More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 423 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Upgrade | 21634314 | 9 days ago | IN | 0 ETH | 0.00057883 | ||||
Upgrade | 21572038 | 18 days ago | IN | 0 ETH | 0.00093962 | ||||
Upgrade | 21496670 | 29 days ago | IN | 0 ETH | 0.00090115 | ||||
Upgrade | 21428459 | 38 days ago | IN | 0 ETH | 0.00186816 | ||||
Upgrade | 21393304 | 43 days ago | IN | 0 ETH | 0.00225602 | ||||
Upgrade | 21391795 | 43 days ago | IN | 0 ETH | 0.00201596 | ||||
Upgrade | 21386538 | 44 days ago | IN | 0 ETH | 0.00325013 | ||||
Upgrade | 21009225 | 97 days ago | IN | 0 ETH | 0.00162986 | ||||
Upgrade | 20892966 | 113 days ago | IN | 0 ETH | 0.0020456 | ||||
Upgrade | 20875523 | 115 days ago | IN | 0 ETH | 0.00076343 | ||||
Upgrade | 20848223 | 119 days ago | IN | 0 ETH | 0.00134329 | ||||
Upgrade | 20373374 | 185 days ago | IN | 0 ETH | 0.00064225 | ||||
Upgrade | 20137266 | 218 days ago | IN | 0 ETH | 0.00043463 | ||||
Upgrade | 20082224 | 226 days ago | IN | 0 ETH | 0.00222211 | ||||
Upgrade | 20038437 | 232 days ago | IN | 0 ETH | 0.00164113 | ||||
Upgrade | 19888060 | 253 days ago | IN | 0 ETH | 0.00065885 | ||||
Upgrade | 19869825 | 256 days ago | IN | 0 ETH | 0.00205297 | ||||
Upgrade | 19847559 | 259 days ago | IN | 0 ETH | 0.00086732 | ||||
Upgrade | 19817265 | 263 days ago | IN | 0 ETH | 0.00178302 | ||||
Upgrade | 19786782 | 267 days ago | IN | 0 ETH | 0.00095474 | ||||
Upgrade | 19695812 | 280 days ago | IN | 0 ETH | 0.00102647 | ||||
Upgrade | 19565809 | 298 days ago | IN | 0 ETH | 0.00273501 | ||||
Upgrade | 19560831 | 299 days ago | IN | 0 ETH | 0.0030811 | ||||
Upgrade | 19560243 | 299 days ago | IN | 0 ETH | 0.00285103 | ||||
Upgrade | 19463268 | 313 days ago | IN | 0 ETH | 0.00586115 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TokenUpgrade
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.8.15; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./TransferHelper.sol"; import "../access/AccessControl.sol"; import "../interfaces/ITokenUpgrade.sol"; import "../utils/Cast.sol"; import "../utils/Math.sol"; /* By signing this Release and clicking "I Agree" on the web interface at https://yieldprotocol.com/ and accessing the smart contract to redeem my [existing LP Tokens] for [updated LP Tokens], I and any protocol I represent hereby irrevocably and unconditionally release all claims I and any protocol I represent (or other separate related or affiliated legal entities) ("Releasing Parties") may have against Yield, Inc. and any of its agents, affiliates, officers, employees, or principals ("Released Parties") related to this matter whether such claims are known or unknown at this time and regardless of how such claims arise and the laws governing such claims (which shall include but not be limited to any claims arising out of Yield Protocol's terms of use). This release constitutes an express and voluntary binding waiver and relinquishment to the fullest extent permitted by law. Releasing Parties further agree to indemnify the Released Parties from any and all third-party claims arising or related to this matter, including damages, attorneys' fees, and any other costs related to those claims. If I am acting for or on behalf of a company (or other such separate related or affiliated legal entity), by signing this Release, clicking "I Agree" on the web interface at https://yieldprotocol.com/ or executing the smart contract and accepting the redemption, I confirm that I am duly authorized to enter into this contract on its behalf. I and any Releasing Parties I represent further acknowledge and agree that the Released Parties are not the issuer of the [updated LP Tokens] that I may redeem through the smart contracts accessible at https://yieldprotocol.com/, the Released Parties are not issuing such [updated LP Token] to me, and I have no expectations from or rights with respect to any Released Party with respect to the [updated LP Token]. This agreement and all disputes relating to or arising under this agreement (including the interpretation, validity or enforcement thereof) will be governed by and subject to Yield, Inc.'s Terms of Service, including, but not limited to, the Limitation of Liability, Dispute Resolution by Binding Arbitration, and General provisions within the Terms of Service. To the extent that the terms of this release are inconsistent with any previous agreement and/or Yield, Inc.'s Terms of Service, I accept that these terms take priority and, where necessary, replace the previous terms. */ /// @dev TokenUpgrade is a contract that can be used upgrade tokens at a fixed rate, with /// the aim of completely replacing the supply of a token by the funds supplied to /// this contract. It is meant to be used as a token upgrade, when other mechanisms fail. /// @dev This contract is currently under audit and not eligible for any bounties. contract TokenUpgrade is AccessControl { using Cast for uint256; using Math for uint256; using TransferHelper for IERC20; error SameToken(address token); error TokenInNotRegistered(address tokenIn); error TokenInAlreadyRegistered(address tokenIn); error TokenOutNotRegistered(address tokenOut); error TokenOutAlreadyRegistered(address tokenOut); error InvalidAcceptanceToken(); error AlreadyClaimed(); error NotInMerkleTree(); event Registered( IERC20 indexed tokenIn, IERC20 indexed tokenOut, uint256 tokenInBalance, uint256 tokenOutBalance, uint96 ratio, bytes32 merkleRoot ); event Unregistered( IERC20 indexed tokenIn, IERC20 indexed tokenOut, uint256 tokenInBalance, uint256 tokenOutBalance ); event Upgraded( IERC20 indexed tokenIn, IERC20 indexed tokenOut, uint256 tokenInAmount, uint256 tokenOutAmount ); event Extracted(IERC20 indexed tokenIn, uint256 tokenInBalance); event Recovered(IERC20 indexed token, uint256 recovered); struct TokenIn { IERC20 reverse; uint96 ratio; uint256 balance; bytes32 merkleRoot; } struct TokenOut { IERC20 reverse; uint256 balance; } // Hash of the above terms of service bytes32 tosHash = 0x9f6699a0964b1bd6fe6c9fb8bebea236c08311ddd25781bbf5d372d00d32936b; mapping(IERC20 => TokenIn) public tokensIn; mapping(IERC20 => TokenOut) public tokensOut; mapping(bytes32 => bool) public isClaimed; /// @dev Register a token to be replaced, and the token to replace it with. /// The ratio is calculated as the funds of the replacement token divided by the supply of the token to be replaced. /// The tokens used as a replacement must have been sent to the contract before this call. /// @param tokenIn_ The token to be replaced /// @param tokenOut_ The token to replace it with /// @param merkleRoot_ the root of the merkle tree for tokenIn_ function register(IERC20 tokenIn_, IERC20 tokenOut_, bytes32 merkleRoot_) external auth { if (address(tokenIn_) == address(tokenOut_)) revert SameToken(address(tokenIn_)); if (address(tokensIn[tokenIn_].reverse) != address(0)) revert TokenInAlreadyRegistered(address(tokenIn_)); if (address(tokensOut[tokenOut_].reverse) != address(0)) revert TokenOutAlreadyRegistered(address(tokenOut_)); uint96 ratio = tokenOut_.balanceOf(address(this)).wdiv(tokenIn_.totalSupply()).u96(); uint256 tokenInBalance = tokenIn_.balanceOf(address(this)); uint256 tokenOutBalance = tokenOut_.balanceOf(address(this)); tokensIn[tokenIn_] = TokenIn(tokenOut_, ratio, tokenInBalance, merkleRoot_); tokensOut[tokenOut_] = TokenOut(tokenIn_, tokenOutBalance); emit Registered(tokenIn_, tokenOut_, tokenInBalance, tokenOutBalance, ratio, merkleRoot_); } /// @dev Unregister a token to be replaced, and the token to replace it with. Send all related tokens to a given address. /// @param tokenIn_ The token to be replaced /// @param to The address to send all tokens to function unregister(IERC20 tokenIn_, address to) external auth { TokenIn memory tokenIn = tokensIn[tokenIn_]; if (address(tokenIn.reverse) == address(0)) revert TokenInNotRegistered(address(tokenIn_)); IERC20 tokenOut_ = tokenIn.reverse; delete tokensIn[tokenIn_]; delete tokensOut[tokenOut_]; // We send all related funds to the given address to make sure it's a clean sweep, not just the tracked balances. uint256 tokenInBalance = tokenIn_.balanceOf(address(this)); uint256 tokenOutBalance = tokenOut_.balanceOf(address(this)); tokenIn_.safeTransfer(to, tokenInBalance); tokenOut_.safeTransfer(to, tokenOutBalance); emit Unregistered(tokenIn_, tokenOut_, tokenInBalance, tokenOutBalance); } /// @dev Extract tokens replaced by this contract. /// @param tokenIn_ The token to be replaced /// @param to The address to send the tokens to function extract(IERC20 tokenIn_, address to) external auth { TokenIn memory tokenIn = tokensIn[tokenIn_]; if (address(tokenIn.reverse) == address(0)) revert TokenInNotRegistered(address(tokenIn_)); tokensIn[tokenIn_].balance = 0; tokenIn_.safeTransfer(to, tokenIn.balance); emit Extracted(tokenIn_, tokenIn.balance); } /// @dev Recover tokens deposited to the contract by mistake /// Be careful, the address passed on as a token is not verified to be a valid ERC20 token. /// @param token The token to be recovered /// @param to The address to send the tokens to function recover(IERC20 token, address to) external auth { if (address(tokensIn[token].reverse) != address(0)) revert TokenInAlreadyRegistered(address(token)); if (address(tokensOut[token].reverse) != address(0)) revert TokenOutAlreadyRegistered(address(token)); uint256 recovered = token.balanceOf(address(this)); token.safeTransfer(to, recovered); emit Recovered(token, recovered); } /// @dev Upgrade a token for its replacement, at the registered ratio. /// The rounding for tokenOutAmount means that the TokenUpgrade contract /// gets the left over wei. /// @param tokenIn_ The token to be replaced /// @param acceptanceToken The acceptance token for the terms of service /// @param from The owner of tokenIn_ /// @param tokenInAmount The amount of tokenIn_ to upgrade /// @param proof The merkle proof to verify the upgrade function upgrade(IERC20 tokenIn_, bytes32 acceptanceToken, address from, uint256 tokenInAmount, bytes32[] calldata proof) external { if (acceptanceToken != keccak256(abi.encodePacked(from, tosHash))) revert InvalidAcceptanceToken(); TokenIn memory tokenIn = tokensIn[tokenIn_]; if (address(tokenIn.reverse) == address(0)) revert TokenInNotRegistered(address(tokenIn_)); IERC20 tokenOut_ = tokenIn.reverse; bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(from, tokenInAmount)))); if (isClaimed[leaf]) revert AlreadyClaimed(); isClaimed[leaf] = true; bool isValidLeaf = MerkleProof.verifyCalldata(proof, tokenIn.merkleRoot, leaf); if (!isValidLeaf) revert NotInMerkleTree(); tokenIn_.safeTransferFrom(from, address(this), tokenInAmount); uint256 tokenOutAmount = tokenInAmount.wmul(tokenIn.ratio); tokensIn[tokenIn_].balance += tokenInAmount; tokensOut[tokenOut_].balance -= tokenOutAmount; tokenOut_.safeTransfer(from, tokenOutAmount); emit Upgraded(tokenIn_, tokenOut_, tokenInAmount, tokenOutAmount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // Taken from https://github.com/Uniswap/uniswap-lib/blob/master/src/libraries/TransferHelper.sol pragma solidity ^0.8.0; import "./IERC20.sol"; import "../utils/RevertMsgExtractor.sol"; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false // USDT is a well known token that returns nothing for its transfer, transferFrom, and approve functions // and part of the reason this library exists library TransferHelper { /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with the underlying revert message if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( IERC20 token, address to, uint256 value ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); if (!(success && _returnTrueOrNothing(data))) revert(RevertMsgExtractor.getRevertMsg(data)); } /// @notice Approves a spender to transfer tokens from msg.sender /// @dev Errors with the underlying revert message if transfer fails /// @param token The contract address of the token which will be approved /// @param spender The approved spender /// @param value The value of the allowance function safeApprove( IERC20 token, address spender, uint256 value ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.approve.selector, spender, value)); if (!(success && _returnTrueOrNothing(data))) revert(RevertMsgExtractor.getRevertMsg(data)); } /// @notice Transfers tokens from the targeted address to the given destination /// @dev Errors with the underlying revert message if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); if (!(success && _returnTrueOrNothing(data))) revert(RevertMsgExtractor.getRevertMsg(data)); } /// @notice Transfers ETH to the recipient address /// @dev Errors with the underlying revert message if transfer fails /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address payable to, uint256 value) internal { (bool success, bytes memory data) = to.call{value: value}(new bytes(0)); if (!success) revert(RevertMsgExtractor.getRevertMsg(data)); } function _returnTrueOrNothing(bytes memory data) internal pure returns(bool) { return (data.length == 0 || abi.decode(data, (bool))); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import { IAccessControl } from "./IAccessControl.sol"; import { IERC20 } from "../token/IERC20.sol"; interface ITokenUpgrade is IAccessControl { struct TokenIn { IERC20 reverse; uint96 ratio; uint256 balance; } struct TokenOut { IERC20 reverse; uint256 balance; } function tokensIn(IERC20 tokenIn) external view returns (TokenIn memory); function tokensOut(IERC20 tokenOut) external view returns (TokenOut memory); function register(IERC20 tokenIn, IERC20 tokenOut) external; function unregister(IERC20 tokenIn, address to) external; function swap(IERC20 tokenIn, address to) external; function extract(IERC20 tokenIn, address to) external; function recover(IERC20 token, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes4` identifier. These are expected to be the * signatures for all the functions in the contract. Special roles should be exposed * in the external API and be unique: * * ``` * bytes4 public constant ROOT = 0x00000000; * ``` * * Roles represent restricted access to a function call. For that purpose, use {auth}: * * ``` * function foo() public auth { * ... * } * ``` * * 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 `ROOT`, 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 `ROOT` 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. */ contract AccessControl { struct RoleData { mapping (address => bool) members; bytes4 adminRole; } mapping (bytes4 => RoleData) private _roles; bytes4 public constant ROOT = 0x00000000; bytes4 public constant ROOT4146650865 = 0x00000000; // Collision protection for ROOT, test with ROOT12007226833() bytes4 public constant LOCK = 0xFFFFFFFF; // Used to disable further permissioning of a function bytes4 public constant LOCK8605463013 = 0xFFFFFFFF; // Collision protection for LOCK, test with LOCK10462387368() /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role * * `ROOT` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes4 indexed role, bytes4 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. */ event RoleGranted(bytes4 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(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Give msg.sender the ROOT role and create a LOCK role with itself as the admin role and no members. * Calling setRoleAdmin(msg.sig, LOCK) means no one can grant that msg.sig role anymore. */ constructor () { _grantRole(ROOT, msg.sender); // Grant ROOT to msg.sender _setRoleAdmin(LOCK, LOCK); // Create the LOCK role by setting itself as its own admin, creating an independent role tree } /** * @dev Each function in the contract has its own role, identified by their msg.sig signature. * ROOT can give and remove access to each function, lock any further access being granted to * a specific action, or even create other roles to delegate admin control over a function. */ modifier auth() { require (_hasRole(msg.sig, msg.sender), "Access denied"); _; } /** * @dev Allow only if the caller has been granted the admin role of `role`. */ modifier admin(bytes4 role) { require (_hasRole(_getRoleAdmin(role), msg.sender), "Only admin"); _; } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes4 role, address account) external view returns (bool) { return _hasRole(role, account); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes4 role) external view returns (bytes4) { return _getRoleAdmin(role); } /** * @dev Sets `adminRole` as ``role``'s admin role. * If ``role``'s admin role is not `adminRole` emits a {RoleAdminChanged} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function setRoleAdmin(bytes4 role, bytes4 adminRole) external virtual admin(role) { _setRoleAdmin(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(bytes4 role, address account) external virtual admin(role) { _grantRole(role, account); } /** * @dev Grants all of `role` in `roles` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - For each `role` in `roles`, the caller must have ``role``'s admin role. */ function grantRoles(bytes4[] memory roles, address account) external virtual { for (uint256 i = 0; i < roles.length; i++) { require (_hasRole(_getRoleAdmin(roles[i]), msg.sender), "Only admin"); _grantRole(roles[i], account); } } /** * @dev Sets LOCK as ``role``'s admin role. LOCK has no members, so this disables admin management of ``role``. * Emits a {RoleAdminChanged} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function lockRole(bytes4 role) external virtual admin(role) { _setRoleAdmin(role, LOCK); } /** * @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(bytes4 role, address account) external virtual admin(role) { _revokeRole(role, account); } /** * @dev Revokes all of `role` in `roles` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - For each `role` in `roles`, the caller must have ``role``'s admin role. */ function revokeRoles(bytes4[] memory roles, address account) external virtual { for (uint256 i = 0; i < roles.length; i++) { require (_hasRole(_getRoleAdmin(roles[i]), msg.sender), "Only admin"); _revokeRole(roles[i], 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 granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes4 role, address account) external virtual { require(account == msg.sender, "Renounce only for self"); _revokeRole(role, account); } function _hasRole(bytes4 role, address account) internal view returns (bool) { return _roles[role].members[account]; } function _getRoleAdmin(bytes4 role) internal view returns (bytes4) { return _roles[role].adminRole; } function _setRoleAdmin(bytes4 role, bytes4 adminRole) internal virtual { if (_getRoleAdmin(role) != adminRole) { _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, adminRole); } } function _grantRole(bytes4 role, address account) internal { if (!_hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, msg.sender); } } function _revokeRole(bytes4 role, address account) internal { if (_hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, msg.sender); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.13; library Cast { ///@dev library for safe casting of value types function b12(bytes32 x) internal pure returns (bytes12 y) { require(bytes32(y = bytes12(x)) == x, "Cast overflow"); } function b6(bytes32 x) internal pure returns (bytes6 y) { require(bytes32(y = bytes6(x)) == x, "Cast overflow"); } function u256(int256 x) internal pure returns (uint256 y) { require(x >= 0, "Cast overflow"); y = uint256(x); } function i256(uint256 x) internal pure returns (int256 y) { require(x <= uint256(type(int256).max), "Cast overflow"); y = int256(x); } function u128(uint256 x) internal pure returns (uint128 y) { require(x <= type(uint128).max, "Cast overflow"); y = uint128(x); } function u128(int256 x) internal pure returns (uint128 y) { require(x >= 0, "Cast overflow"); y = uint128(uint256(x)); } function i128(uint256 x) internal pure returns (int128) { require(x <= uint256(int256(type(int128).max)), "Cast overflow"); return int128(int256(x)); } function i128(int256 x) internal pure returns (int128) { require(x <= type(int128).max, "Cast overflow"); require(x >= type(int128).min, "Cast overflow"); return int128(x); } function u112(uint256 x) internal pure returns (uint112 y) { require(x <= type(uint112).max, "Cast overflow"); y = uint112(x); } function u104(uint256 x) internal pure returns (uint104 y) { require(x <= type(uint104).max, "Cast overflow"); y = uint104(x); } function u96(uint256 x) internal pure returns (uint96 y) { require(x <= type(uint96).max, "Cast overflow"); y = uint96(x); } function u32(uint256 x) internal pure returns (uint32 y) { require(x <= type(uint32).max, "Cast overflow"); y = uint32(x); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.13; library Math { // Taken from https://github.com/usmfum/USM/blob/master/src/WadMath.sol /// @dev Multiply an amount by a fixed point factor with 18 decimals, rounds down. function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x * y; unchecked { z /= 1e18; } } // Taken from https://github.com/usmfum/USM/blob/master/src/WadMath.sol /// @dev Multiply x and y, with y being fixed point. If both are integers, the result is a fixed point factor. Rounds up. function wmulup(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x * y + 1e18 - 1; // Rounds up. So (again imagining 2 decimal places): unchecked { z /= 1e18; } // 383 (3.83) * 235 (2.35) -> 90005 (9.0005), + 99 (0.0099) -> 90104, / 100 -> 901 (9.01). } // Taken from https://github.com/usmfum/USM/blob/master/src/WadMath.sol /// @dev Divide an amount by a fixed point factor with 18 decimals function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = (x * 1e18) / y; } // Taken from https://github.com/usmfum/USM/blob/master/src/WadMath.sol /// @dev Divide x and y, with y being fixed point. If both are integers, the result is a fixed point factor. Rounds up. function wdivup(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x * 1e18 + y; // 101 (1.01) / 1000 (10) -> (101 * 100 + 1000 - 1) / 1000 -> 11 (0.11 = 0.101 rounded up). unchecked { z -= 1; } // Can do unchecked subtraction since division in next line will catch y = 0 case anyway z /= y; } // Taken from https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol /// @dev $x ^ $n; $x is 18-decimals fixed point number function wpow(uint256 x, uint256 n) internal pure returns (uint256 z) { uint256 baseUnit = 1e18; assembly { switch x case 0 { switch n case 0 { // 0 ** 0 = 1 z := baseUnit } default { // 0 ** n = 0 z := 0 } } default { switch mod(n, 2) case 0 { // If n is even, store baseUnit in z for now. z := baseUnit } default { // If n is odd, store x in z for now. z := x } // Shifting right by 1 is like dividing by 2. let half := shr(1, baseUnit) for { // Shift n right by 1 before looping to halve it. n := shr(1, n) } n { // Shift n right by 1 each iteration to halve it. n := shr(1, n) } { // Revert immediately if x ** 2 would overflow. // Equivalent to iszero(eq(div(xx, x), x)) here. if shr(128, x) { revert(0, 0) } // Store x squared. let xx := mul(x, x) // Round to the nearest number. let xxRound := add(xx, half) // Revert if xx + half overflowed. if lt(xxRound, xx) { revert(0, 0) } // Set x to scaled xxRound. x := div(xxRound, baseUnit) // If n is even: if mod(n, 2) { // Compute z * x. let zx := mul(z, x) // If z * x overflowed: if iszero(eq(div(zx, x), z)) { // Revert if x is non-zero. if iszero(iszero(x)) { revert(0, 0) } } // Round to the nearest number. let zxRound := add(zx, half) // Revert if zx + half overflowed. if lt(zxRound, zx) { revert(0, 0) } // Return properly scaled zxRound. z := div(zxRound, baseUnit) } } } } } /// @dev Divide an amount by a fixed point factor with 27 decimals function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = (x * 1e27) / y; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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 // Taken from https://github.com/sushiswap/BoringSolidity/blob/441e51c0544cf2451e6116fe00515e71d7c42e2c/src/BoringBatchable.sol pragma solidity >=0.6.0; library RevertMsgExtractor { /// @dev Helper function to extract a useful revert message from a failed call. /// If the returned data is malformed or not correctly abi encoded then this call can fail itself. function getRevertMsg(bytes memory returnData) internal pure returns (string memory) { // If the _res length is less than 68, then the transaction failed silently (without a revert message) if (returnData.length < 68) return "Transaction reverted silently"; assembly { // Slice the sighash. returnData := add(returnData, 0x04) } return abi.decode(returnData, (string)); // All that remains is the revert string } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IAccessControl { struct RoleData { mapping (address => bool) members; bytes4 adminRole; } event RoleAdminChanged(bytes4 indexed role, bytes4 indexed newAdminRole); event RoleGranted(bytes4 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes4 indexed role, address indexed account, address indexed sender); function ROOT() external view returns (bytes4); function LOCK() external view returns (bytes4); function hasRole(bytes4 role, address account) external view returns (bool); function getRoleAdmin(bytes4 role) external view returns (bytes4); function setRoleAdmin(bytes4 role, bytes4 adminRole) external; function grantRole(bytes4 role, address account) external; function grantRoles(bytes4[] memory roles, address account) external; function lockRole(bytes4 role) external; function revokeRole(bytes4 role, address account) external; function revokeRoles(bytes4[] memory roles, address account) external; function renounceRole(bytes4 role, address account) external; }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"InvalidAcceptanceToken","type":"error"},{"inputs":[],"name":"NotInMerkleTree","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SameToken","type":"error"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"}],"name":"TokenInAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"}],"name":"TokenInNotRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"tokenOut","type":"address"}],"name":"TokenOutAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"tokenOut","type":"address"}],"name":"TokenOutNotRegistered","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenInBalance","type":"uint256"}],"name":"Extracted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"recovered","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenInBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenOutBalance","type":"uint256"},{"indexed":false,"internalType":"uint96","name":"ratio","type":"uint96"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"bytes4","name":"newAdminRole","type":"bytes4"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"role","type":"bytes4"},{"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":"bytes4","name":"role","type":"bytes4"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenInBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenOutBalance","type":"uint256"}],"name":"Unregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"contract IERC20","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenInAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenOutAmount","type":"uint256"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"LOCK","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK8605463013","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT4146650865","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenIn_","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"extract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4[]","name":"roles","type":"bytes4[]"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"}],"name":"lockRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenIn_","type":"address"},{"internalType":"contract IERC20","name":"tokenOut_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4[]","name":"roles","type":"bytes4[]"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"role","type":"bytes4"},{"internalType":"bytes4","name":"adminRole","type":"bytes4"}],"name":"setRoleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"tokensIn","outputs":[{"internalType":"contract IERC20","name":"reverse","type":"address"},{"internalType":"uint96","name":"ratio","type":"uint96"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"tokensOut","outputs":[{"internalType":"contract IERC20","name":"reverse","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenIn_","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenIn_","type":"address"},{"internalType":"bytes32","name":"acceptanceToken","type":"bytes32"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenInAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040527f9f6699a0964b1bd6fe6c9fb8bebea236c08311ddd25781bbf5d372d00d32936b6001553480156200003557600080fd5b50620000436000336200005d565b620000576001600160e01b031980620000f5565b62000193565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff16620000f1576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45b5050565b6001600160e01b0319811662000127836001600160e01b03191660009081526020819052604090206001015460e01b90565b6001600160e01b03191614620000f1576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b611bce80620001a36000396000f3fe608060405234801561001057600080fd5b50600436106101325760003560e01c80639aee80d4116100b8578063b89c39521161007c578063b89c3952146102cc578063de02cde7146102ef578063e00ec9a014610302578063effae35314610343578063f467648014610356578063ffffffff1461028457600080fd5b80639aee80d414610207578063a4f0d7d014610284578063ad82110f14610293578063ae93c1b5146102a6578063b65fb24c146102b957600080fd5b80635909c12f116100ff5780635909c12f146101375780635ba5e9f0146101bb578063648bf774146101ce578063687f0e4c146101e157806369b15fce146101f457600080fd5b801561013757806310ab94321461015d57806344faded0146101805780634a45b60b14610195578063559742d9146101a8575b600080fd5b61013f600081565b6040516001600160e01b031990911681526020015b60405180910390f35b61017061016b366004611659565b610369565b6040519015158152602001610154565b61019361018e366004611659565b61037c565b005b6101936101a3366004611690565b6103c3565b6101936101b63660046116ae565b610614565b61013f6101c93660046116ae565b610653565b6101936101dc366004611690565b610664565b6101936101ef366004611659565b6107da565b6101936102023660046116c9565b610835565b61025261021536600461170a565b60026020819052600091825260409091208054600182015491909201546001600160a01b03831692600160a01b90046001600160601b0316919084565b604080516001600160a01b0390951685526001600160601b039093166020850152918301526060820152608001610154565b61013f6001600160e01b031981565b6101936102a136600461176e565b610bde565b6101936102b436600461182d565b610c60565b6101936102c7366004611690565b610c93565b6101706102da366004611860565b60046020526000908152604090205460ff1681565b6101936102fd366004611659565b610dac565b61033561031036600461170a565b600360205260009081526040902080546001909101546001600160a01b039091169082565b604051610154929190611879565b61019361035136600461176e565b610ddf565b610193610364366004611892565b610e54565b6000610375838361110a565b9392505050565b8161038f6103898261113f565b3361110a565b6103b45760405162461bcd60e51b81526004016103ab9061193f565b60405180910390fd5b6103be8383611161565b505050565b6103d96000356001600160e01b0319163361110a565b6103f55760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b03169281019290925260018101549382019390935291015460608201529061046e57826040516310249ad760e11b81526004016103ab919061198a565b80516001600160a01b0380851660008181526002602081815260408084208481556001808201869055930184905594861683526003905283822080546001600160a01b03191681550181905591516370a0823160e01b81526370a08231906104da90309060040161198a565b602060405180830381865afa1580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b919061199e565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161054b919061198a565b602060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c919061199e565b90506105a26001600160a01b03871686846111d0565b6105b66001600160a01b03841686836111d0565b826001600160a01b0316866001600160a01b03167fb9f291e0ffefbf4bc674385d04958dd56891b94355135d35e6f8571184ebb6e18484604051610604929190918252602082015260400190565b60405180910390a3505050505050565b806106216103898261113f565b61063d5760405162461bcd60e51b81526004016103ab9061193f565b61064f826001600160e01b03196112bb565b5050565b600061065e8261113f565b92915050565b61067a6000356001600160e01b0319163361110a565b6106965760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602052604090205416156106d157816040516333fe186f60e01b81526004016103ab919061198a565b6001600160a01b03828116600090815260036020526040902054161561070c578160405163022b45f360e11b81526004016103ab919061198a565b6040516370a0823160e01b81526000906001600160a01b038416906370a082319061073b90309060040161198a565b602060405180830381865afa158015610758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077c919061199e565b90506107926001600160a01b03841683836111d0565b826001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28826040516107cd91815260200190565b60405180910390a2505050565b6001600160a01b038116331461082b5760405162461bcd60e51b81526020600482015260166024820152752932b737bab731b29037b7363c903337b91039b2b63360511b60448201526064016103ab565b61064f8282611161565b61084b6000356001600160e01b0319163361110a565b6108675760405162461bcd60e51b81526004016103ab90611963565b816001600160a01b0316836001600160a01b03160361089b5782604051638519674760e01b81526004016103ab919061198a565b6001600160a01b0383811660009081526002602052604090205416156108d657826040516333fe186f60e01b81526004016103ab919061198a565b6001600160a01b038281166000908152600360205260409020541615610911578160405163022b45f360e11b81526004016103ab919061198a565b60006109f36109ee856001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b919061199e565b6040516370a0823160e01b81526001600160a01b038716906370a08231906109a790309060040161198a565b602060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e8919061199e565b9061133a565b611359565b90506000846001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610a23919061198a565b602060405180830381865afa158015610a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a64919061199e565b90506000846001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610a94919061198a565b602060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad5919061199e565b604080516080810182526001600160a01b038089168083526001600160601b0380891660208086019182528587018a8152606087018d81528f8716600081815260028086528b82209a519651909716600160a01b0295891695909517895591516001808a019190915590519790940196909655865180880188528681528082018981528584526003909252918790209151825495166001600160a01b0319959095169490941781559251920191909155915192935090917f774c3d3548c4570ed7658adf020fd1a0a1e31bef63fd9c2c8bed5e42ad019d0690610604908690869089908b9093845260208401929092526001600160601b03166040830152606082015260800190565b60005b82518110156103be57610c0f610389848381518110610c0257610c026119b7565b602002602001015161113f565b610c2b5760405162461bcd60e51b81526004016103ab9061193f565b610c4e838281518110610c4057610c406119b7565b602002602001015183611161565b80610c58816119e3565b915050610be1565b81610c6d6103898261113f565b610c895760405162461bcd60e51b81526004016103ab9061193f565b6103be83836112bb565b610ca96000356001600160e01b0319163361110a565b610cc55760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b031692810192909252600181015493820193909352910154606082015290610d3e57826040516310249ad760e11b81526004016103ab919061198a565b6001600160a01b03831660008181526002602052604080822060010191909155820151610d6d919084906111d0565b826001600160a01b03167f69c169e5c85af54e1ca7e16608ccc812437821387924fb3353a7d053264ddaa082604001516040516107cd91815260200190565b81610db96103898261113f565b610dd55760405162461bcd60e51b81526004016103ab9061193f565b6103be83836113a6565b60005b82518110156103be57610e03610389848381518110610c0257610c026119b7565b610e1f5760405162461bcd60e51b81526004016103ab9061193f565b610e42838281518110610e3457610e346119b7565b6020026020010151836113a6565b80610e4c816119e3565b915050610de2565b6001546040516bffffffffffffffffffffffff19606087901b1660208201526034810191909152605401604051602081830303815290604052805190602001208514610eb3576040516331ee416160e11b815260040160405180910390fd5b6001600160a01b0386811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b031692810192909252600181015493820193909352910154606082015290610f2c57866040516310249ad760e11b81526004016103ab919061198a565b8051604051600090610f449088908890602001611879565b60408051601f198184030181528282528051602091820120908301520160408051601f1981840301815291815281516020928301206000818152600490935291205490915060ff1615610faa57604051630c8d9eab60e31b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790556060840151610fd6908790879085611417565b905080610ff657604051632bcde8c960e21b815260040160405180910390fd5b61100b6001600160a01b038b1689308a61142f565b600061102d85602001516001600160601b03168961150090919063ffffffff16565b6001600160a01b038c16600090815260026020526040812060010180549293508a9290919061105d9084906119fc565b90915550506001600160a01b0384166000908152600360205260408120600101805483929061108d908490611a14565b909155506110a790506001600160a01b0385168a836111d0565b836001600160a01b03168b6001600160a01b03167f8bc95e22a73bdc8e430a4c0a4c5fbc30d70969cb6a5f23fc5bea4a282abe583e8a846040516110f5929190918252602082015260400190565b60405180910390a35050505050505050505050565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff1692915050565b6001600160e01b03191660009081526020819052604090206001015460e01b90565b61116b828261110a565b1561064f576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339391927f4ddc7b757e7bdd7254a9cd39452d307a52761bc824625c6a33104a075d8099e691a45050565b600080846001600160a01b031663a9059cbb60e01b85856040516024016111f8929190611879565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516112369190611a5b565b6000604051808303816000865af19150503d8060008114611273576040519150601f19603f3d011682016040523d82523d6000602084013e611278565b606091505b509150915081801561128e575061128e8161151e565b6112b45761129b8161153f565b60405162461bcd60e51b81526004016103ab9190611a77565b5050505050565b6001600160e01b031981166112cf8361113f565b6001600160e01b0319161461064f576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b60008161134f84670de0b6b3a7640000611aaa565b6103759190611ac9565b60006001600160601b038211156113a25760405162461bcd60e51b815260206004820152600d60248201526c43617374206f766572666c6f7760981b60448201526064016103ab565b5090565b6113b0828261110a565b61064f576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45050565b60008261142586868561159e565b1495945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916114939190611a5b565b6000604051808303816000865af19150503d80600081146114d0576040519150601f19603f3d011682016040523d82523d6000602084013e6114d5565b606091505b50915091508180156114eb57506114eb8161151e565b6114f85761129b8161153f565b505050505050565b600061150c8284611aaa565b670de0b6b3a764000090049392505050565b600081516000148061065e57508180602001905181019061065e9190611aeb565b606060448251101561158457505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b6004820191508180602001905181019061065e9190611b0d565b600081815b848110156115e1576115cd828787848181106115c1576115c16119b7565b905060200201356115ea565b9150806115d9816119e3565b9150506115a3565b50949350505050565b6000818310611606576000828152602084905260409020610375565b6000838152602083905260409020610375565b80356001600160e01b03198116811461163157600080fd5b919050565b6001600160a01b038116811461164b57600080fd5b50565b803561163181611636565b6000806040838503121561166c57600080fd5b61167583611619565b9150602083013561168581611636565b809150509250929050565b600080604083850312156116a357600080fd5b823561167581611636565b6000602082840312156116c057600080fd5b61037582611619565b6000806000606084860312156116de57600080fd5b83356116e981611636565b925060208401356116f981611636565b929592945050506040919091013590565b60006020828403121561171c57600080fd5b813561037581611636565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561176657611766611727565b604052919050565b6000806040838503121561178157600080fd5b823567ffffffffffffffff8082111561179957600080fd5b818501915085601f8301126117ad57600080fd5b81356020828211156117c1576117c1611727565b8160051b92506117d281840161173d565b82815292840181019281810190898511156117ec57600080fd5b948201945b848610156118115761180286611619565b825294820194908201906117f1565b9650611820905087820161164e565b9450505050509250929050565b6000806040838503121561184057600080fd5b61184983611619565b915061185760208401611619565b90509250929050565b60006020828403121561187257600080fd5b5035919050565b6001600160a01b03929092168252602082015260400190565b60008060008060008060a087890312156118ab57600080fd5b86356118b681611636565b95506020870135945060408701356118cd81611636565b935060608701359250608087013567ffffffffffffffff808211156118f157600080fd5b818901915089601f83011261190557600080fd5b81358181111561191457600080fd5b8a60208260051b850101111561192957600080fd5b6020830194508093505050509295509295509295565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b6020808252600d908201526c1058d8d95cdcc819195b9a5959609a1b604082015260600190565b6001600160a01b0391909116815260200190565b6000602082840312156119b057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016119f5576119f56119cd565b5060010190565b60008219821115611a0f57611a0f6119cd565b500190565b600082821015611a2657611a266119cd565b500390565b60005b83811015611a46578181015183820152602001611a2e565b83811115611a55576000848401525b50505050565b60008251611a6d818460208701611a2b565b9190910192915050565b6020815260008251806020840152611a96816040850160208701611a2b565b601f01601f19169190910160400192915050565b6000816000190483118215151615611ac457611ac46119cd565b500290565b600082611ae657634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611afd57600080fd5b8151801515811461037557600080fd5b600060208284031215611b1f57600080fd5b815167ffffffffffffffff80821115611b3757600080fd5b818401915084601f830112611b4b57600080fd5b815181811115611b5d57611b5d611727565b611b70601f8201601f191660200161173d565b9150808252856020828501011115611b8757600080fd5b6115e1816020840160208601611a2b56fea264697066735822122081af64f3fb562392dcf8908bd21b0595118ff40134b31f12f627f42840af34ff64736f6c634300080f0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101325760003560e01c80639aee80d4116100b8578063b89c39521161007c578063b89c3952146102cc578063de02cde7146102ef578063e00ec9a014610302578063effae35314610343578063f467648014610356578063ffffffff1461028457600080fd5b80639aee80d414610207578063a4f0d7d014610284578063ad82110f14610293578063ae93c1b5146102a6578063b65fb24c146102b957600080fd5b80635909c12f116100ff5780635909c12f146101375780635ba5e9f0146101bb578063648bf774146101ce578063687f0e4c146101e157806369b15fce146101f457600080fd5b801561013757806310ab94321461015d57806344faded0146101805780634a45b60b14610195578063559742d9146101a8575b600080fd5b61013f600081565b6040516001600160e01b031990911681526020015b60405180910390f35b61017061016b366004611659565b610369565b6040519015158152602001610154565b61019361018e366004611659565b61037c565b005b6101936101a3366004611690565b6103c3565b6101936101b63660046116ae565b610614565b61013f6101c93660046116ae565b610653565b6101936101dc366004611690565b610664565b6101936101ef366004611659565b6107da565b6101936102023660046116c9565b610835565b61025261021536600461170a565b60026020819052600091825260409091208054600182015491909201546001600160a01b03831692600160a01b90046001600160601b0316919084565b604080516001600160a01b0390951685526001600160601b039093166020850152918301526060820152608001610154565b61013f6001600160e01b031981565b6101936102a136600461176e565b610bde565b6101936102b436600461182d565b610c60565b6101936102c7366004611690565b610c93565b6101706102da366004611860565b60046020526000908152604090205460ff1681565b6101936102fd366004611659565b610dac565b61033561031036600461170a565b600360205260009081526040902080546001909101546001600160a01b039091169082565b604051610154929190611879565b61019361035136600461176e565b610ddf565b610193610364366004611892565b610e54565b6000610375838361110a565b9392505050565b8161038f6103898261113f565b3361110a565b6103b45760405162461bcd60e51b81526004016103ab9061193f565b60405180910390fd5b6103be8383611161565b505050565b6103d96000356001600160e01b0319163361110a565b6103f55760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b03169281019290925260018101549382019390935291015460608201529061046e57826040516310249ad760e11b81526004016103ab919061198a565b80516001600160a01b0380851660008181526002602081815260408084208481556001808201869055930184905594861683526003905283822080546001600160a01b03191681550181905591516370a0823160e01b81526370a08231906104da90309060040161198a565b602060405180830381865afa1580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b919061199e565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161054b919061198a565b602060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c919061199e565b90506105a26001600160a01b03871686846111d0565b6105b66001600160a01b03841686836111d0565b826001600160a01b0316866001600160a01b03167fb9f291e0ffefbf4bc674385d04958dd56891b94355135d35e6f8571184ebb6e18484604051610604929190918252602082015260400190565b60405180910390a3505050505050565b806106216103898261113f565b61063d5760405162461bcd60e51b81526004016103ab9061193f565b61064f826001600160e01b03196112bb565b5050565b600061065e8261113f565b92915050565b61067a6000356001600160e01b0319163361110a565b6106965760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602052604090205416156106d157816040516333fe186f60e01b81526004016103ab919061198a565b6001600160a01b03828116600090815260036020526040902054161561070c578160405163022b45f360e11b81526004016103ab919061198a565b6040516370a0823160e01b81526000906001600160a01b038416906370a082319061073b90309060040161198a565b602060405180830381865afa158015610758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077c919061199e565b90506107926001600160a01b03841683836111d0565b826001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28826040516107cd91815260200190565b60405180910390a2505050565b6001600160a01b038116331461082b5760405162461bcd60e51b81526020600482015260166024820152752932b737bab731b29037b7363c903337b91039b2b63360511b60448201526064016103ab565b61064f8282611161565b61084b6000356001600160e01b0319163361110a565b6108675760405162461bcd60e51b81526004016103ab90611963565b816001600160a01b0316836001600160a01b03160361089b5782604051638519674760e01b81526004016103ab919061198a565b6001600160a01b0383811660009081526002602052604090205416156108d657826040516333fe186f60e01b81526004016103ab919061198a565b6001600160a01b038281166000908152600360205260409020541615610911578160405163022b45f360e11b81526004016103ab919061198a565b60006109f36109ee856001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b919061199e565b6040516370a0823160e01b81526001600160a01b038716906370a08231906109a790309060040161198a565b602060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e8919061199e565b9061133a565b611359565b90506000846001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610a23919061198a565b602060405180830381865afa158015610a40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a64919061199e565b90506000846001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401610a94919061198a565b602060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad5919061199e565b604080516080810182526001600160a01b038089168083526001600160601b0380891660208086019182528587018a8152606087018d81528f8716600081815260028086528b82209a519651909716600160a01b0295891695909517895591516001808a019190915590519790940196909655865180880188528681528082018981528584526003909252918790209151825495166001600160a01b0319959095169490941781559251920191909155915192935090917f774c3d3548c4570ed7658adf020fd1a0a1e31bef63fd9c2c8bed5e42ad019d0690610604908690869089908b9093845260208401929092526001600160601b03166040830152606082015260800190565b60005b82518110156103be57610c0f610389848381518110610c0257610c026119b7565b602002602001015161113f565b610c2b5760405162461bcd60e51b81526004016103ab9061193f565b610c4e838281518110610c4057610c406119b7565b602002602001015183611161565b80610c58816119e3565b915050610be1565b81610c6d6103898261113f565b610c895760405162461bcd60e51b81526004016103ab9061193f565b6103be83836112bb565b610ca96000356001600160e01b0319163361110a565b610cc55760405162461bcd60e51b81526004016103ab90611963565b6001600160a01b0382811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b031692810192909252600181015493820193909352910154606082015290610d3e57826040516310249ad760e11b81526004016103ab919061198a565b6001600160a01b03831660008181526002602052604080822060010191909155820151610d6d919084906111d0565b826001600160a01b03167f69c169e5c85af54e1ca7e16608ccc812437821387924fb3353a7d053264ddaa082604001516040516107cd91815260200190565b81610db96103898261113f565b610dd55760405162461bcd60e51b81526004016103ab9061193f565b6103be83836113a6565b60005b82518110156103be57610e03610389848381518110610c0257610c026119b7565b610e1f5760405162461bcd60e51b81526004016103ab9061193f565b610e42838281518110610e3457610e346119b7565b6020026020010151836113a6565b80610e4c816119e3565b915050610de2565b6001546040516bffffffffffffffffffffffff19606087901b1660208201526034810191909152605401604051602081830303815290604052805190602001208514610eb3576040516331ee416160e11b815260040160405180910390fd5b6001600160a01b0386811660009081526002602081815260409283902083516080810185528154958616808252600160a01b9096046001600160601b031692810192909252600181015493820193909352910154606082015290610f2c57866040516310249ad760e11b81526004016103ab919061198a565b8051604051600090610f449088908890602001611879565b60408051601f198184030181528282528051602091820120908301520160408051601f1981840301815291815281516020928301206000818152600490935291205490915060ff1615610faa57604051630c8d9eab60e31b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790556060840151610fd6908790879085611417565b905080610ff657604051632bcde8c960e21b815260040160405180910390fd5b61100b6001600160a01b038b1689308a61142f565b600061102d85602001516001600160601b03168961150090919063ffffffff16565b6001600160a01b038c16600090815260026020526040812060010180549293508a9290919061105d9084906119fc565b90915550506001600160a01b0384166000908152600360205260408120600101805483929061108d908490611a14565b909155506110a790506001600160a01b0385168a836111d0565b836001600160a01b03168b6001600160a01b03167f8bc95e22a73bdc8e430a4c0a4c5fbc30d70969cb6a5f23fc5bea4a282abe583e8a846040516110f5929190918252602082015260400190565b60405180910390a35050505050505050505050565b6001600160e01b031982166000908152602081815260408083206001600160a01b038516845290915290205460ff1692915050565b6001600160e01b03191660009081526020819052604090206001015460e01b90565b61116b828261110a565b1561064f576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339391927f4ddc7b757e7bdd7254a9cd39452d307a52761bc824625c6a33104a075d8099e691a45050565b600080846001600160a01b031663a9059cbb60e01b85856040516024016111f8929190611879565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516112369190611a5b565b6000604051808303816000865af19150503d8060008114611273576040519150601f19603f3d011682016040523d82523d6000602084013e611278565b606091505b509150915081801561128e575061128e8161151e565b6112b45761129b8161153f565b60405162461bcd60e51b81526004016103ab9190611a77565b5050505050565b6001600160e01b031981166112cf8361113f565b6001600160e01b0319161461064f576001600160e01b0319828116600081815260208190526040808220600101805463ffffffff191660e087901c17905551928416927fd348e2220a50b4500ec353f6e802d2f14dd1b5d6786148fd1bbcc570bf92d4739190a35050565b60008161134f84670de0b6b3a7640000611aaa565b6103759190611ac9565b60006001600160601b038211156113a25760405162461bcd60e51b815260206004820152600d60248201526c43617374206f766572666c6f7760981b60448201526064016103ab565b5090565b6113b0828261110a565b61064f576001600160e01b031982166000818152602081815260408083206001600160a01b0386168085529252808320805460ff1916600117905551339391927fe6231789d19137da31d0550f4ba9ee379020a8cfb64cb79bf1790c996d2e616591a45050565b60008261142586868561159e565b1495945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916114939190611a5b565b6000604051808303816000865af19150503d80600081146114d0576040519150601f19603f3d011682016040523d82523d6000602084013e6114d5565b606091505b50915091508180156114eb57506114eb8161151e565b6114f85761129b8161153f565b505050505050565b600061150c8284611aaa565b670de0b6b3a764000090049392505050565b600081516000148061065e57508180602001905181019061065e9190611aeb565b606060448251101561158457505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b6004820191508180602001905181019061065e9190611b0d565b600081815b848110156115e1576115cd828787848181106115c1576115c16119b7565b905060200201356115ea565b9150806115d9816119e3565b9150506115a3565b50949350505050565b6000818310611606576000828152602084905260409020610375565b6000838152602083905260409020610375565b80356001600160e01b03198116811461163157600080fd5b919050565b6001600160a01b038116811461164b57600080fd5b50565b803561163181611636565b6000806040838503121561166c57600080fd5b61167583611619565b9150602083013561168581611636565b809150509250929050565b600080604083850312156116a357600080fd5b823561167581611636565b6000602082840312156116c057600080fd5b61037582611619565b6000806000606084860312156116de57600080fd5b83356116e981611636565b925060208401356116f981611636565b929592945050506040919091013590565b60006020828403121561171c57600080fd5b813561037581611636565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561176657611766611727565b604052919050565b6000806040838503121561178157600080fd5b823567ffffffffffffffff8082111561179957600080fd5b818501915085601f8301126117ad57600080fd5b81356020828211156117c1576117c1611727565b8160051b92506117d281840161173d565b82815292840181019281810190898511156117ec57600080fd5b948201945b848610156118115761180286611619565b825294820194908201906117f1565b9650611820905087820161164e565b9450505050509250929050565b6000806040838503121561184057600080fd5b61184983611619565b915061185760208401611619565b90509250929050565b60006020828403121561187257600080fd5b5035919050565b6001600160a01b03929092168252602082015260400190565b60008060008060008060a087890312156118ab57600080fd5b86356118b681611636565b95506020870135945060408701356118cd81611636565b935060608701359250608087013567ffffffffffffffff808211156118f157600080fd5b818901915089601f83011261190557600080fd5b81358181111561191457600080fd5b8a60208260051b850101111561192957600080fd5b6020830194508093505050509295509295509295565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b6020808252600d908201526c1058d8d95cdcc819195b9a5959609a1b604082015260600190565b6001600160a01b0391909116815260200190565b6000602082840312156119b057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016119f5576119f56119cd565b5060010190565b60008219821115611a0f57611a0f6119cd565b500190565b600082821015611a2657611a266119cd565b500390565b60005b83811015611a46578181015183820152602001611a2e565b83811115611a55576000848401525b50505050565b60008251611a6d818460208701611a2b565b9190910192915050565b6020815260008251806020840152611a96816040850160208701611a2b565b601f01601f19169190910160400192915050565b6000816000190483118215151615611ac457611ac46119cd565b500290565b600082611ae657634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611afd57600080fd5b8151801515811461037557600080fd5b600060208284031215611b1f57600080fd5b815167ffffffffffffffff80821115611b3757600080fd5b818401915084601f830112611b4b57600080fd5b815181811115611b5d57611b5d611727565b611b70601f8201601f191660200161173d565b9150808252856020828501011115611b8757600080fd5b6115e1816020840160208601611a2b56fea264697066735822122081af64f3fb562392dcf8908bd21b0595118ff40134b31f12f627f42840af34ff64736f6c634300080f0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.