Source Code
Overview
CELO Balance
More Info
ContractCreator
Multichain Info
N/A
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
44289773 | 43 hrs ago | 0 CELO | ||||
44289773 | 43 hrs ago | 0 CELO | ||||
44289226 | 43 hrs ago | 0 CELO | ||||
43378471 | 12 days ago | 0 CELO | ||||
43378471 | 12 days ago | 0 CELO | ||||
43377578 | 12 days ago | 0 CELO | ||||
43377578 | 12 days ago | 0 CELO | ||||
43377573 | 12 days ago | 0 CELO | ||||
43377573 | 12 days ago | 0 CELO | ||||
43376675 | 12 days ago | 0 CELO | ||||
43376675 | 12 days ago | 0 CELO | ||||
43375774 | 12 days ago | 0 CELO | ||||
43375774 | 12 days ago | 0 CELO | ||||
43374880 | 12 days ago | 0 CELO | ||||
43374880 | 12 days ago | 0 CELO | ||||
43374875 | 12 days ago | 0 CELO | ||||
43374875 | 12 days ago | 0 CELO | ||||
43373978 | 12 days ago | 0 CELO | ||||
43373978 | 12 days ago | 0 CELO | ||||
43373073 | 12 days ago | 0 CELO | ||||
43373073 | 12 days ago | 0 CELO | ||||
43372179 | 12 days ago | 0 CELO | ||||
43372179 | 12 days ago | 0 CELO | ||||
43371290 | 12 days ago | 0 CELO | ||||
43371290 | 12 days ago | 0 CELO |
Loading...
Loading
Contract Name:
RBACTimelock
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.8.19; import "openzeppelin-contracts/access/AccessControlEnumerable.sol"; import "openzeppelin-contracts/token/ERC721/IERC721Receiver.sol"; import "openzeppelin-contracts/token/ERC1155/IERC1155Receiver.sol"; import "openzeppelin-contracts/utils/Address.sol"; import "openzeppelin-contracts/utils/structs/EnumerableSet.sol"; /** * @notice Contract module which acts as a timelocked controller with role-based * access control. When set as the owner of an `Ownable` smart contract, it * can enforce a timelock on `onlyOwner` maintenance operations and prevent * a list of blocked functions from being called. The timelock can be bypassed * by a bypasser or an admin in emergency situations that require quick action. * * Non-emergency actions are expected to follow the timelock. * * The contract has five roles. Each role can be inhabited by multiple * (potentially overlapping) addresses. * * 1) Admin: The admin manages membership for all roles (including the admin * role itself). The admin automatically inhabits all other roles. The admin * can call the bypasserExecuteBatch function to bypass any restrictions like * the delay imposed by the timelock and the list of blocked functions. The * admin can manage the list of blocked functions. In practice, the admin * role is expected to (1) be inhabited by a contract requiring a secure * quorum of votes before taking any action and (2) to be used rarely, namely * only for emergency actions or configuration of the RBACTimelock. * * 2) Proposer: The proposer can schedule delayed operations that don't use any * blocked function selector. * * 3) Executor: The executor can execute previously scheduled operations once * their delay has expired. The contract enforces that the calls in an * operation are executed with the correct args (target, data, value), but * the executor can freely choose the gas limit. Since the executor is * typically not particularly trusted, we recommend that (transitive) callees * implement standard behavior of simply reverting if insufficient gas is * provided. In particular, this means callees should not have non-reverting * gas-dependent branches. * * 4) Canceller: The canceller can cancel operations that have been scheduled * but not yet executed. * * 5) Bypasser: The bypasser can bypass any restrictions like the delay imposed * by the timelock and the list of blocked functions to immediately execute * operations, e.g. in case of emergencies. * * Note that this contract doesn't place any restrictions on the gas limit used * when executing operations. See the above comment on the executor role for * more details. * * @dev This contract is a modified version of OpenZeppelin's * contracts/governance/TimelockController.sol contract from v4.7.0, accessed in * commit 561d1061fc568f04c7a65853538e834a889751e8 of * github.com/OpenZeppelin/openzeppelin-contracts * Said contract is under "Copyright (c) 2016-2023 zOS Global Limited and * contributors" and its original MIT license can be found at * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/561d1061fc568f04c7a65853538e834a889751e8/LICENSE */ contract RBACTimelock is AccessControlEnumerable, IERC721Receiver, IERC1155Receiver { using EnumerableSet for EnumerableSet.Bytes32Set; struct Call { address target; uint256 value; bytes data; } bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); bytes32 public constant BYPASSER_ROLE = keccak256("BYPASSER_ROLE"); uint256 internal constant _DONE_TIMESTAMP = uint256(1); mapping(bytes32 => uint256) private _timestamps; uint256 private _minDelay; EnumerableSet.Bytes32Set private _blockedFunctionSelectors; /** * @dev Emitted when a call is scheduled as part of operation `id`. */ event CallScheduled( bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt, uint256 delay ); /** * @dev Emitted when a call is performed as part of operation `id`. */ event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when a call is performed via bypasser. */ event BypasserCallExecuted(uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when operation `id` is cancelled. */ event Cancelled(bytes32 indexed id); /** * @dev Emitted when the minimum delay for future operations is modified. */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); /** * @dev Emitted when a function selector is blocked. */ event FunctionSelectorBlocked(bytes4 indexed selector); /** * @dev Emitted when a function selector is unblocked. */ event FunctionSelectorUnblocked(bytes4 indexed selector); /** * @dev Initializes the contract with the following parameters: * * - `minDelay`: initial minimum delay for operations * - `admin`: account to be granted admin role * - `proposers`: accounts to be granted proposer role * - `executors`: accounts to be granted executor role * - `cancellers`: accounts to be granted canceller role * - `bypassers`: accounts to be granted bypasser role */ constructor( uint256 minDelay, address admin, address[] memory proposers, address[] memory executors, address[] memory cancellers, address[] memory bypassers ) { _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); _setRoleAdmin(PROPOSER_ROLE, ADMIN_ROLE); _setRoleAdmin(EXECUTOR_ROLE, ADMIN_ROLE); _setRoleAdmin(CANCELLER_ROLE, ADMIN_ROLE); _setRoleAdmin(BYPASSER_ROLE, ADMIN_ROLE); _setupRole(ADMIN_ROLE, admin); // register proposers for (uint256 i = 0; i < proposers.length; ++i) { _setupRole(PROPOSER_ROLE, proposers[i]); } // register executors for (uint256 i = 0; i < executors.length; ++i) { _setupRole(EXECUTOR_ROLE, executors[i]); } // register cancellers for (uint256 i = 0; i < cancellers.length; ++i) { _setupRole(CANCELLER_ROLE, cancellers[i]); } // register bypassers for (uint256 i = 0; i < bypassers.length; ++i) { _setupRole(BYPASSER_ROLE, bypassers[i]); } _minDelay = minDelay; emit MinDelayChange(0, minDelay); } /** * @dev Modifier to make a function callable only by a certain role or the * admin role. */ modifier onlyRoleOrAdminRole(bytes32 role) { address sender = _msgSender(); if (!hasRole(ADMIN_ROLE, sender)) { _checkRole(role, sender); } _; } /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ receive() external payable {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, AccessControlEnumerable) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns whether an id correspond to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view virtual returns (bool registered) { return getTimestamp(id) > 0; } /** * @dev Returns whether an operation is pending or not. */ function isOperationPending(bytes32 id) public view virtual returns (bool pending) { return getTimestamp(id) > _DONE_TIMESTAMP; } /** * @dev Returns whether an operation is ready or not. */ function isOperationReady(bytes32 id) public view virtual returns (bool ready) { uint256 timestamp = getTimestamp(id); return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; } /** * @dev Returns whether an operation is done or not. */ function isOperationDone(bytes32 id) public view virtual returns (bool done) { return getTimestamp(id) == _DONE_TIMESTAMP; } /** * @dev Returns the timestamp at with an operation becomes ready (0 for * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) { return _timestamps[id]; } /** * @dev Returns the minimum delay for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256 duration) { return _minDelay; } /** * @dev Returns the identifier of an operation containing a batch of * transactions. */ function hashOperationBatch( Call[] calldata calls, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { return keccak256(abi.encode(calls, predecessor, salt)); } /** * @dev Schedule an operation containing a batch of transactions. * * Emits one {CallScheduled} event per transaction in the batch. * * Requirements: * * - the caller must have the 'proposer' or 'admin' role. * - all payloads must not start with a blocked function selector. */ function scheduleBatch( Call[] calldata calls, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRoleOrAdminRole(PROPOSER_ROLE) { bytes32 id = hashOperationBatch(calls, predecessor, salt); _schedule(id, delay); for (uint256 i = 0; i < calls.length; ++i) { _checkFunctionSelectorNotBlocked(calls[i].data); emit CallScheduled(id, i, calls[i].target, calls[i].value, calls[i].data, predecessor, salt, delay); } } /** * @dev Schedule an operation that becomes valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { require(!isOperation(id), "RBACTimelock: operation already scheduled"); require(delay >= getMinDelay(), "RBACTimelock: insufficient delay"); _timestamps[id] = block.timestamp + delay; } /** * @dev Cancel an operation. * * Requirements: * * - the caller must have the 'canceller' or 'admin' role. */ function cancel(bytes32 id) public virtual onlyRoleOrAdminRole(CANCELLER_ROLE) { require(isOperationPending(id), "RBACTimelock: operation cannot be cancelled"); delete _timestamps[id]; emit Cancelled(id); } /** * @dev Execute an (ready) operation containing a batch of transactions. * Note that we perform a raw call to each target. Raw calls to targets that * don't have associated contract code will always succeed regardless of * payload. * * Emits one {CallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'executor' or 'admin' role. */ function executeBatch( Call[] calldata calls, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrAdminRole(EXECUTOR_ROLE) { bytes32 id = hashOperationBatch(calls, predecessor, salt); _beforeCall(id, predecessor); for (uint256 i = 0; i < calls.length; ++i) { _execute(calls[i]); emit CallExecuted(id, i, calls[i].target, calls[i].value, calls[i].data); } _afterCall(id); } /** * @dev Execute an operation's call. */ function _execute( Call calldata call ) internal virtual { (bool success, ) = call.target.call{value: call.value}(call.data); require(success, "RBACTimelock: underlying transaction reverted"); } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { require(isOperationReady(id), "RBACTimelock: operation is not ready"); require(predecessor == bytes32(0) || isOperationDone(predecessor), "RBACTimelock: missing dependency"); } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { require(isOperationReady(id), "RBACTimelock: operation is not ready"); _timestamps[id] = _DONE_TIMESTAMP; } /** * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. * * Requirements: * * - the caller must have the 'admin' role. */ function updateDelay(uint256 newDelay) external virtual onlyRole(ADMIN_ROLE) { emit MinDelayChange(_minDelay, newDelay); _minDelay = newDelay; } /** * @dev See {IERC721Receiver-onERC721Received}. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } /** * @dev See {IERC1155Receiver-onERC1155Received}. */ function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } /** * @dev See {IERC1155Receiver-onERC1155BatchReceived}. */ function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } /* * New functions not present in original OpenZeppelin TimelockController */ /** * @dev Blocks a function selector from being used, i.e. schedule * operations with this function selector will revert. * Note that blocked selectors are only checked when an operation is being * scheduled, not when it is executed. You may want to check any pending * operations for whether they contain the blocked selector and cancel them. * * Requirements: * * - the caller must have the 'admin' role. */ function blockFunctionSelector(bytes4 selector) external onlyRole(ADMIN_ROLE) { if (_blockedFunctionSelectors.add(selector)) { emit FunctionSelectorBlocked(selector); } } /** * @dev Unblocks a previously blocked function selector so it can be used again. * Requirements: * * - the caller must have the 'admin' role. */ function unblockFunctionSelector(bytes4 selector) external onlyRole(ADMIN_ROLE) { if (_blockedFunctionSelectors.remove(selector)) { emit FunctionSelectorUnblocked(selector); } } /** * @dev Returns the number of blocked function selectors. */ function getBlockedFunctionSelectorCount() external view returns (uint256) { return _blockedFunctionSelectors.length(); } /** * @dev Returns the blocked function selector with the given index. Function * selectors are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getBlockedFunctionSelectorCount} and * {getBlockedFunctionSelectorAt} via RPC, make sure you perform all queries * on the same block. When using these functions within an onchain * transaction, make sure that the state of this contract hasn't changed in * between invocations to avoid time-of-check time-of-use bugs. * See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum * post] for more information. */ function getBlockedFunctionSelectorAt(uint256 index) external view returns (bytes4) { return bytes4(_blockedFunctionSelectors.at(index)); } /** * @dev Directly execute a batch of transactions, bypassing any other * checks. * Note that we perform a raw call to each target. Raw calls to targets that * don't have associated contract code will always succeed regardless of * payload. * * Emits one {BypasserCallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'bypasser' or 'admin' role. */ function bypasserExecuteBatch( Call[] calldata calls ) public payable virtual onlyRoleOrAdminRole(BYPASSER_ROLE) { for (uint256 i = 0; i < calls.length; ++i) { _execute(calls[i]); emit BypasserCallExecuted(i, calls[i].target, calls[i].value, calls[i].data); } } /** * @dev Checks to see if the function being scheduled is blocked. This * is used when trying to schedule or batch schedule an operation. */ function _checkFunctionSelectorNotBlocked(bytes calldata data) private view { if (data.length < 4) { return; } bytes4 selector = bytes4(data[:4]); require(!_blockedFunctionSelectors.contains(bytes32(selector)), "RBACTimelock: selector is blocked"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(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) { 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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); 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 keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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 up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (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; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) 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. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 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. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); 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 (rounding == Rounding.Up && 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 down. * * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MockLinkToken { uint256 public constant totalSupply = 10 ** 27; mapping(address => uint256) public balances; constructor() { balances[msg.sender] = totalSupply; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { balances[msg.sender] = balances[msg.sender] - _value; balances[_to] = balances[_to] + _value; return true; } function transferAndCall( address _to, uint256 _value, bytes calldata _data ) public validRecipient(_to) returns (bool success) { transfer(_to, _value); if (isContract(_to)) { contractFallback(_to, _value, _data); } return true; } function balanceOf(address _a) public view returns (uint256 balance) { return balances[_a]; } modifier validRecipient(address _recipient) { require(_recipient != address(0) && _recipient != address(this)); _; } function contractFallback(address _to, uint256 _value, bytes calldata _data) private { ERC677Receiver receiver = ERC677Receiver(_to); receiver.onTokenTransfer(msg.sender, _value, _data); } function isContract(address _addr) private returns (bool hasCode) { uint256 length; assembly { length := extcodesize(_addr) } return length > 0; } } interface ERC677Receiver { function onTokenTransfer(address _sender, uint256 _value, bytes calldata _data) external; }
{ "remappings": [ "@eth-optimism/=node_modules/@eth-optimism/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=foundry-lib/forge-std/lib/ds-test/src/", "erc4626-tests/=foundry-lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=foundry-lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "openzeppelin-contracts/=foundry-lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": false, "runs": 200 }, "metadata": { "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"minDelay","type":"uint256"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address[]","name":"proposers","type":"address[]"},{"internalType":"address[]","name":"executors","type":"address[]"},{"internalType":"address[]","name":"cancellers","type":"address[]"},{"internalType":"address[]","name":"bypassers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"BypasserCallExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"CallExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"delay","type":"uint256"}],"name":"CallScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"Cancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"FunctionSelectorBlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"FunctionSelectorUnblocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"MinDelayChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BYPASSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANCELLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXECUTOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"blockFunctionSelector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct RBACTimelock.Call[]","name":"calls","type":"tuple[]"}],"name":"bypasserExecuteBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct RBACTimelock.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"executeBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getBlockedFunctionSelectorAt","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockedFunctionSelectorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinDelay","outputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct RBACTimelock.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"hashOperationBatch","outputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperation","outputs":[{"internalType":"bool","name":"registered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationDone","outputs":[{"internalType":"bool","name":"done","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationPending","outputs":[{"internalType":"bool","name":"pending","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationReady","outputs":[{"internalType":"bool","name":"ready","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct RBACTimelock.Call[]","name":"calls","type":"tuple[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"delay","type":"uint256"}],"name":"scheduleBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"unblockFunctionSelector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"updateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200428e3803806200428e83398181016040528101906200003791906200092d565b620000697fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177580620003f660201b60201c565b620000bb7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775620003f660201b60201c565b6200010d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e637fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775620003f660201b60201c565b6200015f7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f7837fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775620003f660201b60201c565b620001b17fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775620003f660201b60201c565b620001e37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775866200045960201b60201c565b60005b845181101562000253576200023f7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc18683815181106200022b576200022a62000a45565b5b60200260200101516200045960201b60201c565b806200024b9062000aa3565b9050620001e6565b5060005b8351811015620002c457620002b07fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e638583815181106200029c576200029b62000a45565b5b60200260200101516200045960201b60201c565b80620002bc9062000aa3565b905062000257565b5060005b82518110156200033557620003217ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f7838483815181106200030d576200030c62000a45565b5b60200260200101516200045960201b60201c565b806200032d9062000aa3565b9050620002c8565b5060005b8151811015620003a657620003927fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d8383815181106200037e576200037d62000a45565b5b60200260200101516200045960201b60201c565b806200039e9062000aa3565b905062000339565b50856003819055507f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5600087604051620003e292919062000b4e565b60405180910390a150505050505062000b7b565b600062000409836200046f60201b60201c565b905081600080858152602001908152602001600020600101819055508181847fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff60405160405180910390a4505050565b6200046b82826200048e60201b60201c565b5050565b6000806000838152602001908152602001600020600101549050919050565b620004a08282620004cc60201b60201c565b620004c78160016000858152602001908152602001600020620005bd60201b90919060201c565b505050565b620004de8282620005f560201b60201c565b620005b957600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200055e6200065f60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620005ed836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200066760201b60201c565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b60006200067b8383620006e160201b60201c565b620006d6578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050620006db565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6200072d8162000718565b81146200073957600080fd5b50565b6000815190506200074d8162000722565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620007808262000753565b9050919050565b620007928162000773565b81146200079e57600080fd5b50565b600081519050620007b28162000787565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200080882620007bd565b810181811067ffffffffffffffff821117156200082a5762000829620007ce565b5b80604052505050565b60006200083f62000704565b90506200084d8282620007fd565b919050565b600067ffffffffffffffff82111562000870576200086f620007ce565b5b602082029050602081019050919050565b600080fd5b60006200089d620008978462000852565b62000833565b90508083825260208201905060208402830185811115620008c357620008c262000881565b5b835b81811015620008f05780620008db8882620007a1565b845260208401935050602081019050620008c5565b5050509392505050565b600082601f830112620009125762000911620007b8565b5b81516200092484826020860162000886565b91505092915050565b60008060008060008060c087890312156200094d576200094c6200070e565b5b60006200095d89828a016200073c565b96505060206200097089828a01620007a1565b955050604087015167ffffffffffffffff81111562000994576200099362000713565b5b620009a289828a01620008fa565b945050606087015167ffffffffffffffff811115620009c657620009c562000713565b5b620009d489828a01620008fa565b935050608087015167ffffffffffffffff811115620009f857620009f762000713565b5b62000a0689828a01620008fa565b92505060a087015167ffffffffffffffff81111562000a2a5762000a2962000713565b5b62000a3889828a01620008fa565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062000ab08262000718565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362000ae55762000ae462000a74565b5b600182019050919050565b6000819050919050565b6000819050919050565b600062000b2562000b1f62000b198462000af0565b62000afa565b62000718565b9050919050565b62000b378162000b04565b82525050565b62000b488162000718565b82525050565b600060408201905062000b65600083018562000b2c565b62000b74602083018462000b3d565b9392505050565b6137038062000b8b6000396000f3fe6080604052600436106101f25760003560e01c806364d623531161010d578063a944142d116100a0578063ca15c8731161006f578063ca15c8731461075e578063d45c44351461079b578063d547741f146107d8578063f23a6e6114610801578063f27a0c921461083e576101f9565b8063a944142d146106a4578063b08e51c0146106cd578063bc197c81146106f8578063c4d252f514610735576101f9565b80639010d07c116100dc5780639010d07c146105d657806391d14854146106135780639f5a23f714610650578063a217fddf14610679576101f9565b806364d623531461053b5780636ceef4801461056457806375b238fc146105805780638f61f4f5146105ab576101f9565b806326bb2ec51161018557806336568abe1161015457806336568abe1461046f5780633a98b4e414610498578063515a3db3146104c1578063584b153e146104fe576101f9565b806326bb2ec5146103a15780632ab0f529146103cc5780632f2ff15d1461040957806331d5075014610432576101f9565b806313bc9f20116101c157806313bc9f20146102bf578063150b7a02146102fc578063191cb7b314610339578063248a9ca314610364576101f9565b806301ffc9a7146101fe57806303e561551461023b57806307bd0265146102785780630db866b1146102a3576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b506102256004803603810190610220919061214a565b610869565b6040516102329190612192565b60405180910390f35b34801561024757600080fd5b50610262600480360381019061025d91906121e3565b6108e3565b60405161026f919061221f565b60405180910390f35b34801561028457600080fd5b5061028d610900565b60405161029a9190612253565b60405180910390f35b6102bd60048036038101906102b891906122d3565b610924565b005b3480156102cb57600080fd5b506102e660048036038101906102e1919061234c565b610aab565b6040516102f39190612192565b60405180910390f35b34801561030857600080fd5b50610323600480360381019061031e9190612518565b610ad1565b604051610330919061221f565b60405180910390f35b34801561034557600080fd5b5061034e610ae5565b60405161035b9190612253565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061234c565b610b09565b6040516103989190612253565b60405180910390f35b3480156103ad57600080fd5b506103b6610b28565b6040516103c391906125aa565b60405180910390f35b3480156103d857600080fd5b506103f360048036038101906103ee919061234c565b610b39565b6040516104009190612192565b60405180910390f35b34801561041557600080fd5b50610430600480360381019061042b91906125c5565b610b4e565b005b34801561043e57600080fd5b506104596004803603810190610454919061234c565b610b6f565b6040516104669190612192565b60405180910390f35b34801561047b57600080fd5b50610496600480360381019061049191906125c5565b610b83565b005b3480156104a457600080fd5b506104bf60048036038101906104ba919061214a565b610c06565b005b3480156104cd57600080fd5b506104e860048036038101906104e39190612605565b610cb9565b6040516104f59190612253565b60405180910390f35b34801561050a57600080fd5b506105256004803603810190610520919061234c565b610cf2565b6040516105329190612192565b60405180910390f35b34801561054757600080fd5b50610562600480360381019061055d91906121e3565b610d07565b005b61057e60048036038101906105799190612605565b610d77565b005b34801561058c57600080fd5b50610595610f25565b6040516105a29190612253565b60405180910390f35b3480156105b757600080fd5b506105c0610f49565b6040516105cd9190612253565b60405180910390f35b3480156105e257600080fd5b506105fd60048036038101906105f89190612679565b610f6d565b60405161060a91906126c8565b60405180910390f35b34801561061f57600080fd5b5061063a600480360381019061063591906125c5565b610f9c565b6040516106479190612192565b60405180910390f35b34801561065c57600080fd5b506106776004803603810190610672919061214a565b611006565b005b34801561068557600080fd5b5061068e6110b9565b60405161069b9190612253565b60405180910390f35b3480156106b057600080fd5b506106cb60048036038101906106c691906126e3565b6110c0565b005b3480156106d957600080fd5b506106e261127b565b6040516106ef9190612253565b60405180910390f35b34801561070457600080fd5b5061071f600480360381019061071a919061282e565b61129f565b60405161072c919061221f565b60405180910390f35b34801561074157600080fd5b5061075c6004803603810190610757919061234c565b6112b4565b005b34801561076a57600080fd5b506107856004803603810190610780919061234c565b6113ab565b60405161079291906125aa565b60405180910390f35b3480156107a757600080fd5b506107c260048036038101906107bd919061234c565b6113cf565b6040516107cf91906125aa565b60405180910390f35b3480156107e457600080fd5b506107ff60048036038101906107fa91906125c5565b6113ec565b005b34801561080d57600080fd5b50610828600480360381019061082391906128fd565b61140d565b604051610835919061221f565b60405180910390f35b34801561084a57600080fd5b50610853611422565b60405161086091906125aa565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108dc57506108db8261142c565b5b9050919050565b60006108f98260046114a690919063ffffffff16565b9050919050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d600061094f6114bd565b905061097b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b61098a5761098982826114c5565b5b60005b84849050811015610aa4576109c58585838181106109ae576109ad612994565b5b90506020028101906109c091906129d2565b61154a565b807f6b983f337bab73dfe37faca733adf3ea35b45b8b144ec8ee2de3a1b224564b0c8686848181106109fa576109f9612994565b5b9050602002810190610a0c91906129d2565b6000016020810190610a1e91906129fa565b878785818110610a3157610a30612994565b5b9050602002810190610a4391906129d2565b60200135888886818110610a5a57610a59612994565b5b9050602002810190610a6c91906129d2565b8060400190610a7b9190612a27565b604051610a8b9493929190612ac8565b60405180910390a280610a9d90612b37565b905061098d565b5050505050565b600080610ab7836113cf565b9050600181118015610ac95750428111155b915050919050565b600063150b7a0260e01b9050949350505050565b7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d81565b6000806000838152602001908152602001600020600101549050919050565b6000610b346004611622565b905090565b60006001610b46836113cf565b149050919050565b610b5782610b09565b610b6081611637565b610b6a838361164b565b505050565b600080610b7b836113cf565b119050919050565b610b8b6114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90612c02565b60405180910390fd5b610c02828261167f565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610c3081611637565b610c63827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660046116b390919063ffffffff16565b15610cb557817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167fd91859a8d88193a56a2983deb65a5253985141c49c70bf016880b5243bd432e160405160405180910390a25b5050565b600084848484604051602001610cd29493929190612e60565b604051602081830303815290604052805190602001209050949350505050565b60006001610cff836113cf565b119050919050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610d3181611637565b7f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d560035483604051610d64929190612ea0565b60405180910390a1816003819055505050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636000610da26114bd565b9050610dce7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b610ddd57610ddc82826114c5565b5b6000610deb87878787610cb9565b9050610df781866116ca565b60005b87879050811015610f1257610e32888883818110610e1b57610e1a612994565b5b9050602002810190610e2d91906129d2565b61154a565b80827fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a85818110610e6857610e67612994565b5b9050602002810190610e7a91906129d2565b6000016020810190610e8c91906129fa565b8b8b86818110610e9f57610e9e612994565b5b9050602002810190610eb191906129d2565b602001358c8c87818110610ec857610ec7612994565b5b9050602002810190610eda91906129d2565b8060400190610ee99190612a27565b604051610ef99493929190612ac8565b60405180910390a380610f0b90612b37565b9050610dfa565b50610f1c8161176b565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b6000610f9482600160008681526020019081526020016000206117cf90919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561103081611637565b611063827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660046117e990919063ffffffff16565b156110b557817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f15b40cf8ed4c95cd3c0e1dedfdb3987c3f9bf3d3770d13ddf6dc4daa5ffae9ef60405160405180910390a25b5050565b6000801b81565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc160006110eb6114bd565b90506111177fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b6111265761112582826114c5565b5b600061113488888888610cb9565b90506111408185611800565b60005b888890508110156112705761118a89898381811061116457611163612994565b5b905060200281019061117691906129d2565b80604001906111859190612a27565b6118ba565b80827f4f4da6666f52e3b6dbc3638d8eae4017722678fe58bca79cd8320817807a65be8b8b858181106111c0576111bf612994565b5b90506020028101906111d291906129d2565b60000160208101906111e491906129fa565b8c8c868181106111f7576111f6612994565b5b905060200281019061120991906129d2565b602001358d8d878181106112205761121f612994565b5b905060200281019061123291906129d2565b80604001906112419190612a27565b8d8d8d6040516112579796959493929190612ec9565b60405180910390a38061126990612b37565b9050611143565b505050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b600063bc197c8160e01b905095945050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78360006112df6114bd565b905061130b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b61131a5761131982826114c5565b5b61132383610cf2565b611362576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135990612fa5565b60405180910390fd5b6002600084815260200190815260200160002060009055827fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7060405160405180910390a2505050565b60006113c860016000848152602001908152602001600020611961565b9050919050565b600060026000838152602001908152602001600020549050919050565b6113f582610b09565b6113fe81611637565b611408838361167f565b505050565b600063f23a6e6160e01b905095945050505050565b6000600354905090565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061149f575061149e82611976565b5b9050919050565b60006114b583600001836119f0565b905092915050565b600033905090565b6114cf8282610f9c565b611546576114dc81611a1b565b6114ea8360001c6020611a48565b6040516020016114fb9291906130ce565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d9190613141565b60405180910390fd5b5050565b600081600001602081019061155f91906129fa565b73ffffffffffffffffffffffffffffffffffffffff16826020013583806040019061158a9190612a27565b604051611598929190613193565b60006040518083038185875af1925050503d80600081146115d5576040519150601f19603f3d011682016040523d82523d6000602084013e6115da565b606091505b505090508061161e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116159061321e565b60405180910390fd5b5050565b600061163082600001611c84565b9050919050565b611648816116436114bd565b6114c5565b50565b6116558282611c95565b61167a8160016000858152602001908152602001600020611d7590919063ffffffff16565b505050565b6116898282611da5565b6116ae8160016000858152602001908152602001600020611e8690919063ffffffff16565b505050565b60006116c28360000183611eb6565b905092915050565b6116d382610aab565b611712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611709906132b0565b60405180910390fd5b6000801b811480611728575061172781610b39565b5b611767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175e9061331c565b60405180910390fd5b5050565b61177481610aab565b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa906132b0565b60405180910390fd5b6001600260008381526020019081526020016000208190555050565b60006117de83600001836119f0565b60001c905092915050565b60006117f88360000183611fca565b905092915050565b61180982610b6f565b15611849576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611840906133ae565b60405180910390fd5b611851611422565b811015611893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188a9061341a565b60405180910390fd5b804261189f919061343a565b60026000848152602001908152602001600020819055505050565b6004828290501061195d57600082826000906004926118db93929190613478565b906118e691906134cb565b905061191b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600461203a90919063ffffffff16565b1561195b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119529061359c565b60405180910390fd5b505b5050565b600061196f82600001611c84565b9050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119e957506119e882612051565b5b9050919050565b6000826000018281548110611a0857611a07612994565b5b9060005260206000200154905092915050565b6060611a418273ffffffffffffffffffffffffffffffffffffffff16601460ff16611a48565b9050919050565b606060006002836002611a5b91906135bc565b611a65919061343a565b67ffffffffffffffff811115611a7e57611a7d6123ed565b5b6040519080825280601f01601f191660200182016040528015611ab05781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611ae857611ae7612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611b4c57611b4b612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b8c91906135bc565b611b96919061343a565b90505b6001811115611c36577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611bd857611bd7612994565b5b1a60f81b828281518110611bef57611bee612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611c2f906135fe565b9050611b99565b5060008414611c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7190613673565b60405180910390fd5b8091505092915050565b600081600001805490509050919050565b611c9f8282610f9c565b611d7157600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611d166114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611d9d836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611fca565b905092915050565b611daf8282610f9c565b15611e8257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611e276114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000611eae836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611eb6565b905092915050565b60008083600101600084815260200190815260200160002054905060008114611fbe576000600182611ee89190613693565b9050600060018660000180549050611f009190613693565b9050818114611f6f576000866000018281548110611f2157611f20612994565b5b9060005260206000200154905080876000018481548110611f4557611f44612994565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480611f8357611f826136c7565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611fc4565b60009150505b92915050565b6000611fd683836120bb565b61202f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612034565b600090505b92915050565b600061204983600001836120bb565b905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612127816120f2565b811461213257600080fd5b50565b6000813590506121448161211e565b92915050565b6000602082840312156121605761215f6120e8565b5b600061216e84828501612135565b91505092915050565b60008115159050919050565b61218c81612177565b82525050565b60006020820190506121a76000830184612183565b92915050565b6000819050919050565b6121c0816121ad565b81146121cb57600080fd5b50565b6000813590506121dd816121b7565b92915050565b6000602082840312156121f9576121f86120e8565b5b6000612207848285016121ce565b91505092915050565b612219816120f2565b82525050565b60006020820190506122346000830184612210565b92915050565b6000819050919050565b61224d8161223a565b82525050565b60006020820190506122686000830184612244565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126122935761229261226e565b5b8235905067ffffffffffffffff8111156122b0576122af612273565b5b6020830191508360208202830111156122cc576122cb612278565b5b9250929050565b600080602083850312156122ea576122e96120e8565b5b600083013567ffffffffffffffff811115612308576123076120ed565b5b6123148582860161227d565b92509250509250929050565b6123298161223a565b811461233457600080fd5b50565b60008135905061234681612320565b92915050565b600060208284031215612362576123616120e8565b5b600061237084828501612337565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123a482612379565b9050919050565b6123b481612399565b81146123bf57600080fd5b50565b6000813590506123d1816123ab565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612425826123dc565b810181811067ffffffffffffffff82111715612444576124436123ed565b5b80604052505050565b60006124576120de565b9050612463828261241c565b919050565b600067ffffffffffffffff821115612483576124826123ed565b5b61248c826123dc565b9050602081019050919050565b82818337600083830152505050565b60006124bb6124b684612468565b61244d565b9050828152602081018484840111156124d7576124d66123d7565b5b6124e2848285612499565b509392505050565b600082601f8301126124ff576124fe61226e565b5b813561250f8482602086016124a8565b91505092915050565b60008060008060808587031215612532576125316120e8565b5b6000612540878288016123c2565b9450506020612551878288016123c2565b9350506040612562878288016121ce565b925050606085013567ffffffffffffffff811115612583576125826120ed565b5b61258f878288016124ea565b91505092959194509250565b6125a4816121ad565b82525050565b60006020820190506125bf600083018461259b565b92915050565b600080604083850312156125dc576125db6120e8565b5b60006125ea85828601612337565b92505060206125fb858286016123c2565b9150509250929050565b6000806000806060858703121561261f5761261e6120e8565b5b600085013567ffffffffffffffff81111561263d5761263c6120ed565b5b6126498782880161227d565b9450945050602061265c87828801612337565b925050604061266d87828801612337565b91505092959194509250565b600080604083850312156126905761268f6120e8565b5b600061269e85828601612337565b92505060206126af858286016121ce565b9150509250929050565b6126c281612399565b82525050565b60006020820190506126dd60008301846126b9565b92915050565b6000806000806000608086880312156126ff576126fe6120e8565b5b600086013567ffffffffffffffff81111561271d5761271c6120ed565b5b6127298882890161227d565b9550955050602061273c88828901612337565b935050604061274d88828901612337565b925050606061275e888289016121ce565b9150509295509295909350565b600067ffffffffffffffff821115612786576127856123ed565b5b602082029050602081019050919050565b60006127aa6127a58461276b565b61244d565b905080838252602082019050602084028301858111156127cd576127cc612278565b5b835b818110156127f657806127e288826121ce565b8452602084019350506020810190506127cf565b5050509392505050565b600082601f8301126128155761281461226e565b5b8135612825848260208601612797565b91505092915050565b600080600080600060a0868803121561284a576128496120e8565b5b6000612858888289016123c2565b9550506020612869888289016123c2565b945050604086013567ffffffffffffffff81111561288a576128896120ed565b5b61289688828901612800565b935050606086013567ffffffffffffffff8111156128b7576128b66120ed565b5b6128c388828901612800565b925050608086013567ffffffffffffffff8111156128e4576128e36120ed565b5b6128f0888289016124ea565b9150509295509295909350565b600080600080600060a08688031215612919576129186120e8565b5b6000612927888289016123c2565b9550506020612938888289016123c2565b9450506040612949888289016121ce565b935050606061295a888289016121ce565b925050608086013567ffffffffffffffff81111561297b5761297a6120ed565b5b612987888289016124ea565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b6000823560016060038336030381126129ee576129ed6129c3565b5b80830191505092915050565b600060208284031215612a1057612a0f6120e8565b5b6000612a1e848285016123c2565b91505092915050565b60008083356001602003843603038112612a4457612a436129c3565b5b80840192508235915067ffffffffffffffff821115612a6657612a656129c8565b5b602083019250600182023603831315612a8257612a816129cd565b5b509250929050565b600082825260208201905092915050565b6000612aa78385612a8a565b9350612ab4838584612499565b612abd836123dc565b840190509392505050565b6000606082019050612add60008301876126b9565b612aea602083018661259b565b8181036040830152612afd818486612a9b565b905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b42826121ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7457612b73612b08565b5b600182019050919050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612bec602f83612b7f565b9150612bf782612b90565b604082019050919050565b60006020820190508181036000830152612c1b81612bdf565b9050919050565b600082825260208201905092915050565b6000819050919050565b6000612c4c60208401846123c2565b905092915050565b612c5d81612399565b82525050565b6000612c7260208401846121ce565b905092915050565b612c83816121ad565b82525050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112612cb557612cb4612c93565b5b83810192508235915060208301925067ffffffffffffffff821115612cdd57612cdc612c89565b5b600182023603831315612cf357612cf2612c8e565b5b509250929050565b600082825260208201905092915050565b6000612d188385612cfb565b9350612d25838584612499565b612d2e836123dc565b840190509392505050565b600060608301612d4c6000840184612c3d565b612d596000860182612c54565b50612d676020840184612c63565b612d746020860182612c7a565b50612d826040840184612c98565b8583036040870152612d95838284612d0c565b925050508091505092915050565b6000612daf8383612d39565b905092915050565b600082356001606003833603038112612dd357612dd2612c93565b5b82810191505092915050565b6000602082019050919050565b6000612df88385612c22565b935083602084028501612e0a84612c33565b8060005b87811015612e4e578484038952612e258284612db7565b612e2f8582612da3565b9450612e3a83612ddf565b925060208a01995050600181019050612e0e565b50829750879450505050509392505050565b60006060820190508181036000830152612e7b818688612dec565b9050612e8a6020830185612244565b612e976040830184612244565b95945050505050565b6000604082019050612eb5600083018561259b565b612ec2602083018461259b565b9392505050565b600060c082019050612ede600083018a6126b9565b612eeb602083018961259b565b8181036040830152612efe818789612a9b565b9050612f0d6060830186612244565b612f1a6080830185612244565b612f2760a083018461259b565b98975050505050505050565b7f5242414354696d656c6f636b3a206f7065726174696f6e2063616e6e6f74206260008201527f652063616e63656c6c6564000000000000000000000000000000000000000000602082015250565b6000612f8f602b83612b7f565b9150612f9a82612f33565b604082019050919050565b60006020820190508181036000830152612fbe81612f82565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000613006601783612fc5565b915061301182612fd0565b601782019050919050565b600081519050919050565b60005b8381101561304557808201518184015260208101905061302a565b60008484015250505050565b600061305c8261301c565b6130668185612fc5565b9350613076818560208601613027565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006130b8601183612fc5565b91506130c382613082565b601182019050919050565b60006130d982612ff9565b91506130e58285613051565b91506130f0826130ab565b91506130fc8284613051565b91508190509392505050565b60006131138261301c565b61311d8185612b7f565b935061312d818560208601613027565b613136816123dc565b840191505092915050565b6000602082019050818103600083015261315b8184613108565b905092915050565b600081905092915050565b600061317a8385613163565b9350613187838584612499565b82840190509392505050565b60006131a082848661316e565b91508190509392505050565b7f5242414354696d656c6f636b3a20756e6465726c79696e67207472616e73616360008201527f74696f6e20726576657274656400000000000000000000000000000000000000602082015250565b6000613208602d83612b7f565b9150613213826131ac565b604082019050919050565b60006020820190508181036000830152613237816131fb565b9050919050565b7f5242414354696d656c6f636b3a206f7065726174696f6e206973206e6f74207260008201527f6561647900000000000000000000000000000000000000000000000000000000602082015250565b600061329a602483612b7f565b91506132a58261323e565b604082019050919050565b600060208201905081810360008301526132c98161328d565b9050919050565b7f5242414354696d656c6f636b3a206d697373696e6720646570656e64656e6379600082015250565b6000613306602083612b7f565b9150613311826132d0565b602082019050919050565b60006020820190508181036000830152613335816132f9565b9050919050565b7f5242414354696d656c6f636b3a206f7065726174696f6e20616c72656164792060008201527f7363686564756c65640000000000000000000000000000000000000000000000602082015250565b6000613398602983612b7f565b91506133a38261333c565b604082019050919050565b600060208201905081810360008301526133c78161338b565b9050919050565b7f5242414354696d656c6f636b3a20696e73756666696369656e742064656c6179600082015250565b6000613404602083612b7f565b915061340f826133ce565b602082019050919050565b60006020820190508181036000830152613433816133f7565b9050919050565b6000613445826121ad565b9150613450836121ad565b925082820190508082111561346857613467612b08565b5b92915050565b600080fd5b600080fd5b6000808585111561348c5761348b61346e565b5b8386111561349d5761349c613473565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b60006134d783836134b3565b826134e281356120f2565b925060048210156135225761351d7fffffffff00000000000000000000000000000000000000000000000000000000836004036008026134be565b831692505b505092915050565b7f5242414354696d656c6f636b3a2073656c6563746f7220697320626c6f636b6560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000613586602183612b7f565b91506135918261352a565b604082019050919050565b600060208201905081810360008301526135b581613579565b9050919050565b60006135c7826121ad565b91506135d2836121ad565b92508282026135e0816121ad565b915082820484148315176135f7576135f6612b08565b5b5092915050565b6000613609826121ad565b91506000820361361c5761361b612b08565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061365d602083612b7f565b915061366882613627565b602082019050919050565b6000602082019050818103600083015261368c81613650565b9050919050565b600061369e826121ad565b91506136a9836121ad565b92508282039050818111156136c1576136c0612b08565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a000000000000000000000000000000000000000000000000000000000000012c0000000000000000000000000902aea2c33de813b340b2405eb604aa14d6a0bb00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee
Deployed Bytecode
0x6080604052600436106101f25760003560e01c806364d623531161010d578063a944142d116100a0578063ca15c8731161006f578063ca15c8731461075e578063d45c44351461079b578063d547741f146107d8578063f23a6e6114610801578063f27a0c921461083e576101f9565b8063a944142d146106a4578063b08e51c0146106cd578063bc197c81146106f8578063c4d252f514610735576101f9565b80639010d07c116100dc5780639010d07c146105d657806391d14854146106135780639f5a23f714610650578063a217fddf14610679576101f9565b806364d623531461053b5780636ceef4801461056457806375b238fc146105805780638f61f4f5146105ab576101f9565b806326bb2ec51161018557806336568abe1161015457806336568abe1461046f5780633a98b4e414610498578063515a3db3146104c1578063584b153e146104fe576101f9565b806326bb2ec5146103a15780632ab0f529146103cc5780632f2ff15d1461040957806331d5075014610432576101f9565b806313bc9f20116101c157806313bc9f20146102bf578063150b7a02146102fc578063191cb7b314610339578063248a9ca314610364576101f9565b806301ffc9a7146101fe57806303e561551461023b57806307bd0265146102785780630db866b1146102a3576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b506102256004803603810190610220919061214a565b610869565b6040516102329190612192565b60405180910390f35b34801561024757600080fd5b50610262600480360381019061025d91906121e3565b6108e3565b60405161026f919061221f565b60405180910390f35b34801561028457600080fd5b5061028d610900565b60405161029a9190612253565b60405180910390f35b6102bd60048036038101906102b891906122d3565b610924565b005b3480156102cb57600080fd5b506102e660048036038101906102e1919061234c565b610aab565b6040516102f39190612192565b60405180910390f35b34801561030857600080fd5b50610323600480360381019061031e9190612518565b610ad1565b604051610330919061221f565b60405180910390f35b34801561034557600080fd5b5061034e610ae5565b60405161035b9190612253565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061234c565b610b09565b6040516103989190612253565b60405180910390f35b3480156103ad57600080fd5b506103b6610b28565b6040516103c391906125aa565b60405180910390f35b3480156103d857600080fd5b506103f360048036038101906103ee919061234c565b610b39565b6040516104009190612192565b60405180910390f35b34801561041557600080fd5b50610430600480360381019061042b91906125c5565b610b4e565b005b34801561043e57600080fd5b506104596004803603810190610454919061234c565b610b6f565b6040516104669190612192565b60405180910390f35b34801561047b57600080fd5b50610496600480360381019061049191906125c5565b610b83565b005b3480156104a457600080fd5b506104bf60048036038101906104ba919061214a565b610c06565b005b3480156104cd57600080fd5b506104e860048036038101906104e39190612605565b610cb9565b6040516104f59190612253565b60405180910390f35b34801561050a57600080fd5b506105256004803603810190610520919061234c565b610cf2565b6040516105329190612192565b60405180910390f35b34801561054757600080fd5b50610562600480360381019061055d91906121e3565b610d07565b005b61057e60048036038101906105799190612605565b610d77565b005b34801561058c57600080fd5b50610595610f25565b6040516105a29190612253565b60405180910390f35b3480156105b757600080fd5b506105c0610f49565b6040516105cd9190612253565b60405180910390f35b3480156105e257600080fd5b506105fd60048036038101906105f89190612679565b610f6d565b60405161060a91906126c8565b60405180910390f35b34801561061f57600080fd5b5061063a600480360381019061063591906125c5565b610f9c565b6040516106479190612192565b60405180910390f35b34801561065c57600080fd5b506106776004803603810190610672919061214a565b611006565b005b34801561068557600080fd5b5061068e6110b9565b60405161069b9190612253565b60405180910390f35b3480156106b057600080fd5b506106cb60048036038101906106c691906126e3565b6110c0565b005b3480156106d957600080fd5b506106e261127b565b6040516106ef9190612253565b60405180910390f35b34801561070457600080fd5b5061071f600480360381019061071a919061282e565b61129f565b60405161072c919061221f565b60405180910390f35b34801561074157600080fd5b5061075c6004803603810190610757919061234c565b6112b4565b005b34801561076a57600080fd5b506107856004803603810190610780919061234c565b6113ab565b60405161079291906125aa565b60405180910390f35b3480156107a757600080fd5b506107c260048036038101906107bd919061234c565b6113cf565b6040516107cf91906125aa565b60405180910390f35b3480156107e457600080fd5b506107ff60048036038101906107fa91906125c5565b6113ec565b005b34801561080d57600080fd5b50610828600480360381019061082391906128fd565b61140d565b604051610835919061221f565b60405180910390f35b34801561084a57600080fd5b50610853611422565b60405161086091906125aa565b60405180910390f35b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108dc57506108db8261142c565b5b9050919050565b60006108f98260046114a690919063ffffffff16565b9050919050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d600061094f6114bd565b905061097b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b61098a5761098982826114c5565b5b60005b84849050811015610aa4576109c58585838181106109ae576109ad612994565b5b90506020028101906109c091906129d2565b61154a565b807f6b983f337bab73dfe37faca733adf3ea35b45b8b144ec8ee2de3a1b224564b0c8686848181106109fa576109f9612994565b5b9050602002810190610a0c91906129d2565b6000016020810190610a1e91906129fa565b878785818110610a3157610a30612994565b5b9050602002810190610a4391906129d2565b60200135888886818110610a5a57610a59612994565b5b9050602002810190610a6c91906129d2565b8060400190610a7b9190612a27565b604051610a8b9493929190612ac8565b60405180910390a280610a9d90612b37565b905061098d565b5050505050565b600080610ab7836113cf565b9050600181118015610ac95750428111155b915050919050565b600063150b7a0260e01b9050949350505050565b7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d81565b6000806000838152602001908152602001600020600101549050919050565b6000610b346004611622565b905090565b60006001610b46836113cf565b149050919050565b610b5782610b09565b610b6081611637565b610b6a838361164b565b505050565b600080610b7b836113cf565b119050919050565b610b8b6114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90612c02565b60405180910390fd5b610c02828261167f565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610c3081611637565b610c63827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660046116b390919063ffffffff16565b15610cb557817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167fd91859a8d88193a56a2983deb65a5253985141c49c70bf016880b5243bd432e160405160405180910390a25b5050565b600084848484604051602001610cd29493929190612e60565b604051602081830303815290604052805190602001209050949350505050565b60006001610cff836113cf565b119050919050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610d3181611637565b7f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d560035483604051610d64929190612ea0565b60405180910390a1816003819055505050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636000610da26114bd565b9050610dce7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b610ddd57610ddc82826114c5565b5b6000610deb87878787610cb9565b9050610df781866116ca565b60005b87879050811015610f1257610e32888883818110610e1b57610e1a612994565b5b9050602002810190610e2d91906129d2565b61154a565b80827fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a85818110610e6857610e67612994565b5b9050602002810190610e7a91906129d2565b6000016020810190610e8c91906129fa565b8b8b86818110610e9f57610e9e612994565b5b9050602002810190610eb191906129d2565b602001358c8c87818110610ec857610ec7612994565b5b9050602002810190610eda91906129d2565b8060400190610ee99190612a27565b604051610ef99493929190612ac8565b60405180910390a380610f0b90612b37565b9050610dfa565b50610f1c8161176b565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b6000610f9482600160008681526020019081526020016000206117cf90919063ffffffff16565b905092915050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561103081611637565b611063827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660046117e990919063ffffffff16565b156110b557817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f15b40cf8ed4c95cd3c0e1dedfdb3987c3f9bf3d3770d13ddf6dc4daa5ffae9ef60405160405180910390a25b5050565b6000801b81565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc160006110eb6114bd565b90506111177fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b6111265761112582826114c5565b5b600061113488888888610cb9565b90506111408185611800565b60005b888890508110156112705761118a89898381811061116457611163612994565b5b905060200281019061117691906129d2565b80604001906111859190612a27565b6118ba565b80827f4f4da6666f52e3b6dbc3638d8eae4017722678fe58bca79cd8320817807a65be8b8b858181106111c0576111bf612994565b5b90506020028101906111d291906129d2565b60000160208101906111e491906129fa565b8c8c868181106111f7576111f6612994565b5b905060200281019061120991906129d2565b602001358d8d878181106112205761121f612994565b5b905060200281019061123291906129d2565b80604001906112419190612a27565b8d8d8d6040516112579796959493929190612ec9565b60405180910390a38061126990612b37565b9050611143565b505050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b600063bc197c8160e01b905095945050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78360006112df6114bd565b905061130b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610f9c565b61131a5761131982826114c5565b5b61132383610cf2565b611362576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135990612fa5565b60405180910390fd5b6002600084815260200190815260200160002060009055827fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7060405160405180910390a2505050565b60006113c860016000848152602001908152602001600020611961565b9050919050565b600060026000838152602001908152602001600020549050919050565b6113f582610b09565b6113fe81611637565b611408838361167f565b505050565b600063f23a6e6160e01b905095945050505050565b6000600354905090565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061149f575061149e82611976565b5b9050919050565b60006114b583600001836119f0565b905092915050565b600033905090565b6114cf8282610f9c565b611546576114dc81611a1b565b6114ea8360001c6020611a48565b6040516020016114fb9291906130ce565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d9190613141565b60405180910390fd5b5050565b600081600001602081019061155f91906129fa565b73ffffffffffffffffffffffffffffffffffffffff16826020013583806040019061158a9190612a27565b604051611598929190613193565b60006040518083038185875af1925050503d80600081146115d5576040519150601f19603f3d011682016040523d82523d6000602084013e6115da565b606091505b505090508061161e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116159061321e565b60405180910390fd5b5050565b600061163082600001611c84565b9050919050565b611648816116436114bd565b6114c5565b50565b6116558282611c95565b61167a8160016000858152602001908152602001600020611d7590919063ffffffff16565b505050565b6116898282611da5565b6116ae8160016000858152602001908152602001600020611e8690919063ffffffff16565b505050565b60006116c28360000183611eb6565b905092915050565b6116d382610aab565b611712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611709906132b0565b60405180910390fd5b6000801b811480611728575061172781610b39565b5b611767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175e9061331c565b60405180910390fd5b5050565b61177481610aab565b6117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa906132b0565b60405180910390fd5b6001600260008381526020019081526020016000208190555050565b60006117de83600001836119f0565b60001c905092915050565b60006117f88360000183611fca565b905092915050565b61180982610b6f565b15611849576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611840906133ae565b60405180910390fd5b611851611422565b811015611893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188a9061341a565b60405180910390fd5b804261189f919061343a565b60026000848152602001908152602001600020819055505050565b6004828290501061195d57600082826000906004926118db93929190613478565b906118e691906134cb565b905061191b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600461203a90919063ffffffff16565b1561195b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119529061359c565b60405180910390fd5b505b5050565b600061196f82600001611c84565b9050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119e957506119e882612051565b5b9050919050565b6000826000018281548110611a0857611a07612994565b5b9060005260206000200154905092915050565b6060611a418273ffffffffffffffffffffffffffffffffffffffff16601460ff16611a48565b9050919050565b606060006002836002611a5b91906135bc565b611a65919061343a565b67ffffffffffffffff811115611a7e57611a7d6123ed565b5b6040519080825280601f01601f191660200182016040528015611ab05781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611ae857611ae7612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611b4c57611b4b612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b8c91906135bc565b611b96919061343a565b90505b6001811115611c36577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611bd857611bd7612994565b5b1a60f81b828281518110611bef57611bee612994565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611c2f906135fe565b9050611b99565b5060008414611c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7190613673565b60405180910390fd5b8091505092915050565b600081600001805490509050919050565b611c9f8282610f9c565b611d7157600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611d166114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611d9d836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611fca565b905092915050565b611daf8282610f9c565b15611e8257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611e276114bd565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000611eae836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611eb6565b905092915050565b60008083600101600084815260200190815260200160002054905060008114611fbe576000600182611ee89190613693565b9050600060018660000180549050611f009190613693565b9050818114611f6f576000866000018281548110611f2157611f20612994565b5b9060005260206000200154905080876000018481548110611f4557611f44612994565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480611f8357611f826136c7565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611fc4565b60009150505b92915050565b6000611fd683836120bb565b61202f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612034565b600090505b92915050565b600061204983600001836120bb565b905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600080836001016000848152602001908152602001600020541415905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612127816120f2565b811461213257600080fd5b50565b6000813590506121448161211e565b92915050565b6000602082840312156121605761215f6120e8565b5b600061216e84828501612135565b91505092915050565b60008115159050919050565b61218c81612177565b82525050565b60006020820190506121a76000830184612183565b92915050565b6000819050919050565b6121c0816121ad565b81146121cb57600080fd5b50565b6000813590506121dd816121b7565b92915050565b6000602082840312156121f9576121f86120e8565b5b6000612207848285016121ce565b91505092915050565b612219816120f2565b82525050565b60006020820190506122346000830184612210565b92915050565b6000819050919050565b61224d8161223a565b82525050565b60006020820190506122686000830184612244565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126122935761229261226e565b5b8235905067ffffffffffffffff8111156122b0576122af612273565b5b6020830191508360208202830111156122cc576122cb612278565b5b9250929050565b600080602083850312156122ea576122e96120e8565b5b600083013567ffffffffffffffff811115612308576123076120ed565b5b6123148582860161227d565b92509250509250929050565b6123298161223a565b811461233457600080fd5b50565b60008135905061234681612320565b92915050565b600060208284031215612362576123616120e8565b5b600061237084828501612337565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123a482612379565b9050919050565b6123b481612399565b81146123bf57600080fd5b50565b6000813590506123d1816123ab565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612425826123dc565b810181811067ffffffffffffffff82111715612444576124436123ed565b5b80604052505050565b60006124576120de565b9050612463828261241c565b919050565b600067ffffffffffffffff821115612483576124826123ed565b5b61248c826123dc565b9050602081019050919050565b82818337600083830152505050565b60006124bb6124b684612468565b61244d565b9050828152602081018484840111156124d7576124d66123d7565b5b6124e2848285612499565b509392505050565b600082601f8301126124ff576124fe61226e565b5b813561250f8482602086016124a8565b91505092915050565b60008060008060808587031215612532576125316120e8565b5b6000612540878288016123c2565b9450506020612551878288016123c2565b9350506040612562878288016121ce565b925050606085013567ffffffffffffffff811115612583576125826120ed565b5b61258f878288016124ea565b91505092959194509250565b6125a4816121ad565b82525050565b60006020820190506125bf600083018461259b565b92915050565b600080604083850312156125dc576125db6120e8565b5b60006125ea85828601612337565b92505060206125fb858286016123c2565b9150509250929050565b6000806000806060858703121561261f5761261e6120e8565b5b600085013567ffffffffffffffff81111561263d5761263c6120ed565b5b6126498782880161227d565b9450945050602061265c87828801612337565b925050604061266d87828801612337565b91505092959194509250565b600080604083850312156126905761268f6120e8565b5b600061269e85828601612337565b92505060206126af858286016121ce565b9150509250929050565b6126c281612399565b82525050565b60006020820190506126dd60008301846126b9565b92915050565b6000806000806000608086880312156126ff576126fe6120e8565b5b600086013567ffffffffffffffff81111561271d5761271c6120ed565b5b6127298882890161227d565b9550955050602061273c88828901612337565b935050604061274d88828901612337565b925050606061275e888289016121ce565b9150509295509295909350565b600067ffffffffffffffff821115612786576127856123ed565b5b602082029050602081019050919050565b60006127aa6127a58461276b565b61244d565b905080838252602082019050602084028301858111156127cd576127cc612278565b5b835b818110156127f657806127e288826121ce565b8452602084019350506020810190506127cf565b5050509392505050565b600082601f8301126128155761281461226e565b5b8135612825848260208601612797565b91505092915050565b600080600080600060a0868803121561284a576128496120e8565b5b6000612858888289016123c2565b9550506020612869888289016123c2565b945050604086013567ffffffffffffffff81111561288a576128896120ed565b5b61289688828901612800565b935050606086013567ffffffffffffffff8111156128b7576128b66120ed565b5b6128c388828901612800565b925050608086013567ffffffffffffffff8111156128e4576128e36120ed565b5b6128f0888289016124ea565b9150509295509295909350565b600080600080600060a08688031215612919576129186120e8565b5b6000612927888289016123c2565b9550506020612938888289016123c2565b9450506040612949888289016121ce565b935050606061295a888289016121ce565b925050608086013567ffffffffffffffff81111561297b5761297a6120ed565b5b612987888289016124ea565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b6000823560016060038336030381126129ee576129ed6129c3565b5b80830191505092915050565b600060208284031215612a1057612a0f6120e8565b5b6000612a1e848285016123c2565b91505092915050565b60008083356001602003843603038112612a4457612a436129c3565b5b80840192508235915067ffffffffffffffff821115612a6657612a656129c8565b5b602083019250600182023603831315612a8257612a816129cd565b5b509250929050565b600082825260208201905092915050565b6000612aa78385612a8a565b9350612ab4838584612499565b612abd836123dc565b840190509392505050565b6000606082019050612add60008301876126b9565b612aea602083018661259b565b8181036040830152612afd818486612a9b565b905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b42826121ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b7457612b73612b08565b5b600182019050919050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612bec602f83612b7f565b9150612bf782612b90565b604082019050919050565b60006020820190508181036000830152612c1b81612bdf565b9050919050565b600082825260208201905092915050565b6000819050919050565b6000612c4c60208401846123c2565b905092915050565b612c5d81612399565b82525050565b6000612c7260208401846121ce565b905092915050565b612c83816121ad565b82525050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112612cb557612cb4612c93565b5b83810192508235915060208301925067ffffffffffffffff821115612cdd57612cdc612c89565b5b600182023603831315612cf357612cf2612c8e565b5b509250929050565b600082825260208201905092915050565b6000612d188385612cfb565b9350612d25838584612499565b612d2e836123dc565b840190509392505050565b600060608301612d4c6000840184612c3d565b612d596000860182612c54565b50612d676020840184612c63565b612d746020860182612c7a565b50612d826040840184612c98565b8583036040870152612d95838284612d0c565b925050508091505092915050565b6000612daf8383612d39565b905092915050565b600082356001606003833603038112612dd357612dd2612c93565b5b82810191505092915050565b6000602082019050919050565b6000612df88385612c22565b935083602084028501612e0a84612c33565b8060005b87811015612e4e578484038952612e258284612db7565b612e2f8582612da3565b9450612e3a83612ddf565b925060208a01995050600181019050612e0e565b50829750879450505050509392505050565b60006060820190508181036000830152612e7b818688612dec565b9050612e8a6020830185612244565b612e976040830184612244565b95945050505050565b6000604082019050612eb5600083018561259b565b612ec2602083018461259b565b9392505050565b600060c082019050612ede600083018a6126b9565b612eeb602083018961259b565b8181036040830152612efe818789612a9b565b9050612f0d6060830186612244565b612f1a6080830185612244565b612f2760a083018461259b565b98975050505050505050565b7f5242414354696d656c6f636b3a206f7065726174696f6e2063616e6e6f74206260008201527f652063616e63656c6c6564000000000000000000000000000000000000000000602082015250565b6000612f8f602b83612b7f565b9150612f9a82612f33565b604082019050919050565b60006020820190508181036000830152612fbe81612f82565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000613006601783612fc5565b915061301182612fd0565b601782019050919050565b600081519050919050565b60005b8381101561304557808201518184015260208101905061302a565b60008484015250505050565b600061305c8261301c565b6130668185612fc5565b9350613076818560208601613027565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006130b8601183612fc5565b91506130c382613082565b601182019050919050565b60006130d982612ff9565b91506130e58285613051565b91506130f0826130ab565b91506130fc8284613051565b91508190509392505050565b60006131138261301c565b61311d8185612b7f565b935061312d818560208601613027565b613136816123dc565b840191505092915050565b6000602082019050818103600083015261315b8184613108565b905092915050565b600081905092915050565b600061317a8385613163565b9350613187838584612499565b82840190509392505050565b60006131a082848661316e565b91508190509392505050565b7f5242414354696d656c6f636b3a20756e6465726c79696e67207472616e73616360008201527f74696f6e20726576657274656400000000000000000000000000000000000000602082015250565b6000613208602d83612b7f565b9150613213826131ac565b604082019050919050565b60006020820190508181036000830152613237816131fb565b9050919050565b7f5242414354696d656c6f636b3a206f7065726174696f6e206973206e6f74207260008201527f6561647900000000000000000000000000000000000000000000000000000000602082015250565b600061329a602483612b7f565b91506132a58261323e565b604082019050919050565b600060208201905081810360008301526132c98161328d565b9050919050565b7f5242414354696d656c6f636b3a206d697373696e6720646570656e64656e6379600082015250565b6000613306602083612b7f565b9150613311826132d0565b602082019050919050565b60006020820190508181036000830152613335816132f9565b9050919050565b7f5242414354696d656c6f636b3a206f7065726174696f6e20616c72656164792060008201527f7363686564756c65640000000000000000000000000000000000000000000000602082015250565b6000613398602983612b7f565b91506133a38261333c565b604082019050919050565b600060208201905081810360008301526133c78161338b565b9050919050565b7f5242414354696d656c6f636b3a20696e73756666696369656e742064656c6179600082015250565b6000613404602083612b7f565b915061340f826133ce565b602082019050919050565b60006020820190508181036000830152613433816133f7565b9050919050565b6000613445826121ad565b9150613450836121ad565b925082820190508082111561346857613467612b08565b5b92915050565b600080fd5b600080fd5b6000808585111561348c5761348b61346e565b5b8386111561349d5761349c613473565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b60006134d783836134b3565b826134e281356120f2565b925060048210156135225761351d7fffffffff00000000000000000000000000000000000000000000000000000000836004036008026134be565b831692505b505092915050565b7f5242414354696d656c6f636b3a2073656c6563746f7220697320626c6f636b6560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000613586602183612b7f565b91506135918261352a565b604082019050919050565b600060208201905081810360008301526135b581613579565b9050919050565b60006135c7826121ad565b91506135d2836121ad565b92508282026135e0816121ad565b915082820484148315176135f7576135f6612b08565b5b5092915050565b6000613609826121ad565b91506000820361361c5761361b612b08565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061365d602083612b7f565b915061366882613627565b602082019050919050565b6000602082019050818103600083015261368c81613650565b9050919050565b600061369e826121ad565b91506136a9836121ad565b92508282039050818111156136c1576136c0612b08565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000012c0000000000000000000000000902aea2c33de813b340b2405eb604aa14d6a0bb00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee
-----Decoded View---------------
Arg [0] : minDelay (uint256): 300
Arg [1] : admin (address): 0x0902AEa2c33de813b340b2405EB604aA14d6A0bB
Arg [2] : proposers (address[]): 0xBFf6b15Fc1dc74DE813F2B74B9dE39D5eF2AA7eE
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [1] : 0000000000000000000000000902aea2c33de813b340b2405eb604aa14d6a0bb
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [12] : 000000000000000000000000bff6b15fc1dc74de813f2b74b9de39d5ef2aa7ee
Loading...
Loading
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.