Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xa8Cc001D...c77da3D11 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Governance
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; import {IGovernance} from "./IGovernance.sol"; /// @author Matter Labs /// @custom:security-contact [email protected] /// @dev Contract design is inspired by OpenZeppelin TimelockController and in-house Diamond Proxy upgrade mechanism. /// @notice This contract manages operations (calls with preconditions) for governance tasks. /// The contract allows for operations to be scheduled, executed, and canceled with /// appropriate permissions and delays. It is used for managing and coordinating upgrades /// and changes in all zkSync hyperchain governed contracts. /// /// Operations can be proposed as either fully transparent upgrades with on-chain data, /// or "shadow" upgrades where upgrade data is not published on-chain before execution. Proposed operations /// are subject to a delay before they can be executed, but they can be executed instantly /// with the security council’s permission. contract Governance is IGovernance, Ownable2Step { /// @notice A constant representing the timestamp for completed operations. uint256 internal constant EXECUTED_PROPOSAL_TIMESTAMP = uint256(1); /// @notice The address of the security council. /// @dev It is supposed to be multisig contract. address public securityCouncil; /// @notice A mapping to store timestamps when each operation will be ready for execution. /// @dev - 0 means the operation is not created. /// @dev - 1 (EXECUTED_PROPOSAL_TIMESTAMP) means the operation is already executed. /// @dev - any other value means timestamp in seconds when the operation will be ready for execution. mapping(bytes32 operationId => uint256 executionTimestamp) public timestamps; /// @notice The minimum delay in seconds for operations to be ready for execution. uint256 public minDelay; /// @notice Initializes the contract with the admin address, security council address, and minimum delay. /// @param _admin The address to be assigned as the admin of the contract. /// @param _securityCouncil The address to be assigned as the security council of the contract. /// @param _minDelay The initial minimum delay (in seconds) to be set for operations. constructor(address _admin, address _securityCouncil, uint256 _minDelay) { require(_admin != address(0), "Admin should be non zero address"); _transferOwnership(_admin); securityCouncil = _securityCouncil; emit ChangeSecurityCouncil(address(0), _securityCouncil); minDelay = _minDelay; emit ChangeMinDelay(0, _minDelay); } /*////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ /// @notice Checks that the message sender is contract itself. modifier onlySelf() { require(msg.sender == address(this), "Only governance contract itself is allowed to call this function"); _; } /// @notice Checks that the message sender is an active security council. modifier onlySecurityCouncil() { require(msg.sender == securityCouncil, "Only security council is allowed to call this function"); _; } /// @notice Checks that the message sender is an active owner or an active security council. modifier onlyOwnerOrSecurityCouncil() { require( msg.sender == owner() || msg.sender == securityCouncil, "Only the owner and security council are allowed to call this function" ); _; } /*////////////////////////////////////////////////////////////// OPERATION GETTERS //////////////////////////////////////////////////////////////*/ /// @dev Returns whether an id corresponds to a registered operation. This /// includes Waiting, Ready, and Done operations. function isOperation(bytes32 _id) public view returns (bool) { return getOperationState(_id) != OperationState.Unset; } /// @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". function isOperationPending(bytes32 _id) public view returns (bool) { OperationState state = getOperationState(_id); return state == OperationState.Waiting || state == OperationState.Ready; } /// @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". function isOperationReady(bytes32 _id) public view returns (bool) { return getOperationState(_id) == OperationState.Ready; } /// @dev Returns whether an operation is done or not. function isOperationDone(bytes32 _id) public view returns (bool) { return getOperationState(_id) == OperationState.Done; } /// @dev Returns operation state. function getOperationState(bytes32 _id) public view returns (OperationState) { uint256 timestamp = timestamps[_id]; if (timestamp == 0) { return OperationState.Unset; } else if (timestamp == EXECUTED_PROPOSAL_TIMESTAMP) { return OperationState.Done; } else if (timestamp > block.timestamp) { return OperationState.Waiting; } else { return OperationState.Ready; } } /*////////////////////////////////////////////////////////////// SCHEDULING CALLS //////////////////////////////////////////////////////////////*/ /// @notice Propose a fully transparent upgrade, providing upgrade data on-chain. /// @notice The owner will be able to execute the proposal either: /// - With a `delay` timelock on its own. /// - With security council instantly. /// @dev Only the current owner can propose an upgrade. /// @param _operation The operation parameters will be executed with the upgrade. /// @param _delay The delay time (in seconds) after which the proposed upgrade can be executed by the owner. function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { bytes32 id = hashOperation(_operation); _schedule(id, _delay); emit TransparentOperationScheduled(id, _delay, _operation); } /// @notice Propose "shadow" upgrade, upgrade data is not publishing on-chain. /// @notice The owner will be able to execute the proposal either: /// - With a `delay` timelock on its own. /// - With security council instantly. /// @dev Only the current owner can propose an upgrade. /// @param _id The operation hash (see `hashOperation` function) /// @param _delay The delay time (in seconds) after which the proposed upgrade may be executed by the owner. function scheduleShadow(bytes32 _id, uint256 _delay) external onlyOwner { _schedule(_id, _delay); emit ShadowOperationScheduled(_id, _delay); } /*////////////////////////////////////////////////////////////// CANCELING CALLS //////////////////////////////////////////////////////////////*/ /// @dev Cancel the scheduled operation. /// @dev Only owner can call this function. /// @param _id Proposal id value (see `hashOperation`) function cancel(bytes32 _id) external onlyOwner { require(isOperationPending(_id), "Operation must be pending"); delete timestamps[_id]; emit OperationCancelled(_id); } /*////////////////////////////////////////////////////////////// EXECUTING CALLS //////////////////////////////////////////////////////////////*/ /// @notice Executes the scheduled operation after the delay passed. /// @dev Both the owner and security council may execute delayed operations. /// @param _operation The operation parameters will be executed with the upgrade. // slither-disable-next-line reentrancy-eth function execute(Operation calldata _operation) external payable onlyOwnerOrSecurityCouncil { bytes32 id = hashOperation(_operation); // Check if the predecessor operation is completed. _checkPredecessorDone(_operation.predecessor); // Ensure that the operation is ready to proceed. require(isOperationReady(id), "Operation must be ready before execution"); // Execute operation. // slither-disable-next-line reentrancy-eth _execute(_operation.calls); // Reconfirming that the operation is still ready after execution. // This is needed to avoid unexpected reentrancy attacks of re-executing the same operation. require(isOperationReady(id), "Operation must be ready after execution"); // Set operation to be done timestamps[id] = EXECUTED_PROPOSAL_TIMESTAMP; emit OperationExecuted(id); } /// @notice Executes the scheduled operation with the security council instantly. /// @dev Only the security council may execute an operation instantly. /// @param _operation The operation parameters will be executed with the upgrade. // slither-disable-next-line reentrancy-eth function executeInstant(Operation calldata _operation) external payable onlySecurityCouncil { bytes32 id = hashOperation(_operation); // Check if the predecessor operation is completed. _checkPredecessorDone(_operation.predecessor); // Ensure that the operation is in a pending state before proceeding. require(isOperationPending(id), "Operation must be pending before execution"); // Execute operation. // slither-disable-next-line reentrancy-eth _execute(_operation.calls); // Reconfirming that the operation is still pending before execution. // This is needed to avoid unexpected reentrancy attacks of re-executing the same operation. require(isOperationPending(id), "Operation must be pending after execution"); // Set operation to be done timestamps[id] = EXECUTED_PROPOSAL_TIMESTAMP; emit OperationExecuted(id); } /// @dev Returns the identifier of an operation. /// @param _operation The operation object to compute the identifier for. function hashOperation(Operation calldata _operation) public pure returns (bytes32) { return keccak256(abi.encode(_operation)); } /*////////////////////////////////////////////////////////////// HELPERS //////////////////////////////////////////////////////////////*/ /// @dev Schedule an operation that is to become valid after a given delay. /// @param _id The operation hash (see `hashOperation` function) /// @param _delay The delay time (in seconds) after which the proposed upgrade can be executed by the owner. function _schedule(bytes32 _id, uint256 _delay) internal { require(!isOperation(_id), "Operation with this proposal id already exists"); require(_delay >= minDelay, "Proposed delay is less than minimum delay"); timestamps[_id] = block.timestamp + _delay; } /// @dev Execute an operation's calls. /// @param _calls The array of calls to be executed. function _execute(Call[] calldata _calls) internal { for (uint256 i = 0; i < _calls.length; ++i) { // slither-disable-next-line arbitrary-send-eth (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); if (!success) { // Propagate an error if the call fails. assembly { revert(add(returnData, 0x20), mload(returnData)) } } } } /// @notice Verifies if the predecessor operation is completed. /// @param _predecessorId The hash of the operation that should be completed. /// @dev Doesn't check the operation to be complete if the input is zero. function _checkPredecessorDone(bytes32 _predecessorId) internal view { require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); } /*////////////////////////////////////////////////////////////// SELF UPGRADES //////////////////////////////////////////////////////////////*/ /// @dev Changes the minimum timelock duration for future operations. /// @param _newDelay The new minimum delay time (in seconds) for future operations. function updateDelay(uint256 _newDelay) external onlySelf { emit ChangeMinDelay(minDelay, _newDelay); minDelay = _newDelay; } /// @dev Updates the address of the security council. /// @param _newSecurityCouncil The address of the new security council. function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); securityCouncil = _newSecurityCouncil; } /// @dev Contract might receive/hold ETH as part of the maintenance process. receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.24; /// @title Governance contract interface /// @author Matter Labs /// @custom:security-contact [email protected] interface IGovernance { /// @dev This enumeration includes the following states: /// @param Unset Default state, indicating the operation has not been set. /// @param Waiting The operation is scheduled but not yet ready to be executed. /// @param Ready The operation is ready to be executed. /// @param Done The operation has been successfully executed. enum OperationState { Unset, Waiting, Ready, Done } /// @dev Represents a call to be made during an operation. /// @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 operation that Governance executes. /// @param calls An array of `Call` structs, each representing a call to be made during the operation. /// @param predecessor The hash of the predecessor operation, that should be executed before this operation. /// @param salt A bytes32 value used for creating unique operation hashes. struct Operation { Call[] calls; bytes32 predecessor; bytes32 salt; } function isOperation(bytes32 _id) external view returns (bool); function isOperationPending(bytes32 _id) external view returns (bool); function isOperationReady(bytes32 _id) external view returns (bool); function isOperationDone(bytes32 _id) external view returns (bool); function getOperationState(bytes32 _id) external view returns (OperationState); function scheduleTransparent(Operation calldata _operation, uint256 _delay) external; function scheduleShadow(bytes32 _id, uint256 _delay) external; function cancel(bytes32 _id) external; function execute(Operation calldata _operation) external payable; function executeInstant(Operation calldata _operation) external payable; function hashOperation(Operation calldata _operation) external pure returns (bytes32); function updateDelay(uint256 _newDelay) external; function updateSecurityCouncil(address _newSecurityCouncil) external; /// @notice Emitted when transparent operation is scheduled. event TransparentOperationScheduled(bytes32 indexed _id, uint256 delay, Operation _operation); /// @notice Emitted when shadow operation is scheduled. event ShadowOperationScheduled(bytes32 indexed _id, uint256 delay); /// @notice Emitted when the operation is executed with delay or instantly. event OperationExecuted(bytes32 indexed _id); /// @notice Emitted when the security council address is changed. event ChangeSecurityCouncil(address _securityCouncilBefore, address _securityCouncilAfter); /// @notice Emitted when the minimum delay for future operations is modified. event ChangeMinDelay(uint256 _delayBefore, uint256 _delayAfter); /// @notice Emitted when the operation with specified id is cancelled. event OperationCancelled(bytes32 indexed _id); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "murky/=lib/murky/src/", "foundry-test/=test/foundry/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "l2-contracts/=../l2-contracts/contracts/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_securityCouncil","type":"address"},{"internalType":"uint256","name":"_minDelay","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_delayBefore","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_delayAfter","type":"uint256"}],"name":"ChangeMinDelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_securityCouncilBefore","type":"address"},{"indexed":false,"internalType":"address","name":"_securityCouncilAfter","type":"address"}],"name":"ChangeSecurityCouncil","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"OperationCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"OperationExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"delay","type":"uint256"}],"name":"ShadowOperationScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"delay","type":"uint256"},{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IGovernance.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"indexed":false,"internalType":"struct IGovernance.Operation","name":"_operation","type":"tuple"}],"name":"TransparentOperationScheduled","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IGovernance.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct IGovernance.Operation","name":"_operation","type":"tuple"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IGovernance.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct IGovernance.Operation","name":"_operation","type":"tuple"}],"name":"executeInstant","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getOperationState","outputs":[{"internalType":"enum IGovernance.OperationState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IGovernance.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct IGovernance.Operation","name":"_operation","type":"tuple"}],"name":"hashOperation","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"isOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"isOperationDone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"isOperationPending","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"isOperationReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"scheduleShadow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct IGovernance.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"internalType":"struct IGovernance.Operation","name":"_operation","type":"tuple"},{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"scheduleTransparent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"securityCouncil","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"operationId","type":"bytes32"}],"name":"timestamps","outputs":[{"internalType":"uint256","name":"executionTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newDelay","type":"uint256"}],"name":"updateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newSecurityCouncil","type":"address"}],"name":"updateSecurityCouncil","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x608060405260043610610129575f3560e01c80637958004c116100a8578063c126e8601161006d578063c126e8601461032a578063c4d252f514610349578063c63c4e9b14610368578063dbfe3e961461037d578063e30c39781461039c578063f2fde38b146103b9575f80fd5b80637958004c1461028257806379ba5097146102ae5780638da5cb5b146102c257806395218ecd146102de578063b5872958146102f1575f80fd5b8063584b153e116100ee578063584b153e146101fe57806364d623531461021d5780636d1d83631461023c578063715018a61461025b57806374da756b1461026f575f80fd5b806313bc9f201461013457806327eb6c0f146101685780632ab0f5291461019f5780632c431917146101be57806331d50750146101df575f80fd5b3661013057005b5f80fd5b34801561013f575f80fd5b5061015361014e366004610e82565b6103d8565b60405190151581526020015b60405180910390f35b348015610173575f80fd5b50600254610187906001600160a01b031681565b6040516001600160a01b03909116815260200161015f565b3480156101aa575f80fd5b506101536101b9366004610e82565b6103fd565b3480156101c9575f80fd5b506101dd6101d8366004610eaf565b610405565b005b3480156101ea575f80fd5b506101536101f9366004610e82565b610462565b348015610209575f80fd5b50610153610218366004610e82565b610486565b348015610228575f80fd5b506101dd610237366004610e82565b6104cb565b348015610247575f80fd5b506101dd610256366004610ef1565b610534565b348015610266575f80fd5b506101dd610584565b6101dd61027d366004610f11565b610597565b34801561028d575f80fd5b506102a161029c366004610e82565b61076b565b60405161015f9190610f5f565b3480156102b9575f80fd5b506101dd6107b3565b3480156102cd575f80fd5b505f546001600160a01b0316610187565b6101dd6102ec366004610f11565b61082d565b3480156102fc575f80fd5b5061031c61030b366004610e82565b60036020525f908152604090205481565b60405190815260200161015f565b348015610335575f80fd5b5061031c610344366004610f11565b61099b565b348015610354575f80fd5b506101dd610363366004610e82565b6109ca565b348015610373575f80fd5b5061031c60045481565b348015610388575f80fd5b506101dd610397366004610fa0565b610a61565b3480156103a7575f80fd5b506001546001600160a01b0316610187565b3480156103c4575f80fd5b506101dd6103d3366004610fa0565b610ae9565b5f60025b6103e58361076b565b60038111156103f6576103f6610f4b565b1492915050565b5f60036103dc565b61040d610b59565b5f6104178361099b565b90506104238183610bb2565b807f23bc9f5dc037eb49c162fd08c2a4d43dfe70063149e140d502273168da0a062583856040516104559291906110f8565b60405180910390a2505050565b5f8061046d8361076b565b600381111561047e5761047e610f4b565b141592915050565b5f806104918361076b565b905060018160038111156104a7576104a7610f4b565b14806104c4575060028160038111156104c2576104c2610f4b565b145b9392505050565b3330146104f35760405162461bcd60e51b81526004016104ea90611110565b60405180910390fd5b60045460408051918252602082018390527f0c5ff76c31d24175d9e84ef46e328eafbcaeb2aa67a2333035eb082dd34324f1910160405180910390a1600455565b61053c610b59565b6105468282610bb2565b817fbcb40fd953364ec8aed99fa0bd6dcc03103f979efde4744ad7452e556ff20ba68260405161057891815260200190565b60405180910390a25050565b61058c610b59565b6105955f610ca2565b565b5f546001600160a01b03163314806105b957506002546001600160a01b031633145b6106395760405162461bcd60e51b815260206004820152604560248201527f4f6e6c7920746865206f776e657220616e6420736563757269747920636f756e60448201527f63696c2061726520616c6c6f77656420746f2063616c6c20746869732066756e60648201526431ba34b7b760d91b608482015260a4016104ea565b5f6106438261099b565b90506106528260200135610cbb565b61065b816103d8565b6106b85760405162461bcd60e51b815260206004820152602860248201527f4f7065726174696f6e206d757374206265207265616479206265666f726520656044820152673c32b1baba34b7b760c11b60648201526084016104ea565b6106ca6106c5838061116e565b610d24565b6106d3816103d8565b61072f5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e206d75737420626520726561647920616674657220657860448201526632b1baba34b7b760c91b60648201526084016104ea565b5f81815260036020526040808220600190555182917f1277662f4b42b8a4069e99fb5e41ce8919d3c621156090ac08fb11adbcec66f991a25050565b5f8181526003602052604081205480820361078857505f92915050565b600181036107995750600392915050565b428111156107aa5750600192915050565b50600292915050565b60015433906001600160a01b031681146108215760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016104ea565b61082a81610ca2565b50565b6002546001600160a01b031633146108a65760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920736563757269747920636f756e63696c20697320616c6c6f776564604482015275103a379031b0b636103a3434b990333ab731ba34b7b760511b60648201526084016104ea565b5f6108b08261099b565b90506108bf8260200135610cbb565b6108c881610486565b6109275760405162461bcd60e51b815260206004820152602a60248201527f4f7065726174696f6e206d7573742062652070656e64696e67206265666f72656044820152691032bc32b1baba34b7b760b11b60648201526084016104ea565b6109346106c5838061116e565b61093d81610486565b61072f5760405162461bcd60e51b815260206004820152602960248201527f4f7065726174696f6e206d7573742062652070656e64696e672061667465722060448201526832bc32b1baba34b7b760b91b60648201526084016104ea565b5f816040516020016109ad91906111bb565b604051602081830303815290604052805190602001209050919050565b6109d2610b59565b6109db81610486565b610a275760405162461bcd60e51b815260206004820152601960248201527f4f7065726174696f6e206d7573742062652070656e64696e670000000000000060448201526064016104ea565b5f818152600360205260408082208290555182917fcf0f63b97f3387253cbc0bde884f975df77e39184dc3280c2c81be495f58eef491a250565b333014610a805760405162461bcd60e51b81526004016104ea90611110565b600254604080516001600160a01b03928316815291831660208301527fe55ac8ae7914efca1278b8ed4ae21728d06ad9f6e7637bb2c905aacf2a6f5951910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b610af1610b59565b600180546001600160a01b0383166001600160a01b03199091168117909155610b215f546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f546001600160a01b031633146105955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104ea565b610bbb82610462565b15610c1f5760405162461bcd60e51b815260206004820152602e60248201527f4f7065726174696f6e207769746820746869732070726f706f73616c2069642060448201526d616c72656164792065786973747360901b60648201526084016104ea565b600454811015610c835760405162461bcd60e51b815260206004820152602960248201527f50726f706f7365642064656c6179206973206c657373207468616e206d696e696044820152686d756d2064656c617960b81b60648201526084016104ea565b610c8d81426111cd565b5f928352600360205260409092209190915550565b600180546001600160a01b031916905561082a81610e33565b801580610ccc5750610ccc816103fd565b61082a5760405162461bcd60e51b815260206004820152602360248201527f5072656465636573736f72206f7065726174696f6e206e6f7420636f6d706c656044820152621d195960ea1b60648201526084016104ea565b5f5b81811015610e2e575f80848484818110610d4257610d426111f2565b9050602002810190610d549190611206565b610d62906020810190610fa0565b6001600160a01b0316858585818110610d7d57610d7d6111f2565b9050602002810190610d8f9190611206565b60200135868686818110610da557610da56111f2565b9050602002810190610db79190611206565b610dc5906040810190611224565b604051610dd3929190611267565b5f6040518083038185875af1925050503d805f8114610e0d576040519150601f19603f3d011682016040523d82523d5f602084013e610e12565b606091505b509150915081610e2457805160208201fd5b5050600101610d26565b505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208284031215610e92575f80fd5b5035919050565b5f60608284031215610ea9575f80fd5b50919050565b5f8060408385031215610ec0575f80fd5b823567ffffffffffffffff811115610ed6575f80fd5b610ee285828601610e99565b95602094909401359450505050565b5f8060408385031215610f02575f80fd5b50508035926020909101359150565b5f60208284031215610f21575f80fd5b813567ffffffffffffffff811115610f37575f80fd5b610f4384828501610e99565b949350505050565b634e487b7160e01b5f52602160045260245ffd5b6020810160048310610f7f57634e487b7160e01b5f52602160045260245ffd5b91905290565b80356001600160a01b0381168114610f9b575f80fd5b919050565b5f60208284031215610fb0575f80fd5b6104c482610f85565b5f60608084018335601e19853603018112610fd2575f80fd5b84018035602080830167ffffffffffffffff80841115610ff0575f80fd5b8360051b803603831315611002575f80fd5b60608b52958490526080958a018601868b015f36889003607e19015b878210156110d2578d8403607f19018352853581811261103c575f80fd5b89016001600160a01b03611051898301610f85565b168552604080820135898701528c820135603e19833603018112611073575f80fd5b90910181810191908901358781111561108a575f80fd5b803603831315611098575f80fd5b8d82880152808e88015280838e8901375f8782018e015297890197601f01601f19169095018b01945050918601916001919091019061101e565b505050838a0135848c015260408a013560408c0152809850505050505050505092915050565b828152604060208201525f610f436040830184610fb9565b602080825260409082018190527f4f6e6c7920676f7665726e616e636520636f6e747261637420697473656c6620908201527f697320616c6c6f77656420746f2063616c6c20746869732066756e6374696f6e606082015260800190565b5f808335601e19843603018112611183575f80fd5b83018035915067ffffffffffffffff82111561119d575f80fd5b6020019150600581901b36038213156111b4575f80fd5b9250929050565b602081525f6104c46020830184610fb9565b808201808211156111ec57634e487b7160e01b5f52601160045260245ffd5b92915050565b634e487b7160e01b5f52603260045260245ffd5b5f8235605e1983360301811261121a575f80fd5b9190910192915050565b5f808335601e19843603018112611239575f80fd5b83018035915067ffffffffffffffff821115611253575f80fd5b6020019150368190038213156111b4575f80fd5b818382375f910190815291905056fea264697066735822122031c77cb909f65d0b7f4ceae2724f18477d2dbecf2a684afd8ae4f330af22c06364736f6c63430008180033
Loading...
Loading
[ 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.