Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,566 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 20813780 | 88 days ago | IN | 0 ETH | 0.00677217 | ||||
Withdraw | 16298571 | 721 days ago | IN | 0 ETH | 0.00274704 | ||||
Deposit | 16197213 | 735 days ago | IN | 0 ETH | 0.00562789 | ||||
Withdraw | 15978695 | 766 days ago | IN | 0 ETH | 0.0023693 | ||||
Withdraw | 15922191 | 774 days ago | IN | 0 ETH | 0.00155698 | ||||
Deposit | 15530125 | 829 days ago | IN | 0 ETH | 0.00160145 | ||||
Withdraw | 15337036 | 860 days ago | IN | 0 ETH | 0.00110617 | ||||
Withdraw | 15332429 | 860 days ago | IN | 0 ETH | 0.00120781 | ||||
Deposit | 15221635 | 878 days ago | IN | 0 ETH | 0.00239075 | ||||
Withdraw | 15197514 | 881 days ago | IN | 0 ETH | 0.00154942 | ||||
Withdraw | 15144677 | 890 days ago | IN | 0 ETH | 0.00699045 | ||||
Withdraw | 15028526 | 908 days ago | IN | 0 ETH | 0.00434212 | ||||
Withdraw | 15028514 | 908 days ago | IN | 0 ETH | 0.00695021 | ||||
Withdraw | 14998289 | 914 days ago | IN | 0 ETH | 0.00554528 | ||||
Withdraw | 14817451 | 944 days ago | IN | 0 ETH | 0.00496499 | ||||
Withdraw | 14779613 | 950 days ago | IN | 0 ETH | 0.00282768 | ||||
Withdraw | 14779600 | 950 days ago | IN | 0 ETH | 0.00296869 | ||||
Withdraw | 14767532 | 952 days ago | IN | 0 ETH | 0.01170668 | ||||
Withdraw | 14582581 | 981 days ago | IN | 0 ETH | 0.0033082 | ||||
Deposit | 14582579 | 981 days ago | IN | 0 ETH | 0.00727979 | ||||
Withdraw | 14553497 | 986 days ago | IN | 0 ETH | 0.00351318 | ||||
Withdraw | 14536502 | 988 days ago | IN | 0 ETH | 0.00487405 | ||||
Deposit | 14536465 | 989 days ago | IN | 0 ETH | 0.00679358 | ||||
Withdraw | 14536425 | 989 days ago | IN | 0 ETH | 0.01248587 | ||||
Withdraw | 14517616 | 991 days ago | IN | 0 ETH | 0.01075883 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BonusRewards
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-07-08 */ // SPDX-License-Identifier: NONE pragma solidity 0.8.3; // Part: Address library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // 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 != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require( success, "Address: unable to send value, recipient may have reverted" ); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, "Address: low-level call with value failed" ); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require( address(this).balance >= value, "Address: insufficient balance for call" ); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}( data ); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // Part: IBonusRewards /** * @title Cover Protocol Bonus Token Rewards Interface * @author crypto-pumpkin */ interface IBonusRewards { event Deposit( address indexed user, address indexed lpToken, uint256 amount ); event Withdraw( address indexed user, address indexed lpToken, uint256 amount ); struct Bonus { address bonusTokenAddr; // the external bonus token, like CRV uint48 startTime; uint48 endTime; uint256 weeklyRewards; // total amount to be distributed from start to end uint256 accRewardsPerToken; // accumulated bonus to the lastUpdated Time uint256 remBonus; // remaining bonus in contract } struct Pool { Bonus[] bonuses; uint256 lastUpdatedAt; // last accumulated bonus update timestamp uint256 amount; } struct User { uint256 amount; uint256[] rewardsWriteoffs; // the amount of bonus tokens to write off when calculate rewards from last update } function getPoolList() external view returns (address[] memory); function getResponders() external view returns (address[] memory); function getPool(address _lpToken) external view returns (Pool memory); function getUser(address _lpToken, address _account) external view returns (User memory _user, uint256[] memory _rewards); function getAuthorizers(address _lpToken, address _bonusTokenAddr) external view returns (address[] memory); function viewRewards(address _lpToken, address _user) external view returns (uint256[] memory); function claimRewardsForPools(address[] calldata _lpTokens) external; function deposit(address _lpToken, uint256 _amount) external; function withdraw(address _lpToken, uint256 _amount) external; function emergencyWithdraw(address[] calldata _lpTokens) external; function addBonus( address _lpToken, address _bonusTokenAddr, uint48 _startTime, uint256 _weeklyRewards, uint256 _transferAmount ) external; function extendBonus( address _lpToken, uint256 _poolBonusId, address _bonusTokenAddr, uint256 _transferAmount ) external; function updateBonus( address _lpToken, address _bonusTokenAddr, uint256 _weeklyRewards, uint48 _startTime ) external; // only owner function setResponders(address[] calldata _responders) external; function setPaused(bool _paused) external; function collectDust( address _token, address _lpToken, uint256 _poolBonusId ) external; function addPoolsAndAllowBonus( address[] calldata _lpTokens, address[] calldata _bonusTokenAddrs, address[] calldata _authorizers ) external; } // Part: IERC20 /** * @title Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function totalSupply() external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); } // Part: Ownable /** * @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. * @author crypto-pumpkin@github * * By initialization, the owner account will be the one that called initializeOwner. This * can later be changed with {transferOwnership}. */ contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev COVER: Initializes the contract setting the deployer as the initial owner. */ constructor() { _owner = msg.sender; 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(_owner == msg.sender, "Ownable: caller is not the owner"); _; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // Part: ReentrancyGuard /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // Part: SafeERC20 /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { 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) ); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( 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) + 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) - value; _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(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. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall( data, "SafeERC20: low-level call failed" ); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require( abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed" ); } } } // File: BonusRewards.sol /** * @title Cover Protocol Bonus Token Rewards contract * @author crypto-pumpkin * @notice ETH is not allowed to be an bonus token, use wETH instead * @notice We support multiple bonus tokens for each pool. However, each pool will have 1 bonus token normally, may have 2 in rare cases */ contract BonusRewards is IBonusRewards, Ownable, ReentrancyGuard { using SafeERC20 for IERC20; bool public paused; uint256 private constant WEEK = 7 days; // help calculate rewards/bonus PerToken only. 1e12 will allow meaningful $1 deposit in a $1bn pool uint256 private constant CAL_MULTIPLIER = 1e30; // use array to allow convenient replacement. Size of responders should be very small to 0 till a reputable responder multi-sig within DeFi or Yearn ecosystem is established address[] private responders; address[] private poolList; // lpToken => Pool mapping(address => Pool) private pools; // lpToken => User address => User data mapping(address => mapping(address => User)) private users; // use array to allow convenient replacement. Size of Authorizers should be very small (one or two partner addresses for the pool and bonus) // lpToken => bonus token => [] allowed authorizers to add bonus tokens mapping(address => mapping(address => address[])) private allowedTokenAuthorizers; // bonusTokenAddr => 1, used to avoid collecting bonus token when not ready mapping(address => uint8) private bonusTokenAddrMap; modifier notPaused() { require(!paused, "BonusRewards: paused"); _; } function claimRewardsForPools(address[] calldata _lpTokens) external override nonReentrant notPaused { for (uint256 i = 0; i < _lpTokens.length; i++) { address lpToken = _lpTokens[i]; User memory user = users[lpToken][msg.sender]; if (user.amount == 0) continue; _updatePool(lpToken); _claimRewards(lpToken, user); _updateUserWriteoffs(lpToken); } } function deposit(address _lpToken, uint256 _amount) external override nonReentrant notPaused { require( pools[_lpToken].lastUpdatedAt > 0, "Blacksmith: pool does not exists" ); require( IERC20(_lpToken).balanceOf(msg.sender) >= _amount, "Blacksmith: insufficient balance" ); _updatePool(_lpToken); User storage user = users[_lpToken][msg.sender]; _claimRewards(_lpToken, user); IERC20 token = IERC20(_lpToken); uint256 balanceBefore = token.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), _amount); uint256 received = token.balanceOf(address(this)) - balanceBefore; user.amount = user.amount + received; pools[_lpToken].amount = pools[_lpToken].amount + received; _updateUserWriteoffs(_lpToken); emit Deposit(msg.sender, _lpToken, received); } /// @notice withdraw up to all user deposited function withdraw(address _lpToken, uint256 _amount) external override nonReentrant notPaused { require( pools[_lpToken].lastUpdatedAt > 0, "Blacksmith: pool does not exists" ); _updatePool(_lpToken); User storage user = users[_lpToken][msg.sender]; _claimRewards(_lpToken, user); uint256 amount = user.amount > _amount ? _amount : user.amount; user.amount = user.amount - amount; pools[_lpToken].amount = pools[_lpToken].amount - amount; _updateUserWriteoffs(_lpToken); _safeTransfer(_lpToken, amount); emit Withdraw(msg.sender, _lpToken, amount); } /// @notice withdraw all without rewards function emergencyWithdraw(address[] calldata _lpTokens) external override nonReentrant { for (uint256 i = 0; i < _lpTokens.length; i++) { User storage user = users[_lpTokens[i]][msg.sender]; uint256 amount = user.amount; user.amount = 0; pools[_lpTokens[i]].amount = pools[_lpTokens[i]].amount - amount; _safeTransfer(_lpTokens[i], amount); emit Withdraw(msg.sender, _lpTokens[i], amount); } } /// @notice called by authorizers only function addBonus( address _lpToken, address _bonusTokenAddr, uint48 _startTime, uint256 _weeklyRewards, uint256 _transferAmount ) external override nonReentrant notPaused { require( _isAuthorized(allowedTokenAuthorizers[_lpToken][_bonusTokenAddr]), "BonusRewards: not authorized caller" ); require( _startTime >= block.timestamp, "BonusRewards: startTime in the past" ); // make sure the pool is in the right state (exist with no active bonus at the moment) to add new bonus tokens Pool memory pool = pools[_lpToken]; require(pool.lastUpdatedAt > 0, "BonusRewards: pool does not exist"); Bonus[] memory bonuses = pool.bonuses; for (uint256 i = 0; i < bonuses.length; i++) { if (bonuses[i].bonusTokenAddr == _bonusTokenAddr) { // when there is alreay a bonus program with the same bonus token, make sure the program has ended properly require( bonuses[i].endTime + WEEK < block.timestamp, "BonusRewards: last bonus period hasn't ended" ); require( bonuses[i].remBonus == 0, "BonusRewards: last bonus not all claimed" ); } } IERC20 bonusTokenAddr = IERC20(_bonusTokenAddr); uint256 balanceBefore = bonusTokenAddr.balanceOf(address(this)); bonusTokenAddr.safeTransferFrom( msg.sender, address(this), _transferAmount ); uint256 received = bonusTokenAddr.balanceOf(address(this)) - balanceBefore; // endTime is based on how much tokens transfered v.s. planned weekly rewards uint48 endTime = uint48( (received * WEEK) / _weeklyRewards + _startTime ); pools[_lpToken].bonuses.push( Bonus({ bonusTokenAddr: _bonusTokenAddr, startTime: _startTime, endTime: endTime, weeklyRewards: _weeklyRewards, accRewardsPerToken: 0, remBonus: received }) ); } /// @notice called by authorizers only, update weeklyRewards (if not ended), or update startTime (only if rewards not started, 0 is ignored) function updateBonus( address _lpToken, address _bonusTokenAddr, uint256 _weeklyRewards, uint48 _startTime ) external override nonReentrant notPaused { require( _isAuthorized(allowedTokenAuthorizers[_lpToken][_bonusTokenAddr]), "BonusRewards: not authorized caller" ); require( _startTime == 0 || _startTime > block.timestamp, "BonusRewards: startTime in the past" ); // make sure the pool is in the right state (exist with no active bonus at the moment) to add new bonus tokens Pool memory pool = pools[_lpToken]; require(pool.lastUpdatedAt > 0, "BonusRewards: pool does not exist"); Bonus[] memory bonuses = pool.bonuses; for (uint256 i = 0; i < bonuses.length; i++) { if ( bonuses[i].bonusTokenAddr == _bonusTokenAddr && bonuses[i].endTime > block.timestamp ) { Bonus storage bonus = pools[_lpToken].bonuses[i]; _updatePool(_lpToken); // update pool with old weeklyReward to this block if (bonus.startTime >= block.timestamp) { // only honor new start time, if program has not started if (_startTime >= block.timestamp) { bonus.startTime = _startTime; } bonus.endTime = uint48( (bonus.remBonus * WEEK) / _weeklyRewards + bonus.startTime ); } else { // remaining bonus to distribute * week uint256 remBonusToDistribute = (bonus.endTime - block.timestamp) * bonus.weeklyRewards; bonus.endTime = uint48( remBonusToDistribute / _weeklyRewards + block.timestamp ); } bonus.weeklyRewards = _weeklyRewards; } } } /// @notice extend the current bonus program, the program has to be active (endTime is in the future) function extendBonus( address _lpToken, uint256 _poolBonusId, address _bonusTokenAddr, uint256 _transferAmount ) external override nonReentrant notPaused { require( _isAuthorized(allowedTokenAuthorizers[_lpToken][_bonusTokenAddr]), "BonusRewards: not authorized caller" ); Bonus memory bonus = pools[_lpToken].bonuses[_poolBonusId]; require( bonus.bonusTokenAddr == _bonusTokenAddr, "BonusRewards: bonus and id dont match" ); require( bonus.endTime > block.timestamp, "BonusRewards: bonus program ended, please start a new one" ); IERC20 bonusTokenAddr = IERC20(_bonusTokenAddr); uint256 balanceBefore = bonusTokenAddr.balanceOf(address(this)); bonusTokenAddr.safeTransferFrom( msg.sender, address(this), _transferAmount ); uint256 received = bonusTokenAddr.balanceOf(address(this)) - balanceBefore; // endTime is based on how much tokens transfered v.s. planned weekly rewards uint48 endTime = uint48( (received * WEEK) / bonus.weeklyRewards + bonus.endTime ); pools[_lpToken].bonuses[_poolBonusId].endTime = endTime; pools[_lpToken].bonuses[_poolBonusId].remBonus = bonus.remBonus + received; } /// @notice add pools and authorizers to add bonus tokens for pools, combine two calls into one. Only reason we add pools is when bonus tokens will be added function addPoolsAndAllowBonus( address[] calldata _lpTokens, address[] calldata _bonusTokenAddrs, address[] calldata _authorizers ) external override onlyOwner notPaused { // add pools uint256 currentTime = block.timestamp; for (uint256 i = 0; i < _lpTokens.length; i++) { address _lpToken = _lpTokens[i]; require( IERC20(_lpToken).decimals() <= 18, "BonusRewards: lptoken decimals > 18" ); if (pools[_lpToken].lastUpdatedAt == 0) { pools[_lpToken].lastUpdatedAt = currentTime; poolList.push(_lpToken); } // add bonus tokens and their authorizers (who are allowed to add the token to pool) for (uint256 j = 0; j < _bonusTokenAddrs.length; j++) { address _bonusTokenAddr = _bonusTokenAddrs[j]; allowedTokenAuthorizers[_lpToken][ _bonusTokenAddr ] = _authorizers; bonusTokenAddrMap[_bonusTokenAddr] = 1; } } } /// @notice collect bonus token dust to treasury function collectDust( address _token, address _lpToken, uint256 _poolBonusId ) external override onlyOwner { require( pools[_token].lastUpdatedAt == 0, "BonusRewards: lpToken, not allowed" ); if (_token == address(0)) { // token address(0) = ETH payable(owner()).transfer(address(this).balance); } else { uint256 balance = IERC20(_token).balanceOf(address(this)); if (bonusTokenAddrMap[_token] == 1) { // bonus token Bonus memory bonus = pools[_lpToken].bonuses[_poolBonusId]; require( bonus.bonusTokenAddr == _token, "BonusRewards: wrong pool" ); require( bonus.endTime + WEEK < block.timestamp, "BonusRewards: not ready" ); balance = bonus.remBonus; pools[_lpToken].bonuses[_poolBonusId].remBonus = 0; } IERC20(_token).transfer(owner(), balance); } } function setResponders(address[] calldata _responders) external override onlyOwner { responders = _responders; } function setPaused(bool _paused) external override { require( _isAuthorized(responders), "BonusRewards: caller not responder" ); paused = _paused; } function getPool(address _lpToken) external view override returns (Pool memory) { return pools[_lpToken]; } function getUser(address _lpToken, address _account) external view override returns (User memory, uint256[] memory) { return (users[_lpToken][_account], viewRewards(_lpToken, _account)); } function getAuthorizers(address _lpToken, address _bonusTokenAddr) external view override returns (address[] memory) { return allowedTokenAuthorizers[_lpToken][_bonusTokenAddr]; } function getResponders() external view override returns (address[] memory) { return responders; } function viewRewards(address _lpToken, address _user) public view override returns (uint256[] memory) { Pool memory pool = pools[_lpToken]; User memory user = users[_lpToken][_user]; uint256[] memory rewards = new uint256[](pool.bonuses.length); if (user.amount <= 0) return rewards; uint256 rewardsWriteoffsLen = user.rewardsWriteoffs.length; for (uint256 i = 0; i < rewards.length; i++) { Bonus memory bonus = pool.bonuses[i]; if (bonus.startTime < block.timestamp && bonus.remBonus > 0) { uint256 lpTotal = pool.amount; uint256 bonusForTime = _calRewardsForTime( bonus, pool.lastUpdatedAt ); uint256 bonusPerToken = bonus.accRewardsPerToken + bonusForTime / lpTotal; uint256 rewardsWriteoff = rewardsWriteoffsLen <= i ? 0 : user.rewardsWriteoffs[i]; uint256 reward = (user.amount * bonusPerToken) / CAL_MULTIPLIER - rewardsWriteoff; rewards[i] = reward < bonus.remBonus ? reward : bonus.remBonus; } } return rewards; } function getPoolList() external view override returns (address[] memory) { return poolList; } /// @notice update pool's bonus per staked token till current block timestamp, do nothing if pool does not exist function _updatePool(address _lpToken) private { Pool storage pool = pools[_lpToken]; uint256 poolLastUpdatedAt = pool.lastUpdatedAt; if (poolLastUpdatedAt == 0 || block.timestamp <= poolLastUpdatedAt) return; pool.lastUpdatedAt = block.timestamp; uint256 lpTotal = pool.amount; if (lpTotal == 0) return; for (uint256 i = 0; i < pool.bonuses.length; i++) { Bonus storage bonus = pool.bonuses[i]; if ( poolLastUpdatedAt < bonus.endTime && bonus.startTime < block.timestamp ) { uint256 bonusForTime = _calRewardsForTime( bonus, poolLastUpdatedAt ); bonus.accRewardsPerToken = bonus.accRewardsPerToken + bonusForTime / lpTotal; } } } function _updateUserWriteoffs(address _lpToken) private { Bonus[] memory bonuses = pools[_lpToken].bonuses; User storage user = users[_lpToken][msg.sender]; for (uint256 i = 0; i < bonuses.length; i++) { // update writeoff to match current acc rewards per token if (user.rewardsWriteoffs.length == i) { user.rewardsWriteoffs.push( (user.amount * bonuses[i].accRewardsPerToken) / CAL_MULTIPLIER ); } else { user.rewardsWriteoffs[i] = (user.amount * bonuses[i].accRewardsPerToken) / CAL_MULTIPLIER; } } } /// @notice transfer upto what the contract has function _safeTransfer(address _token, uint256 _amount) private returns (uint256 _transferred) { IERC20 token = IERC20(_token); uint256 balance = token.balanceOf(address(this)); if (balance > _amount) { token.safeTransfer(msg.sender, _amount); _transferred = _amount; } else if (balance > 0) { token.safeTransfer(msg.sender, balance); _transferred = balance; } } function _calRewardsForTime(Bonus memory _bonus, uint256 _lastUpdatedAt) internal view returns (uint256) { if (_bonus.endTime <= _lastUpdatedAt) return 0; uint256 calEndTime = block.timestamp > _bonus.endTime ? _bonus.endTime : block.timestamp; uint256 calStartTime = _lastUpdatedAt > _bonus.startTime ? _lastUpdatedAt : _bonus.startTime; uint256 timePassed = calEndTime - calStartTime; return (_bonus.weeklyRewards * CAL_MULTIPLIER * timePassed) / WEEK; } function _claimRewards(address _lpToken, User memory _user) private { // only claim if user has deposited before if (_user.amount == 0) return; uint256 rewardsWriteoffsLen = _user.rewardsWriteoffs.length; Bonus[] memory bonuses = pools[_lpToken].bonuses; for (uint256 i = 0; i < bonuses.length; i++) { uint256 rewardsWriteoff = rewardsWriteoffsLen <= i ? 0 : _user.rewardsWriteoffs[i]; uint256 bonusSinceLastUpdate = (_user.amount * bonuses[i].accRewardsPerToken) / CAL_MULTIPLIER - rewardsWriteoff; uint256 toTransfer = bonuses[i].remBonus < bonusSinceLastUpdate ? bonuses[i].remBonus : bonusSinceLastUpdate; if (toTransfer == 0) continue; uint256 transferred = _safeTransfer( bonuses[i].bonusTokenAddr, toTransfer ); pools[_lpToken].bonuses[i].remBonus = bonuses[i].remBonus - transferred; } } // only owner or authorized users from list function _isAuthorized(address[] memory checkList) private view returns (bool) { if (msg.sender == owner()) return true; for (uint256 i = 0; i < checkList.length; i++) { if (msg.sender == checkList[i]) { return true; } } return false; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_bonusTokenAddr","type":"address"},{"internalType":"uint48","name":"_startTime","type":"uint48"},{"internalType":"uint256","name":"_weeklyRewards","type":"uint256"},{"internalType":"uint256","name":"_transferAmount","type":"uint256"}],"name":"addBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_lpTokens","type":"address[]"},{"internalType":"address[]","name":"_bonusTokenAddrs","type":"address[]"},{"internalType":"address[]","name":"_authorizers","type":"address[]"}],"name":"addPoolsAndAllowBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_lpTokens","type":"address[]"}],"name":"claimRewardsForPools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_poolBonusId","type":"uint256"}],"name":"collectDust","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_lpTokens","type":"address[]"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_poolBonusId","type":"uint256"},{"internalType":"address","name":"_bonusTokenAddr","type":"address"},{"internalType":"uint256","name":"_transferAmount","type":"uint256"}],"name":"extendBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_bonusTokenAddr","type":"address"}],"name":"getAuthorizers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"}],"name":"getPool","outputs":[{"components":[{"components":[{"internalType":"address","name":"bonusTokenAddr","type":"address"},{"internalType":"uint48","name":"startTime","type":"uint48"},{"internalType":"uint48","name":"endTime","type":"uint48"},{"internalType":"uint256","name":"weeklyRewards","type":"uint256"},{"internalType":"uint256","name":"accRewardsPerToken","type":"uint256"},{"internalType":"uint256","name":"remBonus","type":"uint256"}],"internalType":"struct IBonusRewards.Bonus[]","name":"bonuses","type":"tuple[]"},{"internalType":"uint256","name":"lastUpdatedAt","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IBonusRewards.Pool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getResponders","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_account","type":"address"}],"name":"getUser","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"rewardsWriteoffs","type":"uint256[]"}],"internalType":"struct IBonusRewards.User","name":"","type":"tuple"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_responders","type":"address[]"}],"name":"setResponders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_bonusTokenAddr","type":"address"},{"internalType":"uint256","name":"_weeklyRewards","type":"uint256"},{"internalType":"uint48","name":"_startTime","type":"uint48"}],"name":"updateBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"viewRewards","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360018055613da7806100636000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063bbe4f6db11610071578063bbe4f6db14610288578063bed4df20146102a8578063d41dcbea146102bb578063f2fde38b146102c3578063f3fef3a3146102d65761012c565b80638da5cb5b1461021357806390bde5171461022e578063a55c38681461024f578063abca8a2e14610262578063bb10aa99146102755761012c565b806347e7ef24116100f457806347e7ef241461019d57806352985ac6146101b05780635c975abb146101d0578063664c0bf9146101ed5780638c880e02146102005761012c565b806301c1dfba1461013157806312faae931461014657806316c38b3c146101645780631eaa7a7b146101775780632c43e2ef1461018a575b600080fd5b61014461013f366004613817565b6102e9565b005b61014e61052b565b60405161015b91906139b4565b60405180910390f35b6101446101723660046138ed565b61058d565b6101446101853660046136d0565b61065a565b610144610198366004613817565b610a50565b6101446101ab3660046137ab565b610baa565b6101c36101be36600461369e565b610f83565b60405161015b9190613a01565b6002546101dd9060ff1681565b604051901515815260200161015b565b6101446101fb366004613817565b6112df565b61014461020e366004613857565b611315565b6000546040516001600160a01b03909116815260200161015b565b61024161023c36600461369e565b6115c0565b60405161015b929190613c55565b61014461025d3660046137d4565b611683565b61014461027036600461370b565b611b23565b61014e61028336600461369e565b611f61565b61029b61029636600461367d565b611fe4565b60405161015b9190613ba8565b6101446102b6366004613757565b6120ef565b61014e612732565b6101446102d136600461367d565b612792565b6101446102e43660046137ab565b61287c565b600260015414156103155760405162461bcd60e51b815260040161030c90613b71565b60405180910390fd5b600260015560005b818110156105225760006006600085858581811061034b57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610360919061367d565b6001600160a01b0316815260208082019290925260409081016000908120338252909252812080548282559092509081906005908787878181106103b457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103c9919061367d565b6001600160a01b03166001600160a01b03168152602001908152602001600020600201546103f79190613cef565b6005600087878781811061041b57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610430919061367d565b6001600160a01b0316815260208101919091526040016000206002015561048b85858581811061047057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610485919061367d565b82612a92565b508484848181106104ac57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104c1919061367d565b6001600160a01b0316336001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405161050591815260200190565b60405180910390a35050808061051a90613d32565b91505061031d565b50506001805550565b6060600380548060200260200160405190810160405280929190818152602001828054801561058357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610565575b5050505050905090565b6105f060038054806020026020016040519081016040528092919081815260200182805480156105e657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105c8575b5050505050612b5c565b6106475760405162461bcd60e51b815260206004820152602260248201527f426f6e7573526577617264733a2063616c6c6572206e6f7420726573706f6e6460448201526132b960f11b606482015260840161030c565b6002805460ff1916911515919091179055565b6000546001600160a01b031633146106845760405162461bcd60e51b815260040161030c90613af9565b6001600160a01b038316600090815260056020526040902060010154156106f85760405162461bcd60e51b815260206004820152602260248201527f426f6e7573526577617264733a206c70546f6b656e2c206e6f7420616c6c6f77604482015261195960f21b606482015260840161030c565b6001600160a01b03831661074657600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610740573d6000803e3d6000fd5b50610a4b565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c09190613925565b6001600160a01b03851660009081526008602052604090205490915060ff16600114156109a7576001600160a01b038316600090815260056020526040812080548490811061081f57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600490930290910180546001600160a01b0380821680865265ffffffffffff600160a01b8404811697870197909752600160d01b9092049095169284019290925260018101546060840152600281015460808401526003015460a0830152909250908616146108e55760405162461bcd60e51b815260206004820152601860248201527f426f6e7573526577617264733a2077726f6e6720706f6f6c0000000000000000604482015260640161030c565b4262093a80826040015165ffffffffffff166109019190613c98565b1061094e5760405162461bcd60e51b815260206004820152601760248201527f426f6e7573526577617264733a206e6f74207265616479000000000000000000604482015260640161030c565b60a08101516001600160a01b0385166000908152600560205260408120805492945090918590811061099057634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030181905550505b836001600160a01b031663a9059cbb6109c86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a489190613909565b50505b505050565b60026001541415610a735760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615610a9b5760405162461bcd60e51b815260040161030c90613acb565b60005b81811015610522576000838383818110610ac857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610add919061367d565b6001600160a01b03811660009081526006602090815260408083203384528252808320815180830183528154815260018201805484518187028101870190955280855296975094959094919385810193929190830182828015610b5f57602002820191906000526020600020905b815481526020019060010190808311610b4b575b505050919092525050815191925050610b79575050610b98565b610b8282612bea565b610b8c8282612d50565b610b958261301e565b50505b80610ba281613d32565b915050610a9e565b60026001541415610bcd5760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615610bf55760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b038216600090815260056020526040902060010154610c5d5760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20706f6f6c20646f6573206e6f7420657869737473604482015260640161030c565b6040516370a0823160e01b815233600482015281906001600160a01b038416906370a082319060240160206040518083038186803b158015610c9e57600080fd5b505afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd69190613925565b1015610d245760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20696e73756666696369656e742062616c616e6365604482015260640161030c565b610d2d82612bea565b6001600160a01b038216600090815260066020908152604080832033845282529182902082518084018452815481526001820180548551818602810186019096528086529294610dc094889487938583019392909190830182828015610db257602002820191906000526020600020905b815481526020019060010190808311610d9e575b505050505081525050612d50565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b158015610e0457600080fd5b505afa158015610e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c9190613925565b9050610e536001600160a01b038316333087613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecf9190613925565b610ed99190613cef565b8454909150610ee9908290613c98565b84556001600160a01b038616600090815260056020526040902060020154610f12908290613c98565b6001600160a01b038716600090815260056020526040902060020155610f378661301e565b6040518181526001600160a01b0387169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a350506001805550505050565b6001600160a01b038216600090815260056020908152604080832081518154608094810282018501909352606081810184815290959491938492849190879085015b828210156110485760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101610fc5565b505050908252506001828101546020808401919091526002909301546040928301526001600160a01b03808916600090815260068552838120918916815290845282812083518085018552815481529281018054855181880281018801909652808652969750919592949093858201939092918301828280156110ea57602002820191906000526020600020905b8154815260200190600101908083116110d6575b5050505050815250509050600082600001515167ffffffffffffffff81111561112357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561114c578160200160208202803683370190505b5082519091506111605792506112d9915050565b60208201515160005b82518110156112d15760008560000151828151811061119857634e487b7160e01b600052603260045260246000fd5b6020026020010151905042816020015165ffffffffffff161080156111c1575060008160a00151115b156112be5760008660400151905060006111df83896020015161328f565b905060006111ed8383613cb0565b84608001516111fc9190613c98565b9050600085871115611239578860200151868151811061122c57634e487b7160e01b600052603260045260246000fd5b602002602001015161123c565b60005b90506000816c0c9f2c9cd04674edea40000000848c6000015161125f9190613cd0565b6112699190613cb0565b6112739190613cef565b90508560a00151811061128a578560a0015161128c565b805b8988815181106112ac57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505050505050505b50806112c981613d32565b915050611169565b509093505050505b92915050565b6000546001600160a01b031633146113095760405162461bcd60e51b815260040161030c90613af9565b610a4b60038383613595565b6000546001600160a01b0316331461133f5760405162461bcd60e51b815260040161030c90613af9565b60025460ff16156113625760405162461bcd60e51b815260040161030c90613acb565b4260005b868110156115b657600088888381811061139057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113a5919061367d565b90506012816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156113e257600080fd5b505afa1580156113f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141a919061393d565b60ff1611156114775760405162461bcd60e51b815260206004820152602360248201527f426f6e7573526577617264733a206c70746f6b656e20646563696d616c73203e60448201526204062760eb1b606482015260840161030c565b6001600160a01b0381166000908152600560205260409020600101546114f7576001600160a01b038116600081815260056020526040812060019081018690556004805491820181559091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b03191690911790555b60005b868110156115a157600088888381811061152457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611539919061367d565b6001600160a01b03808516600090815260076020908152604080832093851683529290522090915061156c908888613595565b506001600160a01b03166000908152600860205260409020805460ff191660011790558061159981613d32565b9150506114fa565b505080806115ae90613d32565b915050611366565b5050505050505050565b6040805180820190915260008152606060208201526001600160a01b0380841660009081526006602090815260408083209386168352929052206060906116078585610f83565b81604051806040016040529081600082015481526020016001820180548060200260200160405190810160405280929190818152602001828054801561166c57602002820191906000526020600020905b815481526020019060010190808311611658575b5050505050815250509150915091505b9250929050565b600260015414156116a65760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff16156116ce5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b038085166000908152600760209081526040808320938616835292815290829020805483518184028101840190945280845261174d93928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b6117695760405162461bcd60e51b815260040161030c90613b2e565b6001600160a01b03841660009081526005602052604081208054859081106117a157634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600490930290910180546001600160a01b0380821680865265ffffffffffff600160a01b8404811697870197909752600160d01b9092049095169284019290925260018101546060840152600281015460808401526003015460a0830152909250908416146118755760405162461bcd60e51b815260206004820152602560248201527f426f6e7573526577617264733a20626f6e757320616e6420696420646f6e74206044820152640dac2e8c6d60db1b606482015260840161030c565b42816040015165ffffffffffff16116118f65760405162461bcd60e51b815260206004820152603960248201527f426f6e7573526577617264733a20626f6e75732070726f6772616d20656e646560448201527f642c20706c656173652073746172742061206e6577206f6e6500000000000000606482015260840161030c565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561193a57600080fd5b505afa15801561194e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119729190613925565b90506119896001600160a01b038316333087613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b1580156119cd57600080fd5b505afa1580156119e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a059190613925565b611a0f9190613cef565b90506000846040015165ffffffffffff16856060015162093a8084611a349190613cd0565b611a3e9190613cb0565b611a489190613c98565b6001600160a01b038a166000908152600560205260409020805491925082918a908110611a8557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600001601a6101000a81548165ffffffffffff021916908365ffffffffffff160217905550818560a00151611ac89190613c98565b6001600160a01b038a16600090815260056020526040902080548a908110611b0057634e487b7160e01b600052603260045260246000fd5b600091825260209091206003600490920201015550506001805550505050505050565b60026001541415611b465760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615611b6e5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b0380851660009081526007602090815260408083209387168352928152908290208054835181840281018401909452808452611bed93928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b611c095760405162461bcd60e51b815260040161030c90613b2e565b65ffffffffffff81161580611c255750428165ffffffffffff16115b611c415760405162461bcd60e51b815260040161030c90613a47565b6001600160a01b03841660009081526005602090815260408083208151815460809481028201850190935260608101838152909391928492849190879085015b82821015611d045760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101611c81565b5050505081526020016001820154815260200160028201548152505090506000816020015111611d465760405162461bcd60e51b815260040161030c90613a8a565b805160005b8151811015611f5457856001600160a01b0316828281518110611d7e57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b0316148015611dd2575042828281518110611dbc57634e487b7160e01b600052603260045260246000fd5b60200260200101516040015165ffffffffffff16115b15611f42576001600160a01b0387166000908152600560205260408120805483908110611e0f57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050611e2888612bea565b805442600160a01b90910465ffffffffffff1610611ed257428565ffffffffffff1610611e7057805465ffffffffffff60a01b1916600160a01b65ffffffffffff8716021781555b80546003820154600160a01b90910465ffffffffffff16908790611e989062093a8090613cd0565b611ea29190613cb0565b611eac9190613c98565b815465ffffffffffff91909116600160d01b026001600160d01b03909116178155611f3b565b6001810154815460009190611ef7904290600160d01b900465ffffffffffff16613cef565b611f019190613cd0565b905042611f0e8883613cb0565b611f189190613c98565b825465ffffffffffff91909116600160d01b026001600160d01b03909116178255505b6001018590555b80611f4c81613d32565b915050611d4b565b5050600180555050505050565b6001600160a01b038083166000908152600760209081526040808320938516835292815290829020805483518184028101840190945280845260609392830182828015611fd757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fb9575b5050505050905092915050565b61200860405180606001604052806060815260200160008152602001600081525090565b6001600160a01b03821660009081526005602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b828210156120cb5760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101612048565b5050505081526020016001820154815260200160028201548152505090505b919050565b600260015414156121125760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff161561213a5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b03808616600090815260076020908152604080832093881683529281529082902080548351818402810184019094528084526121b993928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b6121d55760405162461bcd60e51b815260040161030c90613b2e565b428365ffffffffffff1610156121fd5760405162461bcd60e51b815260040161030c90613a47565b6001600160a01b03851660009081526005602090815260408083208151815460809481028201850190935260608101838152909391928492849190879085015b828210156122c05760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a0830152908352909201910161223d565b50505050815260200160018201548152602001600282015481525050905060008160200151116123025760405162461bcd60e51b815260040161030c90613a8a565b805160005b815181101561249857866001600160a01b031682828151811061233a57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415612486574262093a8083838151811061237a57634e487b7160e01b600052603260045260246000fd5b60200260200101516040015165ffffffffffff166123989190613c98565b106123fa5760405162461bcd60e51b815260206004820152602c60248201527f426f6e7573526577617264733a206c61737420626f6e757320706572696f642060448201526b1a185cdb89dd08195b99195960a21b606482015260840161030c565b81818151811061241a57634e487b7160e01b600052603260045260246000fd5b602002602001015160a001516000146124865760405162461bcd60e51b815260206004820152602860248201527f426f6e7573526577617264733a206c61737420626f6e7573206e6f7420616c6c6044820152670818db185a5b595960c21b606482015260840161030c565b8061249081613d32565b915050612307565b506040516370a0823160e01b815230600482015286906000906001600160a01b038316906370a082319060240160206040518083038186803b1580156124dd57600080fd5b505afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190613925565b905061252c6001600160a01b038316333088613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b15801561257057600080fd5b505afa158015612584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a89190613925565b6125b29190613cef565b9050600065ffffffffffff8916886125cd62093a8085613cd0565b6125d79190613cb0565b6125e19190613c98565b9050600560008c6001600160a01b03166001600160a01b031681526020019081526020016000206000016040518060c001604052808c6001600160a01b031681526020018b65ffffffffffff1681526020018365ffffffffffff1681526020018a81526020016000815260200184815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001601a6101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600101556080820151816002015560a082015181600301555050505050505050600180819055505050505050565b60606004805480602002602001604051908101604052809291908181526020018280548015610583576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610565575050505050905090565b6000546001600160a01b031633146127bc5760405162461bcd60e51b815260040161030c90613af9565b6001600160a01b0381166128215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161030c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561289f5760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff16156128c75760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b03821660009081526005602052604090206001015461292f5760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20706f6f6c20646f6573206e6f7420657869737473604482015260640161030c565b61293882612bea565b6001600160a01b0382166000908152600660209081526040808320338452825291829020825180840184528154815260018201805485518186028101860190965280865292946129c994889487938583019392909190830182828015610db25760200282019190600052602060002090815481526020019060010190808311610d9e57505050505081525050612d50565b6000828260000154116129dd5781546129df565b825b82549091506129ef908290613cef565b82556001600160a01b038416600090815260056020526040902060020154612a18908290613cef565b6001600160a01b038516600090815260056020526040902060020155612a3d8461301e565b612a478482612a92565b506040518181526001600160a01b0385169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a35050600180555050565b6040516370a0823160e01b8152306004820152600090839082906001600160a01b038316906370a082319060240160206040518083038186803b158015612ad857600080fd5b505afa158015612aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b109190613925565b905083811115612b3657612b2e6001600160a01b0383163386613350565b839250612b54565b8015612b5457612b506001600160a01b0383163383613350565b8092505b505092915050565b600080546001600160a01b0316331415612b78575060016120ea565b60005b8251811015612be157828181518110612ba457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03161415612bcf5760019150506120ea565b80612bd981613d32565b915050612b7b565b50600092915050565b6001600160a01b03811660009081526005602052604090206001810154801580612c145750804211155b15612c20575050612d4d565b426001830155600282015480612c3857505050612d4d565b60005b8354811015610a48576000846000018281548110612c6957634e487b7160e01b600052603260045260246000fd5b600091825260209091206004909102018054909150600160d01b900465ffffffffffff1684108015612cab5750805442600160a01b90910465ffffffffffff16105b15612d3a576040805160c08101825282546001600160a01b038116825265ffffffffffff600160a01b820481166020840152600160d01b90910416918101919091526001820154606082015260028201546080820152600382015460a0820152600090612d18908661328f565b9050612d248482613cb0565b8260020154612d339190613c98565b6002830155505b5080612d4581613d32565b915050612c3b565b50565b8051612d5b5761301a565b602080820151516001600160a01b03841660009081526005835260408082208054825181870281018701909352808352939492939192909190849084015b82821015612e1c5760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101612d99565b50505050905060005b8151811015610a4857600081841115612e695784602001518281518110612e5c57634e487b7160e01b600052603260045260246000fd5b6020026020010151612e6c565b60005b90506000816c0c9f2c9cd04674edea40000000858581518110612e9f57634e487b7160e01b600052603260045260246000fd5b6020026020010151608001518860000151612eba9190613cd0565b612ec49190613cb0565b612ece9190613cef565b9050600081858581518110612ef357634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015110612f0a5781612f37565b848481518110612f2a57634e487b7160e01b600052603260045260246000fd5b602002602001015160a001515b905080612f4657505050613008565b6000612f7d868681518110612f6b57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015183612a92565b905080868681518110612fa057634e487b7160e01b600052603260045260246000fd5b602002602001015160a00151612fb69190613cef565b6001600160a01b038a166000908152600560205260409020805487908110612fee57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030181905550505050505b8061301281613d32565b915050612e25565b5050565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083529192909190849084015b828210156130d75760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101613054565b505050506001600160a01b038316600090815260066020908152604080832033845290915281209192505b825181101561321e57600182015481141561318957816001016c0c9f2c9cd04674edea4000000084838151811061314957634e487b7160e01b600052603260045260246000fd5b60200260200101516080015184600001546131649190613cd0565b61316e9190613cb0565b8154600181018355600092835260209092209091015561320c565b6c0c9f2c9cd04674edea400000008382815181106131b757634e487b7160e01b600052603260045260246000fd5b60200260200101516080015183600001546131d29190613cd0565b6131dc9190613cb0565b8260010182815481106131ff57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001555b8061321681613d32565b915050613102565b50505050565b6040516001600160a01b038085166024830152831660448201526064810182905261321e9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613380565b600081836040015165ffffffffffff16116132ac575060006112d9565b6000836040015165ffffffffffff1642116132c757426132d5565b836040015165ffffffffffff165b90506000846020015165ffffffffffff1684116132fe57846020015165ffffffffffff16613300565b835b9050600061330e8284613cef565b905062093a80816c0c9f2c9cd04674edea4000000088606001516133329190613cd0565b61333c9190613cd0565b6133469190613cb0565b9695505050505050565b6040516001600160a01b038316602482015260448101829052610a4b90849063a9059cbb60e01b90606401613258565b60006133d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134529092919063ffffffff16565b805190915015610a4b57808060200190518101906133f39190613909565b610a4b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161030c565b60606134618484600085613469565b949350505050565b60606134748561355c565b6134c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161030c565b600080866001600160a01b031685876040516134dc9190613998565b60006040518083038185875af1925050503d8060008114613519576040519150601f19603f3d011682016040523d82523d6000602084013e61351e565b606091505b509150915081156135325791506134619050565b8051156135425780518082602001fd5b8360405162461bcd60e51b815260040161030c9190613a14565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590613461575050151592915050565b8280548282559060005260206000209081019282156135e8579160200282015b828111156135e85781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906135b5565b506135f49291506135f8565b5090565b5b808211156135f457600081556001016135f9565b80356001600160a01b03811681146120ea57600080fd5b60008083601f840112613635578182fd5b50813567ffffffffffffffff81111561364c578182fd5b6020830191508360208260051b850101111561167c57600080fd5b803565ffffffffffff811681146120ea57600080fd5b60006020828403121561368e578081fd5b6136978261360d565b9392505050565b600080604083850312156136b0578081fd5b6136b98361360d565b91506136c76020840161360d565b90509250929050565b6000806000606084860312156136e4578081fd5b6136ed8461360d565b92506136fb6020850161360d565b9150604084013590509250925092565b60008060008060808587031215613720578081fd5b6137298561360d565b93506137376020860161360d565b92506040850135915061374c60608601613667565b905092959194509250565b600080600080600060a0868803121561376e578081fd5b6137778661360d565b94506137856020870161360d565b935061379360408701613667565b94979396509394606081013594506080013592915050565b600080604083850312156137bd578182fd5b6137c68361360d565b946020939093013593505050565b600080600080608085870312156137e9578384fd5b6137f28561360d565b9350602085013592506138076040860161360d565b9396929550929360600135925050565b60008060208385031215613829578182fd5b823567ffffffffffffffff81111561383f578283fd5b61384b85828601613624565b90969095509350505050565b6000806000806000806060878903121561386f578081fd5b863567ffffffffffffffff80821115613886578283fd5b6138928a838b01613624565b909850965060208901359150808211156138aa578283fd5b6138b68a838b01613624565b909650945060408901359150808211156138ce578283fd5b506138db89828a01613624565b979a9699509497509295939492505050565b6000602082840312156138fe578081fd5b813561369781613d63565b60006020828403121561391a578081fd5b815161369781613d63565b600060208284031215613936578081fd5b5051919050565b60006020828403121561394e578081fd5b815160ff81168114613697578182fd5b6000815180845260208085019450808401835b8381101561398d57815187529582019590820190600101613971565b509495945050505050565b600082516139aa818460208701613d06565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156139f55783516001600160a01b0316835292840192918401916001016139d0565b50909695505050505050565b600060208252613697602083018461395e565b6000602082528251806020840152613a33816040850160208701613d06565b601f01601f19169190910160400192915050565b60208082526023908201527f426f6e7573526577617264733a20737461727454696d6520696e207468652070604082015262185cdd60ea1b606082015260800190565b60208082526021908201527f426f6e7573526577617264733a20706f6f6c20646f6573206e6f7420657869736040820152601d60fa1b606082015260800190565b602080825260149082015273109bdb9d5cd4995dd85c991cce881c185d5cd95960621b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526023908201527f426f6e7573526577617264733a206e6f7420617574686f72697a65642063616c6040820152623632b960e91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020808352608080840185516060808588015282825180855260a0945084890191508684019350875b81811015613c3257845180516001600160a01b031684528881015165ffffffffffff9081168a8601526040808301519091169085015284810151858501528781015188850152860151868401529387019360c090920191600101613bd3565b505085890151604089015260408901518289015280965050505050505092915050565b60006040825283516040830152602084015160406060840152613c7b608084018261395e565b90508281036020840152613c8f818561395e565b95945050505050565b60008219821115613cab57613cab613d4d565b500190565b600082613ccb57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613cea57613cea613d4d565b500290565b600082821015613d0157613d01613d4d565b500390565b60005b83811015613d21578181015183820152602001613d09565b8381111561321e5750506000910152565b6000600019821415613d4657613d46613d4d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b8015158114612d4d57600080fdfea2646970667358221220350275c219043ff638825ae4e1ca14637955421ebdd2fe11617360d5b2806c3564736f6c63430008030033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063bbe4f6db11610071578063bbe4f6db14610288578063bed4df20146102a8578063d41dcbea146102bb578063f2fde38b146102c3578063f3fef3a3146102d65761012c565b80638da5cb5b1461021357806390bde5171461022e578063a55c38681461024f578063abca8a2e14610262578063bb10aa99146102755761012c565b806347e7ef24116100f457806347e7ef241461019d57806352985ac6146101b05780635c975abb146101d0578063664c0bf9146101ed5780638c880e02146102005761012c565b806301c1dfba1461013157806312faae931461014657806316c38b3c146101645780631eaa7a7b146101775780632c43e2ef1461018a575b600080fd5b61014461013f366004613817565b6102e9565b005b61014e61052b565b60405161015b91906139b4565b60405180910390f35b6101446101723660046138ed565b61058d565b6101446101853660046136d0565b61065a565b610144610198366004613817565b610a50565b6101446101ab3660046137ab565b610baa565b6101c36101be36600461369e565b610f83565b60405161015b9190613a01565b6002546101dd9060ff1681565b604051901515815260200161015b565b6101446101fb366004613817565b6112df565b61014461020e366004613857565b611315565b6000546040516001600160a01b03909116815260200161015b565b61024161023c36600461369e565b6115c0565b60405161015b929190613c55565b61014461025d3660046137d4565b611683565b61014461027036600461370b565b611b23565b61014e61028336600461369e565b611f61565b61029b61029636600461367d565b611fe4565b60405161015b9190613ba8565b6101446102b6366004613757565b6120ef565b61014e612732565b6101446102d136600461367d565b612792565b6101446102e43660046137ab565b61287c565b600260015414156103155760405162461bcd60e51b815260040161030c90613b71565b60405180910390fd5b600260015560005b818110156105225760006006600085858581811061034b57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610360919061367d565b6001600160a01b0316815260208082019290925260409081016000908120338252909252812080548282559092509081906005908787878181106103b457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103c9919061367d565b6001600160a01b03166001600160a01b03168152602001908152602001600020600201546103f79190613cef565b6005600087878781811061041b57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610430919061367d565b6001600160a01b0316815260208101919091526040016000206002015561048b85858581811061047057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610485919061367d565b82612a92565b508484848181106104ac57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104c1919061367d565b6001600160a01b0316336001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8360405161050591815260200190565b60405180910390a35050808061051a90613d32565b91505061031d565b50506001805550565b6060600380548060200260200160405190810160405280929190818152602001828054801561058357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610565575b5050505050905090565b6105f060038054806020026020016040519081016040528092919081815260200182805480156105e657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105c8575b5050505050612b5c565b6106475760405162461bcd60e51b815260206004820152602260248201527f426f6e7573526577617264733a2063616c6c6572206e6f7420726573706f6e6460448201526132b960f11b606482015260840161030c565b6002805460ff1916911515919091179055565b6000546001600160a01b031633146106845760405162461bcd60e51b815260040161030c90613af9565b6001600160a01b038316600090815260056020526040902060010154156106f85760405162461bcd60e51b815260206004820152602260248201527f426f6e7573526577617264733a206c70546f6b656e2c206e6f7420616c6c6f77604482015261195960f21b606482015260840161030c565b6001600160a01b03831661074657600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610740573d6000803e3d6000fd5b50610a4b565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a082319060240160206040518083038186803b15801561078857600080fd5b505afa15801561079c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c09190613925565b6001600160a01b03851660009081526008602052604090205490915060ff16600114156109a7576001600160a01b038316600090815260056020526040812080548490811061081f57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600490930290910180546001600160a01b0380821680865265ffffffffffff600160a01b8404811697870197909752600160d01b9092049095169284019290925260018101546060840152600281015460808401526003015460a0830152909250908616146108e55760405162461bcd60e51b815260206004820152601860248201527f426f6e7573526577617264733a2077726f6e6720706f6f6c0000000000000000604482015260640161030c565b4262093a80826040015165ffffffffffff166109019190613c98565b1061094e5760405162461bcd60e51b815260206004820152601760248201527f426f6e7573526577617264733a206e6f74207265616479000000000000000000604482015260640161030c565b60a08101516001600160a01b0385166000908152600560205260408120805492945090918590811061099057634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030181905550505b836001600160a01b031663a9059cbb6109c86000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a489190613909565b50505b505050565b60026001541415610a735760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615610a9b5760405162461bcd60e51b815260040161030c90613acb565b60005b81811015610522576000838383818110610ac857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610add919061367d565b6001600160a01b03811660009081526006602090815260408083203384528252808320815180830183528154815260018201805484518187028101870190955280855296975094959094919385810193929190830182828015610b5f57602002820191906000526020600020905b815481526020019060010190808311610b4b575b505050919092525050815191925050610b79575050610b98565b610b8282612bea565b610b8c8282612d50565b610b958261301e565b50505b80610ba281613d32565b915050610a9e565b60026001541415610bcd5760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615610bf55760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b038216600090815260056020526040902060010154610c5d5760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20706f6f6c20646f6573206e6f7420657869737473604482015260640161030c565b6040516370a0823160e01b815233600482015281906001600160a01b038416906370a082319060240160206040518083038186803b158015610c9e57600080fd5b505afa158015610cb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd69190613925565b1015610d245760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20696e73756666696369656e742062616c616e6365604482015260640161030c565b610d2d82612bea565b6001600160a01b038216600090815260066020908152604080832033845282529182902082518084018452815481526001820180548551818602810186019096528086529294610dc094889487938583019392909190830182828015610db257602002820191906000526020600020905b815481526020019060010190808311610d9e575b505050505081525050612d50565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b158015610e0457600080fd5b505afa158015610e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c9190613925565b9050610e536001600160a01b038316333087613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecf9190613925565b610ed99190613cef565b8454909150610ee9908290613c98565b84556001600160a01b038616600090815260056020526040902060020154610f12908290613c98565b6001600160a01b038716600090815260056020526040902060020155610f378661301e565b6040518181526001600160a01b0387169033907f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f629060200160405180910390a350506001805550505050565b6001600160a01b038216600090815260056020908152604080832081518154608094810282018501909352606081810184815290959491938492849190879085015b828210156110485760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101610fc5565b505050908252506001828101546020808401919091526002909301546040928301526001600160a01b03808916600090815260068552838120918916815290845282812083518085018552815481529281018054855181880281018801909652808652969750919592949093858201939092918301828280156110ea57602002820191906000526020600020905b8154815260200190600101908083116110d6575b5050505050815250509050600082600001515167ffffffffffffffff81111561112357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561114c578160200160208202803683370190505b5082519091506111605792506112d9915050565b60208201515160005b82518110156112d15760008560000151828151811061119857634e487b7160e01b600052603260045260246000fd5b6020026020010151905042816020015165ffffffffffff161080156111c1575060008160a00151115b156112be5760008660400151905060006111df83896020015161328f565b905060006111ed8383613cb0565b84608001516111fc9190613c98565b9050600085871115611239578860200151868151811061122c57634e487b7160e01b600052603260045260246000fd5b602002602001015161123c565b60005b90506000816c0c9f2c9cd04674edea40000000848c6000015161125f9190613cd0565b6112699190613cb0565b6112739190613cef565b90508560a00151811061128a578560a0015161128c565b805b8988815181106112ac57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505050505050505b50806112c981613d32565b915050611169565b509093505050505b92915050565b6000546001600160a01b031633146113095760405162461bcd60e51b815260040161030c90613af9565b610a4b60038383613595565b6000546001600160a01b0316331461133f5760405162461bcd60e51b815260040161030c90613af9565b60025460ff16156113625760405162461bcd60e51b815260040161030c90613acb565b4260005b868110156115b657600088888381811061139057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113a5919061367d565b90506012816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156113e257600080fd5b505afa1580156113f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141a919061393d565b60ff1611156114775760405162461bcd60e51b815260206004820152602360248201527f426f6e7573526577617264733a206c70746f6b656e20646563696d616c73203e60448201526204062760eb1b606482015260840161030c565b6001600160a01b0381166000908152600560205260409020600101546114f7576001600160a01b038116600081815260056020526040812060019081018690556004805491820181559091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b03191690911790555b60005b868110156115a157600088888381811061152457634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611539919061367d565b6001600160a01b03808516600090815260076020908152604080832093851683529290522090915061156c908888613595565b506001600160a01b03166000908152600860205260409020805460ff191660011790558061159981613d32565b9150506114fa565b505080806115ae90613d32565b915050611366565b5050505050505050565b6040805180820190915260008152606060208201526001600160a01b0380841660009081526006602090815260408083209386168352929052206060906116078585610f83565b81604051806040016040529081600082015481526020016001820180548060200260200160405190810160405280929190818152602001828054801561166c57602002820191906000526020600020905b815481526020019060010190808311611658575b5050505050815250509150915091505b9250929050565b600260015414156116a65760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff16156116ce5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b038085166000908152600760209081526040808320938616835292815290829020805483518184028101840190945280845261174d93928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b6117695760405162461bcd60e51b815260040161030c90613b2e565b6001600160a01b03841660009081526005602052604081208054859081106117a157634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600490930290910180546001600160a01b0380821680865265ffffffffffff600160a01b8404811697870197909752600160d01b9092049095169284019290925260018101546060840152600281015460808401526003015460a0830152909250908416146118755760405162461bcd60e51b815260206004820152602560248201527f426f6e7573526577617264733a20626f6e757320616e6420696420646f6e74206044820152640dac2e8c6d60db1b606482015260840161030c565b42816040015165ffffffffffff16116118f65760405162461bcd60e51b815260206004820152603960248201527f426f6e7573526577617264733a20626f6e75732070726f6772616d20656e646560448201527f642c20706c656173652073746172742061206e6577206f6e6500000000000000606482015260840161030c565b6040516370a0823160e01b815230600482015283906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561193a57600080fd5b505afa15801561194e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119729190613925565b90506119896001600160a01b038316333087613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b1580156119cd57600080fd5b505afa1580156119e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a059190613925565b611a0f9190613cef565b90506000846040015165ffffffffffff16856060015162093a8084611a349190613cd0565b611a3e9190613cb0565b611a489190613c98565b6001600160a01b038a166000908152600560205260409020805491925082918a908110611a8557634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600001601a6101000a81548165ffffffffffff021916908365ffffffffffff160217905550818560a00151611ac89190613c98565b6001600160a01b038a16600090815260056020526040902080548a908110611b0057634e487b7160e01b600052603260045260246000fd5b600091825260209091206003600490920201015550506001805550505050505050565b60026001541415611b465760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff1615611b6e5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b0380851660009081526007602090815260408083209387168352928152908290208054835181840281018401909452808452611bed93928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b611c095760405162461bcd60e51b815260040161030c90613b2e565b65ffffffffffff81161580611c255750428165ffffffffffff16115b611c415760405162461bcd60e51b815260040161030c90613a47565b6001600160a01b03841660009081526005602090815260408083208151815460809481028201850190935260608101838152909391928492849190879085015b82821015611d045760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101611c81565b5050505081526020016001820154815260200160028201548152505090506000816020015111611d465760405162461bcd60e51b815260040161030c90613a8a565b805160005b8151811015611f5457856001600160a01b0316828281518110611d7e57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b0316148015611dd2575042828281518110611dbc57634e487b7160e01b600052603260045260246000fd5b60200260200101516040015165ffffffffffff16115b15611f42576001600160a01b0387166000908152600560205260408120805483908110611e0f57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402019050611e2888612bea565b805442600160a01b90910465ffffffffffff1610611ed257428565ffffffffffff1610611e7057805465ffffffffffff60a01b1916600160a01b65ffffffffffff8716021781555b80546003820154600160a01b90910465ffffffffffff16908790611e989062093a8090613cd0565b611ea29190613cb0565b611eac9190613c98565b815465ffffffffffff91909116600160d01b026001600160d01b03909116178155611f3b565b6001810154815460009190611ef7904290600160d01b900465ffffffffffff16613cef565b611f019190613cd0565b905042611f0e8883613cb0565b611f189190613c98565b825465ffffffffffff91909116600160d01b026001600160d01b03909116178255505b6001018590555b80611f4c81613d32565b915050611d4b565b5050600180555050505050565b6001600160a01b038083166000908152600760209081526040808320938516835292815290829020805483518184028101840190945280845260609392830182828015611fd757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fb9575b5050505050905092915050565b61200860405180606001604052806060815260200160008152602001600081525090565b6001600160a01b03821660009081526005602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b828210156120cb5760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101612048565b5050505081526020016001820154815260200160028201548152505090505b919050565b600260015414156121125760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff161561213a5760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b03808616600090815260076020908152604080832093881683529281529082902080548351818402810184019094528084526121b993928301828280156105e6576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116105c8575050505050612b5c565b6121d55760405162461bcd60e51b815260040161030c90613b2e565b428365ffffffffffff1610156121fd5760405162461bcd60e51b815260040161030c90613a47565b6001600160a01b03851660009081526005602090815260408083208151815460809481028201850190935260608101838152909391928492849190879085015b828210156122c05760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a0830152908352909201910161223d565b50505050815260200160018201548152602001600282015481525050905060008160200151116123025760405162461bcd60e51b815260040161030c90613a8a565b805160005b815181101561249857866001600160a01b031682828151811061233a57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415612486574262093a8083838151811061237a57634e487b7160e01b600052603260045260246000fd5b60200260200101516040015165ffffffffffff166123989190613c98565b106123fa5760405162461bcd60e51b815260206004820152602c60248201527f426f6e7573526577617264733a206c61737420626f6e757320706572696f642060448201526b1a185cdb89dd08195b99195960a21b606482015260840161030c565b81818151811061241a57634e487b7160e01b600052603260045260246000fd5b602002602001015160a001516000146124865760405162461bcd60e51b815260206004820152602860248201527f426f6e7573526577617264733a206c61737420626f6e7573206e6f7420616c6c6044820152670818db185a5b595960c21b606482015260840161030c565b8061249081613d32565b915050612307565b506040516370a0823160e01b815230600482015286906000906001600160a01b038316906370a082319060240160206040518083038186803b1580156124dd57600080fd5b505afa1580156124f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125159190613925565b905061252c6001600160a01b038316333088613224565b6040516370a0823160e01b815230600482015260009082906001600160a01b038516906370a082319060240160206040518083038186803b15801561257057600080fd5b505afa158015612584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a89190613925565b6125b29190613cef565b9050600065ffffffffffff8916886125cd62093a8085613cd0565b6125d79190613cb0565b6125e19190613c98565b9050600560008c6001600160a01b03166001600160a01b031681526020019081526020016000206000016040518060c001604052808c6001600160a01b031681526020018b65ffffffffffff1681526020018365ffffffffffff1681526020018a81526020016000815260200184815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548165ffffffffffff021916908365ffffffffffff160217905550604082015181600001601a6101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600101556080820151816002015560a082015181600301555050505050505050600180819055505050505050565b60606004805480602002602001604051908101604052809291908181526020018280548015610583576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610565575050505050905090565b6000546001600160a01b031633146127bc5760405162461bcd60e51b815260040161030c90613af9565b6001600160a01b0381166128215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161030c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561289f5760405162461bcd60e51b815260040161030c90613b71565b600260018190555460ff16156128c75760405162461bcd60e51b815260040161030c90613acb565b6001600160a01b03821660009081526005602052604090206001015461292f5760405162461bcd60e51b815260206004820181905260248201527f426c61636b736d6974683a20706f6f6c20646f6573206e6f7420657869737473604482015260640161030c565b61293882612bea565b6001600160a01b0382166000908152600660209081526040808320338452825291829020825180840184528154815260018201805485518186028101860190965280865292946129c994889487938583019392909190830182828015610db25760200282019190600052602060002090815481526020019060010190808311610d9e57505050505081525050612d50565b6000828260000154116129dd5781546129df565b825b82549091506129ef908290613cef565b82556001600160a01b038416600090815260056020526040902060020154612a18908290613cef565b6001600160a01b038516600090815260056020526040902060020155612a3d8461301e565b612a478482612a92565b506040518181526001600160a01b0385169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a35050600180555050565b6040516370a0823160e01b8152306004820152600090839082906001600160a01b038316906370a082319060240160206040518083038186803b158015612ad857600080fd5b505afa158015612aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b109190613925565b905083811115612b3657612b2e6001600160a01b0383163386613350565b839250612b54565b8015612b5457612b506001600160a01b0383163383613350565b8092505b505092915050565b600080546001600160a01b0316331415612b78575060016120ea565b60005b8251811015612be157828181518110612ba457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03161415612bcf5760019150506120ea565b80612bd981613d32565b915050612b7b565b50600092915050565b6001600160a01b03811660009081526005602052604090206001810154801580612c145750804211155b15612c20575050612d4d565b426001830155600282015480612c3857505050612d4d565b60005b8354811015610a48576000846000018281548110612c6957634e487b7160e01b600052603260045260246000fd5b600091825260209091206004909102018054909150600160d01b900465ffffffffffff1684108015612cab5750805442600160a01b90910465ffffffffffff16105b15612d3a576040805160c08101825282546001600160a01b038116825265ffffffffffff600160a01b820481166020840152600160d01b90910416918101919091526001820154606082015260028201546080820152600382015460a0820152600090612d18908661328f565b9050612d248482613cb0565b8260020154612d339190613c98565b6002830155505b5080612d4581613d32565b915050612c3b565b50565b8051612d5b5761301a565b602080820151516001600160a01b03841660009081526005835260408082208054825181870281018701909352808352939492939192909190849084015b82821015612e1c5760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101612d99565b50505050905060005b8151811015610a4857600081841115612e695784602001518281518110612e5c57634e487b7160e01b600052603260045260246000fd5b6020026020010151612e6c565b60005b90506000816c0c9f2c9cd04674edea40000000858581518110612e9f57634e487b7160e01b600052603260045260246000fd5b6020026020010151608001518860000151612eba9190613cd0565b612ec49190613cb0565b612ece9190613cef565b9050600081858581518110612ef357634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015110612f0a5781612f37565b848481518110612f2a57634e487b7160e01b600052603260045260246000fd5b602002602001015160a001515b905080612f4657505050613008565b6000612f7d868681518110612f6b57634e487b7160e01b600052603260045260246000fd5b60200260200101516000015183612a92565b905080868681518110612fa057634e487b7160e01b600052603260045260246000fd5b602002602001015160a00151612fb69190613cef565b6001600160a01b038a166000908152600560205260409020805487908110612fee57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030181905550505050505b8061301281613d32565b915050612e25565b5050565b6001600160a01b038116600090815260056020908152604080832080548251818502810185019093528083529192909190849084015b828210156130d75760008481526020908190206040805160c0810182526004860290920180546001600160a01b038116845265ffffffffffff600160a01b8204811685870152600160d01b909104169183019190915260018082015460608401526002820154608084015260039091015460a08301529083529092019101613054565b505050506001600160a01b038316600090815260066020908152604080832033845290915281209192505b825181101561321e57600182015481141561318957816001016c0c9f2c9cd04674edea4000000084838151811061314957634e487b7160e01b600052603260045260246000fd5b60200260200101516080015184600001546131649190613cd0565b61316e9190613cb0565b8154600181018355600092835260209092209091015561320c565b6c0c9f2c9cd04674edea400000008382815181106131b757634e487b7160e01b600052603260045260246000fd5b60200260200101516080015183600001546131d29190613cd0565b6131dc9190613cb0565b8260010182815481106131ff57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001555b8061321681613d32565b915050613102565b50505050565b6040516001600160a01b038085166024830152831660448201526064810182905261321e9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613380565b600081836040015165ffffffffffff16116132ac575060006112d9565b6000836040015165ffffffffffff1642116132c757426132d5565b836040015165ffffffffffff165b90506000846020015165ffffffffffff1684116132fe57846020015165ffffffffffff16613300565b835b9050600061330e8284613cef565b905062093a80816c0c9f2c9cd04674edea4000000088606001516133329190613cd0565b61333c9190613cd0565b6133469190613cb0565b9695505050505050565b6040516001600160a01b038316602482015260448101829052610a4b90849063a9059cbb60e01b90606401613258565b60006133d5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134529092919063ffffffff16565b805190915015610a4b57808060200190518101906133f39190613909565b610a4b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161030c565b60606134618484600085613469565b949350505050565b60606134748561355c565b6134c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161030c565b600080866001600160a01b031685876040516134dc9190613998565b60006040518083038185875af1925050503d8060008114613519576040519150601f19603f3d011682016040523d82523d6000602084013e61351e565b606091505b509150915081156135325791506134619050565b8051156135425780518082602001fd5b8360405162461bcd60e51b815260040161030c9190613a14565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590613461575050151592915050565b8280548282559060005260206000209081019282156135e8579160200282015b828111156135e85781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906135b5565b506135f49291506135f8565b5090565b5b808211156135f457600081556001016135f9565b80356001600160a01b03811681146120ea57600080fd5b60008083601f840112613635578182fd5b50813567ffffffffffffffff81111561364c578182fd5b6020830191508360208260051b850101111561167c57600080fd5b803565ffffffffffff811681146120ea57600080fd5b60006020828403121561368e578081fd5b6136978261360d565b9392505050565b600080604083850312156136b0578081fd5b6136b98361360d565b91506136c76020840161360d565b90509250929050565b6000806000606084860312156136e4578081fd5b6136ed8461360d565b92506136fb6020850161360d565b9150604084013590509250925092565b60008060008060808587031215613720578081fd5b6137298561360d565b93506137376020860161360d565b92506040850135915061374c60608601613667565b905092959194509250565b600080600080600060a0868803121561376e578081fd5b6137778661360d565b94506137856020870161360d565b935061379360408701613667565b94979396509394606081013594506080013592915050565b600080604083850312156137bd578182fd5b6137c68361360d565b946020939093013593505050565b600080600080608085870312156137e9578384fd5b6137f28561360d565b9350602085013592506138076040860161360d565b9396929550929360600135925050565b60008060208385031215613829578182fd5b823567ffffffffffffffff81111561383f578283fd5b61384b85828601613624565b90969095509350505050565b6000806000806000806060878903121561386f578081fd5b863567ffffffffffffffff80821115613886578283fd5b6138928a838b01613624565b909850965060208901359150808211156138aa578283fd5b6138b68a838b01613624565b909650945060408901359150808211156138ce578283fd5b506138db89828a01613624565b979a9699509497509295939492505050565b6000602082840312156138fe578081fd5b813561369781613d63565b60006020828403121561391a578081fd5b815161369781613d63565b600060208284031215613936578081fd5b5051919050565b60006020828403121561394e578081fd5b815160ff81168114613697578182fd5b6000815180845260208085019450808401835b8381101561398d57815187529582019590820190600101613971565b509495945050505050565b600082516139aa818460208701613d06565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156139f55783516001600160a01b0316835292840192918401916001016139d0565b50909695505050505050565b600060208252613697602083018461395e565b6000602082528251806020840152613a33816040850160208701613d06565b601f01601f19169190910160400192915050565b60208082526023908201527f426f6e7573526577617264733a20737461727454696d6520696e207468652070604082015262185cdd60ea1b606082015260800190565b60208082526021908201527f426f6e7573526577617264733a20706f6f6c20646f6573206e6f7420657869736040820152601d60fa1b606082015260800190565b602080825260149082015273109bdb9d5cd4995dd85c991cce881c185d5cd95960621b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526023908201527f426f6e7573526577617264733a206e6f7420617574686f72697a65642063616c6040820152623632b960e91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020808352608080840185516060808588015282825180855260a0945084890191508684019350875b81811015613c3257845180516001600160a01b031684528881015165ffffffffffff9081168a8601526040808301519091169085015284810151858501528781015188850152860151868401529387019360c090920191600101613bd3565b505085890151604089015260408901518289015280965050505050505092915050565b60006040825283516040830152602084015160406060840152613c7b608084018261395e565b90508281036020840152613c8f818561395e565b95945050505050565b60008219821115613cab57613cab613d4d565b500190565b600082613ccb57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615613cea57613cea613d4d565b500290565b600082821015613d0157613d01613d4d565b500390565b60005b83811015613d21578181015183820152602001613d09565b8381111561321e5750506000910152565b6000600019821415613d4657613d46613d4d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b8015158114612d4d57600080fdfea2646970667358221220350275c219043ff638825ae4e1ca14637955421ebdd2fe11617360d5b2806c3564736f6c63430008030033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.