Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
Escrow
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IGateway { function withdraw( uint256 realTokenAmount, uint256 bridgedTokenAmount ) external; function deposit(uint256 realTokenAmount) external; function nativeToken() external view returns (address); function mbToken() external view returns (address); } /// @notice The modified Escrow contract to work with Gateway contract Escrow is Initializable, AccessControlEnumerableUpgradeable { address public gatewayAddress; address public nativeTokenAddress; address public treasureAddress; uint256 public thresholdAmount; uint256 public periodLimit; uint256 public periodStart; uint256 public periodMaxAmount; uint256 public periodDepositedAmount; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE"); bytes32 public constant WITHDRAWER_ROLE = keccak256("WITHDRAWER_ROLE"); bytes32 public constant ASSET_MANAGER_ROLE = keccak256("ASSET_MANAGER_ROLE"); event DepositToGateway(uint256 amount, uint256 thresholdAmount); event WithdrawFromGateway(uint256 amount, uint256 thresholdAmount); event SetThresholdAmount(uint256 thresholdAmount); event TreasureChanged(address oldTreasure, address newTreasure); event WithdrawERC20(address token, address to, uint256 amount); function initialize( address _gatewayAddress, address _treasureAddress, uint256 _thresholdAmount ) public initializer { __AccessControl_init(); gatewayAddress = _gatewayAddress; treasureAddress = _treasureAddress; thresholdAmount = _thresholdAmount; nativeTokenAddress = IGateway(gatewayAddress).nativeToken(); periodStart = block.timestamp; _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(ADMIN_ROLE, msg.sender); } function depositToGateway() external onlyRole(DEPOSITOR_ROLE) { uint256 gatewayBalance = IERC20(nativeTokenAddress).balanceOf( gatewayAddress ); require( gatewayBalance < thresholdAmount, "Escrow: Gateway balance exceeds the threshold" ); uint256 requiredAmount = thresholdAmount - gatewayBalance; uint256 escrowBalance = IERC20(nativeTokenAddress).balanceOf( address(this) ); uint256 amount = requiredAmount < escrowBalance ? requiredAmount : escrowBalance; checkLimits(amount); IERC20(nativeTokenAddress).approve(gatewayAddress, amount); IGateway(gatewayAddress).deposit(amount); emit DepositToGateway(amount, thresholdAmount); } function withdrawFromGateway() external onlyRole(WITHDRAWER_ROLE) { uint256 gatewayBalance = IERC20(nativeTokenAddress).balanceOf( gatewayAddress ); require( gatewayBalance > thresholdAmount, "Escrow: Gateway balance is below the threshold" ); uint256 requiredAmount = gatewayBalance - thresholdAmount; IGateway(gatewayAddress).withdraw(requiredAmount, 0); emit WithdrawFromGateway(requiredAmount, thresholdAmount); } function setThresholdAmount( uint256 _thresholdAmount ) external onlyRole(ADMIN_ROLE) { thresholdAmount = _thresholdAmount; emit SetThresholdAmount(_thresholdAmount); } function setTreasureAddress( address _treasureAddress ) external onlyRole(ADMIN_ROLE) { address oldTreasure = treasureAddress; treasureAddress = _treasureAddress; emit TreasureChanged(oldTreasure, treasureAddress); } function setPeriodLimit( uint256 _periodLimit ) external onlyRole(ADMIN_ROLE) { periodLimit = _periodLimit; } function setPeriodMaxAmount( uint256 _maxAmount ) external onlyRole(ADMIN_ROLE) { periodMaxAmount = _maxAmount; } function withdrawERC20( address token, uint256 amount ) external onlyRole(ASSET_MANAGER_ROLE) { IERC20(token).transfer(treasureAddress, amount); emit WithdrawERC20(token, treasureAddress, amount); } function checkLimits(uint256 amount) internal { if (!hasRole(ADMIN_ROLE, msg.sender)) { if (block.timestamp - periodStart <= periodLimit) { periodDepositedAmount += amount; require( periodDepositedAmount <= periodMaxAmount, "Period threshold is exceeded" ); } else { periodStart = block.timestamp; periodDepositedAmount = amount; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl struct AccessControlStorage { mapping(bytes32 role => RoleData) _roles; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { assembly { $.slot := AccessControlStorageLocation } } /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @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 returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @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 returns (bytes32) { AccessControlStorage storage $ = _getAccessControlStorage(); 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 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 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 `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { AccessControlStorage storage $ = _getAccessControlStorage(); bytes32 previousAdminRole = getRoleAdmin(role); $._roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (!hasRole(role, account)) { $._roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (hasRole(role, account)) { $._roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol"; import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable struct AccessControlEnumerableStorage { mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000; function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) { assembly { $.slot := AccessControlEnumerableStorageLocation } } function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } /** * @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 returns (address) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); 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 returns (uint256) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].length(); } /** * @dev Return all accounts that have `role` * * 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 getRoleMembers(bytes32 role) public view virtual returns (address[] memory) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].values(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool granted = super._grantRole(role, account); if (granted) { $._roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool revoked = super._revokeRole(role, account); if (revoked) { $._roleMembers[role].remove(account); } return revoked; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC-165 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); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC-165 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 v5.1.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @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. */ 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. This account bears the admin role (for the granted role). * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}. */ 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 `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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 v5.1.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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; assembly ("memory-safe") { 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; assembly ("memory-safe") { 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; assembly ("memory-safe") { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"thresholdAmount","type":"uint256"}],"name":"DepositToGateway","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"thresholdAmount","type":"uint256"}],"name":"SetThresholdAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTreasure","type":"address"},{"indexed":false,"internalType":"address","name":"newTreasure","type":"address"}],"name":"TreasureChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"thresholdAmount","type":"uint256"}],"name":"WithdrawFromGateway","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ASSET_MANAGER_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":"DEPOSITOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositToGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gatewayAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"role","type":"bytes32"}],"name":"getRoleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"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":[{"internalType":"address","name":"_gatewayAddress","type":"address"},{"internalType":"address","name":"_treasureAddress","type":"address"},{"internalType":"uint256","name":"_thresholdAmount","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nativeTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodDepositedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodMaxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","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":[{"internalType":"uint256","name":"_periodLimit","type":"uint256"}],"name":"setPeriodLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAmount","type":"uint256"}],"name":"setPeriodMaxAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_thresholdAmount","type":"uint256"}],"name":"setThresholdAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasureAddress","type":"address"}],"name":"setTreasureAddress","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":[],"name":"thresholdAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasureAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFromGateway","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611640806100206000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063961e2e7c11610104578063ab29fae6116100a2578063d46f6b0311610071578063d46f6b0314610416578063d547741f14610429578063eda4e6d61461043c578063fbaa2af41461044557600080fd5b8063ab29fae6146103d4578063c36b9332146103e7578063ca15c873146103fa578063cf763d1c1461040d57600080fd5b8063a217fddf116100de578063a217fddf1461035e578063a3246ad314610366578063a3b0b5a314610386578063a4b32de8146103ad57600080fd5b8063961e2e7c146103255780639fe8d18414610338578063a1db97821461034b57600080fd5b80634fbc07031161017c57806385f438c11161014b57806385f438c1146102c55780638b851b95146102ec5780639010d07c146102ff57806391d148541461031257600080fd5b80634fbc0703146102975780635561d9951461029f57806375b238fc146102a75780637baf7b58146102bc57600080fd5b806328f4dbb6116101b857806328f4dbb61461023d5780632f2ff15d1461024657806336568abe146102595780634d0047ee1461026c57600080fd5b806301ffc9a7146101df5780631794bb3c14610207578063248a9ca31461021c575b600080fd5b6101f26101ed366004611369565b61044e565b60405190151581526020015b60405180910390f35b61021a6102153660046113a8565b610479565b005b61022f61022a3660046113e9565b610665565b6040519081526020016101fe565b61022f60035481565b61021a610254366004611402565b610687565b61021a610267366004611402565b6106a9565b60015461027f906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b61021a6106e1565b61021a6109ae565b61022f6000805160206115eb83398151915281565b61022f60075481565b61022f7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b60005461027f906001600160a01b031681565b61027f61030d366004611432565b610b7b565b6101f2610320366004611402565b610baa565b61021a6103333660046113e9565b610be2565b61021a6103463660046113e9565b610c36565b61021a610359366004611454565b610c54565b61022f600081565b6103796103743660046113e9565b610d41565b6040516101fe9190611480565b61022f7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a981565b61022f7fb1fadd3142ab2ad7f1337ea4d97112bcc8337fc11ce5b20cb04ad038adf9981981565b61021a6103e23660046113e9565b610d73565b61021a6103f53660046114cd565b610d91565b61022f6104083660046113e9565b610e03565b61022f60045481565b60025461027f906001600160a01b031681565b61021a610437366004611402565b610e29565b61022f60055481565b61022f60065481565b60006001600160e01b03198216635a05180f60e01b1480610473575061047382610e45565b92915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156104bf5750825b905060008267ffffffffffffffff1660011480156104dc5750303b155b9050811580156104ea575080155b156105085760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561053257845460ff60401b1916600160401b1785555b61053a610e7a565b600080546001600160a01b03808b166001600160a01b0319928316811790935560028054918b1691909216179055600387905560408051631c2eb17b60e31b8152905163e1758bd8916004808201926020929091908290030181865afa1580156105a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cc91906114ea565b600180546001600160a01b0319166001600160a01b0392909216919091179055426005556105fb600033610e84565b506106146000805160206115eb83398151915233610e84565b50831561065b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b60009081526000805160206115cb833981519152602052604090206001015490565b61069082610665565b61069981610ec9565b6106a38383610e84565b50505050565b6001600160a01b03811633146106d25760405163334bd91960e11b815260040160405180910390fd5b6106dc8282610ed6565b505050565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a961070b81610ec9565b600154600080546040516370a0823160e01b81526001600160a01b039182166004820152919216906370a0823190602401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d9190611507565b905060035481106107eb5760405162461bcd60e51b815260206004820152602d60248201527f457363726f773a20476174657761792062616c616e636520657863656564732060448201526c1d1a19481d1a1c995cda1bdb19609a1b60648201526084015b60405180910390fd5b6000816003546107fb9190611536565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086d9190611507565b9050600081831061087e5781610880565b825b905061088b81610f12565b60015460005460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af11580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190611549565b5060005460405163b6b55f2560e01b8152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050507fa36fb4bfdc997f01886569c7a040f207e4c8a14d48583ab7c650bd50285448b28160035460405161099f929190918252602082015260400190565b60405180910390a15050505050565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46109d881610ec9565b600154600080546040516370a0823160e01b81526001600160a01b039182166004820152919216906370a0823190602401602060405180830381865afa158015610a26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4a9190611507565b90506003548111610ab45760405162461bcd60e51b815260206004820152602e60248201527f457363726f773a20476174657761792062616c616e63652069732062656c6f7760448201526d081d1a19481d1a1c995cda1bdb1960921b60648201526084016107e2565b600060035482610ac49190611536565b60008054604051630441a3e760e41b81529293506001600160a01b03169163441a3e7091610b0091859190600401918252602082015260400190565b600060405180830381600087803b158015610b1a57600080fd5b505af1158015610b2e573d6000803e3d6000fd5b505050507f665de00018bea0879c1d06d74ca32ac4cb727fa68b7467f2b4bf313265bb2f9581600354604051610b6e929190918252602082015260400190565b60405180910390a1505050565b60008281526000805160206115ab833981519152602081905260408220610ba29084610fb7565b949350505050565b60009182526000805160206115cb833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206115eb833981519152610bfa81610ec9565b60038290556040518281527f15bb4e58b1a08e54d6740a544df5446fd14f33e621da79a6e52bc7500f81ff6c9060200160405180910390a15050565b6000805160206115eb833981519152610c4e81610ec9565b50600655565b7fb1fadd3142ab2ad7f1337ea4d97112bcc8337fc11ce5b20cb04ad038adf99819610c7e81610ec9565b60025460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490529084169063a9059cbb906044016020604051808303816000875af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611549565b50600254604080516001600160a01b038087168252909216602083015281018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb2990606001610b6e565b60008181526000805160206115ab8339815191526020819052604090912060609190610d6c90610fc3565b9392505050565b6000805160206115eb833981519152610d8b81610ec9565b50600455565b6000805160206115eb833981519152610da981610ec9565b600280546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fdc1c13661e721d2c7f7e740517ba53939149aafc99861709612c8acfdd9aaeba9101610b6e565b60008181526000805160206115ab833981519152602081905260408220610d6c90610fd0565b610e3282610665565b610e3b81610ec9565b6106a38383610ed6565b60006001600160e01b03198216637965db0b60e01b148061047357506301ffc9a760e01b6001600160e01b0319831614610473565b610e82610fda565b565b60006000805160206115ab83398151915281610ea08585611023565b90508015610ba2576000858152602083905260409020610ec090856110c8565b50949350505050565b610ed381336110dd565b50565b60006000805160206115ab83398151915281610ef2858561111a565b90508015610ba2576000858152602083905260409020610ec09085611196565b610f2a6000805160206115eb83398151915233610baa565b610ed357600454600554610f3e9042611536565b11610fae578060076000828254610f55919061156b565b90915550506006546007541115610ed35760405162461bcd60e51b815260206004820152601c60248201527f506572696f64207468726573686f6c642069732065786365656465640000000060448201526064016107e2565b42600555600755565b6000610d6c83836111ab565b60606000610d6c836111d5565b6000610473825490565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610e8257604051631afcd79f60e31b815260040160405180910390fd5b60006000805160206115cb83398151915261103e8484610baa565b6110be576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556110743390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610473565b6000915050610473565b6000610d6c836001600160a01b038416611231565b6110e78282610baa565b6111165760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107e2565b5050565b60006000805160206115cb8339815191526111358484610baa565b156110be576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610473565b6000610d6c836001600160a01b038416611280565b60008260000182815481106111c2576111c261157e565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561122557602002820191906000526020600020905b815481526020019060010190808311611211575b50505050509050919050565b600081815260018301602052604081205461127857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610473565b506000610473565b600081815260018301602052604081205480156110be5760006112a4600183611536565b85549091506000906112b890600190611536565b905080821461131d5760008660000182815481106112d8576112d861157e565b90600052602060002001549050808760000184815481106112fb576112fb61157e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061132e5761132e611594565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610473565b60006020828403121561137b57600080fd5b81356001600160e01b031981168114610d6c57600080fd5b6001600160a01b0381168114610ed357600080fd5b6000806000606084860312156113bd57600080fd5b83356113c881611393565b925060208401356113d881611393565b929592945050506040919091013590565b6000602082840312156113fb57600080fd5b5035919050565b6000806040838503121561141557600080fd5b82359150602083013561142781611393565b809150509250929050565b6000806040838503121561144557600080fd5b50508035926020909101359150565b6000806040838503121561146757600080fd5b823561147281611393565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156114c15783516001600160a01b03168352928401929184019160010161149c565b50909695505050505050565b6000602082840312156114df57600080fd5b8135610d6c81611393565b6000602082840312156114fc57600080fd5b8151610d6c81611393565b60006020828403121561151957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561047357610473611520565b60006020828403121561155b57600080fd5b81518015158114610d6c57600080fd5b8082018082111561047357610473611520565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfec1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212202a505009703fa59c8d801de2c4d2a83c740419757f85561190bfaf61d783f82564736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063961e2e7c11610104578063ab29fae6116100a2578063d46f6b0311610071578063d46f6b0314610416578063d547741f14610429578063eda4e6d61461043c578063fbaa2af41461044557600080fd5b8063ab29fae6146103d4578063c36b9332146103e7578063ca15c873146103fa578063cf763d1c1461040d57600080fd5b8063a217fddf116100de578063a217fddf1461035e578063a3246ad314610366578063a3b0b5a314610386578063a4b32de8146103ad57600080fd5b8063961e2e7c146103255780639fe8d18414610338578063a1db97821461034b57600080fd5b80634fbc07031161017c57806385f438c11161014b57806385f438c1146102c55780638b851b95146102ec5780639010d07c146102ff57806391d148541461031257600080fd5b80634fbc0703146102975780635561d9951461029f57806375b238fc146102a75780637baf7b58146102bc57600080fd5b806328f4dbb6116101b857806328f4dbb61461023d5780632f2ff15d1461024657806336568abe146102595780634d0047ee1461026c57600080fd5b806301ffc9a7146101df5780631794bb3c14610207578063248a9ca31461021c575b600080fd5b6101f26101ed366004611369565b61044e565b60405190151581526020015b60405180910390f35b61021a6102153660046113a8565b610479565b005b61022f61022a3660046113e9565b610665565b6040519081526020016101fe565b61022f60035481565b61021a610254366004611402565b610687565b61021a610267366004611402565b6106a9565b60015461027f906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b61021a6106e1565b61021a6109ae565b61022f6000805160206115eb83398151915281565b61022f60075481565b61022f7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b60005461027f906001600160a01b031681565b61027f61030d366004611432565b610b7b565b6101f2610320366004611402565b610baa565b61021a6103333660046113e9565b610be2565b61021a6103463660046113e9565b610c36565b61021a610359366004611454565b610c54565b61022f600081565b6103796103743660046113e9565b610d41565b6040516101fe9190611480565b61022f7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a981565b61022f7fb1fadd3142ab2ad7f1337ea4d97112bcc8337fc11ce5b20cb04ad038adf9981981565b61021a6103e23660046113e9565b610d73565b61021a6103f53660046114cd565b610d91565b61022f6104083660046113e9565b610e03565b61022f60045481565b60025461027f906001600160a01b031681565b61021a610437366004611402565b610e29565b61022f60055481565b61022f60065481565b60006001600160e01b03198216635a05180f60e01b1480610473575061047382610e45565b92915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156104bf5750825b905060008267ffffffffffffffff1660011480156104dc5750303b155b9050811580156104ea575080155b156105085760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561053257845460ff60401b1916600160401b1785555b61053a610e7a565b600080546001600160a01b03808b166001600160a01b0319928316811790935560028054918b1691909216179055600387905560408051631c2eb17b60e31b8152905163e1758bd8916004808201926020929091908290030181865afa1580156105a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cc91906114ea565b600180546001600160a01b0319166001600160a01b0392909216919091179055426005556105fb600033610e84565b506106146000805160206115eb83398151915233610e84565b50831561065b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b60009081526000805160206115cb833981519152602052604090206001015490565b61069082610665565b61069981610ec9565b6106a38383610e84565b50505050565b6001600160a01b03811633146106d25760405163334bd91960e11b815260040160405180910390fd5b6106dc8282610ed6565b505050565b7f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a961070b81610ec9565b600154600080546040516370a0823160e01b81526001600160a01b039182166004820152919216906370a0823190602401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d9190611507565b905060035481106107eb5760405162461bcd60e51b815260206004820152602d60248201527f457363726f773a20476174657761792062616c616e636520657863656564732060448201526c1d1a19481d1a1c995cda1bdb19609a1b60648201526084015b60405180910390fd5b6000816003546107fb9190611536565b6001546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086d9190611507565b9050600081831061087e5781610880565b825b905061088b81610f12565b60015460005460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af11580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109049190611549565b5060005460405163b6b55f2560e01b8152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b505050507fa36fb4bfdc997f01886569c7a040f207e4c8a14d48583ab7c650bd50285448b28160035460405161099f929190918252602082015260400190565b60405180910390a15050505050565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46109d881610ec9565b600154600080546040516370a0823160e01b81526001600160a01b039182166004820152919216906370a0823190602401602060405180830381865afa158015610a26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4a9190611507565b90506003548111610ab45760405162461bcd60e51b815260206004820152602e60248201527f457363726f773a20476174657761792062616c616e63652069732062656c6f7760448201526d081d1a19481d1a1c995cda1bdb1960921b60648201526084016107e2565b600060035482610ac49190611536565b60008054604051630441a3e760e41b81529293506001600160a01b03169163441a3e7091610b0091859190600401918252602082015260400190565b600060405180830381600087803b158015610b1a57600080fd5b505af1158015610b2e573d6000803e3d6000fd5b505050507f665de00018bea0879c1d06d74ca32ac4cb727fa68b7467f2b4bf313265bb2f9581600354604051610b6e929190918252602082015260400190565b60405180910390a1505050565b60008281526000805160206115ab833981519152602081905260408220610ba29084610fb7565b949350505050565b60009182526000805160206115cb833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000805160206115eb833981519152610bfa81610ec9565b60038290556040518281527f15bb4e58b1a08e54d6740a544df5446fd14f33e621da79a6e52bc7500f81ff6c9060200160405180910390a15050565b6000805160206115eb833981519152610c4e81610ec9565b50600655565b7fb1fadd3142ab2ad7f1337ea4d97112bcc8337fc11ce5b20cb04ad038adf99819610c7e81610ec9565b60025460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490529084169063a9059cbb906044016020604051808303816000875af1158015610cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf59190611549565b50600254604080516001600160a01b038087168252909216602083015281018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb2990606001610b6e565b60008181526000805160206115ab8339815191526020819052604090912060609190610d6c90610fc3565b9392505050565b6000805160206115eb833981519152610d8b81610ec9565b50600455565b6000805160206115eb833981519152610da981610ec9565b600280546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fdc1c13661e721d2c7f7e740517ba53939149aafc99861709612c8acfdd9aaeba9101610b6e565b60008181526000805160206115ab833981519152602081905260408220610d6c90610fd0565b610e3282610665565b610e3b81610ec9565b6106a38383610ed6565b60006001600160e01b03198216637965db0b60e01b148061047357506301ffc9a760e01b6001600160e01b0319831614610473565b610e82610fda565b565b60006000805160206115ab83398151915281610ea08585611023565b90508015610ba2576000858152602083905260409020610ec090856110c8565b50949350505050565b610ed381336110dd565b50565b60006000805160206115ab83398151915281610ef2858561111a565b90508015610ba2576000858152602083905260409020610ec09085611196565b610f2a6000805160206115eb83398151915233610baa565b610ed357600454600554610f3e9042611536565b11610fae578060076000828254610f55919061156b565b90915550506006546007541115610ed35760405162461bcd60e51b815260206004820152601c60248201527f506572696f64207468726573686f6c642069732065786365656465640000000060448201526064016107e2565b42600555600755565b6000610d6c83836111ab565b60606000610d6c836111d5565b6000610473825490565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610e8257604051631afcd79f60e31b815260040160405180910390fd5b60006000805160206115cb83398151915261103e8484610baa565b6110be576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556110743390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610473565b6000915050610473565b6000610d6c836001600160a01b038416611231565b6110e78282610baa565b6111165760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107e2565b5050565b60006000805160206115cb8339815191526111358484610baa565b156110be576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610473565b6000610d6c836001600160a01b038416611280565b60008260000182815481106111c2576111c261157e565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561122557602002820191906000526020600020905b815481526020019060010190808311611211575b50505050509050919050565b600081815260018301602052604081205461127857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610473565b506000610473565b600081815260018301602052604081205480156110be5760006112a4600183611536565b85549091506000906112b890600190611536565b905080821461131d5760008660000182815481106112d8576112d861157e565b90600052602060002001549050808760000184815481106112fb576112fb61157e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061132e5761132e611594565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610473565b60006020828403121561137b57600080fd5b81356001600160e01b031981168114610d6c57600080fd5b6001600160a01b0381168114610ed357600080fd5b6000806000606084860312156113bd57600080fd5b83356113c881611393565b925060208401356113d881611393565b929592945050506040919091013590565b6000602082840312156113fb57600080fd5b5035919050565b6000806040838503121561141557600080fd5b82359150602083013561142781611393565b809150509250929050565b6000806040838503121561144557600080fd5b50508035926020909101359150565b6000806040838503121561146757600080fd5b823561147281611393565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b818110156114c15783516001600160a01b03168352928401929184019160010161149c565b50909695505050505050565b6000602082840312156114df57600080fd5b8135610d6c81611393565b6000602082840312156114fc57600080fd5b8151610d6c81611393565b60006020828403121561151957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561047357610473611520565b60006020828403121561155b57600080fd5b81518015158114610d6c57600080fd5b8082018082111561047357610473611520565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfec1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a26469706673582212202a505009703fa59c8d801de2c4d2a83c740419757f85561190bfaf61d783f82564736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.