Overview
MATIC Balance
0 MATIC
MATIC Value
$0.00More Info
Private Name Tags
ContractCreator
Sponsored
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 29080601 | 794 days ago | IN | 0 MATIC | 0.1141752 |
Loading...
Loading
Contract Name:
ChildPool
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.7; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "./interfaces/IChildPool.sol"; import "./interfaces/IFxStateChildTunnel.sol"; contract ChildPool is IChildPool, Initializable, AccessControlUpgradeable, PausableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; bytes32 public constant INSTANT_POOL_OWNER = keccak256("IPO"); address private fxStateChildTunnel; address private maticX; address private trustedForwarder; address payable public override treasury; address payable public override instantPoolOwner; uint256 public override instantPoolMatic; uint256 public override instantPoolMaticX; string public override version; uint256 public override instantWithdrawalFeeBps; uint256 public override instantWithdrawalFees; mapping(address => MaticXSwapRequest[]) private userMaticXSwapRequests; uint256 public override claimedMatic; uint256 public override maticXSwapLockPeriod; /** * @param _fxStateChildTunnel - Address of the fxStateChildTunnel contract * @param _maticX - Address of maticX token on Polygon * @param _manager - Address of the manager * @param _instantPoolOwner - Address of the instant pool owner * @param _treasury - Address of the treasury * @param _instantWithdrawalFeeBps - Fee basis points for using instant withdrawal feature */ function initialize( address _fxStateChildTunnel, address _maticX, address _manager, address payable _instantPoolOwner, address payable _treasury, uint256 _instantWithdrawalFeeBps ) external initializer { __AccessControl_init(); __Pausable_init(); _setupRole(DEFAULT_ADMIN_ROLE, _manager); _setupRole(INSTANT_POOL_OWNER, _instantPoolOwner); instantPoolOwner = _instantPoolOwner; treasury = _treasury; fxStateChildTunnel = _fxStateChildTunnel; maticX = _maticX; instantWithdrawalFeeBps = _instantWithdrawalFeeBps; } //////////////////////////////////////////////////////////// ///// /// ///// ***Instant Pool Interactions*** /// ///// /// //////////////////////////////////////////////////////////// function provideInstantPoolMatic() external payable override whenNotPaused onlyRole(INSTANT_POOL_OWNER) { require(msg.value > 0, "Invalid amount"); instantPoolMatic += msg.value; } function provideInstantPoolMaticX(uint256 _amount) external override whenNotPaused onlyRole(INSTANT_POOL_OWNER) { require(_amount > 0, "Invalid amount"); instantPoolMaticX += _amount; IERC20Upgradeable(maticX).safeTransferFrom( _msgSender(), address(this), _amount ); } function withdrawInstantPoolMaticX(uint256 _amount) external override whenNotPaused onlyRole(INSTANT_POOL_OWNER) { require( instantPoolMaticX >= _amount, "Withdraw amount cannot exceed maticX in instant pool" ); instantPoolMaticX -= _amount; IERC20Upgradeable(maticX).safeTransfer(instantPoolOwner, _amount); } function withdrawInstantPoolMatic(uint256 _amount) external override whenNotPaused onlyRole(INSTANT_POOL_OWNER) { require( instantPoolMatic >= _amount, "Withdraw amount cannot exceed matic in instant pool" ); instantPoolMatic -= _amount; instantPoolOwner.transfer(_amount); } function withdrawInstantWithdrawalFees(uint256 _amount) external override whenNotPaused { require( instantWithdrawalFees >= _amount, "Withdraw amount cannot exceed collected matic in instantWithdrawalFees" ); instantWithdrawalFees -= _amount; treasury.transfer(_amount); } function swapMaticForMaticXViaInstantPool() external payable override whenNotPaused { require(msg.value > 0, "Invalid amount"); instantPoolMatic += msg.value; (uint256 amountInMaticX, , ) = convertMaticToMaticX(msg.value); require( instantPoolMaticX >= amountInMaticX, "Not enough maticX to instant swap" ); instantPoolMaticX -= amountInMaticX; IERC20Upgradeable(maticX).safeTransfer(_msgSender(), amountInMaticX); } function setMaticXSwapLockPeriod(uint256 _hours) external override onlyRole(DEFAULT_ADMIN_ROLE) { require(_hours <= 720, "_hours must not exceed 720 (1 month)"); maticXSwapLockPeriod = _hours * 1 hours; emit SetMaticXSwapLockPeriodEvent(_hours); } ///@dev returns maticXSwapLockPeriod or 24 hours (default value) in seconds function getMaticXSwapLockPeriod() public view override returns (uint256) { return (maticXSwapLockPeriod > 0) ? maticXSwapLockPeriod : 24 hours; } ///@dev request maticX->matic swap from instant pool function requestMaticXSwap(uint256 _amount) external override whenNotPaused returns (uint256) { require(_amount > 0, "Invalid amount"); IERC20Upgradeable(maticX).safeTransferFrom( _msgSender(), address(this), _amount ); instantPoolMaticX += _amount; (uint256 amountInMatic, , ) = convertMaticXToMatic(_amount); require( instantPoolMatic >= amountInMatic, "Sorry we don't have enough matic in the instant pool to facilitate this swap" ); instantPoolMatic -= amountInMatic; claimedMatic += amountInMatic; userMaticXSwapRequests[_msgSender()].push( MaticXSwapRequest( amountInMatic, block.timestamp, block.timestamp + getMaticXSwapLockPeriod() ) ); uint256 idx = userMaticXSwapRequests[_msgSender()].length - 1; emit RequestMaticXSwap(_msgSender(), _amount, amountInMatic, idx); return idx; } function getUserMaticXSwapRequests(address _address) external view override returns (MaticXSwapRequest[] memory) { return userMaticXSwapRequests[_address]; } ///@dev claim earlier requested maticX->matic swap from instant pool function claimMaticXSwap(uint256 _idx) external override whenNotPaused { _claimMaticXSwap(_msgSender(), _idx); } function _claimMaticXSwap(address _to, uint256 _idx) internal { MaticXSwapRequest[] storage userRequests = userMaticXSwapRequests[_to]; require(_idx < userRequests.length, "Invalid Index"); MaticXSwapRequest memory userRequest = userRequests[_idx]; require( block.timestamp >= userRequest.withdrawalTime, "Please wait for the bonding period to get over" ); claimedMatic -= userRequest.amount; payable(_to).transfer(userRequest.amount); userRequests[_idx] = userRequests[userRequests.length - 1]; userRequests.pop(); emit ClaimMaticXSwap(_to, _idx, userRequest.amount); } function swapMaticXForMaticViaInstantPool(uint256 _amount) external override whenNotPaused { // TODO: it is disabled for now! revert("Disabled"); // require(_amount > 0, "Invalid amount"); // instantPoolMaticX += _amount; // IERC20Upgradeable(maticX).safeTransferFrom( // _msgSender(), // address(this), // _amount // ); // (uint256 amountInMatic, , ) = IFxStateChildTunnel(fxStateChildTunnel) // .convertMaticXToMatic(_amount); // ( // uint256 amountInMaticAfterFees, // uint256 fees // ) = getAmountAfterInstantWithdrawalFees(amountInMatic); // require( // instantPoolMatic >= amountInMaticAfterFees, // "Not enough matic to instant swap" // ); // instantPoolMatic -= amountInMaticAfterFees; // instantWithdrawalFees += fees; // IERC20Upgradeable(polygonERC20).safeTransfer( // _msgSender(), // amountInMaticAfterFees // ); // emit CollectedInstantWithdrawalFees(fees); } /** * @dev Flips the pause state */ function togglePause() external override onlyRole(DEFAULT_ADMIN_ROLE) { paused() ? _unpause() : _pause(); } //////////////////////////////////////////////////////////// ///// /// ///// ***Setters*** /// ///// /// //////////////////////////////////////////////////////////// function setTreasury(address payable _address) external override onlyRole(DEFAULT_ADMIN_ROLE) { treasury = _address; emit SetTreasury(_address); } function setInstantPoolOwner(address payable _address) external override onlyRole(DEFAULT_ADMIN_ROLE) { require(instantPoolOwner != _address, "Old address == new address"); _revokeRole(INSTANT_POOL_OWNER, instantPoolOwner); instantPoolOwner = _address; _setupRole(INSTANT_POOL_OWNER, _address); emit SetInstantPoolOwner(_address); } function setFxStateChildTunnel(address _address) external override onlyRole(DEFAULT_ADMIN_ROLE) { fxStateChildTunnel = _address; emit SetFxStateChildTunnel(_address); } /** * @dev Function that sets instant withdrawal fee basis points * @notice Callable only by admin * @param _feeBps - Fee basis points (100 = 0.1%) */ function setInstantWithdrawalFeeBps(uint256 _feeBps) external override onlyRole(DEFAULT_ADMIN_ROLE) { require(_feeBps <= 10000, "_feeBps must not exceed 10000 (100%)"); instantWithdrawalFeeBps = _feeBps; emit SetInstantWithdrawalFeeBps(_feeBps); } /** * @dev Function that sets the new version * @param _version - New version that will be set */ function setVersion(string calldata _version) external override onlyRole(DEFAULT_ADMIN_ROLE) { version = _version; emit SetVersion(_version); } //////////////////////////////////////////////////////////// ///// /// ///// ***Getters*** /// ///// /// //////////////////////////////////////////////////////////// function convertMaticXToMatic(uint256 _balance) public view override returns ( uint256, uint256, uint256 ) { return IFxStateChildTunnel(fxStateChildTunnel).convertMaticXToMatic( _balance ); } function convertMaticToMaticX(uint256 _balance) public view override returns ( uint256, uint256, uint256 ) { return IFxStateChildTunnel(fxStateChildTunnel).convertMaticToMaticX( _balance ); } function getAmountAfterInstantWithdrawalFees(uint256 _amount) public view override returns (uint256, uint256) { uint256 fees = (_amount * instantWithdrawalFeeBps) / 10000; return (_amount - fees, fees); } function getContracts() external view override returns ( address _fxStateChildTunnel, address _maticX, address _trustedForwarder ) { _fxStateChildTunnel = fxStateChildTunnel; _maticX = maticX; _trustedForwarder = trustedForwarder; } //////////////////////////////////////////////////////////// ///// /// ///// ***MetaTx*** /// ///// /// //////////////////////////////////////////////////////////// function setTrustedForwarder(address _address) external override onlyRole(DEFAULT_ADMIN_ROLE) { trustedForwarder = _address; emit SetTrustedForwarder(_address); } function isTrustedForwarder(address _address) public view virtual returns (bool) { return _address == trustedForwarder; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../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: * * ``` * 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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).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 `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 ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` 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 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @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. * * 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 initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.7; interface IChildPool { struct MaticXSwapRequest { uint256 amount; uint256 requestTime; uint256 withdrawalTime; } function version() external view returns (string memory); function claimedMatic() external view returns (uint256); function maticXSwapLockPeriod() external view returns (uint256); function treasury() external view returns (address payable); function instantPoolOwner() external view returns (address payable); function instantPoolMatic() external view returns (uint256); function instantPoolMaticX() external view returns (uint256); function instantWithdrawalFees() external view returns (uint256); function instantWithdrawalFeeBps() external view returns (uint256); function provideInstantPoolMatic() external payable; function provideInstantPoolMaticX(uint256 _amount) external; function withdrawInstantPoolMaticX(uint256 _amount) external; function withdrawInstantPoolMatic(uint256 _amount) external; function withdrawInstantWithdrawalFees(uint256 _amount) external; function swapMaticForMaticXViaInstantPool() external payable; function swapMaticXForMaticViaInstantPool(uint256 _amount) external; function getMaticXSwapLockPeriod() external view returns (uint256); function setMaticXSwapLockPeriod(uint256 _hours) external; function getUserMaticXSwapRequests(address _address) external view returns (MaticXSwapRequest[] memory); function requestMaticXSwap(uint256 _amount) external returns (uint256); function claimMaticXSwap(uint256 _idx) external; function setTreasury(address payable _address) external; function setInstantPoolOwner(address payable _address) external; function setFxStateChildTunnel(address _address) external; function setInstantWithdrawalFeeBps(uint256 _feeBps) external; function setTrustedForwarder(address _address) external; function setVersion(string calldata _version) external; function togglePause() external; function convertMaticXToMatic(uint256 _balance) external view returns ( uint256, uint256, uint256 ); function convertMaticToMaticX(uint256 _balance) external view returns ( uint256, uint256, uint256 ); function getAmountAfterInstantWithdrawalFees(uint256 _amount) external view returns (uint256, uint256); function getContracts() external view returns ( address _fxStateChildTunnel, address _maticX, address _trustedForwarder ); event SetTreasury(address _address); event SetInstantPoolOwner(address _address); event SetFxStateChildTunnel(address _address); event SetTrustedForwarder(address _address); event SetVersion(string _version); event CollectedInstantWithdrawalFees(uint256 _fees); event SetInstantWithdrawalFeeBps(uint256 _feeBps); event SetMaticXSwapLockPeriodEvent(uint256 _hours); event ClaimMaticXSwap( address indexed _from, uint256 indexed _idx, uint256 _amountClaimed ); event RequestMaticXSwap( address indexed _from, uint256 _amountMaticX, uint256 _amountMatic, uint256 userSwapRequestsIndex ); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.7; interface IFxStateChildTunnel { function latestStateId() external view returns (uint256); function latestRootMessageSender() external view returns (address); function latestData() external view returns (bytes memory); function sendMessageToRoot(bytes memory message) external; function setFxRootTunnel(address _fxRootTunnel) external; function getReserves() external view returns (uint256, uint256); function getRate() external view returns (uint256); function convertMaticXToMatic(uint256 _balance) external view returns ( uint256, uint256, uint256 ); function convertMaticToMaticX(uint256 _balance) external view returns ( uint256, uint256, uint256 ); }
// 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 IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 IERC165Upgradeable { /** * @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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"uint256","name":"_idx","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountClaimed","type":"uint256"}],"name":"ClaimMaticXSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fees","type":"uint256"}],"name":"CollectedInstantWithdrawalFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountMaticX","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountMatic","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"userSwapRequestsIndex","type":"uint256"}],"name":"RequestMaticXSwap","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":"address","name":"_address","type":"address"}],"name":"SetFxStateChildTunnel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"SetInstantPoolOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_feeBps","type":"uint256"}],"name":"SetInstantWithdrawalFeeBps","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_hours","type":"uint256"}],"name":"SetMaticXSwapLockPeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"SetTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"SetTrustedForwarder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_version","type":"string"}],"name":"SetVersion","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INSTANT_POOL_OWNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"claimMaticXSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimedMatic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"convertMaticToMaticX","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_balance","type":"uint256"}],"name":"convertMaticXToMatic","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getAmountAfterInstantWithdrawalFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContracts","outputs":[{"internalType":"address","name":"_fxStateChildTunnel","type":"address"},{"internalType":"address","name":"_maticX","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaticXSwapLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getUserMaticXSwapRequests","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"requestTime","type":"uint256"},{"internalType":"uint256","name":"withdrawalTime","type":"uint256"}],"internalType":"struct IChildPool.MaticXSwapRequest[]","name":"","type":"tuple[]"}],"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":"_fxStateChildTunnel","type":"address"},{"internalType":"address","name":"_maticX","type":"address"},{"internalType":"address","name":"_manager","type":"address"},{"internalType":"address payable","name":"_instantPoolOwner","type":"address"},{"internalType":"address payable","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_instantWithdrawalFeeBps","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"instantPoolMatic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"instantPoolMaticX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"instantPoolOwner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"instantWithdrawalFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"instantWithdrawalFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maticXSwapLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provideInstantPoolMatic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"provideInstantPoolMaticX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"requestMaticXSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"_address","type":"address"}],"name":"setFxStateChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"setInstantPoolOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeBps","type":"uint256"}],"name":"setInstantWithdrawalFeeBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hours","type":"uint256"}],"name":"setMaticXSwapLockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_version","type":"string"}],"name":"setVersion","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":"swapMaticForMaticXViaInstantPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapMaticXForMaticViaInstantPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawInstantPoolMatic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawInstantPoolMaticX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawInstantWithdrawalFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50612858806100206000396000f3fe60806040526004361061025b5760003560e01c806377baf20911610144578063c759352d116100b6578063da7422281161007a578063da74222814610729578063e82d73e614610749578063e9ce053214610751578063ec7467ed14610786578063edb64ec01461079b578063f0f44260146107c857600080fd5b8063c759352d146106a9578063c78cf1a0146106bf578063cba45a7c146106c7578063d3bf9d59146106e9578063d547741f1461070957600080fd5b80639683e28e116101085780639683e28e146105e95780639ea87b2d14610609578063a217fddf1461061f578063c1e324a514610634578063c3a2a93a14610654578063c4ae31681461069457600080fd5b806377baf20914610553578063788bc78c1461057357806389dfa0251461059357806391d14854146105a957806395b6ef0c146105c957600080fd5b806336568abe116101dd5780635c975abb116101a15780635c975abb1461048057806361d027b31461049857806368c05c97146104b8578063701845b8146104d857806372be8891146104f857806375a85ef51461051857600080fd5b806336568abe146103d957806348eaf6d6146103f95780634aa6164d1461041957806354fd4d501461042f578063572b6c051461045157600080fd5b80631c083124116102245780631c083124146103175780631dd5d34c1461034f5780631e89a13714610373578063248a9ca3146103895780632f2ff15d146103b957600080fd5b8062fd822c1461026057806301ffc9a71461028257806313acce6a146102b757806313d0255e146102d7578063174b151c146102f7575b600080fd5b34801561026c57600080fd5b5061028061027b3660046123ab565b6107e8565b005b34801561028e57600080fd5b506102a261029d3660046123f4565b6108f8565b60405190151581526020015b60405180910390f35b3480156102c357600080fd5b506102806102d23660046123ab565b61092f565b3480156102e357600080fd5b506102806102f23660046123ab565b6109d8565b34801561030357600080fd5b506102806103123660046122f3565b610ad7565b34801561032357600080fd5b5060cd54610337906001600160a01b031681565b6040516001600160a01b0390911681526020016102ae565b34801561035b57600080fd5b5061036560d45481565b6040519081526020016102ae565b34801561037f57600080fd5b5061036560d15481565b34801561039557600080fd5b506103656103a43660046123ab565b60009081526065602052604090206001015490565b3480156103c557600080fd5b506102806103d43660046123c4565b610b33565b3480156103e557600080fd5b506102806103f43660046123c4565b610b5b565b34801561040557600080fd5b506103656104143660046123ab565b610be5565b34801561042557600080fd5b5061036560d25481565b34801561043b57600080fd5b50610444610e4a565b6040516102ae91906125d7565b34801561045d57600080fd5b506102a261046c3660046122f3565b60cb546001600160a01b0391821691161490565b34801561048c57600080fd5b5060975460ff166102a2565b3480156104a457600080fd5b5060cc54610337906001600160a01b031681565b3480156104c457600080fd5b506102806104d33660046123ab565b610ed8565b3480156104e457600080fd5b506102806104f33660046122f3565b610f59565b34801561050457600080fd5b506102806105133660046123ab565b611056565b34801561052457600080fd5b506105386105333660046123ab565b611101565b604080519384526020840192909252908201526060016102ae565b34801561055f57600080fd5b5061028061056e3660046123ab565b611190565b34801561057f57600080fd5b5061028061058e36600461241e565b6111c7565b34801561059f57600080fd5b5061036560ce5481565b3480156105b557600080fd5b506102a26105c43660046123c4565b611220565b3480156105d557600080fd5b506102806105e4366004612310565b61124b565b3480156105f557600080fd5b506105386106043660046123ab565b61138c565b34801561061557600080fd5b5061036560d55481565b34801561062b57600080fd5b50610365600081565b34801561064057600080fd5b5061028061064f3660046123ab565b6113c2565b34801561066057600080fd5b5060c95460ca5460cb54604080516001600160a01b03948516815292841660208401529216918101919091526060016102ae565b3480156106a057600080fd5b506102806114a3565b3480156106b557600080fd5b5061036560cf5481565b6102806114cb565b3480156106d357600080fd5b5061036560008051602061280383398151915281565b3480156106f557600080fd5b506102806107043660046123ab565b6115c7565b34801561071557600080fd5b506102806107243660046123c4565b61161d565b34801561073557600080fd5b506102806107443660046122f3565b611645565b6102806116a1565b34801561075d57600080fd5b5061077161076c3660046123ab565b611719565b604080519283526020830191909152016102ae565b34801561079257600080fd5b5061036561174e565b3480156107a757600080fd5b506107bb6107b63660046122f3565b611768565b6040516102ae919061254f565b3480156107d457600080fd5b506102806107e33660046122f3565b6117fb565b60975460ff16156108145760405162461bcd60e51b815260040161080b90612632565b60405180910390fd5b6000805160206128038339815191526108348161082f611857565b61187f565b8160ce5410156108a25760405162461bcd60e51b815260206004820152603360248201527f576974686472617720616d6f756e742063616e6e6f7420657863656564206d616044820152721d1a58c81a5b881a5b9cdd185b9d081c1bdbdb606a1b606482015260840161080b565b8160ce60008282546108b49190612700565b909155505060cd546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156108f3573d6000803e3d6000fd5b505050565b60006001600160e01b03198216637965db0b60e01b148061092957506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061093d8161082f611857565b61271082111561099b5760405162461bcd60e51b8152602060048201526024808201527f5f666565427073206d757374206e6f74206578636565642031303030302028316044820152633030252960e01b606482015260840161080b565b60d18290556040518281527ff4e904151506e99aac05f72edf50e48babc4cf26500fd10b096210c51755a2de906020015b60405180910390a15050565b60975460ff16156109fb5760405162461bcd60e51b815260040161080b90612632565b8060d2541015610a825760405162461bcd60e51b815260206004820152604660248201527f576974686472617720616d6f756e742063616e6e6f742065786365656420636f60448201527f6c6c6563746564206d6174696320696e20696e7374616e745769746864726177606482015265616c4665657360d01b608482015260a40161080b565b8060d26000828254610a949190612700565b909155505060cc546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610ad3573d6000803e3d6000fd5b5050565b6000610ae58161082f611857565b60c980546001600160a01b0319166001600160a01b0384169081179091556040519081527ffc1cc3f090c8622ac209ec8a7deabca32ef223096e08844b47f699fb083d4382906020016109cc565b600082815260656020526040902060010154610b518161082f611857565b6108f383836118e3565b610b63611857565b6001600160a01b0316816001600160a01b031614610bdb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161080b565b610ad3828261196a565b6000610bf360975460ff1690565b15610c105760405162461bcd60e51b815260040161080b90612632565b60008211610c305760405162461bcd60e51b815260040161080b9061260a565b610c4f610c3b611857565b60ca546001600160a01b03169030856119ef565b8160cf6000828254610c6191906126a7565b9091555060009050610c7283611101565b505090508060ce541015610d035760405162461bcd60e51b815260206004820152604c60248201527f536f72727920776520646f6e2774206861766520656e6f756768206d6174696360448201527f20696e2074686520696e7374616e7420706f6f6c20746f20666163696c69746160648201526b07465207468697320737761760a41b608482015260a40161080b565b8060ce6000828254610d159190612700565b925050819055508060d46000828254610d2e91906126a7565b9091555060d390506000610d40611857565b6001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280838152602001428152602001610d7f61174e565b610d8990426126a7565b90528154600181810184556000938452602080852084516003909402019283558301518282015560409092015160029091015560d382610dc7611857565b6001600160a01b03168152602081019190915260400160002054610deb9190612700565b9050610df5611857565b60408051868152602081018590529081018390526001600160a01b0391909116907fe4ab2eb98dc2b8ccf81f65743176eb1a6cf829d4307d33f01ec583041e493db39060600160405180910390a29392505050565b60d08054610e579061275a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e839061275a565b8015610ed05780601f10610ea557610100808354040283529160200191610ed0565b820191906000526020600020905b815481529060010190602001808311610eb357829003601f168201915b505050505081565b60975460ff1615610efb5760405162461bcd60e51b815260040161080b90612632565b600080516020612803833981519152610f168161082f611857565b60008211610f365760405162461bcd60e51b815260040161080b9061260a565b8160cf6000828254610f4891906126a7565b90915550610ad39050610c3b611857565b6000610f678161082f611857565b60cd546001600160a01b0383811691161415610fc55760405162461bcd60e51b815260206004820152601a60248201527f4f6c642061646472657373203d3d206e65772061646472657373000000000000604482015260640161080b565b60cd54610fea90600080516020612803833981519152906001600160a01b031661196a565b60cd80546001600160a01b0319166001600160a01b03841617905561101d60008051602061280383398151915283611a60565b6040516001600160a01b03831681527f655166b35cc2872bea49c3cc867c962f7da955e7fd4f5ad9285d913bab5ed39c906020016109cc565b60006110648161082f611857565b6102d08211156110c25760405162461bcd60e51b8152602060048201526024808201527f5f686f757273206d757374206e6f742065786365656420373230202831206d6f6044820152636e74682960e01b606482015260840161080b565b6110ce82610e106126e1565b60d5556040518281527f1898424283701bff1815e2eb4aaf8b2efb42ac7f19823d00cdb57ade022239e1906020016109cc565b60c9546040516375a85ef560e01b815260048101839052600091829182916001600160a01b0316906375a85ef5906024015b60606040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190612490565b9250925092509193909250565b60975460ff16156111b35760405162461bcd60e51b815260040161080b90612632565b6111c46111be611857565b82611a6a565b50565b60006111d58161082f611857565b6111e160d0848461225a565b507f63d269ac72f6157df0c915e6d321d02ae22763652c465e96b1aaa05c5879510283836040516112139291906125a8565b60405180910390a1505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff166112665760005460ff161561126a565b303b155b6112cd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161080b565b600054610100900460ff161580156112ef576000805461ffff19166101011790555b6112f7611cb7565b6112ff611ce0565b61130a600086611a60565b61132260008051602061280383398151915285611a60565b60cd80546001600160a01b038087166001600160a01b03199283161790925560cc805486841690831617905560c980548a841690831617905560ca80549289169290911691909117905560d18290558015611383576000805461ff00191690555b50505050505050565b60c954604051634b41f14760e11b815260048101839052600091829182916001600160a01b031690639683e28e90602401611133565b60975460ff16156113e55760405162461bcd60e51b815260040161080b90612632565b6000805160206128038339815191526114008161082f611857565b8160cf54101561146f5760405162461bcd60e51b815260206004820152603460248201527f576974686472617720616d6f756e742063616e6e6f7420657863656564206d616044820152731d1a58d6081a5b881a5b9cdd185b9d081c1bdbdb60621b606482015260840161080b565b8160cf60008282546114819190612700565b909155505060cd5460ca54610ad3916001600160a01b03918216911684611d0f565b60006114b18161082f611857565b60975460ff166114c3576111c4611d3f565b6111c4611db5565b60975460ff16156114ee5760405162461bcd60e51b815260040161080b90612632565b6000341161150e5760405162461bcd60e51b815260040161080b9061260a565b3460ce600082825461152091906126a7565b90915550600090506115313461138c565b505090508060cf5410156115915760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f756768206d617469635820746f20696e7374616e74207377616044820152600760fc1b606482015260840161080b565b8060cf60008282546115a39190612700565b909155506111c490506115b4611857565b60ca546001600160a01b03169083611d0f565b60975460ff16156115ea5760405162461bcd60e51b815260040161080b90612632565b60405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b604482015260640161080b565b60008281526065602052604090206001015461163b8161082f611857565b6108f3838361196a565b60006116538161082f611857565b60cb80546001600160a01b0319166001600160a01b0384169081179091556040519081527f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff906020016109cc565b60975460ff16156116c45760405162461bcd60e51b815260040161080b90612632565b6000805160206128038339815191526116df8161082f611857565b600034116116ff5760405162461bcd60e51b815260040161080b9061260a565b3460ce600082825461171191906126a7565b909155505050565b600080600061271060d1548561172f91906126e1565b61173991906126bf565b90506117458185612700565b94909350915050565b60008060d5541161176157506201518090565b5060d55490565b6001600160a01b038116600090815260d360209081526040808320805482518185028101850190935280835260609492939192909184015b828210156117f057838290600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050815260200190600101906117a0565b505050509050919050565b60006118098161082f611857565b60cc80546001600160a01b0319166001600160a01b0384169081179091556040519081527fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3906020016109cc565b60cb546000906001600160a01b031633141561187a575060131936013560601c90565b503390565b6118898282611220565b610ad3576118a1816001600160a01b03166014611e31565b6118ac836020611e31565b6040516020016118bd9291906124da565b60408051601f198184030181529082905262461bcd60e51b825261080b916004016125d7565b6118ed8282611220565b610ad35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611926611857565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6119748282611220565b15610ad35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191690556119ab611857565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a5a9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611fd4565b50505050565b610ad382826118e3565b6001600160a01b038216600090815260d36020526040902080548210611ac25760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c84092dcc8caf609b1b604482015260640161080b565b6000818381548110611ad657611ad66127c1565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505090508060400151421015611b7a5760405162461bcd60e51b815260206004820152602e60248201527f506c65617365207761697420666f722074686520626f6e64696e67207065726960448201526d37b2103a379033b2ba1037bb32b960911b606482015260840161080b565b805160d48054600090611b8e908490612700565b909155505080516040516001600160a01b0386169180156108fc02916000818181858888f19350505050158015611bc9573d6000803e3d6000fd5b5081548290611bda90600190612700565b81548110611bea57611bea6127c1565b9060005260206000209060030201828481548110611c0a57611c0a6127c1565b600091825260209091208254600390920201908155600180830154908201556002918201549101558154829080611c4357611c436127ab565b60008281526020812060036000199093019283020181815560018101829055600201559055805160405184916001600160a01b038716917f0c41df34337bedfb475937c70f33606f6e3c44695e9e18d667a856df778afd4e91611ca99190815260200190565b60405180910390a350505050565b600054610100900460ff16611cde5760405162461bcd60e51b815260040161080b9061265c565b565b600054610100900460ff16611d075760405162461bcd60e51b815260040161080b9061265c565b611cde6120a6565b6040516001600160a01b0383166024820152604481018290526108f390849063a9059cbb60e01b90606401611a23565b60975460ff1615611d625760405162461bcd60e51b815260040161080b90612632565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d98611857565b6040516001600160a01b03909116815260200160405180910390a1565b60975460ff16611dfe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161080b565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611d98611857565b60606000611e408360026126e1565b611e4b9060026126a7565b67ffffffffffffffff811115611e6357611e636127d7565b6040519080825280601f01601f191660200182016040528015611e8d576020820181803683370190505b509050600360fc1b81600081518110611ea857611ea86127c1565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ed757611ed76127c1565b60200101906001600160f81b031916908160001a9053506000611efb8460026126e1565b611f069060016126a7565b90505b6001811115611f7e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611f3a57611f3a6127c1565b1a60f81b828281518110611f5057611f506127c1565b60200101906001600160f81b031916908160001a90535060049490941c93611f7781612743565b9050611f09565b508315611fcd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161080b565b9392505050565b6000612029826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120d99092919063ffffffff16565b8051909150156108f357808060200190518101906120479190612389565b6108f35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161080b565b600054610100900460ff166120cd5760405162461bcd60e51b815260040161080b9061265c565b6097805460ff19169055565b60606120e884846000856120f0565b949350505050565b6060824710156121515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161080b565b6001600160a01b0385163b6121a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080b565b600080866001600160a01b031685876040516121c491906124be565b60006040518083038185875af1925050503d8060008114612201576040519150601f19603f3d011682016040523d82523d6000602084013e612206565b606091505b5091509150612216828286612221565b979650505050505050565b60608315612230575081611fcd565b8251156122405782518084602001fd5b8160405162461bcd60e51b815260040161080b91906125d7565b8280546122669061275a565b90600052602060002090601f01602090048101928261228857600085556122ce565b82601f106122a15782800160ff198235161785556122ce565b828001600101855582156122ce579182015b828111156122ce5782358255916020019190600101906122b3565b506122da9291506122de565b5090565b5b808211156122da57600081556001016122df565b60006020828403121561230557600080fd5b8135611fcd816127ed565b60008060008060008060c0878903121561232957600080fd5b8635612334816127ed565b95506020870135612344816127ed565b94506040870135612354816127ed565b93506060870135612364816127ed565b92506080870135612374816127ed565b8092505060a087013590509295509295509295565b60006020828403121561239b57600080fd5b81518015158114611fcd57600080fd5b6000602082840312156123bd57600080fd5b5035919050565b600080604083850312156123d757600080fd5b8235915060208301356123e9816127ed565b809150509250929050565b60006020828403121561240657600080fd5b81356001600160e01b031981168114611fcd57600080fd5b6000806020838503121561243157600080fd5b823567ffffffffffffffff8082111561244957600080fd5b818501915085601f83011261245d57600080fd5b81358181111561246c57600080fd5b86602082850101111561247e57600080fd5b60209290920196919550909350505050565b6000806000606084860312156124a557600080fd5b8351925060208401519150604084015190509250925092565b600082516124d0818460208701612717565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612512816017850160208801612717565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612543816028840160208801612717565b01602801949350505050565b602080825282518282018190526000919060409081850190868401855b8281101561259b578151805185528681015187860152850151858501526060909301929085019060010161256c565b5091979650505050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60208152600082518060208401526125f6816040850160208701612717565b601f01601f19169190910160400192915050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156126ba576126ba612795565b500190565b6000826126dc57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156126fb576126fb612795565b500290565b60008282101561271257612712612795565b500390565b60005b8381101561273257818101518382015260200161271a565b83811115611a5a5750506000910152565b60008161275257612752612795565b506000190190565b600181811c9082168061276e57607f821691505b6020821081141561278f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111c457600080fdfe2572658b6bf2c752d416f25a897890508cdc1ac8fd4845e04dcb7ecd022249fba2646970667358221220c45494d8e0acbc3a4c2f1255da7c2b0ee3f36ec5c74ec427b8958bd2184f93a464736f6c63430008070033
Deployed Bytecode
0x60806040526004361061025b5760003560e01c806377baf20911610144578063c759352d116100b6578063da7422281161007a578063da74222814610729578063e82d73e614610749578063e9ce053214610751578063ec7467ed14610786578063edb64ec01461079b578063f0f44260146107c857600080fd5b8063c759352d146106a9578063c78cf1a0146106bf578063cba45a7c146106c7578063d3bf9d59146106e9578063d547741f1461070957600080fd5b80639683e28e116101085780639683e28e146105e95780639ea87b2d14610609578063a217fddf1461061f578063c1e324a514610634578063c3a2a93a14610654578063c4ae31681461069457600080fd5b806377baf20914610553578063788bc78c1461057357806389dfa0251461059357806391d14854146105a957806395b6ef0c146105c957600080fd5b806336568abe116101dd5780635c975abb116101a15780635c975abb1461048057806361d027b31461049857806368c05c97146104b8578063701845b8146104d857806372be8891146104f857806375a85ef51461051857600080fd5b806336568abe146103d957806348eaf6d6146103f95780634aa6164d1461041957806354fd4d501461042f578063572b6c051461045157600080fd5b80631c083124116102245780631c083124146103175780631dd5d34c1461034f5780631e89a13714610373578063248a9ca3146103895780632f2ff15d146103b957600080fd5b8062fd822c1461026057806301ffc9a71461028257806313acce6a146102b757806313d0255e146102d7578063174b151c146102f7575b600080fd5b34801561026c57600080fd5b5061028061027b3660046123ab565b6107e8565b005b34801561028e57600080fd5b506102a261029d3660046123f4565b6108f8565b60405190151581526020015b60405180910390f35b3480156102c357600080fd5b506102806102d23660046123ab565b61092f565b3480156102e357600080fd5b506102806102f23660046123ab565b6109d8565b34801561030357600080fd5b506102806103123660046122f3565b610ad7565b34801561032357600080fd5b5060cd54610337906001600160a01b031681565b6040516001600160a01b0390911681526020016102ae565b34801561035b57600080fd5b5061036560d45481565b6040519081526020016102ae565b34801561037f57600080fd5b5061036560d15481565b34801561039557600080fd5b506103656103a43660046123ab565b60009081526065602052604090206001015490565b3480156103c557600080fd5b506102806103d43660046123c4565b610b33565b3480156103e557600080fd5b506102806103f43660046123c4565b610b5b565b34801561040557600080fd5b506103656104143660046123ab565b610be5565b34801561042557600080fd5b5061036560d25481565b34801561043b57600080fd5b50610444610e4a565b6040516102ae91906125d7565b34801561045d57600080fd5b506102a261046c3660046122f3565b60cb546001600160a01b0391821691161490565b34801561048c57600080fd5b5060975460ff166102a2565b3480156104a457600080fd5b5060cc54610337906001600160a01b031681565b3480156104c457600080fd5b506102806104d33660046123ab565b610ed8565b3480156104e457600080fd5b506102806104f33660046122f3565b610f59565b34801561050457600080fd5b506102806105133660046123ab565b611056565b34801561052457600080fd5b506105386105333660046123ab565b611101565b604080519384526020840192909252908201526060016102ae565b34801561055f57600080fd5b5061028061056e3660046123ab565b611190565b34801561057f57600080fd5b5061028061058e36600461241e565b6111c7565b34801561059f57600080fd5b5061036560ce5481565b3480156105b557600080fd5b506102a26105c43660046123c4565b611220565b3480156105d557600080fd5b506102806105e4366004612310565b61124b565b3480156105f557600080fd5b506105386106043660046123ab565b61138c565b34801561061557600080fd5b5061036560d55481565b34801561062b57600080fd5b50610365600081565b34801561064057600080fd5b5061028061064f3660046123ab565b6113c2565b34801561066057600080fd5b5060c95460ca5460cb54604080516001600160a01b03948516815292841660208401529216918101919091526060016102ae565b3480156106a057600080fd5b506102806114a3565b3480156106b557600080fd5b5061036560cf5481565b6102806114cb565b3480156106d357600080fd5b5061036560008051602061280383398151915281565b3480156106f557600080fd5b506102806107043660046123ab565b6115c7565b34801561071557600080fd5b506102806107243660046123c4565b61161d565b34801561073557600080fd5b506102806107443660046122f3565b611645565b6102806116a1565b34801561075d57600080fd5b5061077161076c3660046123ab565b611719565b604080519283526020830191909152016102ae565b34801561079257600080fd5b5061036561174e565b3480156107a757600080fd5b506107bb6107b63660046122f3565b611768565b6040516102ae919061254f565b3480156107d457600080fd5b506102806107e33660046122f3565b6117fb565b60975460ff16156108145760405162461bcd60e51b815260040161080b90612632565b60405180910390fd5b6000805160206128038339815191526108348161082f611857565b61187f565b8160ce5410156108a25760405162461bcd60e51b815260206004820152603360248201527f576974686472617720616d6f756e742063616e6e6f7420657863656564206d616044820152721d1a58c81a5b881a5b9cdd185b9d081c1bdbdb606a1b606482015260840161080b565b8160ce60008282546108b49190612700565b909155505060cd546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156108f3573d6000803e3d6000fd5b505050565b60006001600160e01b03198216637965db0b60e01b148061092957506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061093d8161082f611857565b61271082111561099b5760405162461bcd60e51b8152602060048201526024808201527f5f666565427073206d757374206e6f74206578636565642031303030302028316044820152633030252960e01b606482015260840161080b565b60d18290556040518281527ff4e904151506e99aac05f72edf50e48babc4cf26500fd10b096210c51755a2de906020015b60405180910390a15050565b60975460ff16156109fb5760405162461bcd60e51b815260040161080b90612632565b8060d2541015610a825760405162461bcd60e51b815260206004820152604660248201527f576974686472617720616d6f756e742063616e6e6f742065786365656420636f60448201527f6c6c6563746564206d6174696320696e20696e7374616e745769746864726177606482015265616c4665657360d01b608482015260a40161080b565b8060d26000828254610a949190612700565b909155505060cc546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610ad3573d6000803e3d6000fd5b5050565b6000610ae58161082f611857565b60c980546001600160a01b0319166001600160a01b0384169081179091556040519081527ffc1cc3f090c8622ac209ec8a7deabca32ef223096e08844b47f699fb083d4382906020016109cc565b600082815260656020526040902060010154610b518161082f611857565b6108f383836118e3565b610b63611857565b6001600160a01b0316816001600160a01b031614610bdb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161080b565b610ad3828261196a565b6000610bf360975460ff1690565b15610c105760405162461bcd60e51b815260040161080b90612632565b60008211610c305760405162461bcd60e51b815260040161080b9061260a565b610c4f610c3b611857565b60ca546001600160a01b03169030856119ef565b8160cf6000828254610c6191906126a7565b9091555060009050610c7283611101565b505090508060ce541015610d035760405162461bcd60e51b815260206004820152604c60248201527f536f72727920776520646f6e2774206861766520656e6f756768206d6174696360448201527f20696e2074686520696e7374616e7420706f6f6c20746f20666163696c69746160648201526b07465207468697320737761760a41b608482015260a40161080b565b8060ce6000828254610d159190612700565b925050819055508060d46000828254610d2e91906126a7565b9091555060d390506000610d40611857565b6001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280838152602001428152602001610d7f61174e565b610d8990426126a7565b90528154600181810184556000938452602080852084516003909402019283558301518282015560409092015160029091015560d382610dc7611857565b6001600160a01b03168152602081019190915260400160002054610deb9190612700565b9050610df5611857565b60408051868152602081018590529081018390526001600160a01b0391909116907fe4ab2eb98dc2b8ccf81f65743176eb1a6cf829d4307d33f01ec583041e493db39060600160405180910390a29392505050565b60d08054610e579061275a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e839061275a565b8015610ed05780601f10610ea557610100808354040283529160200191610ed0565b820191906000526020600020905b815481529060010190602001808311610eb357829003601f168201915b505050505081565b60975460ff1615610efb5760405162461bcd60e51b815260040161080b90612632565b600080516020612803833981519152610f168161082f611857565b60008211610f365760405162461bcd60e51b815260040161080b9061260a565b8160cf6000828254610f4891906126a7565b90915550610ad39050610c3b611857565b6000610f678161082f611857565b60cd546001600160a01b0383811691161415610fc55760405162461bcd60e51b815260206004820152601a60248201527f4f6c642061646472657373203d3d206e65772061646472657373000000000000604482015260640161080b565b60cd54610fea90600080516020612803833981519152906001600160a01b031661196a565b60cd80546001600160a01b0319166001600160a01b03841617905561101d60008051602061280383398151915283611a60565b6040516001600160a01b03831681527f655166b35cc2872bea49c3cc867c962f7da955e7fd4f5ad9285d913bab5ed39c906020016109cc565b60006110648161082f611857565b6102d08211156110c25760405162461bcd60e51b8152602060048201526024808201527f5f686f757273206d757374206e6f742065786365656420373230202831206d6f6044820152636e74682960e01b606482015260840161080b565b6110ce82610e106126e1565b60d5556040518281527f1898424283701bff1815e2eb4aaf8b2efb42ac7f19823d00cdb57ade022239e1906020016109cc565b60c9546040516375a85ef560e01b815260048101839052600091829182916001600160a01b0316906375a85ef5906024015b60606040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190612490565b9250925092509193909250565b60975460ff16156111b35760405162461bcd60e51b815260040161080b90612632565b6111c46111be611857565b82611a6a565b50565b60006111d58161082f611857565b6111e160d0848461225a565b507f63d269ac72f6157df0c915e6d321d02ae22763652c465e96b1aaa05c5879510283836040516112139291906125a8565b60405180910390a1505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600054610100900460ff166112665760005460ff161561126a565b303b155b6112cd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161080b565b600054610100900460ff161580156112ef576000805461ffff19166101011790555b6112f7611cb7565b6112ff611ce0565b61130a600086611a60565b61132260008051602061280383398151915285611a60565b60cd80546001600160a01b038087166001600160a01b03199283161790925560cc805486841690831617905560c980548a841690831617905560ca80549289169290911691909117905560d18290558015611383576000805461ff00191690555b50505050505050565b60c954604051634b41f14760e11b815260048101839052600091829182916001600160a01b031690639683e28e90602401611133565b60975460ff16156113e55760405162461bcd60e51b815260040161080b90612632565b6000805160206128038339815191526114008161082f611857565b8160cf54101561146f5760405162461bcd60e51b815260206004820152603460248201527f576974686472617720616d6f756e742063616e6e6f7420657863656564206d616044820152731d1a58d6081a5b881a5b9cdd185b9d081c1bdbdb60621b606482015260840161080b565b8160cf60008282546114819190612700565b909155505060cd5460ca54610ad3916001600160a01b03918216911684611d0f565b60006114b18161082f611857565b60975460ff166114c3576111c4611d3f565b6111c4611db5565b60975460ff16156114ee5760405162461bcd60e51b815260040161080b90612632565b6000341161150e5760405162461bcd60e51b815260040161080b9061260a565b3460ce600082825461152091906126a7565b90915550600090506115313461138c565b505090508060cf5410156115915760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f756768206d617469635820746f20696e7374616e74207377616044820152600760fc1b606482015260840161080b565b8060cf60008282546115a39190612700565b909155506111c490506115b4611857565b60ca546001600160a01b03169083611d0f565b60975460ff16156115ea5760405162461bcd60e51b815260040161080b90612632565b60405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b604482015260640161080b565b60008281526065602052604090206001015461163b8161082f611857565b6108f3838361196a565b60006116538161082f611857565b60cb80546001600160a01b0319166001600160a01b0384169081179091556040519081527f8c2bee8063bb4464870b7dfa415ebb2fe80bfa73ba20d6fbf0d42791274667ff906020016109cc565b60975460ff16156116c45760405162461bcd60e51b815260040161080b90612632565b6000805160206128038339815191526116df8161082f611857565b600034116116ff5760405162461bcd60e51b815260040161080b9061260a565b3460ce600082825461171191906126a7565b909155505050565b600080600061271060d1548561172f91906126e1565b61173991906126bf565b90506117458185612700565b94909350915050565b60008060d5541161176157506201518090565b5060d55490565b6001600160a01b038116600090815260d360209081526040808320805482518185028101850190935280835260609492939192909184015b828210156117f057838290600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050815260200190600101906117a0565b505050509050919050565b60006118098161082f611857565b60cc80546001600160a01b0319166001600160a01b0384169081179091556040519081527fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3906020016109cc565b60cb546000906001600160a01b031633141561187a575060131936013560601c90565b503390565b6118898282611220565b610ad3576118a1816001600160a01b03166014611e31565b6118ac836020611e31565b6040516020016118bd9291906124da565b60408051601f198184030181529082905262461bcd60e51b825261080b916004016125d7565b6118ed8282611220565b610ad35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611926611857565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6119748282611220565b15610ad35760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191690556119ab611857565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a5a9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611fd4565b50505050565b610ad382826118e3565b6001600160a01b038216600090815260d36020526040902080548210611ac25760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c84092dcc8caf609b1b604482015260640161080b565b6000818381548110611ad657611ad66127c1565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505090508060400151421015611b7a5760405162461bcd60e51b815260206004820152602e60248201527f506c65617365207761697420666f722074686520626f6e64696e67207065726960448201526d37b2103a379033b2ba1037bb32b960911b606482015260840161080b565b805160d48054600090611b8e908490612700565b909155505080516040516001600160a01b0386169180156108fc02916000818181858888f19350505050158015611bc9573d6000803e3d6000fd5b5081548290611bda90600190612700565b81548110611bea57611bea6127c1565b9060005260206000209060030201828481548110611c0a57611c0a6127c1565b600091825260209091208254600390920201908155600180830154908201556002918201549101558154829080611c4357611c436127ab565b60008281526020812060036000199093019283020181815560018101829055600201559055805160405184916001600160a01b038716917f0c41df34337bedfb475937c70f33606f6e3c44695e9e18d667a856df778afd4e91611ca99190815260200190565b60405180910390a350505050565b600054610100900460ff16611cde5760405162461bcd60e51b815260040161080b9061265c565b565b600054610100900460ff16611d075760405162461bcd60e51b815260040161080b9061265c565b611cde6120a6565b6040516001600160a01b0383166024820152604481018290526108f390849063a9059cbb60e01b90606401611a23565b60975460ff1615611d625760405162461bcd60e51b815260040161080b90612632565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d98611857565b6040516001600160a01b03909116815260200160405180910390a1565b60975460ff16611dfe5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161080b565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611d98611857565b60606000611e408360026126e1565b611e4b9060026126a7565b67ffffffffffffffff811115611e6357611e636127d7565b6040519080825280601f01601f191660200182016040528015611e8d576020820181803683370190505b509050600360fc1b81600081518110611ea857611ea86127c1565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ed757611ed76127c1565b60200101906001600160f81b031916908160001a9053506000611efb8460026126e1565b611f069060016126a7565b90505b6001811115611f7e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611f3a57611f3a6127c1565b1a60f81b828281518110611f5057611f506127c1565b60200101906001600160f81b031916908160001a90535060049490941c93611f7781612743565b9050611f09565b508315611fcd5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161080b565b9392505050565b6000612029826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120d99092919063ffffffff16565b8051909150156108f357808060200190518101906120479190612389565b6108f35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161080b565b600054610100900460ff166120cd5760405162461bcd60e51b815260040161080b9061265c565b6097805460ff19169055565b60606120e884846000856120f0565b949350505050565b6060824710156121515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161080b565b6001600160a01b0385163b6121a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080b565b600080866001600160a01b031685876040516121c491906124be565b60006040518083038185875af1925050503d8060008114612201576040519150601f19603f3d011682016040523d82523d6000602084013e612206565b606091505b5091509150612216828286612221565b979650505050505050565b60608315612230575081611fcd565b8251156122405782518084602001fd5b8160405162461bcd60e51b815260040161080b91906125d7565b8280546122669061275a565b90600052602060002090601f01602090048101928261228857600085556122ce565b82601f106122a15782800160ff198235161785556122ce565b828001600101855582156122ce579182015b828111156122ce5782358255916020019190600101906122b3565b506122da9291506122de565b5090565b5b808211156122da57600081556001016122df565b60006020828403121561230557600080fd5b8135611fcd816127ed565b60008060008060008060c0878903121561232957600080fd5b8635612334816127ed565b95506020870135612344816127ed565b94506040870135612354816127ed565b93506060870135612364816127ed565b92506080870135612374816127ed565b8092505060a087013590509295509295509295565b60006020828403121561239b57600080fd5b81518015158114611fcd57600080fd5b6000602082840312156123bd57600080fd5b5035919050565b600080604083850312156123d757600080fd5b8235915060208301356123e9816127ed565b809150509250929050565b60006020828403121561240657600080fd5b81356001600160e01b031981168114611fcd57600080fd5b6000806020838503121561243157600080fd5b823567ffffffffffffffff8082111561244957600080fd5b818501915085601f83011261245d57600080fd5b81358181111561246c57600080fd5b86602082850101111561247e57600080fd5b60209290920196919550909350505050565b6000806000606084860312156124a557600080fd5b8351925060208401519150604084015190509250925092565b600082516124d0818460208701612717565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612512816017850160208801612717565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612543816028840160208801612717565b01602801949350505050565b602080825282518282018190526000919060409081850190868401855b8281101561259b578151805185528681015187860152850151858501526060909301929085019060010161256c565b5091979650505050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60208152600082518060208401526125f6816040850160208701612717565b601f01601f19169190910160400192915050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082198211156126ba576126ba612795565b500190565b6000826126dc57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156126fb576126fb612795565b500290565b60008282101561271257612712612795565b500390565b60005b8381101561273257818101518382015260200161271a565b83811115611a5a5750506000910152565b60008161275257612752612795565b506000190190565b600181811c9082168061276e57607f821691505b6020821081141561278f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111c457600080fdfe2572658b6bf2c752d416f25a897890508cdc1ac8fd4845e04dcb7ecd022249fba2646970667358221220c45494d8e0acbc3a4c2f1255da7c2b0ee3f36ec5c74ec427b8958bd2184f93a464736f6c63430008070033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.