Address Details
contract
0x7a495c05d009D346C5Ec942ec49AC519dd7035D0
- Contract Name
- Registry
- Creator
- 0x700682–67f0b6 at 0xe03308–1b31b8
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 107 Transactions
- Transfers
- 0 Transfers
- Gas Used
- 20,825,258
- Last Balance Update
- 24293128
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Registry
- Optimization enabled
- true
- Compiler version
- v0.8.7+commit.e28d00a7
- Optimization runs
- 800
- EVM Version
- london
- Verified at
- 2022-08-08T20:34:07.078529Z
contracts/Registry.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.7; import "@openzeppelin/contracts/access/AccessControl.sol"; // custom errors error DUPLICATE_POOL(); error INVALID_POOL(); error NOT_AUTHORIZED(); error POOL_DOES_NOT_EXIST(); /** @notice Registry Contract to keep a track of all goodghosting contracts. */ contract Registry is AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); /// @notice mapping with pool address as the key mapping(address => bool) public poolStatus; /// @notice maps the pool address to its index in the pools array. /// @dev if pool is removed, index will be reset to 0, so before using // the index, one should always check if the pool status is true (address is registered) mapping(address => uint256) public poolIndex; /// @notice list of pools address[] public pools; /// @notice emitted when a pool is added to the registry event LOG_NEW_POOL(address indexed caller, address indexed pool); /// @notice emitted when a pool is removed from the registry event LOG_POOL_REMOVED(address indexed caller, address indexed pool); /** @dev checks if a pool address is valid @param _pool pool contract address */ function isValid(address _pool) internal view { uint256 size; assembly { size := extcodesize(_pool) } if (size == 0) { revert INVALID_POOL(); } if (poolStatus[_pool]) { revert DUPLICATE_POOL(); } } /** @dev Constructor granting admin role */ constructor(address _admin) { _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); _setRoleAdmin(OPERATOR_ROLE, ADMIN_ROLE); _grantRole(ADMIN_ROLE, _admin); } /** @dev Add pools in the registry @param _pools addresses of the pools */ function addContract(address[] memory _pools) external { if (hasRole(ADMIN_ROLE, msg.sender) || hasRole(OPERATOR_ROLE, msg.sender)) { for (uint256 i = 0; i < _pools.length; ) { isValid(_pools[i]); poolIndex[_pools[i]] = pools.length; pools.push(_pools[i]); poolStatus[_pools[i]] = true; emit LOG_NEW_POOL(msg.sender, _pools[i]); unchecked { ++i; } } } else { revert NOT_AUTHORIZED(); } } /** @dev Remove a pool from the registry @param _pool address of the pool to be removed */ function removeContract(address _pool) external { if (hasRole(ADMIN_ROLE, msg.sender)) { if (!poolStatus[_pool]) { revert POOL_DOES_NOT_EXIST(); } uint256 index = poolIndex[_pool]; pools[index] = address(0); poolIndex[_pool] = 0; poolStatus[_pool] = false; emit LOG_POOL_REMOVED(msg.sender, _pool); } else { revert NOT_AUTHORIZED(); } } }
/_openzeppelin/contracts/access/AccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: * * ``` * 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}: * * ``` * 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. */ 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(uint160(account), 20), " 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()); } } }
/_openzeppelin/contracts/access/IAccessControl.sol
// 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; }
/_openzeppelin/contracts/utils/Context.sol
// 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; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_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); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// 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; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// 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); }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_admin","internalType":"address"}]},{"type":"error","name":"DUPLICATE_POOL","inputs":[]},{"type":"error","name":"INVALID_POOL","inputs":[]},{"type":"error","name":"NOT_AUTHORIZED","inputs":[]},{"type":"error","name":"POOL_DOES_NOT_EXIST","inputs":[]},{"type":"event","name":"LOG_NEW_POOL","inputs":[{"type":"address","name":"caller","internalType":"address","indexed":true},{"type":"address","name":"pool","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"LOG_POOL_REMOVED","inputs":[{"type":"address","name":"caller","internalType":"address","indexed":true},{"type":"address","name":"pool","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"OPERATOR_ROLE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addContract","inputs":[{"type":"address[]","name":"_pools","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolIndex","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"poolStatus","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pools","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeContract","inputs":[{"type":"address","name":"_pool","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b5060405162000fab38038062000fab8339810160408190526100319161018c565b61004a60008051602062000f8b833981519152806100a2565b6100837f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92960008051602062000f8b8339815191526100a2565b61009c60008051602062000f8b833981519152826100ed565b506101bc565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610188576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556101473390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006020828403121561019e57600080fd5b81516001600160a01b03811681146101b557600080fd5b9392505050565b610dbf80620001cc6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806391d148541161008c578063b42754a511610066578063b42754a514610237578063c375c2ef14610257578063d547741f1461026a578063f5b541a61461027d57600080fd5b806391d14854146101cd578063a217fddf14610204578063ac4afa381461020c57600080fd5b806336568abe116100c857806336568abe1461015d5780633c38ccbb14610170578063424c312d1461019357806375b238fc146101a657600080fd5b806301ffc9a7146100ef578063248a9ca3146101175780632f2ff15d14610148575b600080fd5b6101026100fd366004610c14565b6102a4565b60405190151581526020015b60405180910390f35b61013a610125366004610bcf565b60009081526020819052604090206001015490565b60405190815260200161010e565b61015b610156366004610be8565b6102db565b005b61015b61016b366004610be8565b610305565b61010261017e366004610ae8565b60016020526000908152604090205460ff1681565b61015b6101a1366004610b03565b610396565b61013a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101026101db366004610be8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61013a600081565b61021f61021a366004610bcf565b6105ac565b6040516001600160a01b03909116815260200161010e565b61013a610245366004610ae8565b60026020526000908152604090205481565b61015b610265366004610ae8565b6105d6565b61015b610278366004610be8565b6106f8565b61013a7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b03198216637965db0b60e01b14806102d557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102f68161071d565b6103008383610727565b505050565b6001600160a01b03811633146103885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61039282826107c5565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff168061040157503360009081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff165b156105905760005b81518110156103925761043482828151811061042757610427610d86565b6020026020010151610844565b6003805490506002600084848151811061045057610450610d86565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600382828151811061049057610490610d86565b602090810291909101810151825460018082018555600094855292842001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039092169190911790558351909182918590859081106104f0576104f0610d86565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811061054157610541610d86565b60200260200101516001600160a01b0316336001600160a01b03167f8ccec77b0cb63ac2cafd0f5de8cdfadab91ce656d262240ba8a6343bccc5f94560405160405180910390a3600101610409565b604051633d83866f60e01b815260040160405180910390fd5b50565b600381815481106105bc57600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff1615610590576001600160a01b03811660009081526001602052604090205460ff16610646576040516310813eaf60e21b815260040160405180910390fd5b6001600160a01b038116600090815260026020526040812054600380549192918390811061067657610676610d86565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039485161790559184168082526002835260408083208390556001909352828220805460ff19169055915133917fb144990a0fcff861c1603ba4e5262a1ddff45424c064fc779e96f92f5d39401791a35050565b6000828152602081905260409020600101546107138161071d565b61030083836107c5565b6105a9813361089e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610392576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556107813390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610392576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b803b806108645760405163015216d560e21b815260040160405180910390fd5b6001600160a01b03821660009081526001602052604090205460ff16156103925760405163d97337e960e01b815260040160405180910390fd5b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610392576108da816001600160a01b0316601461091c565b6108e583602061091c565b6040516020016108f6929190610c3e565b60408051601f198184030181529082905262461bcd60e51b825261037f91600401610cbf565b6060600061092b836002610d0a565b610936906002610cf2565b67ffffffffffffffff81111561094e5761094e610d9c565b6040519080825280601f01601f191660200182016040528015610978576020820181803683370190505b509050600360fc1b8160008151811061099357610993610d86565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106109c2576109c2610d86565b60200101906001600160f81b031916908160001a90535060006109e6846002610d0a565b6109f1906001610cf2565b90505b6001811115610a76577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610a3257610a32610d86565b1a60f81b828281518110610a4857610a48610d86565b60200101906001600160f81b031916908160001a90535060049490941c93610a6f81610d59565b90506109f4565b508315610ac55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161037f565b9392505050565b80356001600160a01b0381168114610ae357600080fd5b919050565b600060208284031215610afa57600080fd5b610ac582610acc565b60006020808385031215610b1657600080fd5b823567ffffffffffffffff80821115610b2e57600080fd5b818501915085601f830112610b4257600080fd5b813581811115610b5457610b54610d9c565b8060051b604051601f19603f83011681018181108582111715610b7957610b79610d9c565b604052828152858101935084860182860187018a1015610b9857600080fd5b600095505b83861015610bc257610bae81610acc565b855260019590950194938601938601610b9d565b5098975050505050505050565b600060208284031215610be157600080fd5b5035919050565b60008060408385031215610bfb57600080fd5b82359150610c0b60208401610acc565b90509250929050565b600060208284031215610c2657600080fd5b81356001600160e01b031981168114610ac557600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610c76816017850160208801610d29565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610cb3816028840160208801610d29565b01602801949350505050565b6020815260008251806020840152610cde816040850160208701610d29565b601f01601f19169190910160400192915050565b60008219821115610d0557610d05610d70565b500190565b6000816000190483118215151615610d2457610d24610d70565b500290565b60005b83811015610d44578181015183820152602001610d2c565b83811115610d53576000848401525b50505050565b600081610d6857610d68610d70565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c6343000807000aa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775000000000000000000000000ce17ffe0576fbb031aa27225ae05f7384f44bbc5
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806391d148541161008c578063b42754a511610066578063b42754a514610237578063c375c2ef14610257578063d547741f1461026a578063f5b541a61461027d57600080fd5b806391d14854146101cd578063a217fddf14610204578063ac4afa381461020c57600080fd5b806336568abe116100c857806336568abe1461015d5780633c38ccbb14610170578063424c312d1461019357806375b238fc146101a657600080fd5b806301ffc9a7146100ef578063248a9ca3146101175780632f2ff15d14610148575b600080fd5b6101026100fd366004610c14565b6102a4565b60405190151581526020015b60405180910390f35b61013a610125366004610bcf565b60009081526020819052604090206001015490565b60405190815260200161010e565b61015b610156366004610be8565b6102db565b005b61015b61016b366004610be8565b610305565b61010261017e366004610ae8565b60016020526000908152604090205460ff1681565b61015b6101a1366004610b03565b610396565b61013a7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6101026101db366004610be8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61013a600081565b61021f61021a366004610bcf565b6105ac565b6040516001600160a01b03909116815260200161010e565b61013a610245366004610ae8565b60026020526000908152604090205481565b61015b610265366004610ae8565b6105d6565b61015b610278366004610be8565b6106f8565b61013a7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b03198216637965db0b60e01b14806102d557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152602081905260409020600101546102f68161071d565b6103008383610727565b505050565b6001600160a01b03811633146103885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61039282826107c5565b5050565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff168061040157503360009081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff165b156105905760005b81518110156103925761043482828151811061042757610427610d86565b6020026020010151610844565b6003805490506002600084848151811061045057610450610d86565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600382828151811061049057610490610d86565b602090810291909101810151825460018082018555600094855292842001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039092169190911790558351909182918590859081106104f0576104f0610d86565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811061054157610541610d86565b60200260200101516001600160a01b0316336001600160a01b03167f8ccec77b0cb63ac2cafd0f5de8cdfadab91ce656d262240ba8a6343bccc5f94560405160405180910390a3600101610409565b604051633d83866f60e01b815260040160405180910390fd5b50565b600381815481106105bc57600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081527f7d7ffb7a348e1c6a02869081a26547b49160dd3df72d1d75a570eb9b698292ec602052604090205460ff1615610590576001600160a01b03811660009081526001602052604090205460ff16610646576040516310813eaf60e21b815260040160405180910390fd5b6001600160a01b038116600090815260026020526040812054600380549192918390811061067657610676610d86565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039485161790559184168082526002835260408083208390556001909352828220805460ff19169055915133917fb144990a0fcff861c1603ba4e5262a1ddff45424c064fc779e96f92f5d39401791a35050565b6000828152602081905260409020600101546107138161071d565b61030083836107c5565b6105a9813361089e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610392576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556107813390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610392576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b803b806108645760405163015216d560e21b815260040160405180910390fd5b6001600160a01b03821660009081526001602052604090205460ff16156103925760405163d97337e960e01b815260040160405180910390fd5b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610392576108da816001600160a01b0316601461091c565b6108e583602061091c565b6040516020016108f6929190610c3e565b60408051601f198184030181529082905262461bcd60e51b825261037f91600401610cbf565b6060600061092b836002610d0a565b610936906002610cf2565b67ffffffffffffffff81111561094e5761094e610d9c565b6040519080825280601f01601f191660200182016040528015610978576020820181803683370190505b509050600360fc1b8160008151811061099357610993610d86565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106109c2576109c2610d86565b60200101906001600160f81b031916908160001a90535060006109e6846002610d0a565b6109f1906001610cf2565b90505b6001811115610a76577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610a3257610a32610d86565b1a60f81b828281518110610a4857610a48610d86565b60200101906001600160f81b031916908160001a90535060049490941c93610a6f81610d59565b90506109f4565b508315610ac55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161037f565b9392505050565b80356001600160a01b0381168114610ae357600080fd5b919050565b600060208284031215610afa57600080fd5b610ac582610acc565b60006020808385031215610b1657600080fd5b823567ffffffffffffffff80821115610b2e57600080fd5b818501915085601f830112610b4257600080fd5b813581811115610b5457610b54610d9c565b8060051b604051601f19603f83011681018181108582111715610b7957610b79610d9c565b604052828152858101935084860182860187018a1015610b9857600080fd5b600095505b83861015610bc257610bae81610acc565b855260019590950194938601938601610b9d565b5098975050505050505050565b600060208284031215610be157600080fd5b5035919050565b60008060408385031215610bfb57600080fd5b82359150610c0b60208401610acc565b90509250929050565b600060208284031215610c2657600080fd5b81356001600160e01b031981168114610ac557600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610c76816017850160208801610d29565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610cb3816028840160208801610d29565b01602801949350505050565b6020815260008251806020840152610cde816040850160208701610d29565b601f01601f19169190910160400192915050565b60008219821115610d0557610d05610d70565b500190565b6000816000190483118215151615610d2457610d24610d70565b500290565b60005b83811015610d44578181015183820152602001610d2c565b83811115610d53576000848401525b50505050565b600081610d6857610d68610d70565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea164736f6c6343000807000a