Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 9 from a total of 9 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Cancel L2Governo... | 6642500 | 461 days ago | IN | 0.001 ETH | 0.00489914 | ||||
| Cancel L2Governo... | 6642495 | 461 days ago | IN | 0.001 ETH | 0.00455113 | ||||
| Cancel L2Governo... | 6620035 | 465 days ago | IN | 0.02 ETH | 0.00159923 | ||||
| Cancel L2Governo... | 6613680 | 466 days ago | IN | 0.002 ETH | 0.00219505 | ||||
| Cancel L2Governo... | 6613484 | 466 days ago | IN | 0.001 ETH | 0.00204687 | ||||
| Cancel L2Governo... | 6613476 | 466 days ago | IN | 0.001 ETH | 0.0022183 | ||||
| Cancel L2Governo... | 6581112 | 471 days ago | IN | 0.001 ETH | 0.0078649 | ||||
| Cancel L2Governo... | 6576159 | 472 days ago | IN | 0.001 ETH | 0.0020939 | ||||
| Approve Upgrade ... | 6499627 | 484 days ago | IN | 0 ETH | 0.00117729 |
Latest 9 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
To
|
Amount
|
||
|---|---|---|---|---|---|---|---|
| Request L2Transa... | 6642500 | 461 days ago | 0.001 ETH | ||||
| Request L2Transa... | 6642495 | 461 days ago | 0.001 ETH | ||||
| Request L2Transa... | 6620035 | 465 days ago | 0.02 ETH | ||||
| Request L2Transa... | 6613680 | 466 days ago | 0.002 ETH | ||||
| Request L2Transa... | 6613484 | 466 days ago | 0.001 ETH | ||||
| Request L2Transa... | 6613476 | 466 days ago | 0.001 ETH | ||||
| Request L2Transa... | 6581112 | 471 days ago | 0.001 ETH | ||||
| Request L2Transa... | 6576159 | 472 days ago | 0.001 ETH | ||||
| 0x6101c060 | 6461475 | 490 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Guardians
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import {IGuardians} from "./interfaces/IGuardians.sol";
import {IZKsyncEra} from "./interfaces/IZKsyncEra.sol";
import {IL2Governor} from "./interfaces/IL2Governor.sol";
import {IProtocolUpgradeHandler} from "./interfaces/IProtocolUpgradeHandler.sol";
import {Multisig} from "./Multisig.sol";
/// @title Guadians
/// @author Matter Labs
/// @custom:security-contact [email protected]
/// @dev Temporary protector of the values of ZKsync. They can approve upgrade changes proposed by the Token Assembly, propose & cancel
/// L2 proposals as well as extend the legal veto period of L1 upgrade proposals through the `ProtocolUpgradeHandler`.
contract Guardians is IGuardians, Multisig, EIP712 {
/// @notice Address of the contract, which manages protocol upgrades.
IProtocolUpgradeHandler public immutable PROTOCOL_UPGRADE_HANDLER;
/// @dev ZKsync smart contract that used to operate with L2 via asynchronous L2 <-> L1 communication.
IZKsyncEra public immutable ZKSYNC_ERA;
/// @dev EIP-712 TypeHash for extending the legal veto period by the guardians.
bytes32 internal constant EXTEND_LEGAL_VETO_PERIOD_TYPEHASH = keccak256("ExtendLegalVetoPeriod(bytes32 id)");
/// @dev EIP-712 TypeHash for protocol upgrades approval by the guardians.
bytes32 internal constant APPROVE_UPGRADE_GUARDIANS_TYPEHASH = keccak256("ApproveUpgradeGuardians(bytes32 id)");
/// @dev EIP-712 TypeHash for canceling the L2 proposals by the guardians.
bytes32 internal constant CANCEL_L2_GOVERNOR_PROPOSAL_TYPEHASH = keccak256(
"CancelL2GovernorProposal(uint256 l2ProposalId,address l2GovernorAddress,uint256 l2GasLimit,uint256 l2GasPerPubdataByteLimit,address refundRecipient,uint256 txMintValue,uint256 nonce)"
);
/// @dev EIP-712 TypeHash for proposing the L2 proposals by the guardians.
bytes32 internal constant PROPOSE_L2_GOVERNOR_PROPOSAL_TYPEHASH = keccak256(
"ProposeL2GovernorProposal(uint256 l2ProposalId,address l2GovernorAddress,uint256 l2GasLimit,uint256 l2GasPerPubdataByteLimit,address refundRecipient,uint256 txMintValue,uint256 nonce)"
);
/// @dev The number of signatures needed to approve the upgrade by guardians.
uint256 public constant APPROVE_UPGRADE_GUARDIANS_THRESHOLD = 5;
/// @dev The number of signatures needed to extend the legal veto period for the upgrade.
uint256 public constant EXTEND_LEGAL_VETO_THRESHOLD = 2;
/// @dev The number of signatures needed to cancel the proposal on one of the L2 Governors.
uint256 public constant CANCEL_L2_GOVERNOR_PROPOSAL_THRESHOLD = 5;
/// @dev The number of signatures needed to propose the proposal on one of the L2 Governors.
uint256 public constant PROPOSE_L2_GOVERNOR_PROPOSAL_THRESHOLD = 5;
/// @dev Tracks the unique identifier used in the last `cancelL2GovernorProposal`/`proposeL2GovernorProposal` to ensure replay attack protection.
uint256 public nonce;
/// @dev Initializes the Guardians contract with predefined members and setup for EIP-712.
/// @param _protocolUpgradeHandler The address of the protocol upgrade handler contract, responsible for executing the upgrades.
/// @param _members Array of addresses representing the members of the guardians.
/// Expected to be sorted in ascending order without duplicates.
constructor(IProtocolUpgradeHandler _protocolUpgradeHandler, IZKsyncEra _ZKsyncEra, address[] memory _members)
Multisig(_members, 5)
EIP712("Guardians", "1")
{
PROTOCOL_UPGRADE_HANDLER = _protocolUpgradeHandler;
ZKSYNC_ERA = _ZKsyncEra;
require(_members.length == 8, "Guardians requires exactly 8 members");
}
/// @notice Extends legal veto period for ZKsync protocol upgrade, by the 2 out of 8 Guardians approvals.
/// @param _id The unique identifier of the upgrade proposal.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from the guardians approving the extend.
function extendLegalVeto(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures) external {
bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(EXTEND_LEGAL_VETO_PERIOD_TYPEHASH, _id)));
checkSignatures(digest, _signers, _signatures, EXTEND_LEGAL_VETO_THRESHOLD);
PROTOCOL_UPGRADE_HANDLER.extendLegalVeto(_id);
}
/// @notice Approves ZKsync protocol upgrade, by the 5 out of 8 Guardians approvals.
/// @param _id The unique identifier of the upgrade proposal.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from the guardians approving the upgrade.
function approveUpgradeGuardians(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures) external {
bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(APPROVE_UPGRADE_GUARDIANS_TYPEHASH, _id)));
checkSignatures(digest, _signers, _signatures, APPROVE_UPGRADE_GUARDIANS_THRESHOLD);
PROTOCOL_UPGRADE_HANDLER.approveUpgradeGuardians(_id);
}
/// @notice Cancel ZKsync proposal in one of the L2 governors, by the 5 of 8 Guardians approvals.
/// @param _l2Proposal The L2 governor proposal to be canceled.
/// @param _txRequest The L1 -> L2 transaction parameters needed to request execution on L2.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from the guardians approving the upgrade.
function cancelL2GovernorProposal(
L2GovernorProposal calldata _l2Proposal,
TxRequest calldata _txRequest,
address[] calldata _signers,
bytes[] calldata _signatures
) external payable {
bytes32 digest = _hashTypedDataV4(
keccak256(
abi.encode(
CANCEL_L2_GOVERNOR_PROPOSAL_TYPEHASH,
hashL2Proposal(_l2Proposal),
_txRequest.to,
_txRequest.l2GasLimit,
_txRequest.l2GasPerPubdataByteLimit,
_txRequest.refundRecipient,
_txRequest.txMintValue,
nonce++
)
)
);
checkSignatures(digest, _signers, _signatures, CANCEL_L2_GOVERNOR_PROPOSAL_THRESHOLD);
bytes memory cancelCalldata = abi.encodeCall(
IL2Governor.cancel,
(_l2Proposal.targets, _l2Proposal.values, _l2Proposal.calldatas, keccak256(bytes(_l2Proposal.description)))
);
ZKSYNC_ERA.requestL2Transaction{value: _txRequest.txMintValue}(
_txRequest.to,
0,
cancelCalldata,
_txRequest.l2GasLimit,
_txRequest.l2GasPerPubdataByteLimit,
new bytes[](0),
_txRequest.refundRecipient
);
}
/// @notice Propose ZKsync proposal on one the L2 governors, by the 5 of 8 Guardians approvals.
/// @param _l2Proposal The L2 governor proposal to be proposed.
/// @param _txRequest The L1 -> L2 transaction parameters needed to request execution on L2.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures from the guardians approving the upgrade.
function proposeL2GovernorProposal(
L2GovernorProposal calldata _l2Proposal,
TxRequest calldata _txRequest,
address[] calldata _signers,
bytes[] calldata _signatures
) external payable {
bytes32 digest = _hashTypedDataV4(
keccak256(
abi.encode(
PROPOSE_L2_GOVERNOR_PROPOSAL_TYPEHASH,
hashL2Proposal(_l2Proposal),
_txRequest.to,
_txRequest.l2GasLimit,
_txRequest.l2GasPerPubdataByteLimit,
_txRequest.refundRecipient,
_txRequest.txMintValue,
nonce++
)
)
);
checkSignatures(digest, _signers, _signatures, PROPOSE_L2_GOVERNOR_PROPOSAL_THRESHOLD);
bytes memory proposeCalldata = abi.encodeCall(
IL2Governor.propose,
(_l2Proposal.targets, _l2Proposal.values, _l2Proposal.calldatas, _l2Proposal.description)
);
ZKSYNC_ERA.requestL2Transaction{value: _txRequest.txMintValue}(
_txRequest.to,
0,
proposeCalldata,
_txRequest.l2GasLimit,
_txRequest.l2GasPerPubdataByteLimit,
new bytes[](0),
_txRequest.refundRecipient
);
}
/// @return proposalId The unique identifier for the L2 proposal in compatible format with L2 Governors.
function hashL2Proposal(L2GovernorProposal calldata _l2Proposal) public pure returns (uint256 proposalId) {
proposalId = uint256(
keccak256(
abi.encode(
_l2Proposal.targets,
_l2Proposal.values,
_l2Proposal.calldatas,
keccak256(bytes(_l2Proposal.description))
)
)
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)
pragma solidity ^0.8.20;
import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../interfaces/IERC5267.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
* encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract
* does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to
* produce the hash of their typed data using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*
* @custom:oz-upgrades-unsafe-allow state-variable-immutable
*/
abstract contract EIP712 is IERC5267 {
using ShortStrings for *;
bytes32 private constant TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _cachedDomainSeparator;
uint256 private immutable _cachedChainId;
address private immutable _cachedThis;
bytes32 private immutable _hashedName;
bytes32 private immutable _hashedVersion;
ShortString private immutable _name;
ShortString private immutable _version;
string private _nameFallback;
string private _versionFallback;
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
_name = name.toShortStringWithFallback(_nameFallback);
_version = version.toShortStringWithFallback(_versionFallback);
_hashedName = keccak256(bytes(name));
_hashedVersion = keccak256(bytes(version));
_cachedChainId = block.chainid;
_cachedDomainSeparator = _buildDomainSeparator();
_cachedThis = address(this);
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
return _cachedDomainSeparator;
} else {
return _buildDomainSeparator();
}
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {IERC-5267}.
*/
function eip712Domain()
public
view
virtual
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
return (
hex"0f", // 01111
_EIP712Name(),
_EIP712Version(),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
/**
* @dev The name parameter for the EIP712 domain.
*
* NOTE: By default this function reads _name which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Name() internal view returns (string memory) {
return _name.toStringWithFallback(_nameFallback);
}
/**
* @dev The version parameter for the EIP712 domain.
*
* NOTE: By default this function reads _version which is an immutable value.
* It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
*/
// solhint-disable-next-line func-name-mixedcase
function _EIP712Version() internal view returns (string memory) {
return _version.toStringWithFallback(_versionFallback);
}
}// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IGuardians { /// @dev Struct for L2 governor proposals parameters. /// @param targets Array of contract addresses to be called. /// @param values Array of ether values (in wei) to send with each call. /// @param calldatas Array of encoded function call data for each target. /// @param description Brief text or hash of the proposal for identification purposes. struct L2GovernorProposal { address[] targets; uint256[] values; bytes[] calldatas; string description; } /// @dev Struct for L1 -> L2 transaction request parameters. /// @param to ZKsync address of the transaction recipient. /// @param l2GasLimit The maximum gas limit for executing this transaction on L2. /// @param l2GasPerPubdataByteLimit Limits the amount of gas per byte of public data on L2. /// @param refundRecipient The L2 address to which any refunds should be sent. /// @param txMintValue The ether minted on L2 in this L1 -> L2 transaction. struct TxRequest { address to; uint256 l2GasLimit; uint256 l2GasPerPubdataByteLimit; address refundRecipient; uint256 txMintValue; } function extendLegalVeto(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures) external; function approveUpgradeGuardians(bytes32 _id, address[] calldata _signers, bytes[] calldata _signatures) external; function cancelL2GovernorProposal( L2GovernorProposal calldata _l2Proposal, TxRequest calldata _txRequest, address[] calldata _signers, bytes[] calldata _signatures ) external payable; function proposeL2GovernorProposal( L2GovernorProposal calldata _l2Proposal, TxRequest calldata _txRequest, address[] calldata _signers, bytes[] calldata _signatures ) external payable; function hashL2Proposal(L2GovernorProposal calldata _l2Proposal) external pure returns (uint256 proposalId); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IZKsyncEra { /// @dev An arbitrary length message passed from L2 /// @notice Under the hood it is `L2Log` sent from the special system L2 contract /// @param txNumberInBatch The L2 transaction number in the batch, in which the message was sent /// @param sender The address of the L2 account from which the message was passed /// @param data An arbitrary length message struct L2Message { uint16 txNumberInBatch; address sender; bytes data; } /// @notice Prove that a specific arbitrary-length message was sent in a specific L2 batch number /// @param _batchNumber The executed L2 batch number in which the message appeared /// @param _index The position in the L2 logs Merkle tree of the l2Log that was sent with the message /// @param _message Information about the sent message: sender address, the message itself, tx index in the L2 batch where the message was sent /// @param _proof Merkle proof for inclusion of L2 log that was sent with the message /// @return Whether the proof is valid function proveL2MessageInclusion( uint256 _batchNumber, uint256 _index, L2Message memory _message, bytes32[] calldata _proof ) external view returns (bool); /// @notice Request execution of L2 transaction from L1. /// @param _contractL2 The L2 receiver address /// @param _l2Value `msg.value` of L2 transaction /// @param _calldata The input of the L2 transaction /// @param _l2GasLimit Maximum amount of L2 gas that transaction can consume during execution on L2 /// @param _l2GasPerPubdataByteLimit The maximum amount L2 gas that the operator may charge the user for single byte of pubdata. /// @param _factoryDeps An array of L2 bytecodes that will be marked as known on L2 /// @param _refundRecipient The address on L2 that will receive the refund for the transaction. /// @dev If the L2 deposit finalization transaction fails, the `_refundRecipient` will receive the `_l2Value`. /// Please note, the contract may change the refund recipient's address to eliminate sending funds to addresses out of control. /// - If `_refundRecipient` is a contract on L1, the refund will be sent to the aliased `_refundRecipient`. /// - If `_refundRecipient` is set to `address(0)` and the sender has NO deployed bytecode on L1, the refund will be sent to the `msg.sender` address. /// - If `_refundRecipient` is set to `address(0)` and the sender has deployed bytecode on L1, the refund will be sent to the aliased `msg.sender` address. /// @dev The address aliasing of L1 contracts as refund recipient on L2 is necessary to guarantee that the funds are controllable, /// since address aliasing to the from address for the L2 tx will be applied if the L1 `msg.sender` is a contract. /// Without address aliasing for L1 contracts as refund recipients they would not be able to make proper L2 tx requests /// through the Mailbox to use or withdraw the funds from L2, and the funds would be lost. function requestL2Transaction( address _contractL2, uint256 _l2Value, bytes calldata _calldata, uint256 _l2GasLimit, uint256 _l2GasPerPubdataByteLimit, bytes[] calldata _factoryDeps, address _refundRecipient ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IL2Governor { function cancel( address[] memory _targets, uint256[] memory _values, bytes[] memory _calldatas, bytes32 _descriptionHash ) external; function propose( address[] memory _targets, uint256[] memory _values, bytes[] memory _calldatas, string memory _description ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @author Matter Labs /// @custom:security-contact [email protected] interface IProtocolUpgradeHandler { /// @dev This enumeration includes the following states: /// @param None Default state, indicating the upgrade has not been set. /// @param LegalVetoPeriod The upgrade passed L2 voting process but it is waiting for the legal veto period. /// @param Waiting The upgrade passed Legal Veto period but it is waiting for the approval from guardians or Security Council. /// @param ExecutionPending The upgrade proposal is waiting for the delay period before being ready for execution. /// @param Ready The upgrade proposal is ready to be executed. /// @param Expired The upgrade proposal was expired. /// @param Done The upgrade has been successfully executed. enum UpgradeState { None, LegalVetoPeriod, Waiting, ExecutionPending, Ready, Expired, Done } /// @dev Represents the status of an upgrade process, including the creation timestamp and actions made by guardians and Security Council. /// @param creationTimestamp The timestamp (in seconds) when the upgrade state was created. /// @param securityCouncilApprovalTimestamp The timestamp (in seconds) when Security Council approved the upgrade. /// @param guardiansApproval Indicates whether the upgrade has been approved by the guardians. /// @param guardiansExtendedLegalVeto Indicates whether guardians extended the legal veto period. /// @param executed Indicates whether the proposal is executed or not. struct UpgradeStatus { uint48 creationTimestamp; uint48 securityCouncilApprovalTimestamp; bool guardiansApproval; bool guardiansExtendedLegalVeto; bool executed; } /// @dev Represents a call to be made during an upgrade. /// @param target The address to which the call will be made. /// @param value The amount of Ether (in wei) to be sent along with the call. /// @param data The calldata to be executed on the `target` address. struct Call { address target; uint256 value; bytes data; } /// @dev Defines the structure of an upgrade that is executed by Protocol Upgrade Handler. /// @param executor The L1 address that is authorized to perform the upgrade execution (if address(0) then anyone). /// @param calls An array of `Call` structs, each representing a call to be made during the upgrade execution. /// @param salt A bytes32 value used for creating unique upgrade proposal hashes. struct UpgradeProposal { Call[] calls; address executor; bytes32 salt; } /// @dev This enumeration includes the following states: /// @param None Default state, indicating the freeze has not been happening in this upgrade cycle. /// @param Soft The protocol is/was frozen for the short time. /// @param Hard The protocol is/was frozen for the long time. /// @param AfterSoftFreeze The protocol was soft frozen, it can be hard frozen in this upgrade cycle. /// @param AfterHardFreeze The protocol was hard frozen, but now it can't be frozen until the upgrade. enum FreezeStatus { None, Soft, Hard, AfterSoftFreeze, AfterHardFreeze } function startUpgrade( uint256 _l2BatchNumber, uint256 _l2MessageIndex, uint16 _l2TxNumberInBatch, bytes32[] calldata _proof, UpgradeProposal calldata _proposal ) external; function extendLegalVeto(bytes32 _id) external; function approveUpgradeSecurityCouncil(bytes32 _id) external; function approveUpgradeGuardians(bytes32 _id) external; function execute(UpgradeProposal calldata _proposal) external payable; function executeEmergencyUpgrade(UpgradeProposal calldata _proposal) external payable; function softFreeze() external; function hardFreeze() external; function reinforceFreeze() external; function unfreeze() external; function reinforceFreezeOneChain(uint256 _chainId) external; function reinforceUnfreeze() external; function reinforceUnfreezeOneChain(uint256 _chainId) external; function upgradeState(bytes32 _id) external view returns (UpgradeState); function updateSecurityCouncil(address _newSecurityCouncil) external; function updateGuardians(address _newGuardians) external; function updateEmergencyUpgradeBoard(address _newEmergencyUpgradeBoard) external; /// @notice Emitted when the security council address is changed. event ChangeSecurityCouncil(address indexed _securityCouncilBefore, address indexed _securityCouncilAfter); /// @notice Emitted when the guardians address is changed. event ChangeGuardians(address indexed _guardiansBefore, address indexed _guardiansAfter); /// @notice Emitted when the emergency upgrade board address is changed. event ChangeEmergencyUpgradeBoard( address indexed _emergencyUpgradeBoardBefore, address indexed _emergencyUpgradeBoardAfter ); /// @notice Emitted when upgrade process on L1 is started. event UpgradeStarted(bytes32 indexed _id, UpgradeProposal _proposal); /// @notice Emitted when the legal veto period is extended. event UpgradeLegalVetoExtended(bytes32 indexed _id); /// @notice Emitted when Security Council approved the upgrade. event UpgradeApprovedBySecurityCouncil(bytes32 indexed _id); /// @notice Emitted when Guardians approved the upgrade. event UpgradeApprovedByGuardians(bytes32 indexed _id); /// @notice Emitted when the upgrade is executed. event UpgradeExecuted(bytes32 indexed _id); /// @notice Emitted when the emergency upgrade is executed. event EmergencyUpgradeExecuted(bytes32 indexed _id); /// @notice Emitted when the protocol became soft frozen. event SoftFreeze(uint256 _protocolFrozenUntil); /// @notice Emitted when the protocol became hard frozen. event HardFreeze(uint256 _protocolFrozenUntil); /// @notice Emitted when someone makes an attempt to freeze the protocol when it is frozen already. event ReinforceFreeze(); /// @notice Emitted when the protocol became active after the soft/hard freeze. event Unfreeze(); /// @notice Emitted when someone makes an attempt to freeze the specific chain when the protocol is frozen already. event ReinforceFreezeOneChain(uint256 _chainId); /// @notice Emitted when someone makes an attempt to unfreeze the protocol when it is unfrozen already. event ReinforceUnfreeze(); /// @notice Emitted when someone makes an attempt to unfreeze the specific chain when the protocol is unfrozen already. event ReinforceUnfreezeOneChain(uint256 _chainId); }
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";
/// @title Multisig
/// @dev An abstract contract implementing a basic multisig wallet functionality.
/// This contract allows a group of members to collectively authorize actions
/// by submitting a threshold number of valid signatures.
/// @author Matter Labs
/// @custom:security-contact [email protected]
abstract contract Multisig is IERC1271 {
using SignatureChecker for address;
/// @notice List of addresses authorized as members of the multisig.
address[] public members;
/// @notice The threshold for EIP-1271 signature verification.
uint256 public immutable EIP1271_THRESHOLD;
/// @dev Initializes the contract by setting the sorted list of multisig members.
/// Members must be unique and sorted in ascending order to ensure efficient
/// signature verification.
/// @param _members Array of addresses to be set as multisig members.
/// Expected to be sorted without duplicates.
/// @param _eip1271Threshold The threshold for EIP-1271 signature verification.
constructor(address[] memory _members, uint256 _eip1271Threshold) {
require(_eip1271Threshold > 0, "EIP-1271 threshold is too small");
require(_eip1271Threshold <= _members.length, "EIP-1271 threshold is too big");
EIP1271_THRESHOLD = _eip1271Threshold;
address lastAddress;
for (uint256 i = 0; i < _members.length; ++i) {
address currentMember = _members[i];
// Ensure the members list is strictly ascending to prevent duplicates and enable efficient signature checks.
require(lastAddress < currentMember, "Members not sorted or duplicate found");
members.push(currentMember);
lastAddress = currentMember;
}
}
/// @dev The function to check if the provided signatures meet the threshold requirement.
/// Signatures must be from unique members and are expected in the same order as the members list (sorted order).
/// @param _digest The hash of the data being signed.
/// @param _signers An array of signers associated with the signatures.
/// @param _signatures An array of signatures to be validated.
/// @param _threshold The minimum number of valid signatures required to pass the check.
function checkSignatures(bytes32 _digest, address[] memory _signers, bytes[] memory _signatures, uint256 _threshold)
public
view
{
// Ensure the total number of signatures meets or exceeds the threshold.
require(_signatures.length >= _threshold, "Insufficient valid signatures");
require(_signers.length == _signatures.length, "Inconsistent signers/signatures length");
uint256 currentMember;
for (uint256 i = 0; i < _signatures.length; ++i) {
bool success = _signers[i].isValidSignatureNow(_digest, _signatures[i]);
require(success, "Signature verification failed");
while (members[currentMember] != _signers[i]) {
currentMember++;
}
currentMember++;
}
}
/// @dev The function to check if the provided signatures are valid and meet predefined threshold.
/// @param _digest The hash of the data being signed.
/// @param _signature An array of signers and signatures to be validated ABI encoded from `address[], bytes[]` to `abi.decode(data,(address[],bytes[]))`.
function isValidSignature(bytes32 _digest, bytes calldata _signature) external view override returns (bytes4) {
(address[] memory signers, bytes[] memory signatures) = abi.decode(_signature, (address[], bytes[]));
checkSignatures(_digest, signers, signatures, EIP1271_THRESHOLD);
return IERC1271.isValidSignature.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)
pragma solidity ^0.8.20;
import {Strings} from "../Strings.sol";
/**
* @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
*
* The library provides methods for generating a hash of a message that conforms to the
* https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
* specifications.
*/
library MessageHashUtils {
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing a bytes32 `messageHash` with
* `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
* keccak256, although any bytes32 value can be safely used because the final digest will
* be re-hashed.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
}
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x45` (`personal_sign` messages).
*
* The digest is calculated by prefixing an arbitrary `message` with
* `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
* hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
*
* See {ECDSA-recover}.
*/
function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
return
keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
}
/**
* @dev Returns the keccak256 digest of an EIP-191 signed data with version
* `0x00` (data with intended validator).
*
* The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
* `validator` address. Then hashing the result.
*
* See {ECDSA-recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(hex"19_00", validator, data));
}
/**
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
*
* The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
* `\x19\x01` and hashing the result. It corresponds to the hash signed by the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
*
* See {ECDSA-recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, hex"19_01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
/// @solidity memory-safe-assembly
assembly {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using
* {setWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)
pragma solidity ^0.8.20;
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/SignatureChecker.sol)
pragma solidity ^0.8.20;
import {ECDSA} from "./ECDSA.sol";
import {IERC1271} from "../../interfaces/IERC1271.sol";
/**
* @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
* signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
* Argent and Safe Wallet (previously Gnosis Safe).
*/
library SignatureChecker {
/**
* @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
* signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
*
* NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
* change through time. It could return true at block N and false at block N+1 (or the opposite).
*/
function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {
(address recovered, ECDSA.RecoverError error, ) = ECDSA.tryRecover(hash, signature);
return
(error == ECDSA.RecoverError.NoError && recovered == signer) ||
isValidERC1271SignatureNow(signer, hash, signature);
}
/**
* @dev Checks if a signature is valid for a given signer and data hash. The signature is validated
* against the signer smart contract using ERC1271.
*
* NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
* change through time. It could return true at block N and false at block N+1 (or the opposite).
*/
function isValidERC1271SignatureNow(
address signer,
bytes32 hash,
bytes memory signature
) internal view returns (bool) {
(bool success, bytes memory result) = signer.staticcall(
abi.encodeCall(IERC1271.isValidSignature, (hash, signature))
);
return (success &&
result.length >= 32 &&
abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1271.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC1271 standard signature validation method for
* contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
*/
interface IERC1271 {
/**
* @dev Should return whether the signature provided is valid for the provided data
* @param hash Hash of the data to be signed
* @param signature Signature byte array associated with _data
*/
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
/**
* @dev The `value` string doesn't fit in the specified `length`.
*/
error StringsInsufficientHexLength(uint256 value, uint256 length);
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = HEX_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
* representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError, bytes32) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"_protocolUpgradeHandler","type":"address"},{"internalType":"contract IZKsyncEra","name":"_ZKsyncEra","type":"address"},{"internalType":"address[]","name":"_members","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"inputs":[],"name":"APPROVE_UPGRADE_GUARDIANS_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANCEL_L2_GOVERNOR_PROPOSAL_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EIP1271_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXTEND_LEGAL_VETO_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSE_L2_GOVERNOR_PROPOSAL_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROTOCOL_UPGRADE_HANDLER","outputs":[{"internalType":"contract IProtocolUpgradeHandler","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZKSYNC_ERA","outputs":[{"internalType":"contract IZKsyncEra","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"approveUpgradeGuardians","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IGuardians.L2GovernorProposal","name":"_l2Proposal","type":"tuple"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"l2GasLimit","type":"uint256"},{"internalType":"uint256","name":"l2GasPerPubdataByteLimit","type":"uint256"},{"internalType":"address","name":"refundRecipient","type":"address"},{"internalType":"uint256","name":"txMintValue","type":"uint256"}],"internalType":"struct IGuardians.TxRequest","name":"_txRequest","type":"tuple"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"cancelL2GovernorProposal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_digest","type":"bytes32"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"checkSignatures","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"extendLegalVeto","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IGuardians.L2GovernorProposal","name":"_l2Proposal","type":"tuple"}],"name":"hashL2Proposal","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_digest","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"members","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IGuardians.L2GovernorProposal","name":"_l2Proposal","type":"tuple"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"l2GasLimit","type":"uint256"},{"internalType":"uint256","name":"l2GasPerPubdataByteLimit","type":"uint256"},{"internalType":"address","name":"refundRecipient","type":"address"},{"internalType":"uint256","name":"txMintValue","type":"uint256"}],"internalType":"struct IGuardians.TxRequest","name":"_txRequest","type":"tuple"},{"internalType":"address[]","name":"_signers","type":"address[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"proposeL2GovernorProposal","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
6101c06040523480156200001257600080fd5b506040516200233a3803806200233a83398101604081905262000035916200040d565b60405180604001604052806009815260200168477561726469616e7360b81b815250604051806040016040528060018152602001603160f81b81525082600560008111620000ca5760405162461bcd60e51b815260206004820152601f60248201527f4549502d31323731207468726573686f6c6420697320746f6f20736d616c6c0060448201526064015b60405180910390fd5b81518111156200011d5760405162461bcd60e51b815260206004820152601d60248201527f4549502d31323731207468726573686f6c6420697320746f6f206269670000006044820152606401620000c1565b60808190526000805b8351811015620002155760008482815181106200014757620001476200050d565b60200260200101519050806001600160a01b0316836001600160a01b031610620001c25760405162461bcd60e51b815260206004820152602560248201527f4d656d62657273206e6f7420736f72746564206f72206475706c696361746520604482015264199bdd5b9960da1b6064820152608401620000c1565b60008054600180820183559180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b0384161790559092500162000126565b506200022992508491506001905062000350565b610140526200023a81600262000350565b61016052815160208084019190912061010052815190820120610120524660c052620002ca6101005161012051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60a05250503060e0526001600160a01b038381166101805282166101a0528051600814620003475760405162461bcd60e51b8152602060048201526024808201527f477561726469616e732072657175697265732065786163746c792038206d656d6044820152636265727360e01b6064820152608401620000c1565b505050620006f6565b60006020835110156200037057620003688362000389565b905062000383565b816200037d8482620005b4565b5060ff90505b92915050565b600080829050601f81511115620003b7578260405163305a27a960e01b8152600401620000c1919062000680565b8051620003c482620006d1565b179392505050565b6001600160a01b0381168114620003e257600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b80516200040881620003cc565b919050565b6000806000606084860312156200042357600080fd5b83516200043081620003cc565b809350506020808501516200044581620003cc565b60408601519093506001600160401b03808211156200046357600080fd5b818701915087601f8301126200047857600080fd5b8151818111156200048d576200048d620003e5565b8060051b604051601f19603f83011681018181108582111715620004b557620004b5620003e5565b60405291825284820192508381018501918a831115620004d457600080fd5b938501935b82851015620004fd57620004ed85620003fb565b84529385019392850192620004d9565b8096505050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806200053857607f821691505b6020821081036200055957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005af576000816000526020600020601f850160051c810160208610156200058a5750805b601f850160051c820191505b81811015620005ab5782815560010162000596565b5050505b505050565b81516001600160401b03811115620005d057620005d0620003e5565b620005e881620005e1845462000523565b846200055f565b602080601f831160018114620006205760008415620006075750858301515b600019600386901b1c1916600185901b178555620005ab565b600085815260208120601f198616915b82811015620006515788860151825594840194600190910190840162000630565b5085821015620006705787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808352835180602085015260005b81811015620006b05785810183015185820160400152820162000692565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620005595760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051611ba56200079560003960008181610311015281816107210152610a7c015260008181610289015281816108d20152610bd101526000610cd601526000610ca401526000610efe01526000610ed601526000610e3101526000610e5b01526000610e850152600081816102dd015261034f0152611ba56000f3fe6080604052600436106100fe5760003560e01c806384b0196e11610095578063b4c77c3b11610064578063b4c77c3b14610277578063bf6b9640146102ab578063cf404b1314610141578063dbf96b80146102cb578063f12913d8146102ff57600080fd5b806384b0196e14610206578063943114d31461022e578063a493872b14610241578063affed0e01461026157600080fd5b80632c46ad8b116100d15780632c46ad8b1461019b5780633bd5402b146101415780635daf08ca146101ae57806369ffe809146101e657600080fd5b80631626ba7e146101035780631729e0df14610141578063194b1ee6146101645780631c9c6a7a14610186575b600080fd5b34801561010f57600080fd5b5061012361011e366004611131565b610333565b6040516001600160e01b031990911681526020015b60405180910390f35b34801561014d57600080fd5b50610156600581565b604051908152602001610138565b34801561017057600080fd5b5061018461017f366004611399565b610385565b005b34801561019257600080fd5b50610156600281565b6101846101a9366004611470565b61056c565b3480156101ba57600080fd5b506101ce6101c9366004611524565b61080d565b6040516001600160a01b039091168152602001610138565b3480156101f257600080fd5b5061018461020136600461153d565b610837565b34801561021257600080fd5b5061021b61093f565b6040516101389796959493929190611606565b61018461023c366004611470565b610985565b34801561024d57600080fd5b5061015661025c36600461169f565b610ab5565b34801561026d57600080fd5b5061015660035481565b34801561028357600080fd5b506101ce7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b757600080fd5b506101846102c636600461153d565b610b2f565b3480156102d757600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000081565b34801561030b57600080fd5b506101ce7f000000000000000000000000000000000000000000000000000000000000000081565b60008080610343848601866116db565b915091506103738683837f0000000000000000000000000000000000000000000000000000000000000000610385565b50630b135d3f60e11b95945050505050565b80825110156103db5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742076616c6964207369676e61747572657300000060448201526064015b60405180910390fd5b815183511461043b5760405162461bcd60e51b815260206004820152602660248201527f496e636f6e73697374656e74207369676e6572732f7369676e617475726573206044820152650d8cadccee8d60d31b60648201526084016103d2565b6000805b835181101561056457600061049a878684815181106104605761046061173e565b602002602001015188858151811061047a5761047a61173e565b60200260200101516001600160a01b0316610c089092919063ffffffff16565b9050806104e95760405162461bcd60e51b815260206004820152601d60248201527f5369676e617475726520766572696669636174696f6e206661696c656400000060448201526064016103d2565b8582815181106104fb576104fb61173e565b60200260200101516001600160a01b03166000848154811061051f5761051f61173e565b6000918252602090912001546001600160a01b03161461054b578261054381611754565b9350506104e9565b8261055581611754565b9350505080600101905061043f565b505050505050565b60006106407f8b11acd0ef1224d9667d505a66919340beb45aa850b9ddef03c49b2b6699314661059b89610ab5565b6105a860208a018a61177b565b60208a013560408b01356105c260808d0160608e0161177b565b6003805460808f01359160006105d783611754565b909155506040805160208101999099528801969096526001600160a01b039485166060880152608087019390935260a086019190915290911660c084015260e0830152610100820152610120015b60405160208183030381529060405280519060200120610c6a565b905061068d818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b6005610385565b600061069988806117a3565b6106a660208b018b6117a3565b6106b360408d018d6117a3565b6106c060608f018f6117ec565b6040516106ce929190611832565b6040519081900381206106e99796959493929160240161197a565b60408051601f19818403018152919052602080820180516001600160e01b03166322908aeb60e11b1790529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063eb6724199060808a01359061075a908b018b61177b565b60008560208d013560408e01358360405190808252806020026020018201604052801561079b57816020015b60608152602001906001900390816107865790505b508f60600160208101906107af919061177b565b6040518963ffffffff1660e01b81526004016107d197969594939291906119cb565b6000604051808303818588803b1580156107ea57600080fd5b505af11580156107fe573d6000803e3d6000fd5b50505050505050505050505050565b6000818154811061081d57600080fd5b6000918252602090912001546001600160a01b0316905081565b604080517ffd23abc4928bc62d877a389de1c4ae2087b8278a8f84c6345bf45308a0d903d6602082015290810186905260009061087690606001610625565b90506108bc818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b604051633a7aece960e11b8152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906374f5d9d2906024015b600060405180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b50505050505050505050565b600060608060008060006060610953610c9d565b61095b610ccf565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60006109b47fce700c5fadc92c997c40ac3e076cb22e2595c19719e6c777b19fc026d7a365d161059b89610ab5565b90506109fa818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b6000610a0688806117a3565b610a1360208b018b6117a3565b610a2060408d018d6117a3565b610a2d60608f018f6117ec565b604051602401610a44989796959493929190611a77565b60408051601f19818403018152919052602080820180516001600160e01b0316633eaf40f160e11b1790529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063eb6724199060808a01359061075a908b018b61177b565b6000610ac182806117a3565b610ace60208501856117a3565b610adb60408701876117a3565b610ae860608901896117ec565b604051610af6929190611832565b604051908190038120610b119796959493929160200161197a565b60408051601f19818403018152919052805160209091012092915050565b604080517feee1550e5990c0bd33af55b02a77f2b470375c86fec5b56614b8580b066c03256020820152908101869052600090610b6e90606001610625565b9050610bbb81868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb49250879150889050611796565b6002610385565b604051632d0a7d0760e21b8152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b429f41c90602401610905565b6000806000610c178585610cfc565b5090925090506000816003811115610c3157610c31611ad7565b148015610c4f5750856001600160a01b0316826001600160a01b0316145b80610c605750610c60868686610d49565b9695505050505050565b6000610c97610c77610e24565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b6060610cca7f00000000000000000000000000000000000000000000000000000000000000006001610f4f565b905090565b6060610cca7f00000000000000000000000000000000000000000000000000000000000000006002610f4f565b60008060008351604103610d365760208401516040850151606086015160001a610d2888828585610ffb565b955095509550505050610d42565b50508151600091506002905b9250925092565b6000806000856001600160a01b03168585604051602401610d6b929190611aed565b60408051601f198184030181529181526020820180516001600160e01b0316630b135d3f60e11b17905251610da09190611b06565b600060405180830381855afa9150503d8060008114610ddb576040519150601f19603f3d011682016040523d82523d6000602084013e610de0565b606091505b5091509150818015610df457506020815110155b8015610c6057508051630b135d3f60e11b90610e199083016020908101908401611b22565b149695505050505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e7d57507f000000000000000000000000000000000000000000000000000000000000000046145b15610ea757507f000000000000000000000000000000000000000000000000000000000000000090565b610cca604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610f6957610f62836110ca565b9050610c97565b818054610f7590611b3b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa190611b3b565b8015610fee5780601f10610fc357610100808354040283529160200191610fee565b820191906000526020600020905b815481529060010190602001808311610fd157829003601f168201915b5050505050905092915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561103657506000915060039050826110c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561108a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110b6575060009250600191508290506110c0565b9250600091508190505b9450945094915050565b606060006110d783611109565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f811115610c9757604051632cd44ac360e21b815260040160405180910390fd5b60008060006040848603121561114657600080fd5b8335925060208401356001600160401b038082111561116457600080fd5b818601915086601f83011261117857600080fd5b81358181111561118757600080fd5b87602082850101111561119957600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156111ea576111ea6111ac565b604052919050565b60006001600160401b0382111561120b5761120b6111ac565b5060051b60200190565b80356001600160a01b038116811461122c57600080fd5b919050565b600082601f83011261124257600080fd5b81356020611257611252836111f2565b6111c2565b8083825260208201915060208460051b87010193508684111561127957600080fd5b602086015b8481101561129c5761128f81611215565b835291830191830161127e565b509695505050505050565b60006112b5611252846111f2565b8381529050602080820190600585901b8401868111156112d457600080fd5b845b818110156113675780356001600160401b03808211156112f65760008081fd5b8188019150601f8a8184011261130c5760008081fd5b82358281111561131e5761131e6111ac565b61132f818301601f191688016111c2565b92508083528b8782860101111561134857600091508182fd5b80878501888501376000908301870152508552509282019282016112d6565b505050509392505050565b600082601f83011261138357600080fd5b611392838335602085016112a7565b9392505050565b600080600080608085870312156113af57600080fd5b8435935060208501356001600160401b03808211156113cd57600080fd5b6113d988838901611231565b945060408701359150808211156113ef57600080fd5b506113fc87828801611372565b949793965093946060013593505050565b60006080828403121561141f57600080fd5b50919050565b60008083601f84011261143757600080fd5b5081356001600160401b0381111561144e57600080fd5b6020830191508360208260051b850101111561146957600080fd5b9250929050565b60008060008060008086880361010081121561148b57600080fd5b87356001600160401b03808211156114a257600080fd5b6114ae8b838c0161140d565b985060a0601f19840112156114c257600080fd5b60208a01975060c08a01359250808311156114dc57600080fd5b6114e88b848c01611425565b909750955060e08a013592508691508083111561150457600080fd5b505061151289828a01611425565b979a9699509497509295939492505050565b60006020828403121561153657600080fd5b5035919050565b60008060008060006060868803121561155557600080fd5b8535945060208601356001600160401b038082111561157357600080fd5b61157f89838a01611425565b9096509450604088013591508082111561159857600080fd5b506115a588828901611425565b969995985093965092949392505050565b60005b838110156115d15781810151838201526020016115b9565b50506000910152565b600081518084526115f28160208601602086016115b6565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261162760e084018a6115da565b8381036040850152611639818a6115da565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561168d57835183529284019291840191600101611671565b50909c9b505050505050505050505050565b6000602082840312156116b157600080fd5b81356001600160401b038111156116c757600080fd5b6116d38482850161140d565b949350505050565b600080604083850312156116ee57600080fd5b82356001600160401b038082111561170557600080fd5b61171186838701611231565b9350602085013591508082111561172757600080fd5b5061173485828601611372565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b60006001820161177457634e487b7160e01b600052601160045260246000fd5b5060010190565b60006020828403121561178d57600080fd5b61139282611215565b60006113923684846112a7565b6000808335601e198436030181126117ba57600080fd5b8301803591506001600160401b038211156117d457600080fd5b6020019150600581901b360382131561146957600080fd5b6000808335601e1984360301811261180357600080fd5b8301803591506001600160401b0382111561181d57600080fd5b60200191503681900382131561146957600080fd5b8183823760009101908152919050565b8183526000602080850194508260005b8581101561187e576001600160a01b0361186b83611215565b1687529582019590820190600101611852565b509495945050505050565b81835260006001600160fb1b038311156118a257600080fd5b8260051b80836020870137939093016020019392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000838385526020808601955060208560051b8301018460005b8781101561196d57848303601f19018952813536889003601e1901811261192457600080fd5b870184810190356001600160401b0381111561193f57600080fd5b80360382131561194e57600080fd5b6119598582846118bb565b9a86019a94505050908301906001016118fe565b5090979650505050505050565b60808152600061198e60808301898b611842565b82810360208401526119a181888a611889565b905082810360408401526119b68186886118e4565b91505082606083015298975050505050505050565b60018060a01b038816815260006020888184015260e060408401526119f360e08401896115da565b87606085015286608085015283810360a08501528086518083528383019150838160051b84010184890160005b83811015611a4e57601f19868403018552611a3c8383516115da565b94870194925090860190600101611a20565b50506001600160a01b03881660c08801529450611a6b9350505050565b98975050505050505050565b608081526000611a8b608083018a8c611842565b8281036020840152611a9e81898b611889565b90508281036040840152611ab38187896118e4565b90508281036060840152611ac88185876118bb565b9b9a5050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b8281526040602082015260006116d360408301846115da565b60008251611b188184602087016115b6565b9190910192915050565b600060208284031215611b3457600080fd5b5051919050565b600181811c90821680611b4f57607f821691505b60208210810361141f57634e487b7160e01b600052602260045260246000fdfea2646970667358221220528cbc22f7152ae703a340406d4289e012bbd7cfc88b349e678b9d283cda6eb364736f6c634300081800330000000000000000000000009b956d242e6806044877c7c1b530d475e371d5440000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000080000000000000000000000002cb0efce4cc4c7592ce0c66b49310a204df811bd00000000000000000000000031ec8dc09c165f9c9b4f555e6fcea1134240bcea0000000000000000000000006221013df1947a920e784f71158502e43b4c4da4000000000000000000000000a91bfdbc9a0f517034625c40d939724fc81b4551000000000000000000000000b86ba00792b49a364016ddb1be56a7ec398f755a000000000000000000000000d0c953c8bf225c16826ead91c66d65c4897cd727000000000000000000000000d282623129a654855fc0ad83cc1ba52b469b2031000000000000000000000000fb5e610df211e3f63e3cc58e35b10e26a4f5aa5f
Deployed Bytecode
0x6080604052600436106100fe5760003560e01c806384b0196e11610095578063b4c77c3b11610064578063b4c77c3b14610277578063bf6b9640146102ab578063cf404b1314610141578063dbf96b80146102cb578063f12913d8146102ff57600080fd5b806384b0196e14610206578063943114d31461022e578063a493872b14610241578063affed0e01461026157600080fd5b80632c46ad8b116100d15780632c46ad8b1461019b5780633bd5402b146101415780635daf08ca146101ae57806369ffe809146101e657600080fd5b80631626ba7e146101035780631729e0df14610141578063194b1ee6146101645780631c9c6a7a14610186575b600080fd5b34801561010f57600080fd5b5061012361011e366004611131565b610333565b6040516001600160e01b031990911681526020015b60405180910390f35b34801561014d57600080fd5b50610156600581565b604051908152602001610138565b34801561017057600080fd5b5061018461017f366004611399565b610385565b005b34801561019257600080fd5b50610156600281565b6101846101a9366004611470565b61056c565b3480156101ba57600080fd5b506101ce6101c9366004611524565b61080d565b6040516001600160a01b039091168152602001610138565b3480156101f257600080fd5b5061018461020136600461153d565b610837565b34801561021257600080fd5b5061021b61093f565b6040516101389796959493929190611606565b61018461023c366004611470565b610985565b34801561024d57600080fd5b5061015661025c36600461169f565b610ab5565b34801561026d57600080fd5b5061015660035481565b34801561028357600080fd5b506101ce7f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d54481565b3480156102b757600080fd5b506101846102c636600461153d565b610b2f565b3480156102d757600080fd5b506101567f000000000000000000000000000000000000000000000000000000000000000581565b34801561030b57600080fd5b506101ce7f0000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef981565b60008080610343848601866116db565b915091506103738683837f0000000000000000000000000000000000000000000000000000000000000005610385565b50630b135d3f60e11b95945050505050565b80825110156103db5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742076616c6964207369676e61747572657300000060448201526064015b60405180910390fd5b815183511461043b5760405162461bcd60e51b815260206004820152602660248201527f496e636f6e73697374656e74207369676e6572732f7369676e617475726573206044820152650d8cadccee8d60d31b60648201526084016103d2565b6000805b835181101561056457600061049a878684815181106104605761046061173e565b602002602001015188858151811061047a5761047a61173e565b60200260200101516001600160a01b0316610c089092919063ffffffff16565b9050806104e95760405162461bcd60e51b815260206004820152601d60248201527f5369676e617475726520766572696669636174696f6e206661696c656400000060448201526064016103d2565b8582815181106104fb576104fb61173e565b60200260200101516001600160a01b03166000848154811061051f5761051f61173e565b6000918252602090912001546001600160a01b03161461054b578261054381611754565b9350506104e9565b8261055581611754565b9350505080600101905061043f565b505050505050565b60006106407f8b11acd0ef1224d9667d505a66919340beb45aa850b9ddef03c49b2b6699314661059b89610ab5565b6105a860208a018a61177b565b60208a013560408b01356105c260808d0160608e0161177b565b6003805460808f01359160006105d783611754565b909155506040805160208101999099528801969096526001600160a01b039485166060880152608087019390935260a086019190915290911660c084015260e0830152610100820152610120015b60405160208183030381529060405280519060200120610c6a565b905061068d818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b6005610385565b600061069988806117a3565b6106a660208b018b6117a3565b6106b360408d018d6117a3565b6106c060608f018f6117ec565b6040516106ce929190611832565b6040519081900381206106e99796959493929160240161197a565b60408051601f19818403018152919052602080820180516001600160e01b03166322908aeb60e11b1790529091506001600160a01b037f0000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef9169063eb6724199060808a01359061075a908b018b61177b565b60008560208d013560408e01358360405190808252806020026020018201604052801561079b57816020015b60608152602001906001900390816107865790505b508f60600160208101906107af919061177b565b6040518963ffffffff1660e01b81526004016107d197969594939291906119cb565b6000604051808303818588803b1580156107ea57600080fd5b505af11580156107fe573d6000803e3d6000fd5b50505050505050505050505050565b6000818154811061081d57600080fd5b6000918252602090912001546001600160a01b0316905081565b604080517ffd23abc4928bc62d877a389de1c4ae2087b8278a8f84c6345bf45308a0d903d6602082015290810186905260009061087690606001610625565b90506108bc818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b604051633a7aece960e11b8152600481018790527f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b0316906374f5d9d2906024015b600060405180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b50505050505050505050565b600060608060008060006060610953610c9d565b61095b610ccf565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60006109b47fce700c5fadc92c997c40ac3e076cb22e2595c19719e6c777b19fc026d7a365d161059b89610ab5565b90506109fa818686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506106869250879150889050611796565b6000610a0688806117a3565b610a1360208b018b6117a3565b610a2060408d018d6117a3565b610a2d60608f018f6117ec565b604051602401610a44989796959493929190611a77565b60408051601f19818403018152919052602080820180516001600160e01b0316633eaf40f160e11b1790529091506001600160a01b037f0000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef9169063eb6724199060808a01359061075a908b018b61177b565b6000610ac182806117a3565b610ace60208501856117a3565b610adb60408701876117a3565b610ae860608901896117ec565b604051610af6929190611832565b604051908190038120610b119796959493929160200161197a565b60408051601f19818403018152919052805160209091012092915050565b604080517feee1550e5990c0bd33af55b02a77f2b470375c86fec5b56614b8580b066c03256020820152908101869052600090610b6e90606001610625565b9050610bbb81868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb49250879150889050611796565b6002610385565b604051632d0a7d0760e21b8152600481018790527f0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5446001600160a01b03169063b429f41c90602401610905565b6000806000610c178585610cfc565b5090925090506000816003811115610c3157610c31611ad7565b148015610c4f5750856001600160a01b0316826001600160a01b0316145b80610c605750610c60868686610d49565b9695505050505050565b6000610c97610c77610e24565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b6060610cca7f477561726469616e7300000000000000000000000000000000000000000000096001610f4f565b905090565b6060610cca7f31000000000000000000000000000000000000000000000000000000000000016002610f4f565b60008060008351604103610d365760208401516040850151606086015160001a610d2888828585610ffb565b955095509550505050610d42565b50508151600091506002905b9250925092565b6000806000856001600160a01b03168585604051602401610d6b929190611aed565b60408051601f198184030181529181526020820180516001600160e01b0316630b135d3f60e11b17905251610da09190611b06565b600060405180830381855afa9150503d8060008114610ddb576040519150601f19603f3d011682016040523d82523d6000602084013e610de0565b606091505b5091509150818015610df457506020815110155b8015610c6057508051630b135d3f60e11b90610e199083016020908101908401611b22565b149695505050505050565b6000306001600160a01b037f000000000000000000000000e95141dd86828d23c2aa8ed518644af5e4216d7916148015610e7d57507f0000000000000000000000000000000000000000000000000000000000aa36a746145b15610ea757507f4401003c236aaac7c12c72f8cc3a3dbd90c33be8236595f88d17cc289f50a2ab90565b610cca604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fd8d06eb9c3e0ffe13f8867f7b026ec7ea7031a8bc4653a6802042ea4460caf0c918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b606060ff8314610f6957610f62836110ca565b9050610c97565b818054610f7590611b3b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa190611b3b565b8015610fee5780601f10610fc357610100808354040283529160200191610fee565b820191906000526020600020905b815481529060010190602001808311610fd157829003601f168201915b5050505050905092915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561103657506000915060039050826110c0565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561108a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110b6575060009250600191508290506110c0565b9250600091508190505b9450945094915050565b606060006110d783611109565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600060ff8216601f811115610c9757604051632cd44ac360e21b815260040160405180910390fd5b60008060006040848603121561114657600080fd5b8335925060208401356001600160401b038082111561116457600080fd5b818601915086601f83011261117857600080fd5b81358181111561118757600080fd5b87602082850101111561119957600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156111ea576111ea6111ac565b604052919050565b60006001600160401b0382111561120b5761120b6111ac565b5060051b60200190565b80356001600160a01b038116811461122c57600080fd5b919050565b600082601f83011261124257600080fd5b81356020611257611252836111f2565b6111c2565b8083825260208201915060208460051b87010193508684111561127957600080fd5b602086015b8481101561129c5761128f81611215565b835291830191830161127e565b509695505050505050565b60006112b5611252846111f2565b8381529050602080820190600585901b8401868111156112d457600080fd5b845b818110156113675780356001600160401b03808211156112f65760008081fd5b8188019150601f8a8184011261130c5760008081fd5b82358281111561131e5761131e6111ac565b61132f818301601f191688016111c2565b92508083528b8782860101111561134857600091508182fd5b80878501888501376000908301870152508552509282019282016112d6565b505050509392505050565b600082601f83011261138357600080fd5b611392838335602085016112a7565b9392505050565b600080600080608085870312156113af57600080fd5b8435935060208501356001600160401b03808211156113cd57600080fd5b6113d988838901611231565b945060408701359150808211156113ef57600080fd5b506113fc87828801611372565b949793965093946060013593505050565b60006080828403121561141f57600080fd5b50919050565b60008083601f84011261143757600080fd5b5081356001600160401b0381111561144e57600080fd5b6020830191508360208260051b850101111561146957600080fd5b9250929050565b60008060008060008086880361010081121561148b57600080fd5b87356001600160401b03808211156114a257600080fd5b6114ae8b838c0161140d565b985060a0601f19840112156114c257600080fd5b60208a01975060c08a01359250808311156114dc57600080fd5b6114e88b848c01611425565b909750955060e08a013592508691508083111561150457600080fd5b505061151289828a01611425565b979a9699509497509295939492505050565b60006020828403121561153657600080fd5b5035919050565b60008060008060006060868803121561155557600080fd5b8535945060208601356001600160401b038082111561157357600080fd5b61157f89838a01611425565b9096509450604088013591508082111561159857600080fd5b506115a588828901611425565b969995985093965092949392505050565b60005b838110156115d15781810151838201526020016115b9565b50506000910152565b600081518084526115f28160208601602086016115b6565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261162760e084018a6115da565b8381036040850152611639818a6115da565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561168d57835183529284019291840191600101611671565b50909c9b505050505050505050505050565b6000602082840312156116b157600080fd5b81356001600160401b038111156116c757600080fd5b6116d38482850161140d565b949350505050565b600080604083850312156116ee57600080fd5b82356001600160401b038082111561170557600080fd5b61171186838701611231565b9350602085013591508082111561172757600080fd5b5061173485828601611372565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b60006001820161177457634e487b7160e01b600052601160045260246000fd5b5060010190565b60006020828403121561178d57600080fd5b61139282611215565b60006113923684846112a7565b6000808335601e198436030181126117ba57600080fd5b8301803591506001600160401b038211156117d457600080fd5b6020019150600581901b360382131561146957600080fd5b6000808335601e1984360301811261180357600080fd5b8301803591506001600160401b0382111561181d57600080fd5b60200191503681900382131561146957600080fd5b8183823760009101908152919050565b8183526000602080850194508260005b8581101561187e576001600160a01b0361186b83611215565b1687529582019590820190600101611852565b509495945050505050565b81835260006001600160fb1b038311156118a257600080fd5b8260051b80836020870137939093016020019392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000838385526020808601955060208560051b8301018460005b8781101561196d57848303601f19018952813536889003601e1901811261192457600080fd5b870184810190356001600160401b0381111561193f57600080fd5b80360382131561194e57600080fd5b6119598582846118bb565b9a86019a94505050908301906001016118fe565b5090979650505050505050565b60808152600061198e60808301898b611842565b82810360208401526119a181888a611889565b905082810360408401526119b68186886118e4565b91505082606083015298975050505050505050565b60018060a01b038816815260006020888184015260e060408401526119f360e08401896115da565b87606085015286608085015283810360a08501528086518083528383019150838160051b84010184890160005b83811015611a4e57601f19868403018552611a3c8383516115da565b94870194925090860190600101611a20565b50506001600160a01b03881660c08801529450611a6b9350505050565b98975050505050505050565b608081526000611a8b608083018a8c611842565b8281036020840152611a9e81898b611889565b90508281036040840152611ab38187896118e4565b90508281036060840152611ac88185876118bb565b9b9a5050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b8281526040602082015260006116d360408301846115da565b60008251611b188184602087016115b6565b9190910192915050565b600060208284031215611b3457600080fd5b5051919050565b600181811c90821680611b4f57607f821691505b60208210810361141f57634e487b7160e01b600052602260045260246000fdfea2646970667358221220528cbc22f7152ae703a340406d4289e012bbd7cfc88b349e678b9d283cda6eb364736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009b956d242e6806044877c7c1b530d475e371d5440000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000080000000000000000000000002cb0efce4cc4c7592ce0c66b49310a204df811bd00000000000000000000000031ec8dc09c165f9c9b4f555e6fcea1134240bcea0000000000000000000000006221013df1947a920e784f71158502e43b4c4da4000000000000000000000000a91bfdbc9a0f517034625c40d939724fc81b4551000000000000000000000000b86ba00792b49a364016ddb1be56a7ec398f755a000000000000000000000000d0c953c8bf225c16826ead91c66d65c4897cd727000000000000000000000000d282623129a654855fc0ad83cc1ba52b469b2031000000000000000000000000fb5e610df211e3f63e3cc58e35b10e26a4f5aa5f
-----Decoded View---------------
Arg [0] : _protocolUpgradeHandler (address): 0x9B956d242e6806044877C7C1B530D475E371d544
Arg [1] : _ZKsyncEra (address): 0x9A6DE0f62Aa270A8bCB1e2610078650D539B1Ef9
Arg [2] : _members (address[]): 0x2CB0Efce4cc4c7592cE0C66B49310A204dF811bd,0x31Ec8dC09C165F9C9b4F555E6fceA1134240bcEA,0x6221013df1947A920E784f71158502E43B4C4dA4,0xa91bFdBc9a0f517034625c40d939724fc81b4551,0xb86Ba00792b49A364016DDB1Be56a7eC398F755a,0xD0c953C8bf225C16826eAD91C66D65c4897CD727,0xD282623129A654855Fc0aD83Cc1BA52B469b2031,0xfB5E610DF211e3F63e3cc58E35B10E26A4f5aa5F
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000009b956d242e6806044877c7c1b530d475e371d544
Arg [1] : 0000000000000000000000009a6de0f62aa270a8bcb1e2610078650d539b1ef9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [4] : 0000000000000000000000002cb0efce4cc4c7592ce0c66b49310a204df811bd
Arg [5] : 00000000000000000000000031ec8dc09c165f9c9b4f555e6fcea1134240bcea
Arg [6] : 0000000000000000000000006221013df1947a920e784f71158502e43b4c4da4
Arg [7] : 000000000000000000000000a91bfdbc9a0f517034625c40d939724fc81b4551
Arg [8] : 000000000000000000000000b86ba00792b49a364016ddb1be56a7ec398f755a
Arg [9] : 000000000000000000000000d0c953c8bf225c16826ead91c66d65c4897cd727
Arg [10] : 000000000000000000000000d282623129a654855fc0ad83cc1ba52b469b2031
Arg [11] : 000000000000000000000000fb5e610df211e3f63e3cc58e35b10e26a4f5aa5f
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.