Address Details
contract
0x3b708fd2828c0598d75484f0aaaae4bAEa71FEAd
- Contract Name
- Outbox
- Creator
- 0x4a9797–0cfb8b at 0x745828–b2a2dc
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 11 Transactions
- Transfers
- 20 Transfers
- Gas Used
- 1,501,983
- Last Balance Update
- 15346081
Transactions
Token Transfers
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Outbox
- Optimization enabled
- true
- Compiler version
- v0.8.13+commit.abaa5c0e
- Optimization runs
- 999999
- EVM Version
- london
- Verified at
- 2022-09-27T16:46:51.763440Z
contracts/Outbox.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IWormhole.sol"; import "./interfaces/TokenBridge.sol"; import "./interfaces/Swapper.sol"; /// contract Outbox is Ownable { event BridgeOut( address sender, bytes32 recipient, uint16 destinationChain, address token, uint256 amount, uint64 sequence ); event InboxAdded(uint16 chainId, address inbox); mapping(uint16 => address) inboxes; function bridgeOut( TokenBridge bridge, Swapper swapper, bytes32 recipient, uint16 destinationChain, address inputToken, address tokenToBridge, uint256 amount, uint256 minAmountToBridge, uint32 nonce, address destinationBridgedToken, address destinationFinalToken, uint256 minFinalAmount ) external payable returns (uint64 sequence) { require( inboxes[destinationChain] != address(0), "OB: Destination chain not supported" ); require( IERC20(inputToken).transferFrom( msg.sender, inputToken == tokenToBridge ? address(this) : address(swapper), amount ), "OB: Insufficient balance" ); if (inputToken != tokenToBridge) { swapper.swap(inputToken, tokenToBridge, minAmountToBridge); } uint256 amountToBridge = IERC20(tokenToBridge).balanceOf(address(this)); require( amountToBridge >= minAmountToBridge, "OB: Insufficient amount to bridge" ); bytes memory payload = abi.encode( recipient, destinationBridgedToken, destinationFinalToken, minFinalAmount ); IERC20(tokenToBridge).approve(address(bridge), amountToBridge); sequence = bridge.transferTokensWithPayload( tokenToBridge, amountToBridge, destinationChain, bytes32(uint256(uint160(inboxes[destinationChain]))), nonce, payload ); emit BridgeOut( msg.sender, recipient, destinationChain, tokenToBridge, amountToBridge, sequence ); return sequence; } function addInbox(uint16 chainId, address inbox) external onlyOwner { inboxes[chainId] = inbox; emit InboxAdded(chainId, inbox); } /// Shouldn't be necessary, here just in case of emergency. function exec( address target, uint256 value, bytes calldata data ) external onlyOwner { (bool success, bytes memory reason) = target.call{value: value}(data); require(success, string(reason)); } }
/_openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
/_openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the 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); }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
/contracts/interfaces/BridgeStructs.sol
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; contract BridgeStructs { struct Transfer { // PayloadID uint8 = 1 uint8 payloadID; // Amount being transferred (big-endian uint256) uint256 amount; // Address of the token. Left-zero-padded if shorter than 32 bytes bytes32 tokenAddress; // Chain ID of the token uint16 tokenChain; // Address of the recipient. Left-zero-padded if shorter than 32 bytes bytes32 to; // Chain ID of the recipient uint16 toChain; // Amount of tokens (big-endian uint256) that the user is willing to pay as relayer fee. Must be <= Amount. uint256 fee; } struct TransferWithPayload { // PayloadID uint8 = 3 uint8 payloadID; // Amount being transferred (big-endian uint256) uint256 amount; // Address of the token. Left-zero-padded if shorter than 32 bytes bytes32 tokenAddress; // Chain ID of the token uint16 tokenChain; // Address of the recipient. Left-zero-padded if shorter than 32 bytes bytes32 to; // Chain ID of the recipient uint16 toChain; // Address of the message sender. Left-zero-padded if shorter than 32 bytes bytes32 fromAddress; // An arbitrary payload bytes payload; } struct TransferResult { // Chain ID of the token uint16 tokenChain; // Address of the token. Left-zero-padded if shorter than 32 bytes bytes32 tokenAddress; // Amount being transferred (big-endian uint256) uint256 normalizedAmount; // Amount of tokens (big-endian uint256) that the user is willing to pay as relayer fee. Must be <= Amount. uint256 normalizedArbiterFee; // Portion of msg.value to be paid as the core bridge fee uint256 wormholeFee; } struct AssetMeta { // PayloadID uint8 = 2 uint8 payloadID; // Address of the token. Left-zero-padded if shorter than 32 bytes bytes32 tokenAddress; // Chain ID of the token uint16 tokenChain; // Number of decimals of the token (big-endian uint256) uint8 decimals; // Symbol of the token (UTF-8) bytes32 symbol; // Name of the token (UTF-8) bytes32 name; } struct RegisterChain { // Governance Header // module: "TokenBridge" left-padded bytes32 module; // governance action: 1 uint8 action; // governance paket chain id: this or 0 uint16 chainId; // Chain ID uint16 emitterChainID; // Emitter address. Left-zero-padded if shorter than 32 bytes bytes32 emitterAddress; } struct UpgradeContract { // Governance Header // module: "TokenBridge" left-padded bytes32 module; // governance action: 2 uint8 action; // governance paket chain id uint16 chainId; // Address of the new contract bytes32 newContract; } }
/contracts/interfaces/IWormhole.sol
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; import "./Structs.sol"; interface IWormhole is Structs { event LogMessagePublished( address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel ); function publishMessage( uint32 nonce, bytes memory payload, uint8 consistencyLevel ) external payable returns (uint64 sequence); function parseAndVerifyVM(bytes calldata encodedVM) external view returns ( Structs.VM memory vm, bool valid, string memory reason ); function verifyVM(Structs.VM memory vm) external view returns (bool valid, string memory reason); function verifySignatures( bytes32 hash, Structs.Signature[] memory signatures, Structs.GuardianSet memory guardianSet ) external pure returns (bool valid, string memory reason); function parseVM(bytes memory encodedVM) external pure returns (Structs.VM memory vm); function getGuardianSet(uint32 index) external view returns (Structs.GuardianSet memory); function getCurrentGuardianSetIndex() external view returns (uint32); function getGuardianSetExpiry() external view returns (uint32); function governanceActionIsConsumed(bytes32 hash) external view returns (bool); function isInitialized(address impl) external view returns (bool); function chainId() external view returns (uint16); function governanceChainId() external view returns (uint16); function governanceContract() external view returns (bytes32); function messageFee() external view returns (uint256); }
/contracts/interfaces/Structs.sol
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; interface Structs { struct Provider { uint16 chainId; uint16 governanceChainId; bytes32 governanceContract; } struct GuardianSet { address[] keys; uint32 expirationTime; } struct Signature { bytes32 r; bytes32 s; uint8 v; uint8 guardianIndex; } struct VM { uint8 version; uint32 timestamp; uint32 nonce; uint16 emitterChainId; bytes32 emitterAddress; uint64 sequence; uint8 consistencyLevel; bytes payload; uint32 guardianSetIndex; Signature[] signatures; bytes32 hash; } }
/contracts/interfaces/Swapper.sol
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; interface Swapper { function swap( address from, address to, uint256 requiredAmount ) external payable; }
/contracts/interfaces/TokenBridge.sol
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; import "./BridgeStructs.sol"; interface TokenBridge { function transferTokensWithPayload( address token, uint256 amount, uint16 recipientChain, bytes32 recipient, uint32 nonce, bytes memory payload ) external payable returns (uint64 sequence); function completeTransferWithPayload(bytes memory encodedVm) external returns (bytes memory); function parseTransferWithPayload(bytes memory encoded) external pure returns (BridgeStructs.TransferWithPayload memory transfer); }
Contract ABI
[{"type":"event","name":"BridgeOut","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":false},{"type":"bytes32","name":"recipient","internalType":"bytes32","indexed":false},{"type":"uint16","name":"destinationChain","internalType":"uint16","indexed":false},{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint64","name":"sequence","internalType":"uint64","indexed":false}],"anonymous":false},{"type":"event","name":"InboxAdded","inputs":[{"type":"uint16","name":"chainId","internalType":"uint16","indexed":false},{"type":"address","name":"inbox","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addInbox","inputs":[{"type":"uint16","name":"chainId","internalType":"uint16"},{"type":"address","name":"inbox","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint64","name":"sequence","internalType":"uint64"}],"name":"bridgeOut","inputs":[{"type":"address","name":"bridge","internalType":"contract TokenBridge"},{"type":"address","name":"swapper","internalType":"contract Swapper"},{"type":"bytes32","name":"recipient","internalType":"bytes32"},{"type":"uint16","name":"destinationChain","internalType":"uint16"},{"type":"address","name":"inputToken","internalType":"address"},{"type":"address","name":"tokenToBridge","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"minAmountToBridge","internalType":"uint256"},{"type":"uint32","name":"nonce","internalType":"uint32"},{"type":"address","name":"destinationBridgedToken","internalType":"address"},{"type":"address","name":"destinationFinalToken","internalType":"address"},{"type":"uint256","name":"minFinalAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"exec","inputs":[{"type":"address","name":"target","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x6080806040523461005b5760008054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09084a3610f9590816100618239f35b600080fdfe60806040526004361015610013575b600080fd5b6000803560e01c9081630565bb671461008e57508063179883d314610085578063715018a61461007c5780638da5cb5b14610073578063ba1506021461006a5763f2fde38b1461006257600080fd5b61000e61040e565b5061000e610336565b5061000e6102e3565b5061000e61023e565b5061000e61016e565b3461011b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011b576004356100c98161011e565b6044359067ffffffffffffffff90818311610117573660238401121561011757826004013591821161011757366024838501011161011757602461011293019060243590610e69565b604051f35b8380fd5b80fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b610124359061014a8261011e565b565b610144359061014a8261011e565b610104359063ffffffff8216820361000e57565b506101807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576004356101a68161011e565b602435906101b38261011e565b60643561ffff8116810361000e5761022f9261021492608435916101d68361011e565b60a435916101e38361011e565b6101eb61015a565b916101f461013c565b936101fd61014c565b95610164359760e4359460c43594604435916108fa565b60405167ffffffffffffffff90911681529081906020820190565b0390f35b600091031261000e57565b503461000e576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011b5780547fffffffffffffffffffffffff000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8216916102b5338414610504565b16825581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561ffff811680910361000e5760407f3d72a3886f8a0a5b383f97aa6dacbbea5e4eb367c1a5a8a8d2c438238dc67cc3916024356103a58161011e565b73ffffffffffffffffffffffffffffffffffffffff6103c981600054163314610504565b82600052600160205283600020911690817fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905582519182526020820152a1005b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561044a8161011e565b73ffffffffffffffffffffffffffffffffffffffff61046e81600054163314610504565b8116156104805761047e90610569565b005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b1561050b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b156105df57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4f423a2044657374696e6174696f6e20636861696e206e6f7420737570706f7260448201527f74656400000000000000000000000000000000000000000000000000000000006064820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116106a757604052565b6106af610663565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106a757604052565b9081602091031261000e5751801515810361000e5790565b506040513d6000823e3d90fd5b1561072157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4f423a20496e73756666696369656e742062616c616e636500000000000000006044820152fd5b9081602091031261000e575190565b1561079557565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f423a20496e73756666696369656e7420616d6f756e7420746f20627269646760448201527f65000000000000000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261000e575167ffffffffffffffff8116810361000e5790565b91908251928382526000905b8482106108905750601f84602094957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09311610883575b0116010190565b600085828601015261087c565b90602090818082850101519082860101520190610845565b929361ffff60c09563ffffffff9473ffffffffffffffffffffffffffffffffffffffff6108f79a9995168752602087015216604085015260608401521660808201528160a08201520190610839565b90565b939083999661095e73ffffffffffffffffffffffffffffffffffffffff6109566020999b9f979c9e969c61093c9061ffff166000526001602052604060002090565b5473ffffffffffffffffffffffffffffffffffffffff1690565b1615156105d8565b73ffffffffffffffffffffffffffffffffffffffff8316610a1b6109fe73ffffffffffffffffffffffffffffffffffffffff8c16998a94858514600014610e4d57305b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604481019190915291829081906064820190565b03816000875af1908115610e40575b600091610e21575b5061071a565b03610d6c575b50506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529960208b602481885afa9a8b15610d5f575b60009b610d21575b5073ffffffffffffffffffffffffffffffffffffffff6020969594610b088a610adc8f978b97610aa0610b649860009b101561078e565b604080518a810195865273ffffffffffffffffffffffffffffffffffffffff9d8e1660208701529c909116908401526060830152899160800190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018952886106b4565b16938b6040519485809481937f095ea7b300000000000000000000000000000000000000000000000000000000835289600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af18015610d14575b610ce7575b5085600089610bee610bb6610b9d610b9d61093c8761ffff166000526001602052604060002090565b73ffffffffffffffffffffffffffffffffffffffff1690565b956040519b8c97889687957fc5a5ebda0000000000000000000000000000000000000000000000000000000087528c600488016108a8565b03925af1938415610cda575b600094610c83575b5060408051338152602081019390935261ffff9093169282019290925273ffffffffffffffffffffffffffffffffffffffff9091166060820152608081019290925267ffffffffffffffff811660a0830152907f4b37133098b42769e408791c5867ebaef588dabe96ed7d8972d427e6d35b9454908060c081015b0390a190565b7f4b37133098b42769e408791c5867ebaef588dabe96ed7d8972d427e6d35b9454945090610ccb610c7d9260203d602011610cd3575b610cc381836106b4565b810190610819565b945090610c02565b503d610cb9565b610ce261070d565b610bfa565b610d0690843d8611610d0d575b610cfe81836106b4565b8101906106f5565b5038610b74565b503d610cf4565b610d1c61070d565b610b6f565b889392919b506020969594963d602011610d58575b610d4081836106b4565b8101610d4b9161077f565b9a90919295939495610a69565b503d610d36565b610d6761070d565b610a61565b73ffffffffffffffffffffffffffffffffffffffff16803b1561000e576040517fdf791e5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529188166024830152604482018c90526000908290606490829084905af18015610e14575b610dfb575b80610a21565b80610e08610e0e92610693565b80610233565b38610df5565b610e1c61070d565b610df0565b610e3a915060203d602011610d0d57610cfe81836106b4565b38610a15565b610e4861070d565b610a0d565b73ffffffffffffffffffffffffffffffffffffffff87166109a1565b91909160009384938493610e9573ffffffffffffffffffffffffffffffffffffffff8654163314610504565b826040519384928337810185815203925af13d15610f56573d67ffffffffffffffff8111610f49575b60405190610ef460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836106b4565b8152809260203d92013e5b15610f075750565b610f45906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610839565b0390fd5b610f51610663565b610ebe565b60609150610eff56fea26469706673582212208210dc0fa28c7a4d88d7ead0beb6045cf796cfdcbbcb4c5401e0fe6afdac510664736f6c634300080d0033
Deployed ByteCode
0x60806040526004361015610013575b600080fd5b6000803560e01c9081630565bb671461008e57508063179883d314610085578063715018a61461007c5780638da5cb5b14610073578063ba1506021461006a5763f2fde38b1461006257600080fd5b61000e61040e565b5061000e610336565b5061000e6102e3565b5061000e61023e565b5061000e61016e565b3461011b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011b576004356100c98161011e565b6044359067ffffffffffffffff90818311610117573660238401121561011757826004013591821161011757366024838501011161011757602461011293019060243590610e69565b604051f35b8380fd5b80fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b610124359061014a8261011e565b565b610144359061014a8261011e565b610104359063ffffffff8216820361000e57565b506101807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576004356101a68161011e565b602435906101b38261011e565b60643561ffff8116810361000e5761022f9261021492608435916101d68361011e565b60a435916101e38361011e565b6101eb61015a565b916101f461013c565b936101fd61014c565b95610164359760e4359460c43594604435916108fa565b60405167ffffffffffffffff90911681529081906020820190565b0390f35b600091031261000e57565b503461000e576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011b5780547fffffffffffffffffffffffff000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8216916102b5338414610504565b16825581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561ffff811680910361000e5760407f3d72a3886f8a0a5b383f97aa6dacbbea5e4eb367c1a5a8a8d2c438238dc67cc3916024356103a58161011e565b73ffffffffffffffffffffffffffffffffffffffff6103c981600054163314610504565b82600052600160205283600020911690817fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905582519182526020820152a1005b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561044a8161011e565b73ffffffffffffffffffffffffffffffffffffffff61046e81600054163314610504565b8116156104805761047e90610569565b005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b1561050b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b156105df57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4f423a2044657374696e6174696f6e20636861696e206e6f7420737570706f7260448201527f74656400000000000000000000000000000000000000000000000000000000006064820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116106a757604052565b6106af610663565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106a757604052565b9081602091031261000e5751801515810361000e5790565b506040513d6000823e3d90fd5b1561072157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4f423a20496e73756666696369656e742062616c616e636500000000000000006044820152fd5b9081602091031261000e575190565b1561079557565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f423a20496e73756666696369656e7420616d6f756e7420746f20627269646760448201527f65000000000000000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261000e575167ffffffffffffffff8116810361000e5790565b91908251928382526000905b8482106108905750601f84602094957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09311610883575b0116010190565b600085828601015261087c565b90602090818082850101519082860101520190610845565b929361ffff60c09563ffffffff9473ffffffffffffffffffffffffffffffffffffffff6108f79a9995168752602087015216604085015260608401521660808201528160a08201520190610839565b90565b939083999661095e73ffffffffffffffffffffffffffffffffffffffff6109566020999b9f979c9e969c61093c9061ffff166000526001602052604060002090565b5473ffffffffffffffffffffffffffffffffffffffff1690565b1615156105d8565b73ffffffffffffffffffffffffffffffffffffffff8316610a1b6109fe73ffffffffffffffffffffffffffffffffffffffff8c16998a94858514600014610e4d57305b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604481019190915291829081906064820190565b03816000875af1908115610e40575b600091610e21575b5061071a565b03610d6c575b50506040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529960208b602481885afa9a8b15610d5f575b60009b610d21575b5073ffffffffffffffffffffffffffffffffffffffff6020969594610b088a610adc8f978b97610aa0610b649860009b101561078e565b604080518a810195865273ffffffffffffffffffffffffffffffffffffffff9d8e1660208701529c909116908401526060830152899160800190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018952886106b4565b16938b6040519485809481937f095ea7b300000000000000000000000000000000000000000000000000000000835289600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af18015610d14575b610ce7575b5085600089610bee610bb6610b9d610b9d61093c8761ffff166000526001602052604060002090565b73ffffffffffffffffffffffffffffffffffffffff1690565b956040519b8c97889687957fc5a5ebda0000000000000000000000000000000000000000000000000000000087528c600488016108a8565b03925af1938415610cda575b600094610c83575b5060408051338152602081019390935261ffff9093169282019290925273ffffffffffffffffffffffffffffffffffffffff9091166060820152608081019290925267ffffffffffffffff811660a0830152907f4b37133098b42769e408791c5867ebaef588dabe96ed7d8972d427e6d35b9454908060c081015b0390a190565b7f4b37133098b42769e408791c5867ebaef588dabe96ed7d8972d427e6d35b9454945090610ccb610c7d9260203d602011610cd3575b610cc381836106b4565b810190610819565b945090610c02565b503d610cb9565b610ce261070d565b610bfa565b610d0690843d8611610d0d575b610cfe81836106b4565b8101906106f5565b5038610b74565b503d610cf4565b610d1c61070d565b610b6f565b889392919b506020969594963d602011610d58575b610d4081836106b4565b8101610d4b9161077f565b9a90919295939495610a69565b503d610d36565b610d6761070d565b610a61565b73ffffffffffffffffffffffffffffffffffffffff16803b1561000e576040517fdf791e5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201529188166024830152604482018c90526000908290606490829084905af18015610e14575b610dfb575b80610a21565b80610e08610e0e92610693565b80610233565b38610df5565b610e1c61070d565b610df0565b610e3a915060203d602011610d0d57610cfe81836106b4565b38610a15565b610e4861070d565b610a0d565b73ffffffffffffffffffffffffffffffffffffffff87166109a1565b91909160009384938493610e9573ffffffffffffffffffffffffffffffffffffffff8654163314610504565b826040519384928337810185815203925af13d15610f56573d67ffffffffffffffff8111610f49575b60405190610ef460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836106b4565b8152809260203d92013e5b15610f075750565b610f45906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610839565b0390fd5b610f51610663565b610ebe565b60609150610eff56fea26469706673582212208210dc0fa28c7a4d88d7ead0beb6045cf796cfdcbbcb4c5401e0fe6afdac510664736f6c634300080d0033