Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,368 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Stake | 17181180 | 573 days ago | IN | 0 ETH | 0.00825887 | ||||
Request Staking ... | 17164732 | 575 days ago | IN | 0 ETH | 0.0042493 | ||||
Submit Value | 17164732 | 575 days ago | IN | 0 ETH | 0.01311915 | ||||
Deposit Stake | 17164732 | 575 days ago | IN | 0 ETH | 0.01187404 | ||||
Withdraw Stake | 17134511 | 579 days ago | IN | 0 ETH | 0.00391293 | ||||
Request Staking ... | 17131303 | 580 days ago | IN | 0 ETH | 0.00420504 | ||||
Request Staking ... | 17084444 | 586 days ago | IN | 0 ETH | 0.00998453 | ||||
Withdraw Stake | 17084186 | 586 days ago | IN | 0 ETH | 0.00689808 | ||||
Submit Value | 17083740 | 586 days ago | IN | 0 ETH | 0.01960078 | ||||
Submit Value | 17083220 | 587 days ago | IN | 0 ETH | 0.02281882 | ||||
Submit Value | 17080898 | 587 days ago | IN | 0 ETH | 0.02018588 | ||||
Submit Value | 17079747 | 587 days ago | IN | 0 ETH | 0.02135607 | ||||
Submit Value | 17078054 | 587 days ago | IN | 0 ETH | 0.01345725 | ||||
Submit Value | 17076196 | 588 days ago | IN | 0 ETH | 0.02164862 | ||||
Submit Value | 17074735 | 588 days ago | IN | 0 ETH | 0.01989333 | ||||
Submit Value | 17073963 | 588 days ago | IN | 0 ETH | 0.01579764 | ||||
Submit Value | 17068864 | 589 days ago | IN | 0 ETH | 0.01023921 | ||||
Submit Value | 17067796 | 589 days ago | IN | 0 ETH | 0.01082431 | ||||
Submit Value | 17067233 | 589 days ago | IN | 0 ETH | 0.0131647 | ||||
Submit Value | 17065711 | 589 days ago | IN | 0 ETH | 0.00877647 | ||||
Submit Value | 17064958 | 589 days ago | IN | 0 ETH | 0.00819137 | ||||
Submit Value | 17063536 | 589 days ago | IN | 0 ETH | 0.00819137 | ||||
Submit Value | 17062961 | 589 days ago | IN | 0 ETH | 0.00906901 | ||||
Submit Value | 17061312 | 590 days ago | IN | 0 ETH | 0.00906901 | ||||
Submit Value | 17059984 | 590 days ago | IN | 0 ETH | 0.00760627 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TellorFlex
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 300 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "./interfaces/IERC20.sol"; /** @author Tellor Inc. @title TellorFlex @dev This is a streamlined Tellor oracle system which handles staking, reporting, * slashing, and user data getters in one contract. This contract is controlled * by a single address known as 'governance', which could be an externally owned * account or a contract, allowing for a flexible, modular design. */ contract TellorFlex { // Storage IERC20 public token; // token used for staking and rewards address public governance; // address with ability to remove values and slash reporters address public owner; // contract deployer, can call init function once uint256 public accumulatedRewardPerShare; // accumulated staking reward per staked token uint256 public minimumStakeAmount; // minimum amount of tokens required to stake uint256 public reportingLock; // base amount of time before a reporter is able to submit a value again uint256 public rewardRate; // total staking rewards released per second uint256 public stakeAmount; // minimum amount required to be a staker uint256 public stakeAmountDollarTarget; // amount of US dollars required to be a staker uint256 public stakingRewardsBalance; // total amount of staking rewards bytes32 public stakingTokenPriceQueryId; // staking token SpotPrice queryId, used for updating stakeAmount uint256 public timeBasedReward = 5e17; // amount of TB rewards released per 5 minutes uint256 public timeOfLastAllocation; // time of last update to accumulatedRewardPerShare uint256 public timeOfLastNewValue = block.timestamp; // time of the last new submitted value, originally set to the block timestamp uint256 public totalRewardDebt; // staking reward debt, used to calculate real staking rewards balance uint256 public totalStakeAmount; // total amount of tokens locked in contract (via stake) uint256 public totalStakers; // total number of stakers with at least stakeAmount staked, not exact mapping(bytes32 => Report) private reports; // mapping of query IDs to a report mapping(address => StakeInfo) private stakerDetails; // mapping from a persons address to their staking info // Structs struct Report { uint256[] timestamps; // array of all newValueTimestamps reported mapping(uint256 => uint256) timestampIndex; // mapping of timestamps to respective indices mapping(uint256 => uint256) timestampToBlockNum; // mapping of timestamp to block number mapping(uint256 => bytes) valueByTimestamp; // mapping of timestamps to values mapping(uint256 => address) reporterByTimestamp; // mapping of timestamps to reporters mapping(uint256 => bool) isDisputed; } struct StakeInfo { uint256 startDate; // stake or withdrawal request start date uint256 stakedBalance; // staked token balance uint256 lockedBalance; // amount locked for withdrawal uint256 rewardDebt; // used for staking reward calculation uint256 reporterLastTimestamp; // timestamp of reporter's last reported value uint256 reportsSubmitted; // total number of reports submitted by reporter uint256 startVoteCount; // total number of governance votes when stake deposited uint256 startVoteTally; // staker vote tally when stake deposited bool staked; // used to keep track of total stakers mapping(bytes32 => uint256) reportsSubmittedByQueryId; // mapping of queryId to number of reports submitted by reporter } // Events event NewReport( bytes32 indexed _queryId, uint256 indexed _time, bytes _value, uint256 _nonce, bytes _queryData, address indexed _reporter ); event NewStakeAmount(uint256 _newStakeAmount); event NewStaker(address indexed _staker, uint256 indexed _amount); event ReporterSlashed( address indexed _reporter, address _recipient, uint256 _slashAmount ); event StakeWithdrawn(address _staker); event StakeWithdrawRequested(address _staker, uint256 _amount); event ValueRemoved(bytes32 _queryId, uint256 _timestamp); // Functions /** * @dev Initializes system parameters * @param _token address of token used for staking and rewards * @param _reportingLock base amount of time (seconds) before reporter is able to report again * @param _stakeAmountDollarTarget fixed USD amount that stakeAmount targets on updateStakeAmount * @param _stakingTokenPrice current price of staking token in USD (18 decimals) * @param _stakingTokenPriceQueryId queryId where staking token price is reported */ constructor( address _token, uint256 _reportingLock, uint256 _stakeAmountDollarTarget, uint256 _stakingTokenPrice, uint256 _minimumStakeAmount, bytes32 _stakingTokenPriceQueryId ) { require(_token != address(0), "must set token address"); require(_stakingTokenPrice > 0, "must set staking token price"); require(_reportingLock > 0, "must set reporting lock"); require(_stakingTokenPriceQueryId != bytes32(0), "must set staking token price queryId"); token = IERC20(_token); owner = msg.sender; reportingLock = _reportingLock; stakeAmountDollarTarget = _stakeAmountDollarTarget; minimumStakeAmount = _minimumStakeAmount; uint256 _potentialStakeAmount = (_stakeAmountDollarTarget * 1e18) / _stakingTokenPrice; if(_potentialStakeAmount < _minimumStakeAmount) { stakeAmount = _minimumStakeAmount; } else { stakeAmount = _potentialStakeAmount; } stakingTokenPriceQueryId = _stakingTokenPriceQueryId; } /** * @dev Allows the owner to initialize the governance (flex addy needed for governance deployment) * @param _governanceAddress address of governance contract (github.com/tellor-io/governance) */ function init(address _governanceAddress) external { require(msg.sender == owner, "only owner can set governance address"); require(governance == address(0), "governance address already set"); require( _governanceAddress != address(0), "governance address can't be zero address" ); governance = _governanceAddress; } /** * @dev Funds the Flex contract with staking rewards (paid by autopay and minting) * @param _amount amount of tokens to fund contract with */ function addStakingRewards(uint256 _amount) external { require(token.transferFrom(msg.sender, address(this), _amount)); _updateRewards(); stakingRewardsBalance += _amount; // update reward rate = real staking rewards balance / 30 days rewardRate = (stakingRewardsBalance - ((accumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt)) / 30 days; } /** * @dev Allows a reporter to submit stake * @param _amount amount of tokens to stake */ function depositStake(uint256 _amount) external { require(governance != address(0), "governance address not set"); StakeInfo storage _staker = stakerDetails[msg.sender]; uint256 _stakedBalance = _staker.stakedBalance; uint256 _lockedBalance = _staker.lockedBalance; if (_lockedBalance > 0) { if (_lockedBalance >= _amount) { // if staker's locked balance covers full _amount, use that _staker.lockedBalance -= _amount; } else { // otherwise, stake the whole locked balance and transfer the // remaining amount from the staker's address require( token.transferFrom( msg.sender, address(this), _amount - _lockedBalance ) ); _staker.lockedBalance = 0; } } else { if (_stakedBalance == 0) { // if staked balance and locked balance equal 0, save current vote tally. // voting participation used for calculating rewards (bool _success, bytes memory _returnData) = governance.call( abi.encodeWithSignature("getVoteCount()") ); if (_success) { _staker.startVoteCount = uint256(abi.decode(_returnData, (uint256))); } (_success,_returnData) = governance.call( abi.encodeWithSignature("getVoteTallyByAddress(address)",msg.sender) ); if(_success){ _staker.startVoteTally = abi.decode(_returnData,(uint256)); } } require(token.transferFrom(msg.sender, address(this), _amount)); } _updateStakeAndPayRewards(msg.sender, _stakedBalance + _amount); _staker.startDate = block.timestamp; // This resets the staker start date to now emit NewStaker(msg.sender, _amount); } /** * @dev Removes a value from the oracle. * Note: this function is only callable by the Governance contract. * @param _queryId is ID of the specific data feed * @param _timestamp is the timestamp of the data value to remove */ function removeValue(bytes32 _queryId, uint256 _timestamp) external { require(msg.sender == governance, "caller must be governance address"); Report storage _report = reports[_queryId]; require(!_report.isDisputed[_timestamp], "value already disputed"); uint256 _index = _report.timestampIndex[_timestamp]; require(_timestamp == _report.timestamps[_index], "invalid timestamp"); _report.valueByTimestamp[_timestamp] = ""; _report.isDisputed[_timestamp] = true; emit ValueRemoved(_queryId, _timestamp); } /** * @dev Allows a reporter to request to withdraw their stake * @param _amount amount of staked tokens requesting to withdraw */ function requestStakingWithdraw(uint256 _amount) external { StakeInfo storage _staker = stakerDetails[msg.sender]; require( _staker.stakedBalance >= _amount, "insufficient staked balance" ); _updateStakeAndPayRewards(msg.sender, _staker.stakedBalance - _amount); _staker.startDate = block.timestamp; _staker.lockedBalance += _amount; emit StakeWithdrawRequested(msg.sender, _amount); } /** * @dev Slashes a reporter and transfers their stake amount to the given recipient * Note: this function is only callable by the governance address. * @param _reporter is the address of the reporter being slashed * @param _recipient is the address receiving the reporter's stake * @return _slashAmount uint256 amount of token slashed and sent to recipient address */ function slashReporter(address _reporter, address _recipient) external returns (uint256 _slashAmount) { require(msg.sender == governance, "only governance can slash reporter"); StakeInfo storage _staker = stakerDetails[_reporter]; uint256 _stakedBalance = _staker.stakedBalance; uint256 _lockedBalance = _staker.lockedBalance; require(_stakedBalance + _lockedBalance > 0, "zero staker balance"); if (_lockedBalance >= stakeAmount) { // if locked balance is at least stakeAmount, slash from locked balance _slashAmount = stakeAmount; _staker.lockedBalance -= stakeAmount; } else if (_lockedBalance + _stakedBalance >= stakeAmount) { // if locked balance + staked balance is at least stakeAmount, // slash from locked balance and slash remainder from staked balance _slashAmount = stakeAmount; _updateStakeAndPayRewards( _reporter, _stakedBalance - (stakeAmount - _lockedBalance) ); _staker.lockedBalance = 0; } else { // if sum(locked balance + staked balance) is less than stakeAmount, // slash sum _slashAmount = _stakedBalance + _lockedBalance; _updateStakeAndPayRewards(_reporter, 0); _staker.lockedBalance = 0; } require(token.transfer(_recipient, _slashAmount)); emit ReporterSlashed(_reporter, _recipient, _slashAmount); } /** * @dev Allows a reporter to submit a value to the oracle * @param _queryId is ID of the specific data feed. Equals keccak256(_queryData) for non-legacy IDs * @param _value is the value the user submits to the oracle * @param _nonce is the current value count for the query id * @param _queryData is the data used to fulfill the data query */ function submitValue( bytes32 _queryId, bytes calldata _value, uint256 _nonce, bytes calldata _queryData ) external { require(keccak256(_value) != keccak256(""), "value must be submitted"); Report storage _report = reports[_queryId]; require( _nonce == _report.timestamps.length || _nonce == 0, "nonce must match timestamp index" ); StakeInfo storage _staker = stakerDetails[msg.sender]; require( _staker.stakedBalance >= stakeAmount, "balance must be greater than stake amount" ); // Require reporter to abide by given reporting lock require( (block.timestamp - _staker.reporterLastTimestamp) * 1000 > (reportingLock * 1000) / (_staker.stakedBalance / stakeAmount), "still in reporter time lock, please wait!" ); require( _queryId == keccak256(_queryData), "query id must be hash of query data" ); _staker.reporterLastTimestamp = block.timestamp; // Checks for no double reporting of timestamps require( _report.reporterByTimestamp[block.timestamp] == address(0), "timestamp already reported for" ); // Update number of timestamps, value for given timestamp, and reporter for timestamp _report.timestampIndex[block.timestamp] = _report.timestamps.length; _report.timestamps.push(block.timestamp); _report.timestampToBlockNum[block.timestamp] = block.number; _report.valueByTimestamp[block.timestamp] = _value; _report.reporterByTimestamp[block.timestamp] = msg.sender; // Disperse Time Based Reward uint256 _reward = ((block.timestamp - timeOfLastNewValue) * timeBasedReward) / 300; //.5 TRB per 5 minutes uint256 _totalTimeBasedRewardsBalance = token.balanceOf(address(this)) - (totalStakeAmount + stakingRewardsBalance); if (_totalTimeBasedRewardsBalance > 0 && _reward > 0) { if (_totalTimeBasedRewardsBalance < _reward) { token.transfer(msg.sender, _totalTimeBasedRewardsBalance); } else { token.transfer(msg.sender, _reward); } } // Update last oracle value and number of values submitted by a reporter timeOfLastNewValue = block.timestamp; _staker.reportsSubmitted++; _staker.reportsSubmittedByQueryId[_queryId]++; emit NewReport( _queryId, block.timestamp, _value, _nonce, _queryData, msg.sender ); } /** * @dev Updates the stake amount after retrieving the latest * 12+-hour-old staking token price from the oracle */ function updateStakeAmount() external { // get staking token price (bool _valFound, bytes memory _val, ) = getDataBefore( stakingTokenPriceQueryId, block.timestamp - 12 hours ); if (_valFound) { uint256 _stakingTokenPrice = abi.decode(_val, (uint256)); require( _stakingTokenPrice >= 0.01 ether && _stakingTokenPrice < 1000000 ether, "invalid staking token price" ); uint256 _adjustedStakeAmount = (stakeAmountDollarTarget * 1e18) / _stakingTokenPrice; if(_adjustedStakeAmount < minimumStakeAmount) { stakeAmount = minimumStakeAmount; } else { stakeAmount = _adjustedStakeAmount; } emit NewStakeAmount(stakeAmount); } } /** * @dev Withdraws a reporter's stake after the lock period expires */ function withdrawStake() external { StakeInfo storage _staker = stakerDetails[msg.sender]; // Ensure reporter is locked and that enough time has passed require( block.timestamp - _staker.startDate >= 7 days, "7 days didn't pass" ); require( _staker.lockedBalance > 0, "reporter not locked for withdrawal" ); require(token.transfer(msg.sender, _staker.lockedBalance)); _staker.lockedBalance = 0; emit StakeWithdrawn(msg.sender); } // ***************************************************************************** // * * // * Getters * // * * // ***************************************************************************** /** * @dev Returns the block number at a given timestamp * @param _queryId is ID of the specific data feed * @param _timestamp is the timestamp to find the corresponding block number for * @return uint256 block number of the timestamp for the given data ID */ function getBlockNumberByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (uint256) { return reports[_queryId].timestampToBlockNum[_timestamp]; } /** * @dev Returns the current value of a data feed given a specific ID * @param _queryId is the ID of the specific data feed * @return _value the latest submitted value for the given queryId */ function getCurrentValue(bytes32 _queryId) external view returns (bytes memory _value) { bool _didGet; (_didGet, _value, ) = getDataBefore(_queryId, block.timestamp + 1); if(!_didGet){revert();} } /** * @dev Retrieves the latest value for the queryId before the specified timestamp * @param _queryId is the queryId to look up the value for * @param _timestamp before which to search for latest value * @return _ifRetrieve bool true if able to retrieve a non-zero value * @return _value the value retrieved * @return _timestampRetrieved the value's timestamp */ function getDataBefore(bytes32 _queryId, uint256 _timestamp) public view returns ( bool _ifRetrieve, bytes memory _value, uint256 _timestampRetrieved ) { (bool _found, uint256 _index) = getIndexForDataBefore( _queryId, _timestamp ); if (!_found) return (false, bytes(""), 0); _timestampRetrieved = getTimestampbyQueryIdandIndex(_queryId, _index); _value = retrieveData(_queryId, _timestampRetrieved); return (true, _value, _timestampRetrieved); } /** * @dev Returns governance address * @return address governance */ function getGovernanceAddress() external view returns (address) { return governance; } /** * @dev Counts the number of values that have been submitted for the request. * @param _queryId the id to look up * @return uint256 count of the number of values received for the id */ function getNewValueCountbyQueryId(bytes32 _queryId) public view returns (uint256) { return reports[_queryId].timestamps.length; } /** * @dev Returns the pending staking reward for a given address * @param _stakerAddress staker address to look up * @return _pendingReward - pending reward for given staker */ function getPendingRewardByStaker(address _stakerAddress) external returns (uint256 _pendingReward) { StakeInfo storage _staker = stakerDetails[_stakerAddress]; _pendingReward = (_staker.stakedBalance * _getUpdatedAccumulatedRewardPerShare()) / 1e18 - _staker.rewardDebt; (bool _success, bytes memory _returnData) = governance.call( abi.encodeWithSignature("getVoteCount()") ); uint256 _numberOfVotes; if (_success) { _numberOfVotes = uint256(abi.decode(_returnData, (uint256))) - _staker.startVoteCount; } if (_numberOfVotes > 0) { (_success,_returnData) = governance.call( abi.encodeWithSignature("getVoteTallyByAddress(address)",_stakerAddress) ); if(_success){ _pendingReward = (_pendingReward * (abi.decode(_returnData,(uint256)) - _staker.startVoteTally)) / _numberOfVotes; } } } /** * @dev Returns the real staking rewards balance after accounting for unclaimed rewards * @return uint256 real staking rewards balance */ function getRealStakingRewardsBalance() external view returns (uint256) { uint256 _pendingRewards = (_getUpdatedAccumulatedRewardPerShare() * totalStakeAmount) / 1e18 - totalRewardDebt; return (stakingRewardsBalance - _pendingRewards); } /** * @dev Returns reporter address and whether a value was removed for a given queryId and timestamp * @param _queryId the id to look up * @param _timestamp is the timestamp of the value to look up * @return address reporter who submitted the value * @return bool true if the value was removed */ function getReportDetails(bytes32 _queryId, uint256 _timestamp) external view returns (address, bool) { return (reports[_queryId].reporterByTimestamp[_timestamp], reports[_queryId].isDisputed[_timestamp]); } /** * @dev Returns the address of the reporter who submitted a value for a data ID at a specific time * @param _queryId is ID of the specific data feed * @param _timestamp is the timestamp to find a corresponding reporter for * @return address of the reporter who reported the value for the data ID at the given timestamp */ function getReporterByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (address) { return reports[_queryId].reporterByTimestamp[_timestamp]; } /** * @dev Returns the timestamp of the reporter's last submission * @param _reporter is address of the reporter * @return uint256 timestamp of the reporter's last submission */ function getReporterLastTimestamp(address _reporter) external view returns (uint256) { return stakerDetails[_reporter].reporterLastTimestamp; } /** * @dev Returns the reporting lock time, the amount of time a reporter must wait to submit again * @return uint256 reporting lock time */ function getReportingLock() external view returns (uint256) { return reportingLock; } /** * @dev Returns the number of values submitted by a specific reporter address * @param _reporter is the address of a reporter * @return uint256 the number of values submitted by the given reporter */ function getReportsSubmittedByAddress(address _reporter) external view returns (uint256) { return stakerDetails[_reporter].reportsSubmitted; } /** * @dev Returns the number of values submitted to a specific queryId by a specific reporter address * @param _reporter is the address of a reporter * @param _queryId is the ID of the specific data feed * @return uint256 the number of values submitted by the given reporter to the given queryId */ function getReportsSubmittedByAddressAndQueryId( address _reporter, bytes32 _queryId ) external view returns (uint256) { return stakerDetails[_reporter].reportsSubmittedByQueryId[_queryId]; } /** * @dev Returns amount required to report oracle values * @return uint256 stake amount */ function getStakeAmount() external view returns (uint256) { return stakeAmount; } /** * @dev Returns all information about a staker * @param _stakerAddress address of staker inquiring about * @return uint startDate of staking * @return uint current amount staked * @return uint current amount locked for withdrawal * @return uint reward debt used to calculate staking rewards * @return uint reporter's last reported timestamp * @return uint total number of reports submitted by reporter * @return uint governance vote count when first staked * @return uint number of votes cast by staker when first staked * @return bool whether staker is counted in totalStakers */ function getStakerInfo(address _stakerAddress) external view returns ( uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool ) { StakeInfo storage _staker = stakerDetails[_stakerAddress]; return ( _staker.startDate, _staker.stakedBalance, _staker.lockedBalance, _staker.rewardDebt, _staker.reporterLastTimestamp, _staker.reportsSubmitted, _staker.startVoteCount, _staker.startVoteTally, _staker.staked ); } /** * @dev Returns the timestamp for the last value of any ID from the oracle * @return uint256 timestamp of the last oracle value */ function getTimeOfLastNewValue() external view returns (uint256) { return timeOfLastNewValue; } /** * @dev Gets the timestamp for the value based on their index * @param _queryId is the id to look up * @param _index is the value index to look up * @return uint256 timestamp */ function getTimestampbyQueryIdandIndex(bytes32 _queryId, uint256 _index) public view returns (uint256) { return reports[_queryId].timestamps[_index]; } /** * @dev Retrieves latest array index of data before the specified timestamp for the queryId * @param _queryId is the queryId to look up the index for * @param _timestamp is the timestamp before which to search for the latest index * @return _found whether the index was found * @return _index the latest index found before the specified timestamp */ // slither-disable-next-line calls-loop function getIndexForDataBefore(bytes32 _queryId, uint256 _timestamp) public view returns (bool _found, uint256 _index) { uint256 _count = getNewValueCountbyQueryId(_queryId); if (_count > 0) { uint256 _middle; uint256 _start = 0; uint256 _end = _count - 1; uint256 _time; //Checking Boundaries to short-circuit the algorithm _time = getTimestampbyQueryIdandIndex(_queryId, _start); if (_time >= _timestamp) return (false, 0); _time = getTimestampbyQueryIdandIndex(_queryId, _end); if (_time < _timestamp) { while(isInDispute(_queryId, _time) && _end > 0) { _end--; _time = getTimestampbyQueryIdandIndex(_queryId, _end); } if(_end == 0 && isInDispute(_queryId, _time)) { return (false, 0); } return (true, _end); } //Since the value is within our boundaries, do a binary search while (true) { _middle = (_end - _start) / 2 + 1 + _start; _time = getTimestampbyQueryIdandIndex(_queryId, _middle); if (_time < _timestamp) { //get immediate next value uint256 _nextTime = getTimestampbyQueryIdandIndex( _queryId, _middle + 1 ); if (_nextTime >= _timestamp) { if(!isInDispute(_queryId, _time)) { // _time is correct return (true, _middle); } else { // iterate backwards until we find a non-disputed value while(isInDispute(_queryId, _time) && _middle > 0) { _middle--; _time = getTimestampbyQueryIdandIndex(_queryId, _middle); } if(_middle == 0 && isInDispute(_queryId, _time)) { return (false, 0); } // _time is correct return (true, _middle); } } else { //look from middle + 1(next value) to end _start = _middle + 1; } } else { uint256 _prevTime = getTimestampbyQueryIdandIndex( _queryId, _middle - 1 ); if (_prevTime < _timestamp) { if(!isInDispute(_queryId, _prevTime)) { // _prevTime is correct return (true, _middle - 1); } else { // iterate backwards until we find a non-disputed value _middle--; while(isInDispute(_queryId, _prevTime) && _middle > 0) { _middle--; _prevTime = getTimestampbyQueryIdandIndex( _queryId, _middle ); } if(_middle == 0 && isInDispute(_queryId, _prevTime)) { return (false, 0); } // _prevtime is correct return (true, _middle); } } else { //look from start to middle -1(prev value) _end = _middle - 1; } } } } return (false, 0); } /** * @dev Returns the index of a reporter timestamp in the timestamp array for a specific data ID * @param _queryId is ID of the specific data feed * @param _timestamp is the timestamp to find in the timestamps array * @return uint256 of the index of the reporter timestamp in the array for specific ID */ function getTimestampIndexByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (uint256) { return reports[_queryId].timestampIndex[_timestamp]; } /** * @dev Returns the address of the token used for staking * @return address of the token used for staking */ function getTokenAddress() external view returns (address) { return address(token); } /** * @dev Returns total amount of token staked for reporting * @return uint256 total amount of token staked */ function getTotalStakeAmount() external view returns (uint256) { return totalStakeAmount; } /** * @dev Returns total number of current stakers. Reporters with stakedBalance less than stakeAmount are excluded from this total * @return uint256 total stakers */ function getTotalStakers() external view returns (uint256) { return totalStakers; } /** * @dev Returns total balance of time based rewards in contract * @return uint256 amount of trb */ function getTotalTimeBasedRewardsBalance() external view returns (uint256) { return token.balanceOf(address(this)) - (totalStakeAmount + stakingRewardsBalance); } /** * @dev Returns whether a given value is disputed * @param _queryId unique ID of the data feed * @param _timestamp timestamp of the value * @return bool whether the value is disputed */ function isInDispute(bytes32 _queryId, uint256 _timestamp) public view returns (bool) { return reports[_queryId].isDisputed[_timestamp]; } /** * @dev Retrieve value from oracle based on timestamp * @param _queryId being requested * @param _timestamp to retrieve data/value from * @return bytes value for timestamp submitted */ function retrieveData(bytes32 _queryId, uint256 _timestamp) public view returns (bytes memory) { return reports[_queryId].valueByTimestamp[_timestamp]; } /** * @dev Used during the upgrade process to verify valid Tellor contracts * @return bool value used to verify valid Tellor contracts */ function verify() external pure returns (uint256) { return 9999; } // ***************************************************************************** // * * // * Internal functions * // * * // ***************************************************************************** /** * @dev Updates accumulated staking rewards per staked token */ function _updateRewards() internal { if (timeOfLastAllocation == block.timestamp) { return; } if (totalStakeAmount == 0 || rewardRate == 0) { timeOfLastAllocation = block.timestamp; return; } // calculate accumulated reward per token staked uint256 _newAccumulatedRewardPerShare = accumulatedRewardPerShare + ((block.timestamp - timeOfLastAllocation) * rewardRate * 1e18) / totalStakeAmount; // calculate accumulated reward with _newAccumulatedRewardPerShare uint256 _accumulatedReward = (_newAccumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt; if (_accumulatedReward >= stakingRewardsBalance) { // if staking rewards run out, calculate remaining reward per staked // token and set rewardRate to 0 uint256 _newPendingRewards = stakingRewardsBalance - ((accumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt); accumulatedRewardPerShare += (_newPendingRewards * 1e18) / totalStakeAmount; rewardRate = 0; } else { accumulatedRewardPerShare = _newAccumulatedRewardPerShare; } timeOfLastAllocation = block.timestamp; } /** * @dev Called whenever a user's stake amount changes. First updates staking rewards, * transfers pending rewards to user's address, and finally updates user's stake amount * and other relevant variables. * @param _stakerAddress address of user whose stake is being updated * @param _newStakedBalance new staked balance of user */ function _updateStakeAndPayRewards( address _stakerAddress, uint256 _newStakedBalance ) internal { _updateRewards(); StakeInfo storage _staker = stakerDetails[_stakerAddress]; if (_staker.stakedBalance > 0) { // if address already has a staked balance, calculate and transfer pending rewards uint256 _pendingReward = (_staker.stakedBalance * accumulatedRewardPerShare) / 1e18 - _staker.rewardDebt; // get staker voting participation rate uint256 _numberOfVotes; (bool _success, bytes memory _returnData) = governance.call( abi.encodeWithSignature("getVoteCount()") ); if (_success) { _numberOfVotes = uint256(abi.decode(_returnData, (uint256))) - _staker.startVoteCount; } if (_numberOfVotes > 0) { // staking reward = pending reward * voting participation rate (_success, _returnData) = governance.call( abi.encodeWithSignature("getVoteTallyByAddress(address)",_stakerAddress) ); if(_success){ uint256 _voteTally = abi.decode(_returnData,(uint256)); uint256 _tempPendingReward = (_pendingReward * (_voteTally - _staker.startVoteTally)) / _numberOfVotes; if (_tempPendingReward < _pendingReward) { _pendingReward = _tempPendingReward; } } } stakingRewardsBalance -= _pendingReward; require(token.transfer(msg.sender, _pendingReward)); totalRewardDebt -= _staker.rewardDebt; totalStakeAmount -= _staker.stakedBalance; } _staker.stakedBalance = _newStakedBalance; // Update total stakers if (_staker.stakedBalance >= stakeAmount) { if (_staker.staked == false) { totalStakers++; } _staker.staked = true; } else { if (_staker.staked == true && totalStakers > 0) { totalStakers--; } _staker.staked = false; } // tracks rewards accumulated before stake amount updated _staker.rewardDebt = (_staker.stakedBalance * accumulatedRewardPerShare) / 1e18; totalRewardDebt += _staker.rewardDebt; totalStakeAmount += _staker.stakedBalance; // update reward rate if staking rewards are available // given staker's updated parameters if(rewardRate == 0) { rewardRate = (stakingRewardsBalance - ((accumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt)) / 30 days; } } /** * @dev Internal function retrieves updated accumulatedRewardPerShare * @return uint256 up-to-date accumulated reward per share */ function _getUpdatedAccumulatedRewardPerShare() internal view returns (uint256) { if (totalStakeAmount == 0) { return accumulatedRewardPerShare; } uint256 _newAccumulatedRewardPerShare = accumulatedRewardPerShare + ((block.timestamp - timeOfLastAllocation) * rewardRate * 1e18) / totalStakeAmount; uint256 _accumulatedReward = (_newAccumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt; if (_accumulatedReward >= stakingRewardsBalance) { uint256 _newPendingRewards = stakingRewardsBalance - ((accumulatedRewardPerShare * totalStakeAmount) / 1e18 - totalRewardDebt); _newAccumulatedRewardPerShare = accumulatedRewardPerShare + (_newPendingRewards * 1e18) / totalStakeAmount; } return _newAccumulatedRewardPerShare; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); }
{ "optimizer": { "enabled": true, "runs": 300 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_reportingLock","type":"uint256"},{"internalType":"uint256","name":"_stakeAmountDollarTarget","type":"uint256"},{"internalType":"uint256","name":"_stakingTokenPrice","type":"uint256"},{"internalType":"uint256","name":"_minimumStakeAmount","type":"uint256"},{"internalType":"bytes32","name":"_stakingTokenPriceQueryId","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"_time","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_value","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_queryData","type":"bytes"},{"indexed":true,"internalType":"address","name":"_reporter","type":"address"}],"name":"NewReport","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newStakeAmount","type":"uint256"}],"name":"NewStakeAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_staker","type":"address"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"NewStaker","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_reporter","type":"address"},{"indexed":false,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_slashAmount","type":"uint256"}],"name":"ReporterSlashed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"StakeWithdrawRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_staker","type":"address"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"ValueRemoved","type":"event"},{"inputs":[],"name":"accumulatedRewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getBlockNumberByTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"}],"name":"getCurrentValue","outputs":[{"internalType":"bytes","name":"_value","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getDataBefore","outputs":[{"internalType":"bool","name":"_ifRetrieve","type":"bool"},{"internalType":"bytes","name":"_value","type":"bytes"},{"internalType":"uint256","name":"_timestampRetrieved","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGovernanceAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getIndexForDataBefore","outputs":[{"internalType":"bool","name":"_found","type":"bool"},{"internalType":"uint256","name":"_index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"}],"name":"getNewValueCountbyQueryId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakerAddress","type":"address"}],"name":"getPendingRewardByStaker","outputs":[{"internalType":"uint256","name":"_pendingReward","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRealStakingRewardsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getReportDetails","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getReporterByTimestamp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reporter","type":"address"}],"name":"getReporterLastTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReportingLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reporter","type":"address"}],"name":"getReportsSubmittedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reporter","type":"address"},{"internalType":"bytes32","name":"_queryId","type":"bytes32"}],"name":"getReportsSubmittedByAddressAndQueryId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakerAddress","type":"address"}],"name":"getStakerInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTimeOfLastNewValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getTimestampIndexByTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTimestampbyQueryIdandIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalStakers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTimeBasedRewardsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_governanceAddress","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"isInDispute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"removeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reportingLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"requestStakingWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"retrieveData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reporter","type":"address"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"slashReporter","outputs":[{"internalType":"uint256","name":"_slashAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeAmountDollarTarget","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingRewardsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingTokenPriceQueryId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"bytes","name":"_value","type":"bytes"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_queryData","type":"bytes"}],"name":"submitValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeBasedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeOfLastAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeOfLastNewValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStakers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateStakeAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"verify","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526706f05b59d3b20000600b5542600d553480156200002157600080fd5b506040516200323538038062003235833981016040819052620000449162000223565b6001600160a01b038616620000a05760405162461bcd60e51b815260206004820152601660248201527f6d7573742073657420746f6b656e20616464726573730000000000000000000060448201526064015b60405180910390fd5b60008311620000f25760405162461bcd60e51b815260206004820152601c60248201527f6d75737420736574207374616b696e6720746f6b656e20707269636500000000604482015260640162000097565b60008511620001445760405162461bcd60e51b815260206004820152601760248201527f6d75737420736574207265706f7274696e67206c6f636b000000000000000000604482015260640162000097565b806200019f5760405162461bcd60e51b8152602060048201526024808201527f6d75737420736574207374616b696e6720746f6b656e207072696365207175656044820152631c9e525960e21b606482015260840162000097565b600080546001600160a01b0388166001600160a01b0319918216178255600280549091163317905560058690556008859055600483905583620001eb86670de0b6b3a7640000620002a3565b620001f7919062000282565b9050828110156200020d57600783905562000213565b60078190555b50600a5550620002cf9350505050565b60008060008060008060c087890312156200023c578182fd5b86516001600160a01b038116811462000253578283fd5b6020880151604089015160608a015160808b015160a0909b0151939c929b509099909850965090945092505050565b6000826200029e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620002ca57634e487b7160e01b81526011600452602481fd5b500290565b612f5680620002df6000396000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c8063733bdef0116101bd578063bed9d861116100f9578063ce5e11bf116100a2578063d9c51cd41161007c578063d9c51cd4146107ea578063e07c5486146107fd578063fc0c546a14610835578063fc735e99146108485761034c565b8063ce5e11bf146107c6578063cecb0647146107d9578063d75174e1146107e25761034c565b8063c0f95d52116100d3578063c0f95d5214610798578063c5958af9146107a0578063cb82cc8f146107b35761034c565b8063bed9d86114610774578063bf5745d61461077c578063c0d416b81461078f5761034c565b80638da5cb5b1161016657806396426d971161014057806396426d97146106fa5780639d9b16ed14610703578063a792765f14610732578063adf1639d146107545761034c565b80638da5cb5b146106af578063935408d0146106c257806394409a56146106f15761034c565b806383bb38771161019757806383bb38771461068a57806386989038146106935780638929f4c61461069c5761034c565b8063733bdef0146105b557806377b03e0d146106615780637b0a47ee146106815761034c565b806344e87f911161028c5780635eaa9ced116102355780636dd0a70f1161020f5780636dd0a70f1461058b5780636fd4f22914610593578063722580b61461059c57806373252494146105a45761034c565b80635eaa9ced1461056657806360c7dc47146105795780636b036f45146105825761034c565b806350005b831161026657806350005b83146105145780635aa6e675146105405780635b5edcfc146105535761034c565b806344e87f91146104b7578063460c33a2146104f95780634dfc2a34146105015761034c565b80632b6696a7116102f95780633321fc41116102d35780633321fc411461048a57806336d42195146104935780633878293e1461049c5780633a0ce342146104af5761034c565b80632b6696a71461040e5780632e206cd71461047957806331ed0db4146104825761034c565b806314c2a1bc1161032a57806314c2a1bc146103c757806319ab453c146103cf57806329449085146103e45761034c565b806304d932e21461035157806310fe9ae81461036d57806311938e081461038d575b600080fd5b61035a60095481565b6040519081526020015b60405180910390f35b610375610850565b6040516001600160a01b039091168152602001610364565b61035a61039b366004612bf2565b6001600160a01b0391909116600090815260126020908152604080832093835260099093019052205490565b600f5461035a565b6103e26103dd366004612b9f565b610860565b005b6103f76103f2366004612cd3565b6109af565b604080519215158352602083019190915201610364565b61045a61041c366004612cd3565b6000918252601160209081526040808420928452600483018252808420546005909301909152909120546001600160a01b039091169160ff90911690565b604080516001600160a01b039093168352901515602083015201610364565b61035a600c5481565b60105461035a565b61035a60055481565b61035a60035481565b61035a6104aa366004612b9f565b610d01565b6103e2610d23565b6104e96104c5366004612cd3565b60009182526011602090815260408084209284526005909201905290205460ff1690565b6040519015158152602001610364565b60055461035a565b61035a61050f366004612bc0565b610e4b565b61035a610522366004612b9f565b6001600160a01b031660009081526012602052604090206004015490565b600154610375906001600160a01b031681565b6103e2610561366004612cd3565b611093565b6103e2610574366004612c53565b611267565b61035a60075481565b61035a60045481565b61035a611845565b61035a600d5481565b60075461035a565b6001546001600160a01b0316610375565b61061b6105c3366004612b9f565b6001600160a01b0316600090815260126020526040902080546001820154600283015460038401546004850154600586015460068701546007880154600890980154969895979496939592949193909260ff90911690565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610364565b61035a61066f366004612c3b565b60009081526011602052604090205490565b61035a60065481565b61035a600e5481565b61035a60105481565b6103e26106aa366004612c3b565b611893565b600254610375906001600160a01b031681565b61035a6106d0366004612cd3565b60009182526011602090815260408084209284526002909201905290205490565b61035a600f5481565b61035a600b5481565b61035a610711366004612cd3565b60009182526011602090815260408084209284526001909201905290205490565b610745610740366004612cd3565b611966565b60405161036493929190612d8e565b610767610762366004612c3b565b6119c9565b6040516103649190612df2565b6103e26119f1565b61035a61078a366004612b9f565b611b83565b61035a60085481565b600d5461035a565b6107676107ae366004612cd3565b611d7b565b6103e26107c1366004612c3b565b611e2c565b61035a6107d4366004612cd3565b6121c9565b61035a600a5481565b61035a61220a565b6103e26107f8366004612c3b565b6122a6565b61037561080b366004612cd3565b6000918252601160209081526040808420928452600490920190529020546001600160a01b031690565b600054610375906001600160a01b031681565b61270f61035a565b6000546001600160a01b03165b90565b6002546001600160a01b031633146108cd5760405162461bcd60e51b815260206004820152602560248201527f6f6e6c79206f776e65722063616e2073657420676f7665726e616e6365206164604482015264647265737360d81b60648201526084015b60405180910390fd5b6001546001600160a01b0316156109265760405162461bcd60e51b815260206004820152601e60248201527f676f7665726e616e6365206164647265737320616c726561647920736574000060448201526064016108c4565b6001600160a01b03811661098d5760405162461bcd60e51b815260206004820152602860248201527f676f7665726e616e636520616464726573732063616e2774206265207a65726f604482015267206164647265737360c01b60648201526084016108c4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526011602052604081205481908015610cf157600080806109d5600185612e5c565b905060006109e389846121c9565b90508781106109fd57600080965096505050505050610cfa565b610a0789836121c9565b905087811015610ab1575b600089815260116020908152604080832084845260050190915290205460ff168015610a3e5750600082115b15610a615781610a4d81612ea3565b925050610a5a89836121c9565b9050610a12565b81158015610a8b5750600089815260116020908152604080832084845260050190915290205460ff165b15610aa157600080965096505050505050610cfa565b50600195509350610cfa92505050565b826002610abe8285612e5c565b610ac89190612e1d565b610ad3906001612e05565b610add9190612e05565b9350610ae989856121c9565b905087811015610bf8576000610b048a6107d4876001612e05565b9050888110610be55760008a815260116020908152604080832085845260050190915290205460ff16610b435760018597509750505050505050610cfa565b60008a815260116020908152604080832085845260050190915290205460ff168015610b6f5750600085115b15610b925784610b7e81612ea3565b955050610b8b8a866121c9565b9150610b43565b84158015610bbc575060008a815260116020908152604080832085845260050190915290205460ff165b15610bd35760008097509750505050505050610cfa565b60018597509750505050505050610cfa565b610bf0856001612e05565b935050610cec565b6000610c098a6107d4600188612e5c565b905088811015610cdd5760008a815260116020908152604080832084845260050190915290205460ff16610c52576001610c438187612e5c565b97509750505050505050610cfa565b84610c5c81612ea3565b9550505b60008a815260116020908152604080832084845260050190915290205460ff168015610c8c5750600085115b15610caf5784610c9b81612ea3565b955050610ca88a866121c9565b9050610c60565b84158015610bbc575060008a815260116020908152604080832084845260050190915290205460ff16610bbc565b610ce8600186612e5c565b9250505b610ab1565b60008092509250505b9250929050565b6001600160a01b0381166000908152601260205260409020600501545b919050565b600080610d3a600a5461a8c0426107409190612e5c565b50915091508115610e4757600081806020019051810190610d5b9190612cf4565b9050662386f26fc100008110158015610d7d575069d3c21bcecceda100000081105b610dc95760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964207374616b696e6720746f6b656e207072696365000000000060448201526064016108c4565b600081600854670de0b6b3a7640000610de29190612e3d565b610dec9190612e1d565b9050600454811015610e0357600454600755610e09565b60078190555b7f1af37d6aaef3c5ef293c3c63d0ac302f60db7fde22eb9f5e96ebd56992832110600754604051610e3c91815260200190565b60405180910390a150505b5050565b6001546000906001600160a01b03163314610eb35760405162461bcd60e51b815260206004820152602260248201527f6f6e6c7920676f7665726e616e63652063616e20736c617368207265706f727460448201526132b960f11b60648201526084016108c4565b6001600160a01b0383166000908152601260205260408120600181015460028201549192909190610ee48284612e05565b11610f275760405162461bcd60e51b81526020600482015260136024820152727a65726f207374616b65722062616c616e636560681b60448201526064016108c4565b6007548110610f56576007549350600754836002016000828254610f4b9190612e5c565b90915550610fb59050565b600754610f638383612e05565b10610f96576007549350610f8a86610f7b8387612e5c565b610f859085612e5c565b6123ab565b60006002840155610fb5565b610fa08183612e05565b9350610fad8660006123ab565b600060028401555b60005460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb90604401602060405180830381600087803b15801561100357600080fd5b505af1158015611017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103b9190612c1b565b61104457600080fd5b604080516001600160a01b038781168252602082018790528816917f4317784407a22e643706ef000f5c0eea399dea3632613786167ab71c9446e3ac910160405180910390a250505092915050565b6001546001600160a01b031633146110f75760405162461bcd60e51b815260206004820152602160248201527f63616c6c6572206d75737420626520676f7665726e616e6365206164647265736044820152607360f81b60648201526084016108c4565b6000828152601160209081526040808320848452600581019092529091205460ff16156111665760405162461bcd60e51b815260206004820152601660248201527f76616c756520616c72656164792064697370757465640000000000000000000060448201526064016108c4565b6000828152600182016020526040902054815482908290811061119957634e487b7160e01b600052603260045260246000fd5b906000526020600020015483146111e65760405162461bcd60e51b81526020600482015260116024820152700696e76616c69642074696d657374616d7607c1b60448201526064016108c4565b60408051602080820180845260008084528781526003870190925292902090516112109290612a3b565b50600083815260058301602052604090819020805460ff19166001179055517fb326db0e54476c677e2b35b75856ac6f4d8bbfb0a6de6690582ebe4dabce0de790610e3c9086908690918252602082015260400190565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708585604051611298929190612d62565b604051809103902014156112ee5760405162461bcd60e51b815260206004820152601760248201527f76616c7565206d757374206265207375626d697474656400000000000000000060448201526064016108c4565b60008681526011602052604090208054841480611309575083155b6113555760405162461bcd60e51b815260206004820181905260248201527f6e6f6e6365206d757374206d617463682074696d657374616d7020696e64657860448201526064016108c4565b336000908152601260205260409020600754600182015410156113cc5760405162461bcd60e51b815260206004820152602960248201527f62616c616e6365206d7573742062652067726561746572207468616e207374616044820152681ad948185b5bdd5b9d60ba1b60648201526084016108c4565b60075481600101546113de9190612e1d565b6005546113ed906103e8612e3d565b6113f79190612e1d565b60048201546114069042612e5c565b611412906103e8612e3d565b116114715760405162461bcd60e51b815260206004820152602960248201527f7374696c6c20696e207265706f727465722074696d65206c6f636b2c20706c6560448201526861736520776169742160b81b60648201526084016108c4565b8383604051611481929190612d62565b604051809103902088146114e35760405162461bcd60e51b815260206004820152602360248201527f7175657279206964206d7573742062652068617368206f66207175657279206460448201526261746160e81b60648201526084016108c4565b4260048083018290556000918252830160205260409020546001600160a01b0316156115515760405162461bcd60e51b815260206004820152601e60248201527f74696d657374616d7020616c7265616479207265706f7274656420666f72000060448201526064016108c4565b8154426000818152600180860160209081526040808420869055918501875586835280832090940183905591815260028501835281812043905560038501909252902061159f908888612abf565b50426000818152600484016020526040812080546001600160a01b03191633179055600b54600d54919261012c926115d691612e5c565b6115e09190612e3d565b6115ea9190612e1d565b90506000600954600f546115fe9190612e05565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561164157600080fd5b505afa158015611655573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116799190612cf4565b6116839190612e5c565b90506000811180156116955750600082115b156117b2578181101561172c5760005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117269190612c1b565b506117b2565b60005460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561177857600080fd5b505af115801561178c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b09190612c1b565b505b42600d556005830180549060006117c883612eef565b909155505060008a815260098401602052604081208054916117e983612eef565b9190505550336001600160a01b0316428b7f48e9e2c732ba278de6ac88a3a57a5c5ba13d3d8370e709b3b98333a57876ca958c8c8c8c8c604051611831959493929190612db9565b60405180910390a450505050505050505050565b600080600e54670de0b6b3a7640000600f5461185f6127e4565b6118699190612e3d565b6118739190612e1d565b61187d9190612e5c565b90508060095461188d9190612e5c565b91505090565b33600090815260126020526040902060018101548211156118f65760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207374616b65642062616c616e6365000000000060448201526064016108c4565b61190a33838360010154610f859190612e5c565b428155600281018054839190600090611924908490612e05565b909155505060408051338152602081018490527f3d8d9df4bd0172df32e557fa48e96435cd7f2cac06aaffacfaee608e6f7898ef910160405180910390a15050565b60006060600080600061197987876109af565b91509150816119a357600060405180602001604052806000815250600094509450945050506119c2565b6119ad87826121c9565b92506119b98784611d7b565b93506001945050505b9250925092565b606060006119dc83610740426001612e05565b5092509050806119eb57600080fd5b50919050565b336000908152601260205260409020805462093a8090611a119042612e5c565b1015611a545760405162461bcd60e51b8152602060048201526012602482015271372064617973206469646e2774207061737360701b60448201526064016108c4565b6000816002015411611ab35760405162461bcd60e51b815260206004820152602260248201527f7265706f72746572206e6f74206c6f636b656420666f72207769746864726177604482015261185b60f21b60648201526084016108c4565b600054600282015460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015611b0557600080fd5b505af1158015611b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3d9190612c1b565b611b4657600080fd5b600060028201556040513381527f4a7934670bd8304e7da22378be1368f7c4fef17c5aee81804beda8638fe428ec9060200160405180910390a150565b6001600160a01b03811660009081526012602052604081206003810154670de0b6b3a7640000611bb16127e4565b8360010154611bc09190612e3d565b611bca9190612e1d565b611bd49190612e5c565b60015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b179052905192945060009283926001600160a01b031691611c1c91612d72565b6000604051808303816000865af19150503d8060008114611c59576040519150601f19603f3d011682016040523d82523d6000602084013e611c5e565b606091505b509150915060008215611c9157836006015482806020019051810190611c849190612cf4565b611c8e9190612e5c565b90505b8015611d72576001546040516001600160a01b0388811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b17905251611ce99190612d72565b6000604051808303816000865af19150503d8060008114611d26576040519150601f19603f3d011682016040523d82523d6000602084013e611d2b565b606091505b5090935091508215611d725780846007015483806020019051810190611d519190612cf4565b611d5b9190612e5c565b611d659087612e3d565b611d6f9190612e1d565b94505b50505050919050565b60008281526011602090815260408083208484526003019091529020805460609190611da690612eba565b80601f0160208091040260200160405190810160405280929190818152602001828054611dd290612eba565b8015611e1f5780601f10611df457610100808354040283529160200191611e1f565b820191906000526020600020905b815481529060010190602001808311611e0257829003601f168201915b5050505050905092915050565b6001546001600160a01b0316611e845760405162461bcd60e51b815260206004820152601a60248201527f676f7665726e616e63652061646472657373206e6f742073657400000000000060448201526064016108c4565b336000908152601260205260409020600181015460028201548015611f8357838110611ec95783836002016000828254611ebe9190612e5c565b90915550611f7e9050565b6000546001600160a01b03166323b872dd3330611ee68589612e5c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b158015611f3557600080fd5b505af1158015611f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6d9190612c1b565b611f7657600080fd5b600060028401555b612185565b816120f25760015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b179052905160009283926001600160a01b0390911691611fd09190612d72565b6000604051808303816000865af19150503d806000811461200d576040519150601f19603f3d011682016040523d82523d6000602084013e612012565b606091505b5091509150811561203757808060200190518101906120319190612cf4565b60068601555b6001546040513360248201526001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b179052516120879190612d72565b6000604051808303816000865af19150503d80600081146120c4576040519150601f19603f3d011682016040523d82523d6000602084013e6120c9565b606091505b50909250905081156120ef57808060200190518101906120e99190612cf4565b60078601555b50505b6000546040516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561214457600080fd5b505af1158015612158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217c9190612c1b565b61218557600080fd5b61219333610f858685612e05565b428355604051849033907fa96c2cce65119a2170d1711a6e82f18f2006448828483ba7545e59547654364790600090a350505050565b60008281526011602052604081208054839081106121f757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000600954600f5461221c9190612e05565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561225f57600080fd5b505afa158015612273573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122979190612cf4565b6122a19190612e5c565b905090565b6000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156122f857600080fd5b505af115801561230c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123309190612c1b565b61233957600080fd5b6123416128f8565b80600960008282546123539190612e05565b9250508190555062278d00600e54670de0b6b3a7640000600f5460035461237a9190612e3d565b6123849190612e1d565b61238e9190612e5c565b60095461239b9190612e5c565b6123a59190612e1d565b60065550565b6123b36128f8565b6001600160a01b03821660009081526012602052604090206001810154156126a15760008160030154670de0b6b3a764000060035484600101546123f79190612e3d565b6124019190612e1d565b61240b9190612e5c565b60015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b1790529051929350600092839283926001600160a01b03909116916124589190612d72565b6000604051808303816000865af19150503d8060008114612495576040519150601f19603f3d011682016040523d82523d6000602084013e61249a565b606091505b509150915081156124cb578460060154818060200190518101906124be9190612cf4565b6124c89190612e5c565b92505b82156125c1576001546040516001600160a01b0389811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b179052516125239190612d72565b6000604051808303816000865af19150503d8060008114612560576040519150601f19603f3d011682016040523d82523d6000602084013e612565565b606091505b50909250905081156125c1576000818060200190518101906125879190612cf4565b905060008487600701548361259c9190612e5c565b6125a69088612e3d565b6125b09190612e1d565b9050858110156125be578095505b50505b83600960008282546125d39190612e5c565b909155505060005460405163a9059cbb60e01b8152336004820152602481018690526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561262457600080fd5b505af1158015612638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265c9190612c1b565b61266557600080fd5b8460030154600e600082825461267b9190612e5c565b90915550506001850154600f8054600090612697908490612e5c565b9091555050505050505b6001810182905560075482106126e757600881015460ff166126d357601080549060006126cd83612eef565b91905055505b60088101805460ff1916600117905561272a565b600881015460ff161515600114801561270257506000601054115b1561271d576010805490600061271783612ea3565b91905055505b60088101805460ff191690555b670de0b6b3a764000060035482600101546127459190612e3d565b61274f9190612e1d565b60038201819055600e8054600090612768908490612e05565b90915550506001810154600f8054600090612784908490612e05565b90915550506006546127df5762278d00600e54670de0b6b3a7640000600f546003546127b09190612e3d565b6127ba9190612e1d565b6127c49190612e5c565b6009546127d19190612e5c565b6127db9190612e1d565b6006555b505050565b6000600f54600014156127fa575060035461085d565b6000600f54600654600c54426128109190612e5c565b61281a9190612e3d565b61282c90670de0b6b3a7640000612e3d565b6128369190612e1d565b6003546128439190612e05565b90506000600e54670de0b6b3a7640000600f54846128619190612e3d565b61286b9190612e1d565b6128759190612e5c565b905060095481106128f2576000600e54670de0b6b3a7640000600f5460035461289e9190612e3d565b6128a89190612e1d565b6128b29190612e5c565b6009546128bf9190612e5c565b600f549091506128d782670de0b6b3a7640000612e3d565b6128e19190612e1d565b6003546128ee9190612e05565b9250505b50905090565b42600c54141561290757612a39565b600f5415806129165750600654155b156129245742600c55612a39565b6000600f54600654600c544261293a9190612e5c565b6129449190612e3d565b61295690670de0b6b3a7640000612e3d565b6129609190612e1d565b60035461296d9190612e05565b90506000600e54670de0b6b3a7640000600f548461298b9190612e3d565b6129959190612e1d565b61299f9190612e5c565b90506009548110612a2c576000600e54670de0b6b3a7640000600f546003546129c89190612e3d565b6129d29190612e1d565b6129dc9190612e5c565b6009546129e99190612e5c565b600f54909150612a0182670de0b6b3a7640000612e3d565b612a0b9190612e1d565b60036000828254612a1c9190612e05565b9091555050600060065550612a32565b60038290555b505042600c555b565b828054612a4790612eba565b90600052602060002090601f016020900481019282612a695760008555612aaf565b82601f10612a8257805160ff1916838001178555612aaf565b82800160010185558215612aaf579182015b82811115612aaf578251825591602001919060010190612a94565b50612abb929150612b33565b5090565b828054612acb90612eba565b90600052602060002090601f016020900481019282612aed5760008555612aaf565b82601f10612b065782800160ff19823516178555612aaf565b82800160010185558215612aaf579182015b82811115612aaf578235825591602001919060010190612b18565b5b80821115612abb5760008155600101612b34565b80356001600160a01b0381168114610d1e57600080fd5b60008083601f840112612b70578182fd5b50813567ffffffffffffffff811115612b87578182fd5b602083019150836020828501011115610cfa57600080fd5b600060208284031215612bb0578081fd5b612bb982612b48565b9392505050565b60008060408385031215612bd2578081fd5b612bdb83612b48565b9150612be960208401612b48565b90509250929050565b60008060408385031215612c04578182fd5b612c0d83612b48565b946020939093013593505050565b600060208284031215612c2c578081fd5b81518015158114612bb9578182fd5b600060208284031215612c4c578081fd5b5035919050565b60008060008060008060808789031215612c6b578182fd5b86359550602087013567ffffffffffffffff80821115612c89578384fd5b612c958a838b01612b5f565b9097509550604089013594506060890135915080821115612cb4578384fd5b50612cc189828a01612b5f565b979a9699509497509295939492505050565b60008060408385031215612ce5578182fd5b50508035926020909101359150565b600060208284031215612d05578081fd5b5051919050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452612d4e816020860160208601612e73565b601f01601f19169290920160200192915050565b6000828483379101908152919050565b60008251612d84818460208701612e73565b9190910192915050565b6000841515825260606020830152612da96060830185612d36565b9050826040830152949350505050565b600060608252612dcd606083018789612d0c565b8560208401528281036040840152612de6818587612d0c565b98975050505050505050565b600060208252612bb96020830184612d36565b60008219821115612e1857612e18612f0a565b500190565b600082612e3857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e5757612e57612f0a565b500290565b600082821015612e6e57612e6e612f0a565b500390565b60005b83811015612e8e578181015183820152602001612e76565b83811115612e9d576000848401525b50505050565b600081612eb257612eb2612f0a565b506000190190565b600181811c90821680612ece57607f821691505b602082108114156119eb57634e487b7160e01b600052602260045260246000fd5b6000600019821415612f0357612f03612f0a565b5060010190565b634e487b7160e01b600052601160045260246000fdfea26469706673582212209d95aaed7f1b1d698fed7682b745f8355994ed2d75a18ce05998fb7ac4f2b64664736f6c6343000803003300000000000000000000000088df592f8eb5d7bd38bfef7deb0fbc02cf3778a0000000000000000000000000000000000000000000000000000000000000a8c000000000000000000000000000000000000000000000005150ae84a8cdf00000000000000000000000000000000000000000000000000000d02ab486cedc00000000000000000000000000000000000000000000000000056bc75e2d631000005c13cd9c97dbb98f2429c101a2a8150e6c7a0ddaff6124ee176a3a411067ded0
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061034c5760003560e01c8063733bdef0116101bd578063bed9d861116100f9578063ce5e11bf116100a2578063d9c51cd41161007c578063d9c51cd4146107ea578063e07c5486146107fd578063fc0c546a14610835578063fc735e99146108485761034c565b8063ce5e11bf146107c6578063cecb0647146107d9578063d75174e1146107e25761034c565b8063c0f95d52116100d3578063c0f95d5214610798578063c5958af9146107a0578063cb82cc8f146107b35761034c565b8063bed9d86114610774578063bf5745d61461077c578063c0d416b81461078f5761034c565b80638da5cb5b1161016657806396426d971161014057806396426d97146106fa5780639d9b16ed14610703578063a792765f14610732578063adf1639d146107545761034c565b80638da5cb5b146106af578063935408d0146106c257806394409a56146106f15761034c565b806383bb38771161019757806383bb38771461068a57806386989038146106935780638929f4c61461069c5761034c565b8063733bdef0146105b557806377b03e0d146106615780637b0a47ee146106815761034c565b806344e87f911161028c5780635eaa9ced116102355780636dd0a70f1161020f5780636dd0a70f1461058b5780636fd4f22914610593578063722580b61461059c57806373252494146105a45761034c565b80635eaa9ced1461056657806360c7dc47146105795780636b036f45146105825761034c565b806350005b831161026657806350005b83146105145780635aa6e675146105405780635b5edcfc146105535761034c565b806344e87f91146104b7578063460c33a2146104f95780634dfc2a34146105015761034c565b80632b6696a7116102f95780633321fc41116102d35780633321fc411461048a57806336d42195146104935780633878293e1461049c5780633a0ce342146104af5761034c565b80632b6696a71461040e5780632e206cd71461047957806331ed0db4146104825761034c565b806314c2a1bc1161032a57806314c2a1bc146103c757806319ab453c146103cf57806329449085146103e45761034c565b806304d932e21461035157806310fe9ae81461036d57806311938e081461038d575b600080fd5b61035a60095481565b6040519081526020015b60405180910390f35b610375610850565b6040516001600160a01b039091168152602001610364565b61035a61039b366004612bf2565b6001600160a01b0391909116600090815260126020908152604080832093835260099093019052205490565b600f5461035a565b6103e26103dd366004612b9f565b610860565b005b6103f76103f2366004612cd3565b6109af565b604080519215158352602083019190915201610364565b61045a61041c366004612cd3565b6000918252601160209081526040808420928452600483018252808420546005909301909152909120546001600160a01b039091169160ff90911690565b604080516001600160a01b039093168352901515602083015201610364565b61035a600c5481565b60105461035a565b61035a60055481565b61035a60035481565b61035a6104aa366004612b9f565b610d01565b6103e2610d23565b6104e96104c5366004612cd3565b60009182526011602090815260408084209284526005909201905290205460ff1690565b6040519015158152602001610364565b60055461035a565b61035a61050f366004612bc0565b610e4b565b61035a610522366004612b9f565b6001600160a01b031660009081526012602052604090206004015490565b600154610375906001600160a01b031681565b6103e2610561366004612cd3565b611093565b6103e2610574366004612c53565b611267565b61035a60075481565b61035a60045481565b61035a611845565b61035a600d5481565b60075461035a565b6001546001600160a01b0316610375565b61061b6105c3366004612b9f565b6001600160a01b0316600090815260126020526040902080546001820154600283015460038401546004850154600586015460068701546007880154600890980154969895979496939592949193909260ff90911690565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610364565b61035a61066f366004612c3b565b60009081526011602052604090205490565b61035a60065481565b61035a600e5481565b61035a60105481565b6103e26106aa366004612c3b565b611893565b600254610375906001600160a01b031681565b61035a6106d0366004612cd3565b60009182526011602090815260408084209284526002909201905290205490565b61035a600f5481565b61035a600b5481565b61035a610711366004612cd3565b60009182526011602090815260408084209284526001909201905290205490565b610745610740366004612cd3565b611966565b60405161036493929190612d8e565b610767610762366004612c3b565b6119c9565b6040516103649190612df2565b6103e26119f1565b61035a61078a366004612b9f565b611b83565b61035a60085481565b600d5461035a565b6107676107ae366004612cd3565b611d7b565b6103e26107c1366004612c3b565b611e2c565b61035a6107d4366004612cd3565b6121c9565b61035a600a5481565b61035a61220a565b6103e26107f8366004612c3b565b6122a6565b61037561080b366004612cd3565b6000918252601160209081526040808420928452600490920190529020546001600160a01b031690565b600054610375906001600160a01b031681565b61270f61035a565b6000546001600160a01b03165b90565b6002546001600160a01b031633146108cd5760405162461bcd60e51b815260206004820152602560248201527f6f6e6c79206f776e65722063616e2073657420676f7665726e616e6365206164604482015264647265737360d81b60648201526084015b60405180910390fd5b6001546001600160a01b0316156109265760405162461bcd60e51b815260206004820152601e60248201527f676f7665726e616e6365206164647265737320616c726561647920736574000060448201526064016108c4565b6001600160a01b03811661098d5760405162461bcd60e51b815260206004820152602860248201527f676f7665726e616e636520616464726573732063616e2774206265207a65726f604482015267206164647265737360c01b60648201526084016108c4565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526011602052604081205481908015610cf157600080806109d5600185612e5c565b905060006109e389846121c9565b90508781106109fd57600080965096505050505050610cfa565b610a0789836121c9565b905087811015610ab1575b600089815260116020908152604080832084845260050190915290205460ff168015610a3e5750600082115b15610a615781610a4d81612ea3565b925050610a5a89836121c9565b9050610a12565b81158015610a8b5750600089815260116020908152604080832084845260050190915290205460ff165b15610aa157600080965096505050505050610cfa565b50600195509350610cfa92505050565b826002610abe8285612e5c565b610ac89190612e1d565b610ad3906001612e05565b610add9190612e05565b9350610ae989856121c9565b905087811015610bf8576000610b048a6107d4876001612e05565b9050888110610be55760008a815260116020908152604080832085845260050190915290205460ff16610b435760018597509750505050505050610cfa565b60008a815260116020908152604080832085845260050190915290205460ff168015610b6f5750600085115b15610b925784610b7e81612ea3565b955050610b8b8a866121c9565b9150610b43565b84158015610bbc575060008a815260116020908152604080832085845260050190915290205460ff165b15610bd35760008097509750505050505050610cfa565b60018597509750505050505050610cfa565b610bf0856001612e05565b935050610cec565b6000610c098a6107d4600188612e5c565b905088811015610cdd5760008a815260116020908152604080832084845260050190915290205460ff16610c52576001610c438187612e5c565b97509750505050505050610cfa565b84610c5c81612ea3565b9550505b60008a815260116020908152604080832084845260050190915290205460ff168015610c8c5750600085115b15610caf5784610c9b81612ea3565b955050610ca88a866121c9565b9050610c60565b84158015610bbc575060008a815260116020908152604080832084845260050190915290205460ff16610bbc565b610ce8600186612e5c565b9250505b610ab1565b60008092509250505b9250929050565b6001600160a01b0381166000908152601260205260409020600501545b919050565b600080610d3a600a5461a8c0426107409190612e5c565b50915091508115610e4757600081806020019051810190610d5b9190612cf4565b9050662386f26fc100008110158015610d7d575069d3c21bcecceda100000081105b610dc95760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964207374616b696e6720746f6b656e207072696365000000000060448201526064016108c4565b600081600854670de0b6b3a7640000610de29190612e3d565b610dec9190612e1d565b9050600454811015610e0357600454600755610e09565b60078190555b7f1af37d6aaef3c5ef293c3c63d0ac302f60db7fde22eb9f5e96ebd56992832110600754604051610e3c91815260200190565b60405180910390a150505b5050565b6001546000906001600160a01b03163314610eb35760405162461bcd60e51b815260206004820152602260248201527f6f6e6c7920676f7665726e616e63652063616e20736c617368207265706f727460448201526132b960f11b60648201526084016108c4565b6001600160a01b0383166000908152601260205260408120600181015460028201549192909190610ee48284612e05565b11610f275760405162461bcd60e51b81526020600482015260136024820152727a65726f207374616b65722062616c616e636560681b60448201526064016108c4565b6007548110610f56576007549350600754836002016000828254610f4b9190612e5c565b90915550610fb59050565b600754610f638383612e05565b10610f96576007549350610f8a86610f7b8387612e5c565b610f859085612e5c565b6123ab565b60006002840155610fb5565b610fa08183612e05565b9350610fad8660006123ab565b600060028401555b60005460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb90604401602060405180830381600087803b15801561100357600080fd5b505af1158015611017573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103b9190612c1b565b61104457600080fd5b604080516001600160a01b038781168252602082018790528816917f4317784407a22e643706ef000f5c0eea399dea3632613786167ab71c9446e3ac910160405180910390a250505092915050565b6001546001600160a01b031633146110f75760405162461bcd60e51b815260206004820152602160248201527f63616c6c6572206d75737420626520676f7665726e616e6365206164647265736044820152607360f81b60648201526084016108c4565b6000828152601160209081526040808320848452600581019092529091205460ff16156111665760405162461bcd60e51b815260206004820152601660248201527f76616c756520616c72656164792064697370757465640000000000000000000060448201526064016108c4565b6000828152600182016020526040902054815482908290811061119957634e487b7160e01b600052603260045260246000fd5b906000526020600020015483146111e65760405162461bcd60e51b81526020600482015260116024820152700696e76616c69642074696d657374616d7607c1b60448201526064016108c4565b60408051602080820180845260008084528781526003870190925292902090516112109290612a3b565b50600083815260058301602052604090819020805460ff19166001179055517fb326db0e54476c677e2b35b75856ac6f4d8bbfb0a6de6690582ebe4dabce0de790610e3c9086908690918252602082015260400190565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708585604051611298929190612d62565b604051809103902014156112ee5760405162461bcd60e51b815260206004820152601760248201527f76616c7565206d757374206265207375626d697474656400000000000000000060448201526064016108c4565b60008681526011602052604090208054841480611309575083155b6113555760405162461bcd60e51b815260206004820181905260248201527f6e6f6e6365206d757374206d617463682074696d657374616d7020696e64657860448201526064016108c4565b336000908152601260205260409020600754600182015410156113cc5760405162461bcd60e51b815260206004820152602960248201527f62616c616e6365206d7573742062652067726561746572207468616e207374616044820152681ad948185b5bdd5b9d60ba1b60648201526084016108c4565b60075481600101546113de9190612e1d565b6005546113ed906103e8612e3d565b6113f79190612e1d565b60048201546114069042612e5c565b611412906103e8612e3d565b116114715760405162461bcd60e51b815260206004820152602960248201527f7374696c6c20696e207265706f727465722074696d65206c6f636b2c20706c6560448201526861736520776169742160b81b60648201526084016108c4565b8383604051611481929190612d62565b604051809103902088146114e35760405162461bcd60e51b815260206004820152602360248201527f7175657279206964206d7573742062652068617368206f66207175657279206460448201526261746160e81b60648201526084016108c4565b4260048083018290556000918252830160205260409020546001600160a01b0316156115515760405162461bcd60e51b815260206004820152601e60248201527f74696d657374616d7020616c7265616479207265706f7274656420666f72000060448201526064016108c4565b8154426000818152600180860160209081526040808420869055918501875586835280832090940183905591815260028501835281812043905560038501909252902061159f908888612abf565b50426000818152600484016020526040812080546001600160a01b03191633179055600b54600d54919261012c926115d691612e5c565b6115e09190612e3d565b6115ea9190612e1d565b90506000600954600f546115fe9190612e05565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561164157600080fd5b505afa158015611655573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116799190612cf4565b6116839190612e5c565b90506000811180156116955750600082115b156117b2578181101561172c5760005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b1580156116ee57600080fd5b505af1158015611702573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117269190612c1b565b506117b2565b60005460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561177857600080fd5b505af115801561178c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b09190612c1b565b505b42600d556005830180549060006117c883612eef565b909155505060008a815260098401602052604081208054916117e983612eef565b9190505550336001600160a01b0316428b7f48e9e2c732ba278de6ac88a3a57a5c5ba13d3d8370e709b3b98333a57876ca958c8c8c8c8c604051611831959493929190612db9565b60405180910390a450505050505050505050565b600080600e54670de0b6b3a7640000600f5461185f6127e4565b6118699190612e3d565b6118739190612e1d565b61187d9190612e5c565b90508060095461188d9190612e5c565b91505090565b33600090815260126020526040902060018101548211156118f65760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e74207374616b65642062616c616e6365000000000060448201526064016108c4565b61190a33838360010154610f859190612e5c565b428155600281018054839190600090611924908490612e05565b909155505060408051338152602081018490527f3d8d9df4bd0172df32e557fa48e96435cd7f2cac06aaffacfaee608e6f7898ef910160405180910390a15050565b60006060600080600061197987876109af565b91509150816119a357600060405180602001604052806000815250600094509450945050506119c2565b6119ad87826121c9565b92506119b98784611d7b565b93506001945050505b9250925092565b606060006119dc83610740426001612e05565b5092509050806119eb57600080fd5b50919050565b336000908152601260205260409020805462093a8090611a119042612e5c565b1015611a545760405162461bcd60e51b8152602060048201526012602482015271372064617973206469646e2774207061737360701b60448201526064016108c4565b6000816002015411611ab35760405162461bcd60e51b815260206004820152602260248201527f7265706f72746572206e6f74206c6f636b656420666f72207769746864726177604482015261185b60f21b60648201526084016108c4565b600054600282015460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015611b0557600080fd5b505af1158015611b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3d9190612c1b565b611b4657600080fd5b600060028201556040513381527f4a7934670bd8304e7da22378be1368f7c4fef17c5aee81804beda8638fe428ec9060200160405180910390a150565b6001600160a01b03811660009081526012602052604081206003810154670de0b6b3a7640000611bb16127e4565b8360010154611bc09190612e3d565b611bca9190612e1d565b611bd49190612e5c565b60015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b179052905192945060009283926001600160a01b031691611c1c91612d72565b6000604051808303816000865af19150503d8060008114611c59576040519150601f19603f3d011682016040523d82523d6000602084013e611c5e565b606091505b509150915060008215611c9157836006015482806020019051810190611c849190612cf4565b611c8e9190612e5c565b90505b8015611d72576001546040516001600160a01b0388811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b17905251611ce99190612d72565b6000604051808303816000865af19150503d8060008114611d26576040519150601f19603f3d011682016040523d82523d6000602084013e611d2b565b606091505b5090935091508215611d725780846007015483806020019051810190611d519190612cf4565b611d5b9190612e5c565b611d659087612e3d565b611d6f9190612e1d565b94505b50505050919050565b60008281526011602090815260408083208484526003019091529020805460609190611da690612eba565b80601f0160208091040260200160405190810160405280929190818152602001828054611dd290612eba565b8015611e1f5780601f10611df457610100808354040283529160200191611e1f565b820191906000526020600020905b815481529060010190602001808311611e0257829003601f168201915b5050505050905092915050565b6001546001600160a01b0316611e845760405162461bcd60e51b815260206004820152601a60248201527f676f7665726e616e63652061646472657373206e6f742073657400000000000060448201526064016108c4565b336000908152601260205260409020600181015460028201548015611f8357838110611ec95783836002016000828254611ebe9190612e5c565b90915550611f7e9050565b6000546001600160a01b03166323b872dd3330611ee68589612e5c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b158015611f3557600080fd5b505af1158015611f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6d9190612c1b565b611f7657600080fd5b600060028401555b612185565b816120f25760015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b179052905160009283926001600160a01b0390911691611fd09190612d72565b6000604051808303816000865af19150503d806000811461200d576040519150601f19603f3d011682016040523d82523d6000602084013e612012565b606091505b5091509150811561203757808060200190518101906120319190612cf4565b60068601555b6001546040513360248201526001600160a01b039091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b179052516120879190612d72565b6000604051808303816000865af19150503d80600081146120c4576040519150601f19603f3d011682016040523d82523d6000602084013e6120c9565b606091505b50909250905081156120ef57808060200190518101906120e99190612cf4565b60078601555b50505b6000546040516323b872dd60e01b8152336004820152306024820152604481018690526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561214457600080fd5b505af1158015612158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217c9190612c1b565b61218557600080fd5b61219333610f858685612e05565b428355604051849033907fa96c2cce65119a2170d1711a6e82f18f2006448828483ba7545e59547654364790600090a350505050565b60008281526011602052604081208054839081106121f757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000600954600f5461221c9190612e05565b6000546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561225f57600080fd5b505afa158015612273573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122979190612cf4565b6122a19190612e5c565b905090565b6000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156122f857600080fd5b505af115801561230c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123309190612c1b565b61233957600080fd5b6123416128f8565b80600960008282546123539190612e05565b9250508190555062278d00600e54670de0b6b3a7640000600f5460035461237a9190612e3d565b6123849190612e1d565b61238e9190612e5c565b60095461239b9190612e5c565b6123a59190612e1d565b60065550565b6123b36128f8565b6001600160a01b03821660009081526012602052604090206001810154156126a15760008160030154670de0b6b3a764000060035484600101546123f79190612e3d565b6124019190612e1d565b61240b9190612e5c565b60015460408051600481526024810182526020810180516001600160e01b03166339ecce1f60e21b1790529051929350600092839283926001600160a01b03909116916124589190612d72565b6000604051808303816000865af19150503d8060008114612495576040519150601f19603f3d011682016040523d82523d6000602084013e61249a565b606091505b509150915081156124cb578460060154818060200190518101906124be9190612cf4565b6124c89190612e5c565b92505b82156125c1576001546040516001600160a01b0389811660248301529091169060440160408051601f198184030181529181526020820180516001600160e01b03166317b8fb3b60e31b179052516125239190612d72565b6000604051808303816000865af19150503d8060008114612560576040519150601f19603f3d011682016040523d82523d6000602084013e612565565b606091505b50909250905081156125c1576000818060200190518101906125879190612cf4565b905060008487600701548361259c9190612e5c565b6125a69088612e3d565b6125b09190612e1d565b9050858110156125be578095505b50505b83600960008282546125d39190612e5c565b909155505060005460405163a9059cbb60e01b8152336004820152602481018690526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561262457600080fd5b505af1158015612638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061265c9190612c1b565b61266557600080fd5b8460030154600e600082825461267b9190612e5c565b90915550506001850154600f8054600090612697908490612e5c565b9091555050505050505b6001810182905560075482106126e757600881015460ff166126d357601080549060006126cd83612eef565b91905055505b60088101805460ff1916600117905561272a565b600881015460ff161515600114801561270257506000601054115b1561271d576010805490600061271783612ea3565b91905055505b60088101805460ff191690555b670de0b6b3a764000060035482600101546127459190612e3d565b61274f9190612e1d565b60038201819055600e8054600090612768908490612e05565b90915550506001810154600f8054600090612784908490612e05565b90915550506006546127df5762278d00600e54670de0b6b3a7640000600f546003546127b09190612e3d565b6127ba9190612e1d565b6127c49190612e5c565b6009546127d19190612e5c565b6127db9190612e1d565b6006555b505050565b6000600f54600014156127fa575060035461085d565b6000600f54600654600c54426128109190612e5c565b61281a9190612e3d565b61282c90670de0b6b3a7640000612e3d565b6128369190612e1d565b6003546128439190612e05565b90506000600e54670de0b6b3a7640000600f54846128619190612e3d565b61286b9190612e1d565b6128759190612e5c565b905060095481106128f2576000600e54670de0b6b3a7640000600f5460035461289e9190612e3d565b6128a89190612e1d565b6128b29190612e5c565b6009546128bf9190612e5c565b600f549091506128d782670de0b6b3a7640000612e3d565b6128e19190612e1d565b6003546128ee9190612e05565b9250505b50905090565b42600c54141561290757612a39565b600f5415806129165750600654155b156129245742600c55612a39565b6000600f54600654600c544261293a9190612e5c565b6129449190612e3d565b61295690670de0b6b3a7640000612e3d565b6129609190612e1d565b60035461296d9190612e05565b90506000600e54670de0b6b3a7640000600f548461298b9190612e3d565b6129959190612e1d565b61299f9190612e5c565b90506009548110612a2c576000600e54670de0b6b3a7640000600f546003546129c89190612e3d565b6129d29190612e1d565b6129dc9190612e5c565b6009546129e99190612e5c565b600f54909150612a0182670de0b6b3a7640000612e3d565b612a0b9190612e1d565b60036000828254612a1c9190612e05565b9091555050600060065550612a32565b60038290555b505042600c555b565b828054612a4790612eba565b90600052602060002090601f016020900481019282612a695760008555612aaf565b82601f10612a8257805160ff1916838001178555612aaf565b82800160010185558215612aaf579182015b82811115612aaf578251825591602001919060010190612a94565b50612abb929150612b33565b5090565b828054612acb90612eba565b90600052602060002090601f016020900481019282612aed5760008555612aaf565b82601f10612b065782800160ff19823516178555612aaf565b82800160010185558215612aaf579182015b82811115612aaf578235825591602001919060010190612b18565b5b80821115612abb5760008155600101612b34565b80356001600160a01b0381168114610d1e57600080fd5b60008083601f840112612b70578182fd5b50813567ffffffffffffffff811115612b87578182fd5b602083019150836020828501011115610cfa57600080fd5b600060208284031215612bb0578081fd5b612bb982612b48565b9392505050565b60008060408385031215612bd2578081fd5b612bdb83612b48565b9150612be960208401612b48565b90509250929050565b60008060408385031215612c04578182fd5b612c0d83612b48565b946020939093013593505050565b600060208284031215612c2c578081fd5b81518015158114612bb9578182fd5b600060208284031215612c4c578081fd5b5035919050565b60008060008060008060808789031215612c6b578182fd5b86359550602087013567ffffffffffffffff80821115612c89578384fd5b612c958a838b01612b5f565b9097509550604089013594506060890135915080821115612cb4578384fd5b50612cc189828a01612b5f565b979a9699509497509295939492505050565b60008060408385031215612ce5578182fd5b50508035926020909101359150565b600060208284031215612d05578081fd5b5051919050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452612d4e816020860160208601612e73565b601f01601f19169290920160200192915050565b6000828483379101908152919050565b60008251612d84818460208701612e73565b9190910192915050565b6000841515825260606020830152612da96060830185612d36565b9050826040830152949350505050565b600060608252612dcd606083018789612d0c565b8560208401528281036040840152612de6818587612d0c565b98975050505050505050565b600060208252612bb96020830184612d36565b60008219821115612e1857612e18612f0a565b500190565b600082612e3857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612e5757612e57612f0a565b500290565b600082821015612e6e57612e6e612f0a565b500390565b60005b83811015612e8e578181015183820152602001612e76565b83811115612e9d576000848401525b50505050565b600081612eb257612eb2612f0a565b506000190190565b600181811c90821680612ece57607f821691505b602082108114156119eb57634e487b7160e01b600052602260045260246000fd5b6000600019821415612f0357612f03612f0a565b5060010190565b634e487b7160e01b600052601160045260246000fdfea26469706673582212209d95aaed7f1b1d698fed7682b745f8355994ed2d75a18ce05998fb7ac4f2b64664736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000088df592f8eb5d7bd38bfef7deb0fbc02cf3778a0000000000000000000000000000000000000000000000000000000000000a8c000000000000000000000000000000000000000000000005150ae84a8cdf00000000000000000000000000000000000000000000000000000d02ab486cedc00000000000000000000000000000000000000000000000000056bc75e2d631000005c13cd9c97dbb98f2429c101a2a8150e6c7a0ddaff6124ee176a3a411067ded0
-----Decoded View---------------
Arg [0] : _token (address): 0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0
Arg [1] : _reportingLock (uint256): 43200
Arg [2] : _stakeAmountDollarTarget (uint256): 1500000000000000000000
Arg [3] : _stakingTokenPrice (uint256): 15000000000000000000
Arg [4] : _minimumStakeAmount (uint256): 100000000000000000000
Arg [5] : _stakingTokenPriceQueryId (bytes32): 0x5c13cd9c97dbb98f2429c101a2a8150e6c7a0ddaff6124ee176a3a411067ded0
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000088df592f8eb5d7bd38bfef7deb0fbc02cf3778a0
Arg [1] : 000000000000000000000000000000000000000000000000000000000000a8c0
Arg [2] : 00000000000000000000000000000000000000000000005150ae84a8cdf00000
Arg [3] : 000000000000000000000000000000000000000000000000d02ab486cedc0000
Arg [4] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [5] : 5c13cd9c97dbb98f2429c101a2a8150e6c7a0ddaff6124ee176a3a411067ded0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $68.17 | 395.024 | $26,928.79 |
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.