More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,282 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 11850073 | 1410 days ago | IN | 0 ETH | 0.01347253 | ||||
Exit | 11390909 | 1480 days ago | IN | 0 ETH | 0.0023289 | ||||
Get Reward | 11313022 | 1492 days ago | IN | 0 ETH | 0.003159 | ||||
Get Reward | 11194153 | 1510 days ago | IN | 0 ETH | 0.0016146 | ||||
Get Reward | 11169366 | 1514 days ago | IN | 0 ETH | 0.00149508 | ||||
Get Reward | 11144770 | 1518 days ago | IN | 0 ETH | 0.00404222 | ||||
Exit | 11144249 | 1518 days ago | IN | 0 ETH | 0.00388614 | ||||
Get Reward | 11092208 | 1526 days ago | IN | 0 ETH | 0.0029154 | ||||
Get Reward | 11085116 | 1527 days ago | IN | 0 ETH | 0.00224262 | ||||
Get Reward | 11081669 | 1528 days ago | IN | 0 ETH | 0.00119606 | ||||
Exit | 11063588 | 1530 days ago | IN | 0 ETH | 0.00531997 | ||||
Exit | 11062010 | 1531 days ago | IN | 0 ETH | 0.0055396 | ||||
Exit | 11053325 | 1532 days ago | IN | 0 ETH | 0.00657226 | ||||
Exit | 11042398 | 1534 days ago | IN | 0 ETH | 0.00566455 | ||||
Exit | 11038226 | 1534 days ago | IN | 0 ETH | 0.00270155 | ||||
Get Reward | 11022002 | 1537 days ago | IN | 0 ETH | 0.00603515 | ||||
Exit | 11014320 | 1538 days ago | IN | 0 ETH | 0.00504173 | ||||
Get Reward | 11012958 | 1538 days ago | IN | 0 ETH | 0.00336393 | ||||
Exit | 11006054 | 1539 days ago | IN | 0 ETH | 0.01267224 | ||||
Get Reward | 11005237 | 1539 days ago | IN | 0 ETH | 0.00396196 | ||||
Get Reward | 11000457 | 1540 days ago | IN | 0 ETH | 0.00448524 | ||||
Get Reward | 10999147 | 1540 days ago | IN | 0 ETH | 0.00209144 | ||||
Exit | 10995833 | 1541 days ago | IN | 0 ETH | 0.00576198 | ||||
Exit | 10991681 | 1542 days ago | IN | 0 ETH | 0.00470593 | ||||
Exit | 10988988 | 1542 days ago | IN | 0 ETH | 0.00400876 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
YearnGovernance
Compiler Version
v0.5.5+commit.47a71e8f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-01 */ /** *Submitted for verification at Etherscan.io on 2020-07-29 */ /* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: YFIRewards.sol * * Docs: https://docs.synthetix.io/ * * * MIT License * =========== * * Copyright (c) 2020 Synthetix * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ // File: @openzeppelin/contracts/math/Math.sol pragma solidity ^0.5.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/GSN/Context.sol pragma solidity ^0.5.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/ownership/Ownable.sol pragma solidity ^0.5.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * IMPORTANT: It is unsafe to assume that an address for which this * function returns false is an externally-owned account (EOA) and not a * contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } // File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol pragma solidity ^0.5.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/IRewardDistributionRecipient.sol pragma solidity ^0.5.0; contract IRewardDistributionRecipient is Ownable { address rewardDistribution; function notifyRewardAmount(uint256 reward) external; modifier onlyRewardDistribution() { require(_msgSender() == rewardDistribution, "Caller is not reward distribution"); _; } function setRewardDistribution(address _rewardDistribution) external onlyOwner { rewardDistribution = _rewardDistribution; } } // File: contracts/CurveRewards.sol pragma solidity ^0.5.0; contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public vote = IERC20(0xa1d0E215a23d7030842FC67cE582a6aFa3CCaB83); uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stake(uint256 amount) public { _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); vote.safeTransferFrom(msg.sender, address(this), amount); } function withdraw(uint256 amount) public { _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); vote.safeTransfer(msg.sender, amount); } } interface Executor { function execute(uint, uint, uint, uint) external; } contract YearnGovernance is LPTokenWrapper, IRewardDistributionRecipient { /* Fee collection for any other token */ function seize(IERC20 _token, uint amount) external { require(msg.sender == governance, "!governance"); require(_token != token, "reward"); require(_token != vote, "vote"); _token.safeTransfer(governance, amount); } /* Fees breaker, to protect withdraws if anything ever goes wrong */ bool public breaker = false; function setBreaker(bool _breaker) external { require(msg.sender == governance, "!governance"); breaker = _breaker; } /* Modifications for proposals */ mapping(address => uint) public voteLock; // period that your sake it locked to keep it for voting struct Proposal { uint id; address proposer; mapping(address => uint) forVotes; mapping(address => uint) againstVotes; uint totalForVotes; uint totalAgainstVotes; uint start; // block start; uint end; // start + period address executor; string hash; uint totalVotesAvailable; uint quorum; uint quorumRequired; bool open; } mapping (uint => Proposal) public proposals; uint public proposalCount; uint public period = 17280; // voting period in blocks ~ 17280 3 days for 15s/block uint public lock = 17280; // vote lock in blocks ~ 17280 3 days for 15s/block uint public minimum = 1e18; uint public quorum = 2000; bool public config = true; address public governance; function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function setQuorum(uint _quorum) public { require(msg.sender == governance, "!governance"); quorum = _quorum; } function setMinimum(uint _minimum) public { require(msg.sender == governance, "!governance"); minimum = _minimum; } function setPeriod(uint _period) public { require(msg.sender == governance, "!governance"); period = _period; } function setLock(uint _lock) public { require(msg.sender == governance, "!governance"); lock = _lock; } function initialize(uint id) public { require(config == true, "!config"); config = false; proposalCount = id; governance = 0xc487E91aac75D048EeACA7360E479Ae7cCEa0b86; } event NewProposal(uint id, address creator, uint start, uint duration, address executor); event Vote(uint indexed id, address indexed voter, bool vote, uint weight); function propose(address executor, string memory hash) public { require(votesOf(msg.sender) > minimum, "<minimum"); proposals[proposalCount++] = Proposal({ id: proposalCount, proposer: msg.sender, totalForVotes: 0, totalAgainstVotes: 0, start: block.number, end: period.add(block.number), executor: executor, hash: hash, totalVotesAvailable: totalVotes, quorum: 0, quorumRequired: quorum, open: true }); emit NewProposal(proposalCount, msg.sender, block.number, period, executor); voteLock[msg.sender] = lock.add(block.number); } function execute(uint id) public { (uint _for, uint _against, uint _quorum) = getStats(id); require(proposals[id].quorumRequired < _quorum, "!quorum"); require(proposals[id].end < block.number , "!end"); if (proposals[id].open == true) { tallyVotes(id); } Executor(proposals[id].executor).execute(id, _for, _against, _quorum); } function getStats(uint id) public view returns (uint _for, uint _against, uint _quorum) { _for = proposals[id].totalForVotes; _against = proposals[id].totalAgainstVotes; uint _total = _for.add(_against); _for = _for.mul(10000).div(_total); _against = _against.mul(10000).div(_total); _quorum = _total.mul(10000).div(proposals[id].totalVotesAvailable); } event ProposalFinished(uint indexed id, uint _for, uint _against, bool quorumReached); function tallyVotes(uint id) public { require(proposals[id].open == true, "!open"); require(proposals[id].end < block.number, "!end"); (uint _for, uint _against,) = getStats(id); bool _quorum = false; if (proposals[id].quorum >= proposals[id].quorumRequired) { _quorum = true; } proposals[id].open = false; emit ProposalFinished(id, _for, _against, _quorum); } function votesOf(address voter) public view returns (uint) { return votes[voter]; } uint public totalVotes; mapping(address => uint) public votes; event RegisterVoter(address voter, uint votes, uint totalVotes); event RevokeVoter(address voter, uint votes, uint totalVotes); function register() public { require(voters[msg.sender] == false, "voter"); voters[msg.sender] = true; votes[msg.sender] = balanceOf(msg.sender); totalVotes = totalVotes.add(votes[msg.sender]); emit RegisterVoter(msg.sender, votes[msg.sender], totalVotes); } function revoke() public { require(voters[msg.sender] == true, "!voter"); voters[msg.sender] = false; if (totalVotes < votes[msg.sender]) { //edge case, should be impossible, but this is defi totalVotes = 0; } else { totalVotes = totalVotes.sub(votes[msg.sender]); } emit RevokeVoter(msg.sender, votes[msg.sender], totalVotes); votes[msg.sender] = 0; } mapping(address => bool) public voters; function voteFor(uint id) public { require(proposals[id].start < block.number , "<start"); require(proposals[id].end > block.number , ">end"); uint _against = proposals[id].againstVotes[msg.sender]; if (_against > 0) { proposals[id].totalAgainstVotes = proposals[id].totalAgainstVotes.sub(_against); proposals[id].againstVotes[msg.sender] = 0; } uint vote = votesOf(msg.sender).sub(proposals[id].forVotes[msg.sender]); proposals[id].totalForVotes = proposals[id].totalForVotes.add(vote); proposals[id].forVotes[msg.sender] = votesOf(msg.sender); proposals[id].totalVotesAvailable = totalVotes; uint _votes = proposals[id].totalForVotes.add(proposals[id].totalAgainstVotes); proposals[id].quorum = _votes.mul(10000).div(totalVotes); voteLock[msg.sender] = lock.add(block.number); emit Vote(id, msg.sender, true, vote); } function voteAgainst(uint id) public { require(proposals[id].start < block.number , "<start"); require(proposals[id].end > block.number , ">end"); uint _for = proposals[id].forVotes[msg.sender]; if (_for > 0) { proposals[id].totalForVotes = proposals[id].totalForVotes.sub(_for); proposals[id].forVotes[msg.sender] = 0; } uint vote = votesOf(msg.sender).sub(proposals[id].againstVotes[msg.sender]); proposals[id].totalAgainstVotes = proposals[id].totalAgainstVotes.add(vote); proposals[id].againstVotes[msg.sender] = votesOf(msg.sender); proposals[id].totalVotesAvailable = totalVotes; uint _votes = proposals[id].totalForVotes.add(proposals[id].totalAgainstVotes); proposals[id].quorum = _votes.mul(10000).div(totalVotes); voteLock[msg.sender] = lock.add(block.number); emit Vote(id, msg.sender, false, vote); } /* Default rewards contract */ IERC20 public token = IERC20(0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8); uint256 public constant DURATION = 7 days; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view returns (uint256) { if (totalSupply() == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable() .sub(lastUpdateTime) .mul(rewardRate) .mul(1e18) .div(totalSupply()) ); } function earned(address account) public view returns (uint256) { return balanceOf(account) .mul(rewardPerToken().sub(userRewardPerTokenPaid[account])) .div(1e18) .add(rewards[account]); } // stake visibility is public as overriding LPTokenWrapper's stake() function function stake(uint256 amount) public updateReward(msg.sender) { require(amount > 0, "Cannot stake 0"); if (voters[msg.sender] == true) { votes[msg.sender] = votes[msg.sender].add(amount); totalVotes = totalVotes.add(amount); } super.stake(amount); emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public updateReward(msg.sender) { require(amount > 0, "Cannot withdraw 0"); if (voters[msg.sender] == true) { votes[msg.sender] = votes[msg.sender].sub(amount); totalVotes = totalVotes.sub(amount); } if (breaker == false) { require(voteLock[msg.sender] < block.number,"!locked"); } super.withdraw(amount); emit Withdrawn(msg.sender, amount); } function exit() external { withdraw(balanceOf(msg.sender)); getReward(); } function getReward() public updateReward(msg.sender) { if (breaker == false) { require(voteLock[msg.sender] > block.number,"!voted"); } uint256 reward = earned(msg.sender); if (reward > 0) { rewards[msg.sender] = 0; token.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { IERC20(token).safeTransferFrom(msg.sender, address(this), reward); if (block.timestamp >= periodFinish) { rewardRate = reward.div(DURATION); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(DURATION); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(DURATION); emit RewardAdded(reward); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"earned","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"id","type":"uint256"},{"name":"proposer","type":"address"},{"name":"totalForVotes","type":"uint256"},{"name":"totalAgainstVotes","type":"uint256"},{"name":"start","type":"uint256"},{"name":"end","type":"uint256"},{"name":"executor","type":"address"},{"name":"hash","type":"string"},{"name":"totalVotesAvailable","type":"uint256"},{"name":"quorum","type":"uint256"},{"name":"quorumRequired","type":"uint256"},{"name":"open","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"rewards","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalVotes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_period","type":"uint256"}],"name":"setPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"breaker","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"quorum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"register","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DURATION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_minimum","type":"uint256"}],"name":"setMinimum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"tallyVotes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"voteLock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_breaker","type":"bool"}],"name":"setBreaker","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vote","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"voteAgainst","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"config","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"voter","type":"address"}],"name":"votesOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getStats","outputs":[{"name":"_for","type":"uint256"},{"name":"_against","type":"uint256"},{"name":"_quorum","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"voteFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"voters","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"revoke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_quorum","type":"uint256"}],"name":"setQuorum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdateTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_lock","type":"uint256"}],"name":"setLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"executor","type":"address"},{"name":"hash","type":"string"}],"name":"propose","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"votes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proposalCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenStored","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"amount","type":"uint256"}],"name":"seize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"period","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"execute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"},{"indexed":false,"name":"creator","type":"address"},{"indexed":false,"name":"start","type":"uint256"},{"indexed":false,"name":"duration","type":"uint256"},{"indexed":false,"name":"executor","type":"address"}],"name":"NewProposal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":true,"name":"voter","type":"address"},{"indexed":false,"name":"vote","type":"bool"},{"indexed":false,"name":"weight","type":"uint256"}],"name":"Vote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":false,"name":"_for","type":"uint256"},{"indexed":false,"name":"_against","type":"uint256"},{"indexed":false,"name":"quorumReached","type":"bool"}],"name":"ProposalFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"voter","type":"address"},{"indexed":false,"name":"votes","type":"uint256"},{"indexed":false,"name":"totalVotes","type":"uint256"}],"name":"RegisterVoter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"voter","type":"address"},{"indexed":false,"name":"votes","type":"uint256"},{"indexed":false,"name":"totalVotes","type":"uint256"}],"name":"RevokeVoter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
6080604052600080546001600160a01b031990811673a1d0e215a23d7030842fc67ce582a6afa3ccab8317825560048054600160a01b60ff02191690556143806008819055600955670de0b6b3a7640000600a556107d0600b55600c805460ff191660011790556010805490911673df5e0e81dff6faf3a7e52ba697820c5e32d806a8179055601181905560125561009c6100ed602090811b901c565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100f1565b3390565b612cc6806101006000396000f3fe608060405234801561001057600080fd5b50600436106103415760003560e01c80637b303965116101b8578063d3e1574711610104578063ebe2b12b116100a2578063f83d08ba1161007c578063f83d08ba14610954578063fc0c546a1461095c578063fe0d94c114610964578063fe4b84df1461098157610341565b8063ebe2b12b1461091e578063ef78d4fd14610926578063f2fde38b1461092e57610341565b8063da35c664116100de578063da35c664146108da578063df136d65146108e2578063e9fad8ee146108ea578063eb9253c0146108f257610341565b8063d3e15747146107e1578063d6f0948c146107fe578063d8bff5a5146108b457610341565b8063a3ec138d11610171578063b6549f751161014b578063b6549f75146107ac578063c1ba4e59146107b4578063c8f33c91146107d1578063cd3daf9d146107d957610341565b8063a3ec138d14610743578063a694fc3a14610769578063ab033ea91461078657610341565b80637b303965146106ad57806380faa57d146106e857806386a50535146106f05780638b8763471461070d5780638da5cb5b146107335780638f32d59b1461073b57610341565b80633c6b16ab11610292578063632a9a5211610230578063750e443a1161020a578063750e443a1461065a57806379502c551461067757806379ec5d3a1461067f5780637b0a47ee146106a557610341565b8063632a9a521461062457806370a082311461062c578063715018a61461065257610341565b80634e27e9161161026c5780634e27e916146105b357806352d6804d146105d95780635aa6e675146105e15780635c0aeb0e1461060557610341565b80633c6b16ab146105715780633d18b9121461058e5780634d318b0e1461059657610341565b80630f41e0d2116102ff5780631aa3a008116102d95780631aa3a008146105275780631be052891461052f5780632e1a7d4d146105375780633209e9e61461055457610341565b80630f41e0d2146104fb5780631703a0181461051757806318160ddd1461051f57610341565b80628cc26214610346578063013cf08b1461037e5780630700037d146104885780630d15fd77146104ae5780630d68b761146104b65780630f3a9f65146104de575b600080fd5b61036c6004803603602081101561035c57600080fd5b50356001600160a01b031661099e565b60408051918252519081900360200190f35b61039b6004803603602081101561039457600080fd5b5035610a24565b604051808d81526020018c6001600160a01b03166001600160a01b031681526020018b81526020018a8152602001898152602001888152602001876001600160a01b03166001600160a01b031681526020018060200186815260200185815260200184815260200183151515158152602001828103825287818151815260200191508051906020019080838360005b8381101561044257818101518382015260200161042a565b50505050905090810190601f16801561046f5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b61036c6004803603602081101561049e57600080fd5b50356001600160a01b0316610b1d565b61036c610b2f565b6104dc600480360360208110156104cc57600080fd5b50356001600160a01b0316610b35565b005b6104dc600480360360208110156104f457600080fd5b5035610bb5565b610503610c12565b604080519115158252519081900360200190f35b61036c610c22565b61036c610c28565b6104dc610c2f565b61036c610d20565b6104dc6004803603602081101561054d57600080fd5b5035610d27565b6104dc6004803603602081101561056a57600080fd5b5035610ee6565b6104dc6004803603602081101561058757600080fd5b5035610f43565b6104dc6110de565b6104dc600480360360208110156105ac57600080fd5b5035611215565b61036c600480360360208110156105c957600080fd5b50356001600160a01b031661135c565b61036c61136e565b6105e9611374565b604080516001600160a01b039092168252519081900360200190f35b6104dc6004803603602081101561061b57600080fd5b50351515611388565b6105e961140f565b61036c6004803603602081101561064257600080fd5b50356001600160a01b031661141e565b6104dc611439565b6104dc6004803603602081101561067057600080fd5b50356114e1565b610503611747565b61036c6004803603602081101561069557600080fd5b50356001600160a01b0316611750565b61036c61176b565b6106ca600480360360208110156106c357600080fd5b5035611771565b60408051938452602084019290925282820152519081900360600190f35b61036c611801565b6104dc6004803603602081101561070657600080fd5b5035611814565b61036c6004803603602081101561072357600080fd5b50356001600160a01b0316611a7e565b6105e9611a90565b610503611a9f565b6105036004803603602081101561075957600080fd5b50356001600160a01b0316611ac5565b6104dc6004803603602081101561077f57600080fd5b5035611ada565b6104dc6004803603602081101561079c57600080fd5b50356001600160a01b0316611c33565b6104dc611cb3565b6104dc600480360360208110156107ca57600080fd5b5035611dc6565b61036c611e23565b61036c611e29565b6104dc600480360360208110156107f757600080fd5b5035611e7f565b6104dc6004803603604081101561081457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561083f57600080fd5b82018360208201111561085157600080fd5b8035906020019184600183028401116401000000008311171561087357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611edc945050505050565b61036c600480360360208110156108ca57600080fd5b50356001600160a01b0316612109565b61036c61211b565b61036c612121565b6104dc612127565b6104dc6004803603604081101561090857600080fd5b506001600160a01b038135169060200135612142565b61036c612263565b61036c612269565b6104dc6004803603602081101561094457600080fd5b50356001600160a01b031661226f565b61036c6122d9565b6105e96122df565b6104dc6004803603602081101561097a57600080fd5b50356122ee565b6104dc6004803603602081101561099757600080fd5b5035612461565b6001600160a01b0381166000908152601660209081526040808320546015909252822054610a1e9190610a1290670de0b6b3a764000090610a06906109f1906109e5611e29565b9063ffffffff6124de16565b6109fa8861141e565b9063ffffffff61252716565b9063ffffffff61258716565b9063ffffffff6125c916565b92915050565b60066020818152600092835260409283902080546001808301546004840154600585015496850154600786015460088701546009880180548c51600261010099831615999099026000190190911697909704601f81018b90048b0288018b01909c528b8752969a6001600160a01b039586169a949994989397929695909116949293830182828015610af75780601f10610acc57610100808354040283529160200191610af7565b820191906000526020600020905b815481529060010190602001808311610ada57829003601f168201915b50505050600a830154600b840154600c850154600d909501549394919390925060ff168c565b60166020526000908152604090205481565b600d5481565b610b3d611a9f565b1515610b935760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600c5461010090046001600160a01b03163314610c0d5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600855565b600454600160a01b900460ff1681565b600b5481565b6001545b90565b336000908152600f602052604090205460ff1615610c825760408051600160e51b62461bcd0281526020600482015260056024820152600160d91b643b37ba32b902604482015290519081900360640190fd5b336000818152600f60205260409020805460ff19166001179055610ca59061141e565b336000908152600e60205260409020819055600d54610cc99163ffffffff6125c916565b600d819055336000818152600e6020908152604091829020548251938452908301528181019290925290517f42bd0b21218b5114f60361fe686fe499033f14f22cb728a08cf9df9b4e60f8cc9181900360600190a1565b62093a8081565b33610d30611e29565b601455610d3b611801565b6013556001600160a01b03811615610d8257610d568161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b811515610dd95760408051600160e51b62461bcd02815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b336000908152600f602052604090205460ff16151560011415610e3d57336000908152600e6020526040902054610e16908363ffffffff6124de16565b336000908152600e6020526040902055600d54610e39908363ffffffff6124de16565b600d555b600454600160a01b900460ff161515610ea357336000908152600560205260409020544311610ea35760408051600160e51b62461bcd0281526020600482015260076024820152600160ca1b66085b1bd8dad95902604482015290519081900360640190fd5b610eac82612626565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b600c5461010090046001600160a01b03163314610f3e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600a55565b6004546001600160a01b0316610f57612687565b6001600160a01b031614610f9f57604051600160e51b62461bcd028152600401808060200182810382526021815260200180612c506021913960400191505060405180910390fd5b6000610fa9611e29565b601455610fb4611801565b6013556001600160a01b03811615610ffb57610fcf8161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b601054611019906001600160a01b031633308563ffffffff61268b16565b601154421061103d576110358262093a8063ffffffff61258716565b60125561108b565b601154600090611053904263ffffffff6124de16565b9050600061106c6012548361252790919063ffffffff16565b905061108562093a80610a06868463ffffffff6125c916565b60125550505b4260138190556110a49062093a8063ffffffff6125c916565b6011556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336110e7611e29565b6014556110f2611801565b6013556001600160a01b038116156111395761110d8161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b600454600160a01b900460ff16151561119e5733600090815260056020526040902054431061119e5760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b65085d9bdd195902604482015290519081900360640190fd5b60006111a93361099e565b9050801561121157336000818152601660205260408120556010546111da916001600160a01b0390911690836126ee565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6000818152600660205260409020600d015460ff16151560011461126e5760408051600160e51b62461bcd0281526020600482015260056024820152600160d91b6410b7b832b702604482015290519081900360640190fd5b60008181526006602052604090206007015443116112c25760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b6308595b9902604482015290519081900360640190fd5b6000806112ce83611771565b506000858152600660205260408120600c810154600b9091015493955091935091106112f8575060015b600084815260066020908152604091829020600d01805460ff19169055815185815290810184905282151581830152905185917f66ab4d2a1f6db1c01d1d46ab61a9c333b5a4de5e75cc7a68e1495b4badbd009b919081900360600190a250505050565b60056020526000908152604090205481565b600a5481565b600c5461010090046001600160a01b031681565b600c5461010090046001600160a01b031633146113e05760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b60048054911515600160a01b0274ff000000000000000000000000000000000000000019909216919091179055565b6000546001600160a01b031681565b6001600160a01b031660009081526002602052604090205490565b611441611a9f565b15156114975760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b6000818152600660208190526040909120015443116115365760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b650f1cdd185c9d02604482015290519081900360640190fd5b600081815260066020526040902060070154431061158a5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b630f995b9902604482015290519081900360640190fd5b600081815260066020908152604080832033845260020190915290205480156115f7576000828152600660205260409020600401546115cf908263ffffffff6124de16565b6000838152600660209081526040808320600481019490945533835260029093019052908120555b6000828152600660209081526040808320338085526003909101909252822054611624916109e590611750565b600084815260066020526040902060050154909150611649908263ffffffff6125c916565b60008481526006602052604090206005015561166433611750565b600084815260066020818152604080842033855260038101835290842094909455600d54878452919052600a830155600582015460049092015490916116b0919063ffffffff6125c916565b600d549091506116cc90610a068361271063ffffffff61252716565b6000858152600660205260409020600b01556009546116f1904363ffffffff6125c916565b33600081815260056020908152604080832094909455835191825281018590528251919287927f88d35328232823f54954b6627e9f732371656f6daa40cb1b01b27dc7875a7b479281900390910190a350505050565b600c5460ff1681565b6001600160a01b03166000908152600e602052604090205490565b60125481565b6000818152600660205260408120600481015460059091015490918061179d848463ffffffff6125c916565b90506117b581610a068661271063ffffffff61252716565b93506117cd81610a068561271063ffffffff61252716565b6000868152600660205260409020600a01549093506117f890610a068361271063ffffffff61252716565b93959294505050565b600061180f42601154612748565b905090565b6000818152600660208190526040909120015443116118695760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b650f1cdd185c9d02604482015290519081900360640190fd5b60008181526006602052604090206007015443106118bd5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b630f995b9902604482015290519081900360640190fd5b6000818152600660209081526040808320338452600301909152902054801561192a57600082815260066020526040902060050154611902908263ffffffff6124de16565b6000838152600660209081526040808320600581019490945533835260039093019052908120555b6000828152600660209081526040808320338085526002909101909252822054611957916109e590611750565b60008481526006602052604090206004015490915061197c908263ffffffff6125c916565b60008481526006602052604090206004015561199733611750565b600084815260066020818152604080842033855260028101835290842094909455600d54878452919052600a830155600582015460049092015490916119e3919063ffffffff6125c916565b600d549091506119ff90610a068361271063ffffffff61252716565b6000858152600660205260409020600b0155600954611a24904363ffffffff6125c916565b33600081815260056020908152604091829020939093558051600181529283018590528051919287927f88d35328232823f54954b6627e9f732371656f6daa40cb1b01b27dc7875a7b47929181900390910190a350505050565b60156020526000908152604090205481565b6003546001600160a01b031690565b6003546000906001600160a01b0316611ab6612687565b6001600160a01b031614905090565b600f6020526000908152604090205460ff1681565b33611ae3611e29565b601455611aee611801565b6013556001600160a01b03811615611b3557611b098161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b811515611b8c5760408051600160e51b62461bcd02815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b336000908152600f602052604090205460ff16151560011415611bf057336000908152600e6020526040902054611bc9908363ffffffff6125c916565b336000908152600e6020526040902055600d54611bec908363ffffffff6125c916565b600d555b611bf98261275e565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600c5461010090046001600160a01b03163314611c8b5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600c80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b336000908152600f602052604090205460ff161515600114611d0b5760408051600160e51b62461bcd0281526020600482015260066024820152600160d11b6510bb37ba32b902604482015290519081900360640190fd5b336000908152600f60209081526040808320805460ff19169055600e909152902054600d541015611d40576000600d55611d66565b336000908152600e6020526040902054600d54611d629163ffffffff6124de16565b600d555b336000818152600e602090815260409182902054600d5483519485529184015282820152517e330fa0724b41c0d187cfad0aa7ff5fa2ff7e742995886f55fda6f5909914b89181900360600190a1336000908152600e6020526040812055565b600c5461010090046001600160a01b03163314611e1e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600b55565b60135481565b6000611e33610c28565b1515611e425750601454610c2c565b61180f611e70611e50610c28565b610a06670de0b6b3a76400006109fa6012546109fa6013546109e5611801565b6014549063ffffffff6125c916565b600c5461010090046001600160a01b03163314611ed75760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600955565b600a54611ee833611750565b11611f2b5760408051600160e51b62461bcd0281526020600482015260086024820152600160c01b673c6d696e696d756d02604482015290519081900360640190fd5b6040518061018001604052806007548152602001336001600160a01b031681526020016000815260200160008152602001438152602001611f77436008546125c990919063ffffffff16565b81526001600160a01b038085166020808401919091526040808401869052600d5460608086019190915260006080808701829052600b5460a080890191909152600160c098890181905260078054808301825585526006808952948790208b5181558b8901519281018054938b166001600160a01b0319948516179055968b01516004880155948a0151600587015591890151928501929092559087015191830191909155938501516008820180549190941694169390931790915560e0830151805161204a9260098501920190612b70565b50610100820151600a820155610120820151600b820155610140820151600c82015561016090910151600d909101805460ff191691151591909117905560075460085460408051928352336020840152438382015260608301919091526001600160a01b0384166080830152517ff3aa81c2323a935a3e72c018c519b8d8b432eeebaa15cbbe5c8305f0f9df6f4d9160a0908290030190a16009546120f5904363ffffffff6125c916565b336000908152600560205260409020555050565b600e6020526000908152604090205481565b60075481565b60145481565b6121386121333361141e565b610d27565b6121406110de565b565b600c5461010090046001600160a01b0316331461219a5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b6010546001600160a01b03838116911614156121ec5760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c995dd85c9902604482015290519081900360640190fd5b6000546001600160a01b038381169116141561223e5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e01b63766f746502604482015290519081900360640190fd5b600c54611211906001600160a01b03848116916101009004168363ffffffff6126ee16565b60115481565b60085481565b612277611a9f565b15156122cd5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6122d6816127c0565b50565b60095481565b6010546001600160a01b031681565b60008060006122fc84611771565b6000878152600660205260409020600c0154929550909350915081116123595760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b662171756f72756d02604482015290519081900360640190fd5b60008481526006602052604090206007015443116123ad5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b6308595b9902604482015290519081900360640190fd5b6000848152600660205260409020600d015460ff161515600114156123d5576123d584611215565b600084815260066020526040808220600801548151600160e11b636009bfbd0281526004810188905260248101879052604481018690526064810185905291516001600160a01b039091169263c0137f7a926084808201939182900301818387803b15801561244357600080fd5b505af1158015612457573d6000803e3d6000fd5b5050505050505050565b600c5460ff1615156001146124ad5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b6621636f6e66696702604482015290519081900360640190fd5b600c80546007929092556001600160a81b031990911674c487e91aac75d048eeaca7360e479ae7ccea0b8600179055565b600061252083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612866565b9392505050565b600082151561253857506000610a1e565b82820282848281151561254757fe5b041461252057604051600160e51b62461bcd028152600401808060200182810382526021815260200180612c2f6021913960400191505060405180910390fd5b600061252083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612900565b6000828201838110156125205760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154612639908263ffffffff6124de16565b6001553360009081526002602052604090205461265c908263ffffffff6124de16565b3360008181526002602052604081209290925590546122d6916001600160a01b0390911690836126ee565b3390565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b0316600160e01b6323b872dd021790526126e890859061296d565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0316600160e01b63a9059cbb0217905261274390849061296d565b505050565b60008183106127575781612520565b5090919050565b600154612771908263ffffffff6125c916565b60015533600090815260026020526040902054612794908263ffffffff6125c916565b3360008181526002602052604081209290925590546122d6916001600160a01b0390911690308461268b565b6001600160a01b038116151561280a57604051600160e51b62461bcd028152600401808060200182810382526026815260200180612c096026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156128f857604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128bd5781810151838201526020016128a5565b50505050905090810190601f1680156128ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183151561295557604051600160e51b62461bcd028152600401808060200182810382528381815181526020019150805190602001908083836000838110156128bd5781810151838201526020016128a5565b506000838581151561296357fe5b0495945050505050565b61297f826001600160a01b0316612b34565b15156129d55760408051600160e51b62461bcd02815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612a135780518252601f1990920191602091820191016129f4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612a75576040519150601f19603f3d011682016040523d82523d6000602084013e612a7a565b606091505b5091509150811515612ad65760408051600160e51b62461bcd02815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156126e857808060200190516020811015612af257600080fd5b505115156126e857604051600160e51b62461bcd02815260040180806020018281038252602a815260200180612c71602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590612b685750808214155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612bb157805160ff1916838001178555612bde565b82800160010185558215612bde579182015b82811115612bde578251825591602001919060010190612bc3565b50612bea929150612bee565b5090565b610c2c91905b80821115612bea5760008155600101612bf456fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a165627a7a72305820e01d7a0c3039a81957f31e90d795c2ef1c7ab2af335bf9b9d3ac123fa4f1bdc60029
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103415760003560e01c80637b303965116101b8578063d3e1574711610104578063ebe2b12b116100a2578063f83d08ba1161007c578063f83d08ba14610954578063fc0c546a1461095c578063fe0d94c114610964578063fe4b84df1461098157610341565b8063ebe2b12b1461091e578063ef78d4fd14610926578063f2fde38b1461092e57610341565b8063da35c664116100de578063da35c664146108da578063df136d65146108e2578063e9fad8ee146108ea578063eb9253c0146108f257610341565b8063d3e15747146107e1578063d6f0948c146107fe578063d8bff5a5146108b457610341565b8063a3ec138d11610171578063b6549f751161014b578063b6549f75146107ac578063c1ba4e59146107b4578063c8f33c91146107d1578063cd3daf9d146107d957610341565b8063a3ec138d14610743578063a694fc3a14610769578063ab033ea91461078657610341565b80637b303965146106ad57806380faa57d146106e857806386a50535146106f05780638b8763471461070d5780638da5cb5b146107335780638f32d59b1461073b57610341565b80633c6b16ab11610292578063632a9a5211610230578063750e443a1161020a578063750e443a1461065a57806379502c551461067757806379ec5d3a1461067f5780637b0a47ee146106a557610341565b8063632a9a521461062457806370a082311461062c578063715018a61461065257610341565b80634e27e9161161026c5780634e27e916146105b357806352d6804d146105d95780635aa6e675146105e15780635c0aeb0e1461060557610341565b80633c6b16ab146105715780633d18b9121461058e5780634d318b0e1461059657610341565b80630f41e0d2116102ff5780631aa3a008116102d95780631aa3a008146105275780631be052891461052f5780632e1a7d4d146105375780633209e9e61461055457610341565b80630f41e0d2146104fb5780631703a0181461051757806318160ddd1461051f57610341565b80628cc26214610346578063013cf08b1461037e5780630700037d146104885780630d15fd77146104ae5780630d68b761146104b65780630f3a9f65146104de575b600080fd5b61036c6004803603602081101561035c57600080fd5b50356001600160a01b031661099e565b60408051918252519081900360200190f35b61039b6004803603602081101561039457600080fd5b5035610a24565b604051808d81526020018c6001600160a01b03166001600160a01b031681526020018b81526020018a8152602001898152602001888152602001876001600160a01b03166001600160a01b031681526020018060200186815260200185815260200184815260200183151515158152602001828103825287818151815260200191508051906020019080838360005b8381101561044257818101518382015260200161042a565b50505050905090810190601f16801561046f5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b61036c6004803603602081101561049e57600080fd5b50356001600160a01b0316610b1d565b61036c610b2f565b6104dc600480360360208110156104cc57600080fd5b50356001600160a01b0316610b35565b005b6104dc600480360360208110156104f457600080fd5b5035610bb5565b610503610c12565b604080519115158252519081900360200190f35b61036c610c22565b61036c610c28565b6104dc610c2f565b61036c610d20565b6104dc6004803603602081101561054d57600080fd5b5035610d27565b6104dc6004803603602081101561056a57600080fd5b5035610ee6565b6104dc6004803603602081101561058757600080fd5b5035610f43565b6104dc6110de565b6104dc600480360360208110156105ac57600080fd5b5035611215565b61036c600480360360208110156105c957600080fd5b50356001600160a01b031661135c565b61036c61136e565b6105e9611374565b604080516001600160a01b039092168252519081900360200190f35b6104dc6004803603602081101561061b57600080fd5b50351515611388565b6105e961140f565b61036c6004803603602081101561064257600080fd5b50356001600160a01b031661141e565b6104dc611439565b6104dc6004803603602081101561067057600080fd5b50356114e1565b610503611747565b61036c6004803603602081101561069557600080fd5b50356001600160a01b0316611750565b61036c61176b565b6106ca600480360360208110156106c357600080fd5b5035611771565b60408051938452602084019290925282820152519081900360600190f35b61036c611801565b6104dc6004803603602081101561070657600080fd5b5035611814565b61036c6004803603602081101561072357600080fd5b50356001600160a01b0316611a7e565b6105e9611a90565b610503611a9f565b6105036004803603602081101561075957600080fd5b50356001600160a01b0316611ac5565b6104dc6004803603602081101561077f57600080fd5b5035611ada565b6104dc6004803603602081101561079c57600080fd5b50356001600160a01b0316611c33565b6104dc611cb3565b6104dc600480360360208110156107ca57600080fd5b5035611dc6565b61036c611e23565b61036c611e29565b6104dc600480360360208110156107f757600080fd5b5035611e7f565b6104dc6004803603604081101561081457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561083f57600080fd5b82018360208201111561085157600080fd5b8035906020019184600183028401116401000000008311171561087357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611edc945050505050565b61036c600480360360208110156108ca57600080fd5b50356001600160a01b0316612109565b61036c61211b565b61036c612121565b6104dc612127565b6104dc6004803603604081101561090857600080fd5b506001600160a01b038135169060200135612142565b61036c612263565b61036c612269565b6104dc6004803603602081101561094457600080fd5b50356001600160a01b031661226f565b61036c6122d9565b6105e96122df565b6104dc6004803603602081101561097a57600080fd5b50356122ee565b6104dc6004803603602081101561099757600080fd5b5035612461565b6001600160a01b0381166000908152601660209081526040808320546015909252822054610a1e9190610a1290670de0b6b3a764000090610a06906109f1906109e5611e29565b9063ffffffff6124de16565b6109fa8861141e565b9063ffffffff61252716565b9063ffffffff61258716565b9063ffffffff6125c916565b92915050565b60066020818152600092835260409283902080546001808301546004840154600585015496850154600786015460088701546009880180548c51600261010099831615999099026000190190911697909704601f81018b90048b0288018b01909c528b8752969a6001600160a01b039586169a949994989397929695909116949293830182828015610af75780601f10610acc57610100808354040283529160200191610af7565b820191906000526020600020905b815481529060010190602001808311610ada57829003601f168201915b50505050600a830154600b840154600c850154600d909501549394919390925060ff168c565b60166020526000908152604090205481565b600d5481565b610b3d611a9f565b1515610b935760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600c5461010090046001600160a01b03163314610c0d5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600855565b600454600160a01b900460ff1681565b600b5481565b6001545b90565b336000908152600f602052604090205460ff1615610c825760408051600160e51b62461bcd0281526020600482015260056024820152600160d91b643b37ba32b902604482015290519081900360640190fd5b336000818152600f60205260409020805460ff19166001179055610ca59061141e565b336000908152600e60205260409020819055600d54610cc99163ffffffff6125c916565b600d819055336000818152600e6020908152604091829020548251938452908301528181019290925290517f42bd0b21218b5114f60361fe686fe499033f14f22cb728a08cf9df9b4e60f8cc9181900360600190a1565b62093a8081565b33610d30611e29565b601455610d3b611801565b6013556001600160a01b03811615610d8257610d568161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b811515610dd95760408051600160e51b62461bcd02815260206004820152601160248201527f43616e6e6f742077697468647261772030000000000000000000000000000000604482015290519081900360640190fd5b336000908152600f602052604090205460ff16151560011415610e3d57336000908152600e6020526040902054610e16908363ffffffff6124de16565b336000908152600e6020526040902055600d54610e39908363ffffffff6124de16565b600d555b600454600160a01b900460ff161515610ea357336000908152600560205260409020544311610ea35760408051600160e51b62461bcd0281526020600482015260076024820152600160ca1b66085b1bd8dad95902604482015290519081900360640190fd5b610eac82612626565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b600c5461010090046001600160a01b03163314610f3e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600a55565b6004546001600160a01b0316610f57612687565b6001600160a01b031614610f9f57604051600160e51b62461bcd028152600401808060200182810382526021815260200180612c506021913960400191505060405180910390fd5b6000610fa9611e29565b601455610fb4611801565b6013556001600160a01b03811615610ffb57610fcf8161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b601054611019906001600160a01b031633308563ffffffff61268b16565b601154421061103d576110358262093a8063ffffffff61258716565b60125561108b565b601154600090611053904263ffffffff6124de16565b9050600061106c6012548361252790919063ffffffff16565b905061108562093a80610a06868463ffffffff6125c916565b60125550505b4260138190556110a49062093a8063ffffffff6125c916565b6011556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336110e7611e29565b6014556110f2611801565b6013556001600160a01b038116156111395761110d8161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b600454600160a01b900460ff16151561119e5733600090815260056020526040902054431061119e5760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b65085d9bdd195902604482015290519081900360640190fd5b60006111a93361099e565b9050801561121157336000818152601660205260408120556010546111da916001600160a01b0390911690836126ee565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6000818152600660205260409020600d015460ff16151560011461126e5760408051600160e51b62461bcd0281526020600482015260056024820152600160d91b6410b7b832b702604482015290519081900360640190fd5b60008181526006602052604090206007015443116112c25760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b6308595b9902604482015290519081900360640190fd5b6000806112ce83611771565b506000858152600660205260408120600c810154600b9091015493955091935091106112f8575060015b600084815260066020908152604091829020600d01805460ff19169055815185815290810184905282151581830152905185917f66ab4d2a1f6db1c01d1d46ab61a9c333b5a4de5e75cc7a68e1495b4badbd009b919081900360600190a250505050565b60056020526000908152604090205481565b600a5481565b600c5461010090046001600160a01b031681565b600c5461010090046001600160a01b031633146113e05760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b60048054911515600160a01b0274ff000000000000000000000000000000000000000019909216919091179055565b6000546001600160a01b031681565b6001600160a01b031660009081526002602052604090205490565b611441611a9f565b15156114975760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b6000818152600660208190526040909120015443116115365760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b650f1cdd185c9d02604482015290519081900360640190fd5b600081815260066020526040902060070154431061158a5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b630f995b9902604482015290519081900360640190fd5b600081815260066020908152604080832033845260020190915290205480156115f7576000828152600660205260409020600401546115cf908263ffffffff6124de16565b6000838152600660209081526040808320600481019490945533835260029093019052908120555b6000828152600660209081526040808320338085526003909101909252822054611624916109e590611750565b600084815260066020526040902060050154909150611649908263ffffffff6125c916565b60008481526006602052604090206005015561166433611750565b600084815260066020818152604080842033855260038101835290842094909455600d54878452919052600a830155600582015460049092015490916116b0919063ffffffff6125c916565b600d549091506116cc90610a068361271063ffffffff61252716565b6000858152600660205260409020600b01556009546116f1904363ffffffff6125c916565b33600081815260056020908152604080832094909455835191825281018590528251919287927f88d35328232823f54954b6627e9f732371656f6daa40cb1b01b27dc7875a7b479281900390910190a350505050565b600c5460ff1681565b6001600160a01b03166000908152600e602052604090205490565b60125481565b6000818152600660205260408120600481015460059091015490918061179d848463ffffffff6125c916565b90506117b581610a068661271063ffffffff61252716565b93506117cd81610a068561271063ffffffff61252716565b6000868152600660205260409020600a01549093506117f890610a068361271063ffffffff61252716565b93959294505050565b600061180f42601154612748565b905090565b6000818152600660208190526040909120015443116118695760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b650f1cdd185c9d02604482015290519081900360640190fd5b60008181526006602052604090206007015443106118bd5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b630f995b9902604482015290519081900360640190fd5b6000818152600660209081526040808320338452600301909152902054801561192a57600082815260066020526040902060050154611902908263ffffffff6124de16565b6000838152600660209081526040808320600581019490945533835260039093019052908120555b6000828152600660209081526040808320338085526002909101909252822054611957916109e590611750565b60008481526006602052604090206004015490915061197c908263ffffffff6125c916565b60008481526006602052604090206004015561199733611750565b600084815260066020818152604080842033855260028101835290842094909455600d54878452919052600a830155600582015460049092015490916119e3919063ffffffff6125c916565b600d549091506119ff90610a068361271063ffffffff61252716565b6000858152600660205260409020600b0155600954611a24904363ffffffff6125c916565b33600081815260056020908152604091829020939093558051600181529283018590528051919287927f88d35328232823f54954b6627e9f732371656f6daa40cb1b01b27dc7875a7b47929181900390910190a350505050565b60156020526000908152604090205481565b6003546001600160a01b031690565b6003546000906001600160a01b0316611ab6612687565b6001600160a01b031614905090565b600f6020526000908152604090205460ff1681565b33611ae3611e29565b601455611aee611801565b6013556001600160a01b03811615611b3557611b098161099e565b6001600160a01b0382166000908152601660209081526040808320939093556014546015909152919020555b811515611b8c5760408051600160e51b62461bcd02815260206004820152600e60248201527f43616e6e6f74207374616b652030000000000000000000000000000000000000604482015290519081900360640190fd5b336000908152600f602052604090205460ff16151560011415611bf057336000908152600e6020526040902054611bc9908363ffffffff6125c916565b336000908152600e6020526040902055600d54611bec908363ffffffff6125c916565b600d555b611bf98261275e565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600c5461010090046001600160a01b03163314611c8b5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600c80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b336000908152600f602052604090205460ff161515600114611d0b5760408051600160e51b62461bcd0281526020600482015260066024820152600160d11b6510bb37ba32b902604482015290519081900360640190fd5b336000908152600f60209081526040808320805460ff19169055600e909152902054600d541015611d40576000600d55611d66565b336000908152600e6020526040902054600d54611d629163ffffffff6124de16565b600d555b336000818152600e602090815260409182902054600d5483519485529184015282820152517e330fa0724b41c0d187cfad0aa7ff5fa2ff7e742995886f55fda6f5909914b89181900360600190a1336000908152600e6020526040812055565b600c5461010090046001600160a01b03163314611e1e5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600b55565b60135481565b6000611e33610c28565b1515611e425750601454610c2c565b61180f611e70611e50610c28565b610a06670de0b6b3a76400006109fa6012546109fa6013546109e5611801565b6014549063ffffffff6125c916565b600c5461010090046001600160a01b03163314611ed75760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b600955565b600a54611ee833611750565b11611f2b5760408051600160e51b62461bcd0281526020600482015260086024820152600160c01b673c6d696e696d756d02604482015290519081900360640190fd5b6040518061018001604052806007548152602001336001600160a01b031681526020016000815260200160008152602001438152602001611f77436008546125c990919063ffffffff16565b81526001600160a01b038085166020808401919091526040808401869052600d5460608086019190915260006080808701829052600b5460a080890191909152600160c098890181905260078054808301825585526006808952948790208b5181558b8901519281018054938b166001600160a01b0319948516179055968b01516004880155948a0151600587015591890151928501929092559087015191830191909155938501516008820180549190941694169390931790915560e0830151805161204a9260098501920190612b70565b50610100820151600a820155610120820151600b820155610140820151600c82015561016090910151600d909101805460ff191691151591909117905560075460085460408051928352336020840152438382015260608301919091526001600160a01b0384166080830152517ff3aa81c2323a935a3e72c018c519b8d8b432eeebaa15cbbe5c8305f0f9df6f4d9160a0908290030190a16009546120f5904363ffffffff6125c916565b336000908152600560205260409020555050565b600e6020526000908152604090205481565b60075481565b60145481565b6121386121333361141e565b610d27565b6121406110de565b565b600c5461010090046001600160a01b0316331461219a5760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a21676f7665726e616e636502604482015290519081900360640190fd5b6010546001600160a01b03838116911614156121ec5760408051600160e51b62461bcd0281526020600482015260066024820152600160d21b651c995dd85c9902604482015290519081900360640190fd5b6000546001600160a01b038381169116141561223e5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e01b63766f746502604482015290519081900360640190fd5b600c54611211906001600160a01b03848116916101009004168363ffffffff6126ee16565b60115481565b60085481565b612277611a9f565b15156122cd5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6122d6816127c0565b50565b60095481565b6010546001600160a01b031681565b60008060006122fc84611771565b6000878152600660205260409020600c0154929550909350915081116123595760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b662171756f72756d02604482015290519081900360640190fd5b60008481526006602052604090206007015443116123ad5760408051600160e51b62461bcd02815260206004808301919091526024820152600160e21b6308595b9902604482015290519081900360640190fd5b6000848152600660205260409020600d015460ff161515600114156123d5576123d584611215565b600084815260066020526040808220600801548151600160e11b636009bfbd0281526004810188905260248101879052604481018690526064810185905291516001600160a01b039091169263c0137f7a926084808201939182900301818387803b15801561244357600080fd5b505af1158015612457573d6000803e3d6000fd5b5050505050505050565b600c5460ff1615156001146124ad5760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b6621636f6e66696702604482015290519081900360640190fd5b600c80546007929092556001600160a81b031990911674c487e91aac75d048eeaca7360e479ae7ccea0b8600179055565b600061252083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612866565b9392505050565b600082151561253857506000610a1e565b82820282848281151561254757fe5b041461252057604051600160e51b62461bcd028152600401808060200182810382526021815260200180612c2f6021913960400191505060405180910390fd5b600061252083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612900565b6000828201838110156125205760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154612639908263ffffffff6124de16565b6001553360009081526002602052604090205461265c908263ffffffff6124de16565b3360008181526002602052604081209290925590546122d6916001600160a01b0390911690836126ee565b3390565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b0316600160e01b6323b872dd021790526126e890859061296d565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0316600160e01b63a9059cbb0217905261274390849061296d565b505050565b60008183106127575781612520565b5090919050565b600154612771908263ffffffff6125c916565b60015533600090815260026020526040902054612794908263ffffffff6125c916565b3360008181526002602052604081209290925590546122d6916001600160a01b0390911690308461268b565b6001600160a01b038116151561280a57604051600160e51b62461bcd028152600401808060200182810382526026815260200180612c096026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156128f857604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128bd5781810151838201526020016128a5565b50505050905090810190601f1680156128ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183151561295557604051600160e51b62461bcd028152600401808060200182810382528381815181526020019150805190602001908083836000838110156128bd5781810151838201526020016128a5565b506000838581151561296357fe5b0495945050505050565b61297f826001600160a01b0316612b34565b15156129d55760408051600160e51b62461bcd02815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310612a135780518252601f1990920191602091820191016129f4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612a75576040519150601f19603f3d011682016040523d82523d6000602084013e612a7a565b606091505b5091509150811515612ad65760408051600160e51b62461bcd02815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156126e857808060200190516020811015612af257600080fd5b505115156126e857604051600160e51b62461bcd02815260040180806020018281038252602a815260200180612c71602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590612b685750808214155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612bb157805160ff1916838001178555612bde565b82800160010185558215612bde579182015b82811115612bde578251825591602001919060010190612bc3565b50612bea929150612bee565b5090565b610c2c91905b80821115612bea5760008155600101612bf456fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a165627a7a72305820e01d7a0c3039a81957f31e90d795c2ef1c7ab2af335bf9b9d3ac123fa4f1bdc60029
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $410.71 | 44.7376 | $18,374.18 |
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.