File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -54,17 +54,9 @@ abstract contract SignetL1 {
5454 }
5555 }
5656
57- /// @notice This is used to know whether to alias. It should generally
58- /// return false. If writing an ephemeral contract, override to return true.
59- function isEphemeral () internal pure virtual returns (bool ) {
60- return false ;
61- }
62-
63- /// @notice Returns
64- function selfOnL2 () internal view returns (address ) {
65- if (isEphemeral ()) {
66- return address (this );
67- }
57+ /// @notice Returns the address of this contract on L2, applying an
58+ /// address alias.
59+ function selfOnL2 () internal view virtual returns (address ) {
6860 if (address (this ).code.length == 23 ) {
6961 bool is7702;
7062 assembly {
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: UNLICENSED
2+ pragma solidity ^ 0.8.13 ;
3+
4+ import {SignetL1} from "./Signet.sol " ;
5+
6+ abstract contract SignetL1Ephemeral is SignetL1 {
7+ function selfOnL2 () internal view override returns (address ) {
8+ return address (this );
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments