More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 30 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize And C... | 19802938 | 269 days ago | IN | 0 ETH | 0.00125676 | ||||
Initialize And C... | 18855911 | 402 days ago | IN | 0 ETH | 0.00421993 | ||||
Initialize And C... | 18263238 | 485 days ago | IN | 0 ETH | 0.00455348 | ||||
Initialize And C... | 18195353 | 495 days ago | IN | 0 ETH | 0.00177162 | ||||
Initialize And C... | 17618723 | 575 days ago | IN | 0 ETH | 0.00322324 | ||||
Initialize And C... | 16951475 | 669 days ago | IN | 0 ETH | 0.00459298 | ||||
Initialize And C... | 16888511 | 678 days ago | IN | 0 ETH | 0.0008016 | ||||
Initialize And C... | 16888509 | 678 days ago | IN | 0 ETH | 0.00248064 | ||||
Initialize And C... | 16134851 | 784 days ago | IN | 0 ETH | 0.00541682 | ||||
Initialize And C... | 16127459 | 785 days ago | IN | 0 ETH | 0.00805 | ||||
Initialize And C... | 16075510 | 792 days ago | IN | 0 ETH | 0.00304713 | ||||
Initialize And C... | 15912443 | 815 days ago | IN | 0 ETH | 0.00263092 | ||||
Initialize And C... | 15898586 | 817 days ago | IN | 0 ETH | 0.00602712 | ||||
Initialize And C... | 15891385 | 818 days ago | IN | 0 ETH | 0.00474476 | ||||
Initialize And C... | 15701693 | 844 days ago | IN | 0 ETH | 0.00188773 | ||||
Initialize And C... | 15244565 | 914 days ago | IN | 0 ETH | 0.00313908 | ||||
Initialize And C... | 15207223 | 920 days ago | IN | 0 ETH | 0.00166004 | ||||
Initialize And C... | 15033046 | 947 days ago | IN | 0 ETH | 0.0033217 | ||||
Initialize And C... | 14998586 | 954 days ago | IN | 0 ETH | 0.00388523 | ||||
Initialize And C... | 14950653 | 962 days ago | IN | 0 ETH | 0.01083549 | ||||
Initialize And C... | 14878321 | 974 days ago | IN | 0 ETH | 0.00655519 | ||||
Initialize And C... | 14858462 | 977 days ago | IN | 0 ETH | 0.00376249 | ||||
Initialize And C... | 14840714 | 980 days ago | IN | 0 ETH | 0.00435254 | ||||
Initialize And C... | 14568588 | 1023 days ago | IN | 0 ETH | 0.00494656 | ||||
Initialize And C... | 14446998 | 1042 days ago | IN | 0 ETH | 0.00710575 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
IntegralMerkleTimeRelease
Compiler Version
v0.7.5+commit.eb77ed08
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; import 'Math.sol'; import 'SafeMath.sol'; import 'TransferHelper.sol'; import 'IERC20.sol'; import 'IIntegralMerkleTimeRelease.sol'; import 'Votes.sol'; import 'MerkleProof.sol'; contract IntegralMerkleTimeRelease is IIntegralMerkleTimeRelease, Votes { using SafeMath for uint256; using SafeMath for uint96; address public immutable token; bytes32 public immutable merkleRoot; address public owner; uint96 public option1TotalAllocations; uint96 public option2TotalAllocations; uint96 public option1TotalClaimed; uint96 public option2TotalClaimed; struct Option { uint96 allocation; uint96 claimed; uint32 initBlock; } mapping(address => Option) public option1; mapping(address => Option) public option2; uint256 public option1StartBlock; uint256 public option1EndBlock; uint256 public option1StopBlock; uint256 public option2StartBlock; uint256 public option2EndBlock; uint256 public option2StopBlock; uint256 public option1StopSetBlock; uint256 public option2StopSetBlock; constructor( address _token, bytes32 _merkleRoot, uint256 _option1StartBlock, uint256 _option1EndBlock, uint256 _option2StartBlock, uint256 _option2EndBlock ) { owner = msg.sender; emit OwnerSet(owner); token = _token; merkleRoot = _merkleRoot; _setOption1Timeframe(_option1StartBlock, _option1EndBlock); _setOption2Timeframe(_option2StartBlock, _option2EndBlock); } function setOwner(address _owner) external { require(msg.sender == owner, 'MR_FORBIDDEN'); owner = _owner; emit OwnerSet(_owner); } function _setOption1Timeframe(uint256 _option1StartBlock, uint256 _option1EndBlock) internal { require(_option1EndBlock > _option1StartBlock, 'MR_INVALID_OPTION1_TIME_FRAME'); option1StartBlock = _option1StartBlock; option1EndBlock = _option1EndBlock; option1StopBlock = _option1EndBlock; option1StopSetBlock = _option1EndBlock; } function _setOption2Timeframe(uint256 _option2StartBlock, uint256 _option2EndBlock) internal { require(_option2EndBlock > _option2StartBlock, 'MR_INVALID_OPTION2_TIME_FRAME'); option2StartBlock = _option2StartBlock; option2EndBlock = _option2EndBlock; option2StopBlock = _option2EndBlock; option2StopSetBlock = _option2EndBlock; } function initializeAndClaim( address to, uint96 amount1, uint96 amount2, bytes32[] calldata merkleProof ) external { if (option1[msg.sender].allocation == 0 && option2[msg.sender].allocation == 0) { initializeAllocations(msg.sender, amount1, amount2, merkleProof); } claim(to); } function initializeAllocations( address wallet, uint96 amount1, uint96 amount2, bytes32[] calldata merkleProof ) public { require( option1StopSetBlock == option1EndBlock && option2StopSetBlock == option2EndBlock, 'MR_STOP_ALREADY_SET' ); require( option1[wallet].allocation == 0 && option2[wallet].allocation == 0, 'MR_ALLOCATION_ALREADY_INITIALIZED' ); bytes32 node = keccak256(abi.encodePacked(wallet, uint256(amount1), uint256(amount2))); require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MR_INVALID_PROOF'); uint32 initBlock = safe32(block.number); if (amount1 > 0) { option1[wallet].allocation = amount1; option1[wallet].initBlock = initBlock; option1TotalAllocations = option1TotalAllocations.add96(amount1); } if (amount2 > 0) { option2[wallet].allocation = amount2; option2[wallet].initBlock = initBlock; option2TotalAllocations = option2TotalAllocations.add96(amount2); } require(IERC20(token).balanceOf(address(this)) >= getTokensLeft(), 'MR_INSUFFICIENT_BALANCE'); } function updateOption1Allocations(address[] calldata wallets, uint96[] calldata amounts) external { require(msg.sender == owner, 'MR_FORBIDDEN'); require(option1StopSetBlock == option1EndBlock, 'MR_STOP_ALREADY_SET'); require(wallets.length == amounts.length, 'MR_INVALID_LENGTHS'); for (uint256 i = 0; i < wallets.length; i++) { address wallet = wallets[i]; uint96 amount = amounts[i]; uint96 oldAmount = option1[wallet].allocation; require(oldAmount > 0, 'MR_ALLOCATION_NOT_SET'); require(getReleasedOption1(wallet) <= amount, 'MR_ALLOCATION_TOO_SMALL'); option1TotalAllocations = option1TotalAllocations.sub96(oldAmount).add96(amount); option1[wallet].allocation = amount; uint96 claimed = option1[wallet].claimed; if (checkpointsLength[wallet] != 0) { _updateVotes(wallet, address(0), oldAmount.sub96(claimed)); } _updateVotes(address(0), wallet, amount.sub96(claimed)); } require(IERC20(token).balanceOf(address(this)) >= getTokensLeft(), 'MR_INSUFFICIENT_BALANCE'); } function updateOption2Allocations(address[] calldata wallets, uint96[] calldata amounts) external { require(msg.sender == owner, 'MR_FORBIDDEN'); require(option2StopSetBlock == option2EndBlock, 'MR_STOP_ALREADY_SET'); require(wallets.length == amounts.length, 'MR_INVALID_LENGTHS'); for (uint256 i = 0; i < wallets.length; i++) { address wallet = wallets[i]; uint96 amount = amounts[i]; uint96 oldAmount = option2[wallet].allocation; require(oldAmount > 0, 'MR_ALLOCATION_NOT_SET'); require(getReleasedOption2(wallet) <= amount, 'MR_ALLOCATION_TOO_SMALL'); option2TotalAllocations = option2TotalAllocations.sub96(oldAmount).add96(amount); option2[wallet].allocation = amount; uint96 claimed = option2[wallet].claimed; if (checkpointsLength[wallet] != 0) { _updateVotes(wallet, address(0), oldAmount.sub96(claimed)); } _updateVotes(address(0), wallet, amount.sub96(claimed)); } require(IERC20(token).balanceOf(address(this)) >= getTokensLeft(), 'MR_INSUFFICIENT_BALANCE'); } function getTokensLeft() public view returns (uint96) { uint256 allocationTime1 = option1EndBlock.sub(option1StartBlock); uint256 claimableTime1 = option1StopBlock.sub(option1StartBlock); uint256 allocation1 = option1TotalAllocations.mul(claimableTime1).div(allocationTime1); uint256 allocationTime2 = option2EndBlock.sub(option2StartBlock); uint256 claimableTime2 = option2StopBlock.sub(option2StartBlock); uint256 allocation2 = option2TotalAllocations.mul(claimableTime2).div(allocationTime2); return allocation1.add(allocation2).sub(option1TotalClaimed).sub(option2TotalClaimed).toUint96(); } function setOption1StopBlock(uint256 _option1StopBlock) external { require(msg.sender == owner, 'MR_FORBIDDEN'); require(option1StopSetBlock == option1EndBlock, 'MR_STOP_ALREADY_SET'); require(_option1StopBlock >= block.number && _option1StopBlock < option1EndBlock, 'MR_INVALID_BLOCK_NUMBER'); option1StopBlock = _option1StopBlock; option1StopSetBlock = block.number; emit Option1StopBlockSet(_option1StopBlock); } function setOption2StopBlock(uint256 _option2StopBlock) external { require(msg.sender == owner, 'MR_FORBIDDEN'); require(option2StopSetBlock == option2EndBlock, 'MR_STOP_ALREADY_SET'); require(_option2StopBlock >= block.number && _option2StopBlock < option2EndBlock, 'MR_INVALID_BLOCK_NUMBER'); option2StopBlock = _option2StopBlock; option2StopSetBlock = block.number; emit Option2StopBlockSet(_option2StopBlock); } function skim(address to) external { require(msg.sender == owner, 'MR_FORBIDDEN'); require(to != address(0), 'MR_ADDRESS_ZERO'); uint256 amount = getExcessTokens(); TransferHelper.safeTransfer(token, to, amount); emit Skim(to, amount); } function getExcessTokens() public view returns (uint256) { return IERC20(token).balanceOf(address(this)).sub(getTokensLeft()); } function getReleasedOption1(address wallet) public view returns (uint96) { return _getReleasedOption1ForBlock(wallet, block.number); } function _getReleasedOption1ForBlock(address wallet, uint256 blockNumber) internal view returns (uint96) { if (blockNumber <= option1StartBlock) { return 0; } uint256 elapsed = Math.min(blockNumber, option1StopBlock).sub(option1StartBlock); uint256 allocationTime = option1EndBlock.sub(option1StartBlock); return option1[wallet].allocation.mul(elapsed).div(allocationTime).toUint96(); } function getReleasedOption2(address wallet) public view returns (uint96) { return _getReleasedOption2ForBlock(wallet, block.number); } function _getReleasedOption2ForBlock(address wallet, uint256 blockNumber) internal view returns (uint96) { if (blockNumber <= option2StartBlock) { return 0; } uint256 elapsed = Math.min(blockNumber, option2StopBlock).sub(option2StartBlock); uint256 allocationTime = option2EndBlock.sub(option2StartBlock); return option2[wallet].allocation.mul(elapsed).div(allocationTime).toUint96(); } function getClaimableOption1(address wallet) external view returns (uint256) { return getReleasedOption1(wallet).sub(option1[wallet].claimed); } function getClaimableOption2(address wallet) external view returns (uint256) { return getReleasedOption2(wallet).sub(option2[wallet].claimed); } function getOption1Allocation(address wallet) external view returns (uint256) { return option1[wallet].allocation; } function getOption1Claimed(address wallet) external view returns (uint256) { return option1[wallet].claimed; } function getOption2Allocation(address wallet) external view returns (uint256) { return option2[wallet].allocation; } function getOption2Claimed(address wallet) external view returns (uint256) { return option2[wallet].claimed; } function claim(address to) public { address sender = msg.sender; Option memory _option1 = option1[sender]; Option memory _option2 = option2[sender]; uint96 _option1Claimed = _option1.claimed; uint96 _option2Claimed = _option2.claimed; uint96 option1Amount = getReleasedOption1(sender).sub96(_option1Claimed); uint96 option2Amount = getReleasedOption2(sender).sub96(_option2Claimed); option1[sender].claimed = _option1Claimed.add96(option1Amount); option2[sender].claimed = _option2Claimed.add96(option2Amount); option1TotalClaimed = option1TotalClaimed.add96(option1Amount); option2TotalClaimed = option2TotalClaimed.add96(option2Amount); uint96 totalClaimed = option1Amount.add96(option2Amount); if (checkpointsLength[sender] == 0) { _updateVotes(address(0), sender, _option1.allocation.add96(_option2.allocation)); } _updateVotes(sender, address(0), totalClaimed); TransferHelper.safeTransfer(token, to, totalClaimed); emit Claim(sender, to, option1Amount, option2Amount); } function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96) { uint96 option1TotalAllocation = option1[account].allocation; uint96 option2TotalAllocation = option2[account].allocation; uint256 votes = 0; if (checkpointsLength[account] == 0 || checkpoints[account][0].fromBlock > blockNumber) { if (option1[account].initBlock <= blockNumber) { votes = votes.add(option1TotalAllocation); } if (option2[account].initBlock <= blockNumber) { votes = votes.add(option2TotalAllocation); } } else { votes = _getPriorVotes(account, blockNumber); } if (option1StopBlock == option1EndBlock && option2StopBlock == option2EndBlock) { return votes.toUint96(); } if (option1StopSetBlock > blockNumber && option2StopSetBlock > blockNumber) { return votes.toUint96(); } uint256 lockedAllocation1; uint256 lockedAllocation2; if (blockNumber >= option1StopSetBlock) { uint256 allocationTime = option1EndBlock.sub(option1StartBlock); uint256 haltedTime = option1EndBlock.sub(option1StopBlock); lockedAllocation1 = option1TotalAllocation.mul(haltedTime).div(allocationTime); } if (blockNumber >= option2StopSetBlock) { uint256 allocationTime = option2EndBlock.sub(option2StartBlock); uint256 haltedTime = option2EndBlock.sub(option2StopBlock); lockedAllocation2 = option2TotalAllocation.mul(haltedTime).div(allocationTime); } return votes.sub(lockedAllocation1).sub(lockedAllocation2).toUint96(); } }
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; // a library for performing various math operations library Math { function min(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x < y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x > y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMath { function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, 'SM_ADD_OVERFLOW'); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { z = sub(x, y, 'SM_SUB_UNDERFLOW'); } function sub( uint256 x, uint256 y, string memory message ) internal pure returns (uint256 z) { require((z = x - y) <= x, message); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, 'SM_MUL_OVERFLOW'); } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, 'SM_DIV_BY_ZERO'); uint256 c = a / b; return c; } function ceil_div(uint256 a, uint256 b) internal pure returns (uint256 c) { c = div(a, b); if (c == mul(a, b)) { return c; } else { return add(c, 1); } } function toUint32(uint256 n) internal pure returns (uint32) { require(n < 2**32, 'IS_EXCEEDS_32_BITS'); return uint32(n); } function toUint96(uint256 n) internal pure returns (uint96) { require(n < 2**96, 'IT_EXCEEDS_96_BITS'); return uint96(n); } function add96(uint96 a, uint96 b) internal pure returns (uint96 c) { c = a + b; require(c >= a, 'SM_ADD_OVERFLOW'); } function sub96(uint96 a, uint96 b) internal pure returns (uint96) { require(b <= a, 'SM_SUB_UNDERFLOW'); return a - b; } }
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TH_APPROVE_FAILED'); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TH_TRANSFER_FAILED'); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TH_TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{ value: value }(new bytes(0)); require(success, 'TH_ETH_TRANSFER_FAILED'); } }
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; interface IIntegralMerkleTimeRelease { event OwnerSet(address owner); event Claim(address claimer, address receiver, uint256 option1Amount, uint256 option2Amount); event Skim(address to, uint256 amount); event Option1StopBlockSet(uint256 option1StopBlock); event Option2StopBlockSet(uint256 option2StopBlock); }
// SPDX-License-Identifier: GPL-3.0-or-later // CODE COPIED FROM COMPOUND PROTOCOL (https://github.com/compound-finance/compound-protocol/tree/b9b14038612d846b83f8a009a82c38974ff2dcfe) // Copyright 2020 Compound Labs, Inc. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // CODE WAS SLIGHTLY MODIFIED // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; import 'SafeMath.sol'; contract Votes { using SafeMath for uint96; struct Checkpoint { uint32 fromBlock; uint96 votes; } mapping(address => mapping(uint32 => Checkpoint)) public checkpoints; mapping(address => uint32) public checkpointsLength; event DelegateVotesChanged(address indexed account, uint96 oldVotes, uint96 newVotes); function getCurrentVotes(address account) external view returns (uint96) { // out of bounds access is safe and returns 0 votes return checkpoints[account][checkpointsLength[account] - 1].votes; } function _getPriorVotes(address account, uint256 blockNumber) internal view returns (uint96) { require(blockNumber < block.number, 'VO_NOT_YET_DETERMINED'); uint32 n = checkpointsLength[account]; if (n == 0) { return 0; } if (checkpoints[account][n - 1].fromBlock <= blockNumber) { return checkpoints[account][n - 1].votes; } if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = n - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; Checkpoint memory checkpoint = checkpoints[account][center]; if (checkpoint.fromBlock == blockNumber) { return checkpoint.votes; } else if (checkpoint.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _updateVotes( address giver, address receiver, uint96 votes ) internal { if (giver == receiver || votes == 0) { return; } if (giver != address(0)) { uint32 n = checkpointsLength[giver]; require(n > 0, 'VO_INSUFFICIENT_VOTES'); // out of bounds access is safe and returns 0 votes uint96 oldVotes = checkpoints[giver][n - 1].votes; uint96 newVotes = oldVotes.sub96(votes); _writeCheckpoint(giver, n, newVotes); } if (receiver != address(0)) { uint32 n = checkpointsLength[receiver]; // out of bounds access is safe and returns 0 votes uint96 oldVotes = checkpoints[receiver][n - 1].votes; uint96 newVotes = oldVotes.add96(votes); _writeCheckpoint(receiver, n, newVotes); } } function _writeCheckpoint( address account, uint32 n, uint96 votes ) internal { uint32 blockNumber = safe32(block.number); // out of bounds access is safe and returns 0 votes uint96 oldVotes = checkpoints[account][n - 1].votes; if (n > 0 && checkpoints[account][n - 1].fromBlock == blockNumber) { checkpoints[account][n - 1].votes = votes; } else { checkpoints[account][n] = Checkpoint(blockNumber, votes); checkpointsLength[account] = n + 1; } emit DelegateVotesChanged(account, oldVotes, votes); } function safe32(uint256 n) internal pure returns (uint32) { require(n < 2**32, 'VO_EXCEEDS_32_BITS'); return uint32(n); } }
// SPDX-License-Identifier: MIT // Deployed with donations via Gitcoin GR9 pragma solidity 0.7.5; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * This library is copied from openzeppelin. * See `openzeppelin-contracts/test/cryptography/MerkleProof.test.js` for some examples. */ 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) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
{ "libraries": { "Math.sol": {}, "SafeMath.sol": {}, "TransferHelper.sol": {}, "IERC20.sol": {}, "IIntegralMerkleTimeRelease.sol": {}, "Votes.sol": {}, "MerkleProof.sol": {}, "IntegralMerkleTimeRelease.sol": {} }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"_option1StartBlock","type":"uint256"},{"internalType":"uint256","name":"_option1EndBlock","type":"uint256"},{"internalType":"uint256","name":"_option2StartBlock","type":"uint256"},{"internalType":"uint256","name":"_option2EndBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"option1Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"option2Amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint96","name":"oldVotes","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"newVotes","type":"uint96"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"option1StopBlock","type":"uint256"}],"name":"Option1StopBlockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"option2StopBlock","type":"uint256"}],"name":"Option2StopBlockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"OwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Skim","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"checkpointsLength","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getClaimableOption1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getClaimableOption2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExcessTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getOption1Allocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getOption1Claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getOption2Allocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getOption2Claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getReleasedOption1","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getReleasedOption2","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensLeft","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint96","name":"amount1","type":"uint96"},{"internalType":"uint96","name":"amount2","type":"uint96"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"initializeAllocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint96","name":"amount1","type":"uint96"},{"internalType":"uint96","name":"amount2","type":"uint96"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"initializeAndClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"option1","outputs":[{"internalType":"uint96","name":"allocation","type":"uint96"},{"internalType":"uint96","name":"claimed","type":"uint96"},{"internalType":"uint32","name":"initBlock","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1EndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1StartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1StopBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1StopSetBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1TotalAllocations","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option1TotalClaimed","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"option2","outputs":[{"internalType":"uint96","name":"allocation","type":"uint96"},{"internalType":"uint96","name":"claimed","type":"uint96"},{"internalType":"uint32","name":"initBlock","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2EndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2StartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2StopBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2StopSetBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2TotalAllocations","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"option2TotalClaimed","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_option1StopBlock","type":"uint256"}],"name":"setOption1StopBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_option2StopBlock","type":"uint256"}],"name":"setOption2StopBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint96[]","name":"amounts","type":"uint96[]"}],"name":"updateOption1Allocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint96[]","name":"amounts","type":"uint96[]"}],"name":"updateOption2Allocations","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604051620030c2380380620030c2833981810160405260c08110156200003757600080fd5b5080516020808301516040808501516060860151608087015160a090970151600280546001600160a01b03191633179081905584516001600160a01b03919091168152935196979496929591949390927f50146d0e3c60aa1d17a70635b05494f864e86144a2201275021014fbf08bafe2929181900390910190a16001600160601b0319606087901b1660805260a0859052620000d58484620000ed565b620000e1828262000157565b505050505050620001c1565b81811162000142576040805162461bcd60e51b815260206004820152601d60248201527f4d525f494e56414c49445f4f5054494f4e315f54494d455f4652414d45000000604482015290519081900360640190fd5b60079190915560088190556009819055600d55565b818111620001ac576040805162461bcd60e51b815260206004820152601d60248201527f4d525f494e56414c49445f4f5054494f4e325f54494d455f4652414d45000000604482015290519081900360640190fd5b600a91909155600b819055600c819055600e55565b60805160601c60a051612ebc6200020660003980610a8252806110e8525080610c46528061102e52806118735280611c2e5280611e59528061220b5250612ebc6000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c8063892a38551161013b578063d09bba02116100b8578063ec43d75c1161007c578063ec43d75c146107c0578063f1127ed8146107c8578063fa7eee3914610822578063fc0c546a146108e0578063ffe4aa00146108e857610248565b8063d09bba02146106a6578063d901fc1d146106cc578063de5f98661461078a578063e228f32a14610792578063eaa18f27146107b857610248565b8063ba659254116100ff578063ba65925414610624578063bbaa08f51461064a578063bc25cf7714610652578063c5c7fcb514610678578063cf8149a01461068057610248565b8063892a3855146104f75780638a22744a1461051d5780638da5cb5b14610543578063a755c51914610567578063b4b5ea57146105fe57610248565b80634d5ce9ed116101c957806361d09fdf1161018d57806361d09fdf146104565780636b3703c31461047c57806376db069614610484578063782d6fe1146104c35780637fc31c06146104ef57610248565b80634d5ce9ed14610404578063534fd09f1461040c57806355b04e701461042957806359b9c1ab146104315780636167ae451461044e57610248565b806330ef8ca31161021057806330ef8ca31461037257806333af619b1461037a57806335856e961461039e5780634162ef28146103a65780634357eb6d146103fc57610248565b806310e73df71461024d57806313af4035146102e65780631e83409a1461030c5780632989ee92146103325780632eb4a7ab1461036a575b600080fd5b6102e46004803603608081101561026357600080fd5b6001600160a01b03823516916001600160601b03602082013581169260408301359091169190810190608081016060820135600160201b8111156102a657600080fd5b8201836020820111156102b857600080fd5b803590602001918460208302840111600160201b831117156102d957600080fd5b50909250905061090e565b005b6102e4600480360360208110156102fc57600080fd5b50356001600160a01b0316610d33565b6102e46004803603602081101561032257600080fd5b50356001600160a01b0316610dd5565b6103586004803603602081101561034857600080fd5b50356001600160a01b03166110c2565b60408051918252519081900360200190f35b6103586110e6565b61035861110a565b610382611110565b604080516001600160601b039092168252519081900360200190f35b61038261111f565b6103cc600480360360208110156103bc57600080fd5b50356001600160a01b0316611135565b604080516001600160601b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b61038261116b565b61035861117a565b6102e46004803603602081101561042257600080fd5b5035611180565b6103586112b7565b6102e46004803603602081101561044757600080fd5b50356112bd565b6103586113f4565b6103586004803603602081101561046c57600080fd5b50356001600160a01b03166113fa565b610382611445565b6104aa6004803603602081101561049a57600080fd5b50356001600160a01b031661145b565b6040805163ffffffff9092168252519081900360200190f35b610382600480360360408110156104d957600080fd5b506001600160a01b038135169060200135611473565b6103586116c3565b6103826004803603602081101561050d57600080fd5b50356001600160a01b03166116c9565b6103586004803603602081101561053357600080fd5b50356001600160a01b03166116d5565b61054b611700565b604080516001600160a01b039092168252519081900360200190f35b6102e46004803603608081101561057d57600080fd5b6001600160a01b03823516916001600160601b03602082013581169260408301359091169190810190608081016060820135600160201b8111156105c057600080fd5b8201836020820111156105d257600080fd5b803590602001918460208302840111600160201b831117156105f357600080fd5b50909250905061170f565b6103826004803603602081101561061457600080fd5b50356001600160a01b031661176d565b6103826004803603602081101561063a57600080fd5b50356001600160a01b03166117b5565b6103586117c1565b6102e46004803603602081101561066857600080fd5b50356001600160a01b03166117c7565b6103586118e1565b6103586004803603602081101561069657600080fd5b50356001600160a01b03166118e7565b610358600480360360208110156106bc57600080fd5b50356001600160a01b031661191d565b6102e4600480360360408110156106e257600080fd5b810190602081018135600160201b8111156106fc57600080fd5b82018360208201111561070e57600080fd5b803590602001918460208302840111600160201b8311171561072f57600080fd5b919390929091602081019035600160201b81111561074c57600080fd5b82018360208201111561075e57600080fd5b803590602001918460208302840111600160201b8311171561077f57600080fd5b509092509050611941565b610382611d18565b6103cc600480360360208110156107a857600080fd5b50356001600160a01b0316611e0b565b610358611e41565b610358611efb565b6107fa600480360360408110156107de57600080fd5b5080356001600160a01b0316906020013563ffffffff16611f01565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6102e46004803603604081101561083857600080fd5b810190602081018135600160201b81111561085257600080fd5b82018360208201111561086457600080fd5b803590602001918460208302840111600160201b8311171561088557600080fd5b919390929091602081019035600160201b8111156108a257600080fd5b8201836020820111156108b457600080fd5b803590602001918460208302840111600160201b831117156108d557600080fd5b509092509050611f33565b61054b612209565b610358600480360360208110156108fe57600080fd5b50356001600160a01b031661222d565b600854600d541480156109245750600b54600e54145b61096b576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b6001600160a01b0385166000908152600560205260409020546001600160601b03161580156109b957506001600160a01b0385166000908152600660205260409020546001600160601b0316155b6109f45760405162461bcd60e51b8152600401808060200182810382526021815260200180612e666021913960400191505060405180910390fd5b600085856001600160601b0316856001600160601b031660405160200180846001600160a01b031660601b81526014018381526020018281526020019350505050604051602081830303815290604052805190602001209050610aad8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506122589050565b610af1576040805162461bcd60e51b815260206004820152601060248201526f26a92fa4a72b20a624a22fa82927a7a360811b604482015290519081900360640190fd5b6000610afc43612301565b90506001600160601b03861615610ba0576001600160a01b0387166000908152600560205260409020805463ffffffff808416600160c01b0263ffffffff60c01b196001600160601b03808c166001600160601b0319909516949094171617909255600254610b7992600160a01b90910490911690889061235416565b600260146101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b03851615610c33576001600160a01b0387166000908152600660205260409020805463ffffffff808416600160c01b0263ffffffff60c01b196001600160601b03808b166001600160601b0319909516949094171617909255600354610c1292911690879061235416565b600380546001600160601b0319166001600160601b03929092169190911790555b610c3b611d18565b6001600160601b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cb157600080fd5b505afa158015610cc5573d6000803e3d6000fd5b505050506040513d6020811015610cdb57600080fd5b50511015610d2a576040805162461bcd60e51b81526020600482015260176024820152764d525f494e53554646494349454e545f42414c414e434560481b604482015290519081900360640190fd5b50505050505050565b6002546001600160a01b03163314610d81576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f50146d0e3c60aa1d17a70635b05494f864e86144a2201275021014fbf08bafe29181900360200190a150565b33610dde612e2e565b506001600160a01b038116600090815260056020908152604091829020825160608101845290546001600160601b038082168352600160601b82041692820192909252600160c01b90910463ffffffff1691810191909152610e3e612e2e565b506001600160a01b0382166000908152600660209081526040808320815160608101835290546001600160601b038082168352600160601b820416828501819052600160c01b90910463ffffffff1692820192909252918401519192610eb683610ea7886116c9565b6001600160601b0316906123aa565b90506000610ec783610ea7896117b5565b9050610edc6001600160601b03851683612354565b6001600160a01b03881660009081526005602052604090208054600160601b600160c01b031916600160601b6001600160601b0393841602179055610f2390841682612354565b6001600160a01b03881660009081526006602052604090208054600160601b600160c01b031916600160601b6001600160601b03938416810291909117909155600354610f74929190041683612354565b60038054600160601b600160c01b031916600160601b6001600160601b0393841602179055600454610fa7911682612354565b600480546001600160601b0319166001600160601b03928316179055600090610fd290841683612354565b6001600160a01b03891660009081526001602052604090205490915063ffffffff1661101d578551875161101d916000918b91611018916001600160601b031690612354565b61240c565b6110298860008361240c565b61105d7f00000000000000000000000000000000000000000000000000000000000000008a836001600160601b0316612594565b604080516001600160a01b03808b1682528b1660208201526001600160601b03808616828401528416606082015290517f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e946459181900360800190a1505050505050505050565b6001600160a01b03166000908152600560205260409020546001600160601b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b600b5481565b6003546001600160601b031681565b600254600160a01b90046001600160601b031681565b6005602052600090815260409020546001600160601b0380821691600160601b810490911690600160c01b900463ffffffff1683565b6004546001600160601b031681565b600e5481565b6002546001600160a01b031633146111ce576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600b54600e541461121c576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b43811015801561122d5750600b5481105b611278576040805162461bcd60e51b815260206004820152601760248201527626a92fa4a72b20a624a22fa12627a1a5afa72aa6a122a960491b604482015290519081900360640190fd5b600c81905543600e556040805182815290517f934cc9b36aa2ef3a7649683f0d03ccf35d83c04aeb4c57d18c2a85171351a2ff9181900360200190a150565b600d5481565b6002546001600160a01b0316331461130b576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600854600d5414611359576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b43811015801561136a575060085481105b6113b5576040805162461bcd60e51b815260206004820152601760248201527626a92fa4a72b20a624a22fa12627a1a5afa72aa6a122a960491b604482015290519081900360640190fd5b600981905543600d556040805182815290517f13d912bb286abe264da9c0961908c7b9674ef54c5e86955eb906169fe1d620b39181900360200190a150565b600a5481565b6001600160a01b03811660009081526005602052604081205461143f90600160601b90046001600160601b0316611430846116c9565b6001600160601b0316906126ec565b92915050565b600354600160601b90046001600160601b031681565b60016020526000908152604090205463ffffffff1681565b6001600160a01b03821660009081526005602090815260408083205460068352818420546001909352908320546001600160601b039182169290911690839063ffffffff1615806114ea57506001600160a01b03861660009081526020818152604080832083805290915290205463ffffffff1685105b15611578576001600160a01b038616600090815260056020526040902054600160c01b900463ffffffff1685106115315761152e816001600160601b038516612728565b90505b6001600160a01b038616600090815260066020526040902054600160c01b900463ffffffff16851061157357611570816001600160601b038416612728565b90505b61158e565b6115828686612772565b6001600160601b031690505b6008546009541480156115a45750600b54600c54145b156115bc576115b2816129a3565b935050505061143f565b84600d541180156115ce575084600e54115b156115dc576115b2816129a3565b600080600d5487106116405760006116016007546008546126ec90919063ffffffff16565b9050600061161c6009546008546126ec90919063ffffffff16565b905061163b826116356001600160601b038a16846129f2565b90612a50565b935050505b600e54871061169b576000611662600a54600b546126ec90919063ffffffff16565b9050600061167d600c54600b546126ec90919063ffffffff16565b9050611696826116356001600160601b038916846129f2565b925050505b6116b76116b2826116ac86866126ec565b906126ec565b6129a3565b98975050505050505050565b60075481565b600061143f8243612aab565b6001600160a01b0316600090815260056020526040902054600160601b90046001600160601b031690565b6002546001600160a01b031681565b336000908152600560205260409020546001600160601b031615801561174b5750336000908152600660205260409020546001600160601b0316155b1561175d5761175d338585858561090e565b61176685610dd5565b5050505050565b6001600160a01b0316600090815260208181526040808320600183528184205463ffffffff90811660001901168452909152902054600160201b90046001600160601b031690565b600061143f8243612b2f565b60095481565b6002546001600160a01b03163314611815576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b6001600160a01b038116611862576040805162461bcd60e51b815260206004820152600f60248201526e4d525f414444524553535f5a45524f60881b604482015290519081900360640190fd5b600061186c611e41565b90506118997f00000000000000000000000000000000000000000000000000000000000000008383612594565b604080516001600160a01b03841681526020810183905281517f5e99aaf6d3588fb2497fde044168e8c046704a3223559cfe107f8f94b42cefdd929181900390910190a15050565b600c5481565b6001600160a01b03811660009081526006602052604081205461143f90600160601b90046001600160601b0316611430846117b5565b6001600160a01b03166000908152600660205260409020546001600160601b031690565b6002546001600160a01b0316331461198f576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600b54600e54146119dd576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b828114611a26576040805162461bcd60e51b81526020600482015260126024820152714d525f494e56414c49445f4c454e4754485360701b604482015290519081900360640190fd5b60005b83811015611c1a576000858583818110611a3f57fe5b905060200201356001600160a01b031690506000848484818110611a5f57fe5b6001600160a01b038516600090815260066020908152604090912054910292909201356001600160601b039081169350909116905080611ade576040805162461bcd60e51b8152602060048201526015602482015274135497d0531313d0d0551253d397d393d517d4d155605a1b604482015290519081900360640190fd5b816001600160601b0316611af1846117b5565b6001600160601b03161115611b47576040805162461bcd60e51b8152602060048201526017602482015276135497d0531313d0d0551253d397d513d3d7d4d3505313604a1b604482015290519081900360640190fd5b600354611b72908390611b63906001600160601b0316846123aa565b6001600160601b031690612354565b600380546001600160601b03199081166001600160601b03938416179091556001600160a01b0385166000908152600660209081526040808320805490941687861617938490556001909152902054600160601b9091049091169063ffffffff1615611bf157611bf18460006110186001600160601b038616856123aa565b611c0a6000856110186001600160601b038716856123aa565b505060019092019150611a299050565b50611c23611d18565b6001600160601b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c9957600080fd5b505afa158015611cad573d6000803e3d6000fd5b505050506040513d6020811015611cc357600080fd5b50511015611d12576040805162461bcd60e51b81526020600482015260176024820152764d525f494e53554646494349454e545f42414c414e434560481b604482015290519081900360640190fd5b50505050565b600080611d326007546008546126ec90919063ffffffff16565b90506000611d4d6007546009546126ec90919063ffffffff16565b600254909150600090611d7690849061163590600160a01b90046001600160601b0316856129f2565b90506000611d91600a54600b546126ec90919063ffffffff16565b90506000611dac600a54600c546126ec90919063ffffffff16565b600354909150600090611dce908490611635906001600160601b0316856129f2565b600454600354919250611e00916116b2916001600160601b03908116916116ac91600160601b90910416818987612728565b965050505050505090565b6006602052600090815260409020546001600160601b0380821691600160601b810490911690600160c01b900463ffffffff1683565b6000611ef6611e4e611d18565b6001600160601b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611ec457600080fd5b505afa158015611ed8573d6000803e3d6000fd5b505050506040513d6020811015611eee57600080fd5b5051906126ec565b905090565b60085481565b600060208181529281526040808220909352908152205463ffffffff811690600160201b90046001600160601b031682565b6002546001600160a01b03163314611f81576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600854600d5414611fcf576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b828114612018576040805162461bcd60e51b81526020600482015260126024820152714d525f494e56414c49445f4c454e4754485360701b604482015290519081900360640190fd5b60005b83811015611c1a57600085858381811061203157fe5b905060200201356001600160a01b03169050600084848481811061205157fe5b6001600160a01b038516600090815260056020908152604090912054910292909201356001600160601b0390811693509091169050806120d0576040805162461bcd60e51b8152602060048201526015602482015274135497d0531313d0d0551253d397d393d517d4d155605a1b604482015290519081900360640190fd5b816001600160601b03166120e3846116c9565b6001600160601b03161115612139576040805162461bcd60e51b8152602060048201526017602482015276135497d0531313d0d0551253d397d513d3d7d4d3505313604a1b604482015290519081900360640190fd5b60025461215c908390611b6390600160a01b90046001600160601b0316846123aa565b600280546001600160a01b03908116600160a01b6001600160601b0394851602179091558416600090815260056020908152604080832080546001600160601b0319168786161790819055600190925290912054600160601b9091049091169063ffffffff16156121e0576121e08460006110186001600160601b038616856123aa565b6121f96000856110186001600160601b038716856123aa565b50506001909201915061201b9050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0316600090815260066020526040902054600160601b90046001600160601b031690565b600081815b85518110156122f657600086828151811061227457fe5b602002602001015190508083116122bb57828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506122ed565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161225d565b509092149392505050565b6000600160201b8210612350576040805162461bcd60e51b8152602060048201526012602482015271564f5f455843454544535f33325f4249545360701b604482015290519081900360640190fd5b5090565b8181016001600160601b03808416908216101561143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4144445f4f564552464c4f5760881b604482015290519081900360640190fd5b6000826001600160601b0316826001600160601b03161115612406576040805162461bcd60e51b815260206004820152601060248201526f534d5f5355425f554e444552464c4f5760801b604482015290519081900360640190fd5b50900390565b816001600160a01b0316836001600160a01b0316148061243357506001600160601b038116155b1561243d5761258f565b6001600160a01b03831615612513576001600160a01b03831660009081526001602052604090205463ffffffff16806124b5576040805162461bcd60e51b8152602060048201526015602482015274564f5f494e53554646494349454e545f564f54455360581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020818152604080832063ffffffff60001986018116855292528220546001600160601b03600160201b90910416919061250290839086906123aa16565b905061250f868483612baa565b5050505b6001600160a01b0382161561258f576001600160a01b03821660009081526001602090815260408083205483835281842063ffffffff9182166000198101831686529352908320549192600160201b9092046001600160601b0316919061257e908390869061235416565b905061258b858483612baa565b5050505b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106126115780518252601f1990920191602091820191016125f2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612673576040519150601f19603f3d011682016040523d82523d6000602084013e612678565b606091505b50915091508180156126a65750805115806126a657508080602001905160208110156126a357600080fd5b50515b611766576040805162461bcd60e51b8152602060048201526012602482015271151217d514905394d1915497d1905253115160721b604482015290519081900360640190fd5b600061272183836040518060400160405280601081526020016f534d5f5355425f554e444552464c4f5760801b815250612d80565b9392505050565b8082018281101561143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4144445f4f564552464c4f5760881b604482015290519081900360640190fd5b60004382106127c0576040805162461bcd60e51b81526020600482015260156024820152741593d7d393d517d6515517d1115511549352539151605a1b604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205463ffffffff16806127ee57600091505061143f565b6001600160a01b03841660009081526020818152604080832063ffffffff600019860181168552925290912054168310612866576001600160a01b0384166000908152602081815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061143f565b6001600160a01b03841660009081526020818152604080832083805290915290205463ffffffff1683101561289f57600091505061143f565b600060001982015b8163ffffffff168163ffffffff16111561296057600282820363ffffffff160481036128d1612e4e565b506001600160a01b03871660009081526020818152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b0316918101919091529087141561293b5760200151945061143f9350505050565b805163ffffffff1687111561295257819350612959565b6001820392505b50506128a7565b506001600160a01b03851660009081526020818152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b6000600160601b8210612350576040805162461bcd60e51b815260206004820152601260248201527149545f455843454544535f39365f4249545360701b604482015290519081900360640190fd5b6000811580612a0d57505080820282828281612a0a57fe5b04145b61143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4d554c5f4f564552464c4f5760881b604482015290519081900360640190fd5b6000808211612a97576040805162461bcd60e51b815260206004820152600e60248201526d534d5f4449565f42595f5a45524f60901b604482015290519081900360640190fd5b6000828481612aa257fe5b04949350505050565b60006007548211612abe5750600061143f565b6000612ad26007546116ac85600954612e18565b90506000612aed6007546008546126ec90919063ffffffff16565b6001600160a01b038616600090815260056020526040902054909150612b26906116b2908390611635906001600160601b0316866129f2565b95945050505050565b6000600a548211612b425750600061143f565b6000612b56600a546116ac85600c54612e18565b90506000612b71600a54600b546126ec90919063ffffffff16565b6001600160a01b038616600090815260066020526040902054909150612b26906116b2908390611635906001600160601b0316866129f2565b6000612bb543612301565b6001600160a01b038516600090815260208181526040808320600019880163ffffffff9081168552925290912054919250600160201b9091046001600160601b031690841615801590612c3757506001600160a01b03851660009081526020818152604080832063ffffffff6000198901811685529252909120548382169116145b15612c94576001600160a01b038516600090815260208181526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b03861602179055612d2c565b60408051808201825263ffffffff84811682526001600160601b0386811660208085019182526001600160a01b038b1660008181528083528781208c87168252835287812096518754945163ffffffff19958616918816919091176fffffffffffffffffffffffff000000001916600160201b9190961602949094179095559382526001938490529390208054909316918701161790555b604080516001600160601b0380841682528516602082015281516001600160a01b038816927f664ef4a22338e827df5b675ec1747eac10c2ea611e1c575f3d96c38a2e24231e928290030190a25050505050565b8183038184821115612e105760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612dd5578181015183820152602001612dbd565b50505050905090810190601f168015612e025780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509392505050565b6000818310612e275781612721565b5090919050565b604080516060810182526000808252602082018190529181019190915290565b60408051808201909152600080825260208201529056fe4d525f414c4c4f434154494f4e5f414c52454144595f494e495449414c495a4544a26469706673582212204d7125a02d366e34afd825d80b3917183477e61dfd33f999f07a06ffc63e84c864736f6c63430007050033000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc988543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c50000000000000000000000000000000000000000000000000000000000cfaedb00000000000000000000000000000000000000000000000000000000013ebabe0000000000000000000000000000000000000000000000000000000000cfaedb0000000000000000000000000000000000000000000000000000000000e230d7
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c8063892a38551161013b578063d09bba02116100b8578063ec43d75c1161007c578063ec43d75c146107c0578063f1127ed8146107c8578063fa7eee3914610822578063fc0c546a146108e0578063ffe4aa00146108e857610248565b8063d09bba02146106a6578063d901fc1d146106cc578063de5f98661461078a578063e228f32a14610792578063eaa18f27146107b857610248565b8063ba659254116100ff578063ba65925414610624578063bbaa08f51461064a578063bc25cf7714610652578063c5c7fcb514610678578063cf8149a01461068057610248565b8063892a3855146104f75780638a22744a1461051d5780638da5cb5b14610543578063a755c51914610567578063b4b5ea57146105fe57610248565b80634d5ce9ed116101c957806361d09fdf1161018d57806361d09fdf146104565780636b3703c31461047c57806376db069614610484578063782d6fe1146104c35780637fc31c06146104ef57610248565b80634d5ce9ed14610404578063534fd09f1461040c57806355b04e701461042957806359b9c1ab146104315780636167ae451461044e57610248565b806330ef8ca31161021057806330ef8ca31461037257806333af619b1461037a57806335856e961461039e5780634162ef28146103a65780634357eb6d146103fc57610248565b806310e73df71461024d57806313af4035146102e65780631e83409a1461030c5780632989ee92146103325780632eb4a7ab1461036a575b600080fd5b6102e46004803603608081101561026357600080fd5b6001600160a01b03823516916001600160601b03602082013581169260408301359091169190810190608081016060820135600160201b8111156102a657600080fd5b8201836020820111156102b857600080fd5b803590602001918460208302840111600160201b831117156102d957600080fd5b50909250905061090e565b005b6102e4600480360360208110156102fc57600080fd5b50356001600160a01b0316610d33565b6102e46004803603602081101561032257600080fd5b50356001600160a01b0316610dd5565b6103586004803603602081101561034857600080fd5b50356001600160a01b03166110c2565b60408051918252519081900360200190f35b6103586110e6565b61035861110a565b610382611110565b604080516001600160601b039092168252519081900360200190f35b61038261111f565b6103cc600480360360208110156103bc57600080fd5b50356001600160a01b0316611135565b604080516001600160601b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b61038261116b565b61035861117a565b6102e46004803603602081101561042257600080fd5b5035611180565b6103586112b7565b6102e46004803603602081101561044757600080fd5b50356112bd565b6103586113f4565b6103586004803603602081101561046c57600080fd5b50356001600160a01b03166113fa565b610382611445565b6104aa6004803603602081101561049a57600080fd5b50356001600160a01b031661145b565b6040805163ffffffff9092168252519081900360200190f35b610382600480360360408110156104d957600080fd5b506001600160a01b038135169060200135611473565b6103586116c3565b6103826004803603602081101561050d57600080fd5b50356001600160a01b03166116c9565b6103586004803603602081101561053357600080fd5b50356001600160a01b03166116d5565b61054b611700565b604080516001600160a01b039092168252519081900360200190f35b6102e46004803603608081101561057d57600080fd5b6001600160a01b03823516916001600160601b03602082013581169260408301359091169190810190608081016060820135600160201b8111156105c057600080fd5b8201836020820111156105d257600080fd5b803590602001918460208302840111600160201b831117156105f357600080fd5b50909250905061170f565b6103826004803603602081101561061457600080fd5b50356001600160a01b031661176d565b6103826004803603602081101561063a57600080fd5b50356001600160a01b03166117b5565b6103586117c1565b6102e46004803603602081101561066857600080fd5b50356001600160a01b03166117c7565b6103586118e1565b6103586004803603602081101561069657600080fd5b50356001600160a01b03166118e7565b610358600480360360208110156106bc57600080fd5b50356001600160a01b031661191d565b6102e4600480360360408110156106e257600080fd5b810190602081018135600160201b8111156106fc57600080fd5b82018360208201111561070e57600080fd5b803590602001918460208302840111600160201b8311171561072f57600080fd5b919390929091602081019035600160201b81111561074c57600080fd5b82018360208201111561075e57600080fd5b803590602001918460208302840111600160201b8311171561077f57600080fd5b509092509050611941565b610382611d18565b6103cc600480360360208110156107a857600080fd5b50356001600160a01b0316611e0b565b610358611e41565b610358611efb565b6107fa600480360360408110156107de57600080fd5b5080356001600160a01b0316906020013563ffffffff16611f01565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6102e46004803603604081101561083857600080fd5b810190602081018135600160201b81111561085257600080fd5b82018360208201111561086457600080fd5b803590602001918460208302840111600160201b8311171561088557600080fd5b919390929091602081019035600160201b8111156108a257600080fd5b8201836020820111156108b457600080fd5b803590602001918460208302840111600160201b831117156108d557600080fd5b509092509050611f33565b61054b612209565b610358600480360360208110156108fe57600080fd5b50356001600160a01b031661222d565b600854600d541480156109245750600b54600e54145b61096b576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b6001600160a01b0385166000908152600560205260409020546001600160601b03161580156109b957506001600160a01b0385166000908152600660205260409020546001600160601b0316155b6109f45760405162461bcd60e51b8152600401808060200182810382526021815260200180612e666021913960400191505060405180910390fd5b600085856001600160601b0316856001600160601b031660405160200180846001600160a01b031660601b81526014018381526020018281526020019350505050604051602081830303815290604052805190602001209050610aad8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f8543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c592508591506122589050565b610af1576040805162461bcd60e51b815260206004820152601060248201526f26a92fa4a72b20a624a22fa82927a7a360811b604482015290519081900360640190fd5b6000610afc43612301565b90506001600160601b03861615610ba0576001600160a01b0387166000908152600560205260409020805463ffffffff808416600160c01b0263ffffffff60c01b196001600160601b03808c166001600160601b0319909516949094171617909255600254610b7992600160a01b90910490911690889061235416565b600260146101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b03851615610c33576001600160a01b0387166000908152600660205260409020805463ffffffff808416600160c01b0263ffffffff60c01b196001600160601b03808b166001600160601b0319909516949094171617909255600354610c1292911690879061235416565b600380546001600160601b0319166001600160601b03929092169190911790555b610c3b611d18565b6001600160601b03167f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc986001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cb157600080fd5b505afa158015610cc5573d6000803e3d6000fd5b505050506040513d6020811015610cdb57600080fd5b50511015610d2a576040805162461bcd60e51b81526020600482015260176024820152764d525f494e53554646494349454e545f42414c414e434560481b604482015290519081900360640190fd5b50505050505050565b6002546001600160a01b03163314610d81576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f50146d0e3c60aa1d17a70635b05494f864e86144a2201275021014fbf08bafe29181900360200190a150565b33610dde612e2e565b506001600160a01b038116600090815260056020908152604091829020825160608101845290546001600160601b038082168352600160601b82041692820192909252600160c01b90910463ffffffff1691810191909152610e3e612e2e565b506001600160a01b0382166000908152600660209081526040808320815160608101835290546001600160601b038082168352600160601b820416828501819052600160c01b90910463ffffffff1692820192909252918401519192610eb683610ea7886116c9565b6001600160601b0316906123aa565b90506000610ec783610ea7896117b5565b9050610edc6001600160601b03851683612354565b6001600160a01b03881660009081526005602052604090208054600160601b600160c01b031916600160601b6001600160601b0393841602179055610f2390841682612354565b6001600160a01b03881660009081526006602052604090208054600160601b600160c01b031916600160601b6001600160601b03938416810291909117909155600354610f74929190041683612354565b60038054600160601b600160c01b031916600160601b6001600160601b0393841602179055600454610fa7911682612354565b600480546001600160601b0319166001600160601b03928316179055600090610fd290841683612354565b6001600160a01b03891660009081526001602052604090205490915063ffffffff1661101d578551875161101d916000918b91611018916001600160601b031690612354565b61240c565b6110298860008361240c565b61105d7f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc988a836001600160601b0316612594565b604080516001600160a01b03808b1682528b1660208201526001600160601b03808616828401528416606082015290517f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e946459181900360800190a1505050505050505050565b6001600160a01b03166000908152600560205260409020546001600160601b031690565b7f8543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c581565b600b5481565b6003546001600160601b031681565b600254600160a01b90046001600160601b031681565b6005602052600090815260409020546001600160601b0380821691600160601b810490911690600160c01b900463ffffffff1683565b6004546001600160601b031681565b600e5481565b6002546001600160a01b031633146111ce576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600b54600e541461121c576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b43811015801561122d5750600b5481105b611278576040805162461bcd60e51b815260206004820152601760248201527626a92fa4a72b20a624a22fa12627a1a5afa72aa6a122a960491b604482015290519081900360640190fd5b600c81905543600e556040805182815290517f934cc9b36aa2ef3a7649683f0d03ccf35d83c04aeb4c57d18c2a85171351a2ff9181900360200190a150565b600d5481565b6002546001600160a01b0316331461130b576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600854600d5414611359576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b43811015801561136a575060085481105b6113b5576040805162461bcd60e51b815260206004820152601760248201527626a92fa4a72b20a624a22fa12627a1a5afa72aa6a122a960491b604482015290519081900360640190fd5b600981905543600d556040805182815290517f13d912bb286abe264da9c0961908c7b9674ef54c5e86955eb906169fe1d620b39181900360200190a150565b600a5481565b6001600160a01b03811660009081526005602052604081205461143f90600160601b90046001600160601b0316611430846116c9565b6001600160601b0316906126ec565b92915050565b600354600160601b90046001600160601b031681565b60016020526000908152604090205463ffffffff1681565b6001600160a01b03821660009081526005602090815260408083205460068352818420546001909352908320546001600160601b039182169290911690839063ffffffff1615806114ea57506001600160a01b03861660009081526020818152604080832083805290915290205463ffffffff1685105b15611578576001600160a01b038616600090815260056020526040902054600160c01b900463ffffffff1685106115315761152e816001600160601b038516612728565b90505b6001600160a01b038616600090815260066020526040902054600160c01b900463ffffffff16851061157357611570816001600160601b038416612728565b90505b61158e565b6115828686612772565b6001600160601b031690505b6008546009541480156115a45750600b54600c54145b156115bc576115b2816129a3565b935050505061143f565b84600d541180156115ce575084600e54115b156115dc576115b2816129a3565b600080600d5487106116405760006116016007546008546126ec90919063ffffffff16565b9050600061161c6009546008546126ec90919063ffffffff16565b905061163b826116356001600160601b038a16846129f2565b90612a50565b935050505b600e54871061169b576000611662600a54600b546126ec90919063ffffffff16565b9050600061167d600c54600b546126ec90919063ffffffff16565b9050611696826116356001600160601b038916846129f2565b925050505b6116b76116b2826116ac86866126ec565b906126ec565b6129a3565b98975050505050505050565b60075481565b600061143f8243612aab565b6001600160a01b0316600090815260056020526040902054600160601b90046001600160601b031690565b6002546001600160a01b031681565b336000908152600560205260409020546001600160601b031615801561174b5750336000908152600660205260409020546001600160601b0316155b1561175d5761175d338585858561090e565b61176685610dd5565b5050505050565b6001600160a01b0316600090815260208181526040808320600183528184205463ffffffff90811660001901168452909152902054600160201b90046001600160601b031690565b600061143f8243612b2f565b60095481565b6002546001600160a01b03163314611815576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b6001600160a01b038116611862576040805162461bcd60e51b815260206004820152600f60248201526e4d525f414444524553535f5a45524f60881b604482015290519081900360640190fd5b600061186c611e41565b90506118997f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc988383612594565b604080516001600160a01b03841681526020810183905281517f5e99aaf6d3588fb2497fde044168e8c046704a3223559cfe107f8f94b42cefdd929181900390910190a15050565b600c5481565b6001600160a01b03811660009081526006602052604081205461143f90600160601b90046001600160601b0316611430846117b5565b6001600160a01b03166000908152600660205260409020546001600160601b031690565b6002546001600160a01b0316331461198f576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600b54600e54146119dd576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b828114611a26576040805162461bcd60e51b81526020600482015260126024820152714d525f494e56414c49445f4c454e4754485360701b604482015290519081900360640190fd5b60005b83811015611c1a576000858583818110611a3f57fe5b905060200201356001600160a01b031690506000848484818110611a5f57fe5b6001600160a01b038516600090815260066020908152604090912054910292909201356001600160601b039081169350909116905080611ade576040805162461bcd60e51b8152602060048201526015602482015274135497d0531313d0d0551253d397d393d517d4d155605a1b604482015290519081900360640190fd5b816001600160601b0316611af1846117b5565b6001600160601b03161115611b47576040805162461bcd60e51b8152602060048201526017602482015276135497d0531313d0d0551253d397d513d3d7d4d3505313604a1b604482015290519081900360640190fd5b600354611b72908390611b63906001600160601b0316846123aa565b6001600160601b031690612354565b600380546001600160601b03199081166001600160601b03938416179091556001600160a01b0385166000908152600660209081526040808320805490941687861617938490556001909152902054600160601b9091049091169063ffffffff1615611bf157611bf18460006110186001600160601b038616856123aa565b611c0a6000856110186001600160601b038716856123aa565b505060019092019150611a299050565b50611c23611d18565b6001600160601b03167f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc986001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c9957600080fd5b505afa158015611cad573d6000803e3d6000fd5b505050506040513d6020811015611cc357600080fd5b50511015611d12576040805162461bcd60e51b81526020600482015260176024820152764d525f494e53554646494349454e545f42414c414e434560481b604482015290519081900360640190fd5b50505050565b600080611d326007546008546126ec90919063ffffffff16565b90506000611d4d6007546009546126ec90919063ffffffff16565b600254909150600090611d7690849061163590600160a01b90046001600160601b0316856129f2565b90506000611d91600a54600b546126ec90919063ffffffff16565b90506000611dac600a54600c546126ec90919063ffffffff16565b600354909150600090611dce908490611635906001600160601b0316856129f2565b600454600354919250611e00916116b2916001600160601b03908116916116ac91600160601b90910416818987612728565b965050505050505090565b6006602052600090815260409020546001600160601b0380821691600160601b810490911690600160c01b900463ffffffff1683565b6000611ef6611e4e611d18565b6001600160601b03167f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc986001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611ec457600080fd5b505afa158015611ed8573d6000803e3d6000fd5b505050506040513d6020811015611eee57600080fd5b5051906126ec565b905090565b60085481565b600060208181529281526040808220909352908152205463ffffffff811690600160201b90046001600160601b031682565b6002546001600160a01b03163314611f81576040805162461bcd60e51b815260206004820152600c60248201526b26a92fa327a92124a22222a760a11b604482015290519081900360640190fd5b600854600d5414611fcf576040805162461bcd60e51b8152602060048201526013602482015272135497d4d513d417d053149150511657d4d155606a1b604482015290519081900360640190fd5b828114612018576040805162461bcd60e51b81526020600482015260126024820152714d525f494e56414c49445f4c454e4754485360701b604482015290519081900360640190fd5b60005b83811015611c1a57600085858381811061203157fe5b905060200201356001600160a01b03169050600084848481811061205157fe5b6001600160a01b038516600090815260056020908152604090912054910292909201356001600160601b0390811693509091169050806120d0576040805162461bcd60e51b8152602060048201526015602482015274135497d0531313d0d0551253d397d393d517d4d155605a1b604482015290519081900360640190fd5b816001600160601b03166120e3846116c9565b6001600160601b03161115612139576040805162461bcd60e51b8152602060048201526017602482015276135497d0531313d0d0551253d397d513d3d7d4d3505313604a1b604482015290519081900360640190fd5b60025461215c908390611b6390600160a01b90046001600160601b0316846123aa565b600280546001600160a01b03908116600160a01b6001600160601b0394851602179091558416600090815260056020908152604080832080546001600160601b0319168786161790819055600190925290912054600160601b9091049091169063ffffffff16156121e0576121e08460006110186001600160601b038616856123aa565b6121f96000856110186001600160601b038716856123aa565b50506001909201915061201b9050565b7f000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc9881565b6001600160a01b0316600090815260066020526040902054600160601b90046001600160601b031690565b600081815b85518110156122f657600086828151811061227457fe5b602002602001015190508083116122bb57828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506122ed565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5060010161225d565b509092149392505050565b6000600160201b8210612350576040805162461bcd60e51b8152602060048201526012602482015271564f5f455843454544535f33325f4249545360701b604482015290519081900360640190fd5b5090565b8181016001600160601b03808416908216101561143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4144445f4f564552464c4f5760881b604482015290519081900360640190fd5b6000826001600160601b0316826001600160601b03161115612406576040805162461bcd60e51b815260206004820152601060248201526f534d5f5355425f554e444552464c4f5760801b604482015290519081900360640190fd5b50900390565b816001600160a01b0316836001600160a01b0316148061243357506001600160601b038116155b1561243d5761258f565b6001600160a01b03831615612513576001600160a01b03831660009081526001602052604090205463ffffffff16806124b5576040805162461bcd60e51b8152602060048201526015602482015274564f5f494e53554646494349454e545f564f54455360581b604482015290519081900360640190fd5b6001600160a01b03841660009081526020818152604080832063ffffffff60001986018116855292528220546001600160601b03600160201b90910416919061250290839086906123aa16565b905061250f868483612baa565b5050505b6001600160a01b0382161561258f576001600160a01b03821660009081526001602090815260408083205483835281842063ffffffff9182166000198101831686529352908320549192600160201b9092046001600160601b0316919061257e908390869061235416565b905061258b858483612baa565b5050505b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106126115780518252601f1990920191602091820191016125f2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612673576040519150601f19603f3d011682016040523d82523d6000602084013e612678565b606091505b50915091508180156126a65750805115806126a657508080602001905160208110156126a357600080fd5b50515b611766576040805162461bcd60e51b8152602060048201526012602482015271151217d514905394d1915497d1905253115160721b604482015290519081900360640190fd5b600061272183836040518060400160405280601081526020016f534d5f5355425f554e444552464c4f5760801b815250612d80565b9392505050565b8082018281101561143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4144445f4f564552464c4f5760881b604482015290519081900360640190fd5b60004382106127c0576040805162461bcd60e51b81526020600482015260156024820152741593d7d393d517d6515517d1115511549352539151605a1b604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205463ffffffff16806127ee57600091505061143f565b6001600160a01b03841660009081526020818152604080832063ffffffff600019860181168552925290912054168310612866576001600160a01b0384166000908152602081815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b0316905061143f565b6001600160a01b03841660009081526020818152604080832083805290915290205463ffffffff1683101561289f57600091505061143f565b600060001982015b8163ffffffff168163ffffffff16111561296057600282820363ffffffff160481036128d1612e4e565b506001600160a01b03871660009081526020818152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b0316918101919091529087141561293b5760200151945061143f9350505050565b805163ffffffff1687111561295257819350612959565b6001820392505b50506128a7565b506001600160a01b03851660009081526020818152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b6000600160601b8210612350576040805162461bcd60e51b815260206004820152601260248201527149545f455843454544535f39365f4249545360701b604482015290519081900360640190fd5b6000811580612a0d57505080820282828281612a0a57fe5b04145b61143f576040805162461bcd60e51b815260206004820152600f60248201526e534d5f4d554c5f4f564552464c4f5760881b604482015290519081900360640190fd5b6000808211612a97576040805162461bcd60e51b815260206004820152600e60248201526d534d5f4449565f42595f5a45524f60901b604482015290519081900360640190fd5b6000828481612aa257fe5b04949350505050565b60006007548211612abe5750600061143f565b6000612ad26007546116ac85600954612e18565b90506000612aed6007546008546126ec90919063ffffffff16565b6001600160a01b038616600090815260056020526040902054909150612b26906116b2908390611635906001600160601b0316866129f2565b95945050505050565b6000600a548211612b425750600061143f565b6000612b56600a546116ac85600c54612e18565b90506000612b71600a54600b546126ec90919063ffffffff16565b6001600160a01b038616600090815260066020526040902054909150612b26906116b2908390611635906001600160601b0316866129f2565b6000612bb543612301565b6001600160a01b038516600090815260208181526040808320600019880163ffffffff9081168552925290912054919250600160201b9091046001600160601b031690841615801590612c3757506001600160a01b03851660009081526020818152604080832063ffffffff6000198901811685529252909120548382169116145b15612c94576001600160a01b038516600090815260208181526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b03861602179055612d2c565b60408051808201825263ffffffff84811682526001600160601b0386811660208085019182526001600160a01b038b1660008181528083528781208c87168252835287812096518754945163ffffffff19958616918816919091176fffffffffffffffffffffffff000000001916600160201b9190961602949094179095559382526001938490529390208054909316918701161790555b604080516001600160601b0380841682528516602082015281516001600160a01b038816927f664ef4a22338e827df5b675ec1747eac10c2ea611e1c575f3d96c38a2e24231e928290030190a25050505050565b8183038184821115612e105760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612dd5578181015183820152602001612dbd565b50505050905090810190601f168015612e025780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509392505050565b6000818310612e275781612721565b5090919050565b604080516060810182526000808252602082018190529181019190915290565b60408051808201909152600080825260208201529056fe4d525f414c4c4f434154494f4e5f414c52454144595f494e495449414c495a4544a26469706673582212204d7125a02d366e34afd825d80b3917183477e61dfd33f999f07a06ffc63e84c864736f6c63430007050033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc988543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c50000000000000000000000000000000000000000000000000000000000cfaedb00000000000000000000000000000000000000000000000000000000013ebabe0000000000000000000000000000000000000000000000000000000000cfaedb0000000000000000000000000000000000000000000000000000000000e230d7
-----Decoded View---------------
Arg [0] : _token (address): 0xD502F487e1841Fdc805130e13eae80c61186Bc98
Arg [1] : _merkleRoot (bytes32): 0x8543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c5
Arg [2] : _option1StartBlock (uint256): 13610715
Arg [3] : _option1EndBlock (uint256): 20888254
Arg [4] : _option2StartBlock (uint256): 13610715
Arg [5] : _option2EndBlock (uint256): 14823639
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000d502f487e1841fdc805130e13eae80c61186bc98
Arg [1] : 8543df66311696cdd9cea5cbc46fcd68328ea3ff03ef45e39825ea97f85411c5
Arg [2] : 0000000000000000000000000000000000000000000000000000000000cfaedb
Arg [3] : 00000000000000000000000000000000000000000000000000000000013ebabe
Arg [4] : 0000000000000000000000000000000000000000000000000000000000cfaedb
Arg [5] : 0000000000000000000000000000000000000000000000000000000000e230d7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.003773 | 458,681.547 | $1,730.71 |
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.