Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions specs/ref-impls/src/interfaces/IZone.sol
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ interface IZonePortal {
error NotAdmin();
error NotFactory();
error AlreadyInitialized();
error MustDelegateCall();
error NotPendingSequencer();
error NotPendingAdmin();
error InvalidProof();
Expand Down
10 changes: 10 additions & 0 deletions specs/ref-impls/src/tempo/ZonePortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ contract ZonePortal is IZonePortal {
/// @notice Maximum allowed gas fee rate to prevent overflows
uint128 public constant MAX_GAS_FEE_RATE = 1e18;

/// @dev The fixed account holding the shared portal logic contract runtime.
address internal constant ZONE_PORTAL_LOGIC_ADDRESS =
0x5AD1000000000000000000000000000000000000;
/*//////////////////////////////////////////////////////////////
STORAGE
//////////////////////////////////////////////////////////////*/
Expand Down Expand Up @@ -152,6 +155,7 @@ contract ZonePortal is IZonePortal {
string calldata _rpcUrl
)
external
onlyDelegateCall
{
if (msg.sender != ZONE_FACTORY_ADDRESS) revert NotFactory();
if (_initialized) revert AlreadyInitialized();
Expand All @@ -174,6 +178,12 @@ contract ZonePortal is IZonePortal {
MODIFIERS
//////////////////////////////////////////////////////////////*/

/// @dev Initialization is valid only in a portal proxy's storage context.
modifier onlyDelegateCall() {
if (address(this) == ZONE_PORTAL_LOGIC_ADDRESS) revert MustDelegateCall();
_;
}

modifier onlySequencer() {
if (msg.sender != sequencer) revert NotSequencer();
_;
Expand Down
Loading