-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
134 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,11 @@ pragma solidity 0.8.24; | |
|
||
import {IBridgehub} from "./IBridgehub.sol"; | ||
|
||
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
/** | ||
* @author Matter Labs | ||
* @notice MessageRoot contract is responsible for storing and aggregating the roots of the batches from different chains into the MessageRoot. | ||
* @custom:security-contact [email protected] | ||
*/ | ||
interface IMessageRoot { | ||
function BRIDGE_HUB() external view returns (IBridgehub); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import {BaseZkSyncUpgrade, ProposedUpgrade} from "./BaseZkSyncUpgrade.sol"; | |
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
contract DefaultUpgrade is BaseZkSyncUpgrade { | ||
/// @notice The main function that will be called by the upgrade proxy. | ||
/// @notice The main function that will be delegate-called by the chain. | ||
/// @param _proposedUpgrade The upgrade to be executed. | ||
function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { | ||
super.upgrade(_proposedUpgrade); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,14 @@ pragma solidity 0.8.24; | |
|
||
import {ProposedUpgrade} from "./BaseZkSyncUpgrade.sol"; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice Gateway upgrade interface. Used for the protocol upgrade that introduces the Gateway. | ||
*/ | ||
interface IGatewayUpgrade { | ||
/// @notice The upgrade function called from within this same contract | ||
/// @dev This is needed for memory -> calldata conversion of the _upgrade arg. | ||
/// @param _upgrade The upgrade to be executed. | ||
function upgradeExternal(ProposedUpgrade calldata _upgrade) external returns (bytes32); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,32 @@ pragma solidity 0.8.24; | |
|
||
import {L2CanonicalTransaction} from "../common/Messaging.sol"; | ||
|
||
/** | ||
* @author Matter Labs | ||
* @custom:security-contact [email protected] | ||
* @notice L1 genesis upgrade interface. Every chain has to process an upgrade txs at its genesis. | ||
* @notice This is needed to set system params like the chainId and to deploy some system contracts. | ||
*/ | ||
interface IL1GenesisUpgrade { | ||
/// @dev emitted when a chain registers and a GenesisUpgrade happens | ||
/// @param _zkChain the address of the zk chain | ||
/// @param _l2Transaction the l2 genesis upgrade transaction | ||
/// @param _protocolVersion the current protocol version | ||
/// @param _factoryDeps the factory dependencies needed for the upgrade | ||
event GenesisUpgrade( | ||
address indexed _zkChain, | ||
L2CanonicalTransaction _l2Transaction, | ||
uint256 indexed _protocolVersion, | ||
bytes[] _factoryDeps | ||
); | ||
|
||
/// @notice The main function that will be called by the Admin facet at genesis. | ||
/// @param _l1GenesisUpgrade the address of the l1 genesis upgrade | ||
/// @param _chainId the chain id | ||
/// @param _protocolVersion the current protocol version | ||
/// @param _l1CtmDeployerAddress the address of the l1 ctm deployer | ||
/// @param _forceDeployments the force deployments | ||
/// @param _factoryDeps the factory dependencies | ||
function genesisUpgrade( | ||
address _l1GenesisUpgrade, | ||
uint256 _chainId, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,13 @@ import {L1GatewayHelper} from "./L1GatewayHelper.sol"; | |
/// @author Matter Labs | ||
/// @custom:security-contact [email protected] | ||
contract L1GenesisUpgrade is IL1GenesisUpgrade, BaseZkSyncUpgradeGenesis { | ||
/// @notice The main function that will be called by the upgrade proxy. | ||
/// @notice The main function that will be called by the Admin facet. | ||
/// @param _l1GenesisUpgrade the address of the l1 genesis upgrade | ||
/// @param _chainId the chain id | ||
/// @param _protocolVersion the current protocol version | ||
/// @param _l1CtmDeployerAddress the address of the l1 ctm deployer | ||
/// @param _fixedForceDeploymentsData the force deployments data | ||
/// @param _factoryDeps the factory dependencies | ||
function genesisUpgrade( | ||
address _l1GenesisUpgrade, | ||
uint256 _chainId, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.