Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 104 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Owner Addres... | 46306266 | 479 days ago | IN | 0 POL | 0.0032195 | ||||
Set Manager Addr... | 46306263 | 479 days ago | IN | 0 POL | 0.0034205 | ||||
Set Owner Addres... | 46306260 | 479 days ago | IN | 0 POL | 0.0032159 | ||||
Set Manager Addr... | 46306256 | 479 days ago | IN | 0 POL | 0.0034169 | ||||
Set Owner Addres... | 46306254 | 479 days ago | IN | 0 POL | 0.0032111 | ||||
Set Manager Addr... | 46306250 | 479 days ago | IN | 0 POL | 0.0034121 | ||||
Set Owner Addres... | 46306247 | 479 days ago | IN | 0 POL | 0.0032231 | ||||
Set Manager Addr... | 46306245 | 479 days ago | IN | 0 POL | 0.0034241 | ||||
Set Owner Addres... | 46306241 | 479 days ago | IN | 0 POL | 0.0032111 | ||||
Set Manager Addr... | 46306238 | 479 days ago | IN | 0 POL | 0.0034121 | ||||
Set Owner Addres... | 46306234 | 479 days ago | IN | 0 POL | 0.0032051 | ||||
Set Manager Addr... | 46306231 | 479 days ago | IN | 0 POL | 0.0034061 | ||||
Set Owner Addres... | 46306228 | 479 days ago | IN | 0 POL | 0.0032135 | ||||
Set Manager Addr... | 46306224 | 479 days ago | IN | 0 POL | 0.0034145 | ||||
Set Owner Addres... | 46306220 | 479 days ago | IN | 0 POL | 0.0032111 | ||||
Set Manager Addr... | 46306217 | 479 days ago | IN | 0 POL | 0.0034121 | ||||
Set Owner Addres... | 46306214 | 479 days ago | IN | 0 POL | 0.0032099 | ||||
Set Manager Addr... | 46306211 | 479 days ago | IN | 0 POL | 0.0034109 | ||||
Set Owner Addres... | 46306209 | 479 days ago | IN | 0 POL | 0.0032219 | ||||
Set Manager Addr... | 46306205 | 479 days ago | IN | 0 POL | 0.0034229 | ||||
Set Owner Addres... | 46306203 | 479 days ago | IN | 0 POL | 0.0032111 | ||||
Set Manager Addr... | 46306200 | 479 days ago | IN | 0 POL | 0.0034121 | ||||
Set Owner Addres... | 46306196 | 479 days ago | IN | 0 POL | 0.0032255 | ||||
Set Manager Addr... | 46306193 | 479 days ago | IN | 0 POL | 0.0034265 | ||||
Set Owner Addres... | 46306191 | 479 days ago | IN | 0 POL | 0.0032291 |
Loading...
Loading
Contract Name:
DataSpecsRegistry
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 "usingtellor/contracts/UsingTellor.sol"; import "./interfaces/IERC20.sol"; /** @author Tellor Inc. @title DataSpecsRegistry @dev This is a registry for Tellor oracle data specifications. It allows users to register * a query type name and manage a data specs document by setting its IPFS hash. Registration * fees are paid in TRB and are calculated based on the current price of TRB in USD. */ contract DataSpecsRegistry is UsingTellor { IERC20 public token; // TRB token used for registration fee address public feeRecipient; // recipient of registration fees bytes32 public constant trbPriceQueryId = keccak256(abi.encode("SpotPrice", abi.encode("trb", "usd"))); // used for fee calculated uint256 public lastSavedTrbPrice = 15e18; // last saved price of TRB in USD uint256 public registrationPricePerYearUSD; // fee paid for 1 year spec registration in USD uint256 public registrationPricePerInifinityUSD; // fee paid for infinite time spec registration in USD (SHOULD THIS BE REMOVED?) mapping(string => Spec) public specs; // mapping (queryType string => Spec) string[] public allRegisteredQueryTypes; // record of every query type ever registered struct Spec { address owner; // sets the manager and owner addresses address manager; // sets the document hash and lock time string documentHash; // IPFS hash of data specs document (ex: ipfs://bafybeic6nwiuutq2fs3wq7qg5t5xcqghg6bnv65atis3aphjtatb26nc5u) uint256 expirationTime; // timestamp when spec registration expires bool registered; // registered at some point in time } // Events event DocumentHashUpdated(string _queryType, string _documentHash); event ManagerUpdated(string _queryType, address _manager); event NewRegistration(string _queryType, address _owner, uint256 _expirationTime); event OwnerUpdated(string _queryType, address _owner); event RegistrationExtended(string _queryType, uint256 _expirationTime); event TellorAddressUpdated(address _tellorAddress); // Functions /** * @dev Initializes system parameters * @param _token token address * @param _tellor oracle address * @param _feeRecipient address which receives all fees collected by this contract * @param _reservedOwner address which owns all reserved query types * @param _registrationPricePerYearUSD fee paid for 1 year spec registration in USD */ constructor( address _token, address payable _tellor, address _feeRecipient, address _reservedOwner, uint256 _registrationPricePerYearUSD ) UsingTellor(_tellor) { require( _token != address(0), "Token address cannot be zero" ); require(_tellor != address(0), "Tellor oracle address cannot be zero"); require( _feeRecipient != address(0), "Fee recipient address cannot be zero" ); token = IERC20(_token); feeRecipient = _feeRecipient; registrationPricePerYearUSD = _registrationPricePerYearUSD; registrationPricePerInifinityUSD = _registrationPricePerYearUSD * 20; string[37] memory _reservedQueries = [ "AmpleforthCustomSpotPrice", "AmpleforthUSPCE", "AutopayAddresses", "ChatGPTResponse", "ComboQuery", "CrossChainBalance", "Custom1", "Custom2", "Custom3", "CustomPrice", "DIVAProtocol", "DailyVolatility", "EVMCall", "EVMHeader", "EVMHeaderslist", "ExampleFantasyFootball", "ExampleNftCollectionStats", "FilecoinDealStatus", "HistoricalGasPrice", "InflationData", "LeagueDAO", "LegacyRequest", "LendingPairToxicity", "MimicryCollectionStat", "MimicryMacroMarketMashup", "MimicryNFTMarketIndex", "Morphware", "NumericApiResponse", "Snapshot", "SpotPrice", "StringQuery", "TWAP", "TellorKpr", "TellorOracleAddress", "TellorRNG", "TracerFinance", "TwitterContestV1" ]; for (uint256 _i = 0; _i < _reservedQueries.length; _i++) { Spec storage _spec = specs[_reservedQueries[_i]]; _spec.owner = _reservedOwner; _spec.manager = _reservedOwner; _spec.expirationTime = type(uint256).max; _spec.registered = true; allRegisteredQueryTypes.push(_reservedQueries[_i]); } } /** * @dev Extends an existing registration * @param _queryType query type string identifier * @param _amount amount of TRB to pay for extended registration, USD value determines length of extension */ function extendRegistration( string calldata _queryType, uint256 _amount ) public { Spec storage _spec = specs[_queryType]; require( _spec.expirationTime > block.timestamp, "Query type not registered" ); uint256 _amountInUSD = _getAmountInUSD(_amount); if (_amountInUSD >= registrationPricePerInifinityUSD) { _spec.expirationTime = type(uint256).max; } else { _spec.expirationTime += (_amountInUSD * 31536000) / registrationPricePerYearUSD; } require( token.transferFrom(msg.sender, feeRecipient, _amount), "Fee transfer failed" ); emit RegistrationExtended(_queryType, _spec.expirationTime); } /** * @dev Registers a new query type * @param _queryType query type string identifier * @param _amount amount of TRB to pay for registration, USD value determines length of registration * @notice a minimum of 1 year registration is required */ function register(string calldata _queryType, uint256 _amount) public { Spec storage _spec = specs[_queryType]; require( _spec.expirationTime < block.timestamp, "Query type registered" ); uint256 _amountInUSD = _getAmountInUSD(_amount); require( _amountInUSD >= registrationPricePerYearUSD, "Must register for at least one year" ); require( token.transferFrom(msg.sender, feeRecipient, _amount), "Fee transfer failed" ); if (_amountInUSD >= registrationPricePerInifinityUSD) { _spec.expirationTime = type(uint256).max; } else { _spec.expirationTime = block.timestamp + (_amountInUSD * 31536000) / registrationPricePerYearUSD; } _spec.owner = msg.sender; _spec.manager = msg.sender; if (!_spec.registered) { allRegisteredQueryTypes.push(_queryType); _spec.registered = true; } emit NewRegistration(_queryType, msg.sender, _spec.expirationTime); } /** * @dev Sets a document hash * @param _queryType query type string identifier * @param _documentHash data specs document hash (IPFS hash), ex: ipfs://Qm... */ function setDocumentHash( string calldata _queryType, string calldata _documentHash ) public { Spec storage _spec = specs[_queryType]; require( msg.sender == _spec.manager, "Only spec manager can set content record" ); require(block.timestamp < _spec.expirationTime, "Registration expired"); _spec.documentHash = _documentHash; emit DocumentHashUpdated(_queryType, _documentHash); } /** * @dev Sets a manager address * @param _queryType query type string identifier * @param _manager new manager address */ function setManagerAddress( string calldata _queryType, address _manager ) public { Spec storage _spec = specs[_queryType]; require( msg.sender == _spec.owner, "Only admin can change manager address" ); require(block.timestamp < _spec.expirationTime, "Registration expired"); _spec.manager = _manager; emit ManagerUpdated(_queryType, _manager); } /** * @dev Sets a new owner address * @param _queryType query type string identifier * @param _newOwner new owner address */ function setOwnerAddress( string calldata _queryType, address _newOwner ) public { Spec storage _spec = specs[_queryType]; require( msg.sender == _spec.owner, "Only owner can change owner address" ); require(block.timestamp < _spec.expirationTime, "Registration expired"); _spec.owner = _newOwner; emit OwnerUpdated(_queryType, _newOwner); } // Getters /** * @dev Returns an array of all registered query type name strings * @return string[] array of all registered query type name strings * @notice this function returns all registered query types, including expired ones */ function getAllRegisteredQueryTypes() external view returns (string[] memory) { return allRegisteredQueryTypes; } /** * @dev Returns the registration cost per year in TRB * @return uint256 cost per year in TRB */ function getCostPerYearInTRB() external view returns (uint256) { ( bytes memory _trbPriceBytes, uint256 _timestampRetrieved ) = getDataBefore(trbPriceQueryId, block.timestamp - 12 hours); uint256 _trbPrice; if (_timestampRetrieved > 0) { _trbPrice = abi.decode(_trbPriceBytes, (uint256)); } else { _trbPrice = lastSavedTrbPrice; } return (registrationPricePerYearUSD * 1e18) / _trbPrice; } /** * @dev Returns the query type name by index * @param _index index in allRegisteredQueryTypes array * @return string query type name */ function getRegisteredQueryTypeByIndex( uint256 _index ) external view returns (string memory) { return allRegisteredQueryTypes[_index]; } /** * @dev Returns the number of unique query type names ever registered * @return uint256 number of registered query types */ function getRegisteredQueryTypeCount() external view returns (uint256) { return allRegisteredQueryTypes.length; } /** * @dev Returns the registration info for a given query type * @param _queryType query type string identifier * @return Spec struct */ function getRegistration( string calldata _queryType ) external view returns (Spec memory) { return specs[_queryType]; } // Internal functions /** * @dev Returns the USD value of a given amount of TRB * @param _amount amount of TRB * @return uint256 USD value of TRB */ function _getAmountInUSD(uint256 _amount) internal returns (uint256) { ( bytes memory _trbPriceBytes, uint256 _timestampRetrieved ) = getDataBefore(trbPriceQueryId, block.timestamp - 12 hours); uint256 _amountInUsd; if (_timestampRetrieved > 0) { uint256 _trbPrice = abi.decode(_trbPriceBytes, (uint256)); _amountInUsd = (_amount * _trbPrice) / 1e18; lastSavedTrbPrice = _trbPrice; } else { _amountInUsd = (_amount * lastSavedTrbPrice) / 1e18; } return _amountInUsd; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; interface IERC20 { function transfer(address _to, uint256 _amount) external returns(bool); function transferFrom(address _from, address _to, uint256 _amount) external returns(bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; /** * @dev EIP2362 Interface for pull oracles * https://github.com/tellor-io/EIP-2362 */ interface IERC2362 { /** * @dev Exposed function pertaining to EIP standards * @param _id bytes32 ID of the query * @return int,uint,uint returns the value, timestamp, and status code of query */ function valueFor(bytes32 _id) external view returns(int256,uint256,uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IMappingContract{ function getTellorID(bytes32 _id) external view returns(bytes32); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface ITellor { //Controller function addresses(bytes32) external view returns (address); function uints(bytes32) external view returns (uint256); function burn(uint256 _amount) external; function changeDeity(address _newDeity) external; function changeOwner(address _newOwner) external; function changeUint(bytes32 _target, uint256 _amount) external; function migrate() external; function mint(address _reciever, uint256 _amount) external; function init() external; function getAllDisputeVars(uint256 _disputeId) external view returns ( bytes32, bool, bool, bool, address, address, address, uint256[9] memory, int256 ); function getDisputeIdByDisputeHash(bytes32 _hash) external view returns (uint256); function getDisputeUintVars(uint256 _disputeId, bytes32 _data) external view returns (uint256); function getLastNewValueById(uint256 _requestId) external view returns (uint256, bool); function retrieveData(uint256 _requestId, uint256 _timestamp) external view returns (uint256); function getNewValueCountbyRequestId(uint256 _requestId) external view returns (uint256); function getAddressVars(bytes32 _data) external view returns (address); function getUintVar(bytes32 _data) external view returns (uint256); function totalSupply() external view returns (uint256); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function isMigrated(address _addy) external view returns (bool); function allowance(address _user, address _spender) external view returns (uint256); function allowedToTrade(address _user, uint256 _amount) external view returns (bool); function approve(address _spender, uint256 _amount) external returns (bool); function approveAndTransferFrom( address _from, address _to, uint256 _amount ) external returns (bool); function balanceOf(address _user) external view returns (uint256); function balanceOfAt(address _user, uint256 _blockNumber) external view returns (uint256); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom( address _from, address _to, uint256 _amount ) external returns (bool success); function depositStake() external; function requestStakingWithdraw() external; function withdrawStake() external; function changeStakingStatus(address _reporter, uint256 _status) external; function slashReporter(address _reporter, address _disputer) external; function getStakerInfo(address _staker) external view returns (uint256, uint256); function getTimestampbyRequestIDandIndex(uint256 _requestId, uint256 _index) external view returns (uint256); function getNewCurrentVariables() external view returns ( bytes32 _c, uint256[5] memory _r, uint256 _d, uint256 _t ); function getNewValueCountbyQueryId(bytes32 _queryId) external view returns (uint256); function getTimestampbyQueryIdandIndex(bytes32 _queryId, uint256 _index) external view returns (uint256); function retrieveData(bytes32 _queryId, uint256 _timestamp) external view returns (bytes memory); //Governance enum VoteResult { FAILED, PASSED, INVALID } function setApprovedFunction(bytes4 _func, bool _val) external; function beginDispute(bytes32 _queryId, uint256 _timestamp) external; function delegate(address _delegate) external; function delegateOfAt(address _user, uint256 _blockNumber) external view returns (address); function executeVote(uint256 _disputeId) external; function proposeVote( address _contract, bytes4 _function, bytes calldata _data, uint256 _timestamp ) external; function tallyVotes(uint256 _disputeId) external; function governance() external view returns (address); function updateMinDisputeFee() external; function verify() external pure returns (uint256); function vote( uint256 _disputeId, bool _supports, bool _invalidQuery ) external; function voteFor( address[] calldata _addys, uint256 _disputeId, bool _supports, bool _invalidQuery ) external; function getDelegateInfo(address _holder) external view returns (address, uint256); function isFunctionApproved(bytes4 _func) external view returns (bool); function isApprovedGovernanceContract(address _contract) external returns (bool); function getVoteRounds(bytes32 _hash) external view returns (uint256[] memory); function getVoteCount() external view returns (uint256); function getVoteInfo(uint256 _disputeId) external view returns ( bytes32, uint256[9] memory, bool[2] memory, VoteResult, bytes memory, bytes4, address[2] memory ); function getDisputeInfo(uint256 _disputeId) external view returns ( uint256, uint256, bytes memory, address ); function getOpenDisputesOnId(bytes32 _queryId) external view returns (uint256); function didVote(uint256 _disputeId, address _voter) external view returns (bool); //Oracle function getReportTimestampByIndex(bytes32 _queryId, uint256 _index) external view returns (uint256); function getValueByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (bytes memory); function getBlockNumberByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (uint256); function getReportingLock() external view returns (uint256); function getReporterByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns (address); function reportingLock() external view returns (uint256); function removeValue(bytes32 _queryId, uint256 _timestamp) external; function getTipsByUser(address _user) external view returns(uint256); function tipQuery(bytes32 _queryId, uint256 _tip, bytes memory _queryData) external; function submitValue(bytes32 _queryId, bytes calldata _value, uint256 _nonce, bytes memory _queryData) external; function burnTips() external; function changeReportingLock(uint256 _newReportingLock) external; function getReportsSubmittedByAddress(address _reporter) external view returns(uint256); function changeTimeBasedReward(uint256 _newTimeBasedReward) external; function getReporterLastTimestamp(address _reporter) external view returns(uint256); function getTipsById(bytes32 _queryId) external view returns(uint256); function getTimeBasedReward() external view returns(uint256); function getTimestampCountById(bytes32 _queryId) external view returns(uint256); function getTimestampIndexByTimestamp(bytes32 _queryId, uint256 _timestamp) external view returns(uint256); function getCurrentReward(bytes32 _queryId) external view returns(uint256, uint256); function getCurrentValue(bytes32 _queryId) external view returns(bytes memory); function getDataBefore(bytes32 _queryId, uint256 _timestamp) external view returns(bool _ifRetrieve, bytes memory _value, uint256 _timestampRetrieved); function getTimeOfLastNewValue() external view returns(uint256); function depositStake(uint256 _amount) external; function requestStakingWithdraw(uint256 _amount) external; //Test functions function changeAddressVar(bytes32 _id, address _addy) external; //parachute functions function killContract() external; function migrateFor(address _destination, uint256 _amount) external; function rescue51PercentAttack(address _tokenHolder) external; function rescueBrokenDataReporting() external; function rescueFailedUpdate() external; //Tellor 360 function addStakingRewards(uint256 _amount) external; function _sliceUint(bytes memory _b) external pure returns (uint256 _number); function claimOneTimeTip(bytes32 _queryId, uint256[] memory _timestamps) external; function claimTip( bytes32 _feedId, bytes32 _queryId, uint256[] memory _timestamps ) external; function fee() external view returns (uint256); function feedsWithFunding(uint256) external view returns (bytes32); function fundFeed( bytes32 _feedId, bytes32 _queryId, uint256 _amount ) external; function getCurrentFeeds(bytes32 _queryId) external view returns (bytes32[] memory); function getCurrentTip(bytes32 _queryId) external view returns (uint256); function getDataAfter(bytes32 _queryId, uint256 _timestamp) external view returns (bytes memory _value, uint256 _timestampRetrieved); function getDataFeed(bytes32 _feedId) external view returns (Autopay.FeedDetails memory); function getFundedFeeds() external view returns (bytes32[] memory); function getFundedQueryIds() external view returns (bytes32[] memory); function getIndexForDataAfter(bytes32 _queryId, uint256 _timestamp) external view returns (bool _found, uint256 _index); function getIndexForDataBefore(bytes32 _queryId, uint256 _timestamp) external view returns (bool _found, uint256 _index); function getMultipleValuesBefore( bytes32 _queryId, uint256 _timestamp, uint256 _maxAge, uint256 _maxCount ) external view returns (uint256[] memory _values, uint256[] memory _timestamps); function getPastTipByIndex(bytes32 _queryId, uint256 _index) external view returns (Autopay.Tip memory); function getPastTipCount(bytes32 _queryId) external view returns (uint256); function getPastTips(bytes32 _queryId) external view returns (Autopay.Tip[] memory); function getQueryIdFromFeedId(bytes32 _feedId) external view returns (bytes32); function getRewardAmount( bytes32 _feedId, bytes32 _queryId, uint256[] memory _timestamps ) external view returns (uint256 _cumulativeReward); function getRewardClaimedStatus( bytes32 _feedId, bytes32 _queryId, uint256 _timestamp ) external view returns (bool); function getTipsByAddress(address _user) external view returns (uint256); function isInDispute(bytes32 _queryId, uint256 _timestamp) external view returns (bool); function queryIdFromDataFeedId(bytes32) external view returns (bytes32); function queryIdsWithFunding(uint256) external view returns (bytes32); function queryIdsWithFundingIndex(bytes32) external view returns (uint256); function setupDataFeed( bytes32 _queryId, uint256 _reward, uint256 _startTime, uint256 _interval, uint256 _window, uint256 _priceThreshold, uint256 _rewardIncreasePerSecond, bytes memory _queryData, uint256 _amount ) external; function tellor() external view returns (address); function tip( bytes32 _queryId, uint256 _amount, bytes memory _queryData ) external; function tips(bytes32, uint256) external view returns (uint256 amount, uint256 timestamp); function token() external view returns (address); function userTipsTotal(address) external view returns (uint256); function valueFor(bytes32 _id) external view returns ( int256 _value, uint256 _timestamp, uint256 _statusCode ); } interface Autopay { struct FeedDetails { uint256 reward; uint256 balance; uint256 startTime; uint256 interval; uint256 window; uint256 priceThreshold; uint256 rewardIncreasePerSecond; uint256 feedsWithFundingIndex; } struct Tip { uint256 amount; uint256 timestamp; } function getStakeAmount() external view returns(uint256); function stakeAmount() external view returns(uint256); function token() external view returns(address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "./interface/ITellor.sol"; import "./interface/IERC2362.sol"; import "./interface/IMappingContract.sol"; /** @author Tellor Inc @title UsingTellor @dev This contract helps smart contracts read data from Tellor */ contract UsingTellor is IERC2362 { ITellor public tellor; IMappingContract public idMappingContract; /*Constructor*/ /** * @dev the constructor sets the oracle address in storage * @param _tellor is the Tellor Oracle address */ constructor(address payable _tellor) { tellor = ITellor(_tellor); } /*Getters*/ /** * @dev Retrieves the next value for the queryId after the specified timestamp * @param _queryId is the queryId to look up the value for * @param _timestamp after which to search for next value * @return _value the value retrieved * @return _timestampRetrieved the value's timestamp */ function getDataAfter(bytes32 _queryId, uint256 _timestamp) public view returns (bytes memory _value, uint256 _timestampRetrieved) { (bool _found, uint256 _index) = getIndexForDataAfter( _queryId, _timestamp ); if (!_found) { return ("", 0); } _timestampRetrieved = getTimestampbyQueryIdandIndex(_queryId, _index); _value = retrieveData(_queryId, _timestampRetrieved); return (_value, _timestampRetrieved); } /** * @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 _value the value retrieved * @return _timestampRetrieved the value's timestamp */ function getDataBefore(bytes32 _queryId, uint256 _timestamp) public view returns (bytes memory _value, uint256 _timestampRetrieved) { (, _value, _timestampRetrieved) = tellor.getDataBefore( _queryId, _timestamp ); } /** * @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 getIndexForDataAfter(bytes32 _queryId, uint256 _timestamp) public view returns (bool _found, uint256 _index) { uint256 _count = getNewValueCountbyQueryId(_queryId); if (_count == 0) return (false, 0); _count--; bool _search = true; // perform binary search uint256 _middle = 0; uint256 _start = 0; uint256 _end = _count; uint256 _timestampRetrieved; // checking boundaries to short-circuit the algorithm _timestampRetrieved = getTimestampbyQueryIdandIndex(_queryId, _end); if (_timestampRetrieved <= _timestamp) return (false, 0); _timestampRetrieved = getTimestampbyQueryIdandIndex(_queryId, _start); if (_timestampRetrieved > _timestamp) { // candidate found, check for disputes _search = false; } // since the value is within our boundaries, do a binary search while (_search) { _middle = (_end + _start) / 2; _timestampRetrieved = getTimestampbyQueryIdandIndex( _queryId, _middle ); if (_timestampRetrieved > _timestamp) { // get immediate previous value uint256 _prevTime = getTimestampbyQueryIdandIndex( _queryId, _middle - 1 ); if (_prevTime <= _timestamp) { // candidate found, check for disputes _search = false; } else { // look from start to middle -1(prev value) _end = _middle - 1; } } else { // get immediate next value uint256 _nextTime = getTimestampbyQueryIdandIndex( _queryId, _middle + 1 ); if (_nextTime > _timestamp) { // candidate found, check for disputes _search = false; _middle++; _timestampRetrieved = _nextTime; } else { // look from middle + 1(next value) to end _start = _middle + 1; } } } // candidate found, check for disputed values if (!isInDispute(_queryId, _timestampRetrieved)) { // _timestampRetrieved is correct return (true, _middle); } else { // iterate forward until we find a non-disputed value while ( isInDispute(_queryId, _timestampRetrieved) && _middle < _count ) { _middle++; _timestampRetrieved = getTimestampbyQueryIdandIndex( _queryId, _middle ); } if ( _middle == _count && isInDispute(_queryId, _timestampRetrieved) ) { return (false, 0); } // _timestampRetrieved is correct return (true, _middle); } } /** * @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) { return tellor.getIndexForDataBefore(_queryId, _timestamp); } /** * @dev Retrieves multiple uint256 values before the specified timestamp * @param _queryId the unique id of the data query * @param _timestamp the timestamp before which to search for values * @param _maxAge the maximum number of seconds before the _timestamp to search for values * @param _maxCount the maximum number of values to return * @return _values the values retrieved, ordered from oldest to newest * @return _timestamps the timestamps of the values retrieved */ function getMultipleValuesBefore( bytes32 _queryId, uint256 _timestamp, uint256 _maxAge, uint256 _maxCount ) public view returns (bytes[] memory _values, uint256[] memory _timestamps) { // get index of first possible value (bool _ifRetrieve, uint256 _startIndex) = getIndexForDataAfter( _queryId, _timestamp - _maxAge ); // no value within range if (!_ifRetrieve) { return (new bytes[](0), new uint256[](0)); } uint256 _endIndex; // get index of last possible value (_ifRetrieve, _endIndex) = getIndexForDataBefore(_queryId, _timestamp); // no value before _timestamp if (!_ifRetrieve) { return (new bytes[](0), new uint256[](0)); } uint256 _valCount = 0; uint256 _index = 0; uint256[] memory _timestampsArrayTemp = new uint256[](_maxCount); // generate array of non-disputed timestamps within range while (_valCount < _maxCount && _endIndex + 1 - _index > _startIndex) { uint256 _timestampRetrieved = getTimestampbyQueryIdandIndex( _queryId, _endIndex - _index ); if (!isInDispute(_queryId, _timestampRetrieved)) { _timestampsArrayTemp[_valCount] = _timestampRetrieved; _valCount++; } _index++; } bytes[] memory _valuesArray = new bytes[](_valCount); uint256[] memory _timestampsArray = new uint256[](_valCount); // retrieve values and reverse timestamps order for (uint256 _i = 0; _i < _valCount; _i++) { _timestampsArray[_i] = _timestampsArrayTemp[_valCount - 1 - _i]; _valuesArray[_i] = retrieveData(_queryId, _timestampsArray[_i]); } return (_valuesArray, _timestampsArray); } /** * @dev Counts the number of values that have been submitted for the queryId * @param _queryId the id to look up * @return uint256 count of the number of values received for the queryId */ function getNewValueCountbyQueryId(bytes32 _queryId) public view returns (uint256) { return tellor.getNewValueCountbyQueryId(_queryId); } /** * @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) public view returns (address) { return tellor.getReporterByTimestamp(_queryId, _timestamp); } /** * @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 tellor.getTimestampbyQueryIdandIndex(_queryId, _index); } /** * @dev Determines whether a value with a given queryId and timestamp has been disputed * @param _queryId is the value id to look up * @param _timestamp is the timestamp of the value to look up * @return bool true if queryId/timestamp is under dispute */ function isInDispute(bytes32 _queryId, uint256 _timestamp) public view returns (bool) { return tellor.isInDispute(_queryId, _timestamp); } /** * @dev Retrieve value from oracle based on queryId/timestamp * @param _queryId being requested * @param _timestamp to retrieve data/value from * @return bytes value for query/timestamp submitted */ function retrieveData(bytes32 _queryId, uint256 _timestamp) public view returns (bytes memory) { return tellor.retrieveData(_queryId, _timestamp); } /** * @dev allows dev to set mapping contract for valueFor (EIP2362) * @param _addy address of mapping contract */ function setIdMappingContract(address _addy) external { require(address(idMappingContract) == address(0)); idMappingContract = IMappingContract(_addy); } /** * @dev Retrieve most recent int256 value from oracle based on queryId * @param _id being requested * @return _value most recent value submitted * @return _timestamp timestamp of most recent value * @return _statusCode 200 if value found, 404 if not found */ function valueFor(bytes32 _id) external view override returns ( int256 _value, uint256 _timestamp, uint256 _statusCode ) { bytes32 _queryId = idMappingContract.getTellorID(_id); bytes memory _valueBytes; (_valueBytes, _timestamp) = getDataBefore( _queryId, block.timestamp + 1 ); if (_timestamp == 0) { return (0, 0, 404); } uint256 _valueUint = _sliceUint(_valueBytes); _value = int256(_valueUint); return (_value, _timestamp, 200); } // Internal functions /** * @dev Convert bytes to uint256 * @param _b bytes value to convert to uint256 * @return _number uint256 converted from bytes */ function _sliceUint(bytes memory _b) internal pure returns (uint256 _number) { for (uint256 _i = 0; _i < _b.length; _i++) { _number = _number * 256 + uint8(_b[_i]); } } }
{ "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":"address payable","name":"_tellor","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"_reservedOwner","type":"address"},{"internalType":"uint256","name":"_registrationPricePerYearUSD","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_queryType","type":"string"},{"indexed":false,"internalType":"string","name":"_documentHash","type":"string"}],"name":"DocumentHashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_queryType","type":"string"},{"indexed":false,"internalType":"address","name":"_manager","type":"address"}],"name":"ManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_queryType","type":"string"},{"indexed":false,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_expirationTime","type":"uint256"}],"name":"NewRegistration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_queryType","type":"string"},{"indexed":false,"internalType":"address","name":"_owner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_queryType","type":"string"},{"indexed":false,"internalType":"uint256","name":"_expirationTime","type":"uint256"}],"name":"RegistrationExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_tellorAddress","type":"address"}],"name":"TellorAddressUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allRegisteredQueryTypes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_queryType","type":"string"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"extendRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRegisteredQueryTypes","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCostPerYearInTRB","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getDataAfter","outputs":[{"internalType":"bytes","name":"_value","type":"bytes"},{"internalType":"uint256","name":"_timestampRetrieved","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getDataBefore","outputs":[{"internalType":"bytes","name":"_value","type":"bytes"},{"internalType":"uint256","name":"_timestampRetrieved","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_queryId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getIndexForDataAfter","outputs":[{"internalType":"bool","name":"_found","type":"bool"},{"internalType":"uint256","name":"_index","type":"uint256"}],"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"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"uint256","name":"_maxAge","type":"uint256"},{"internalType":"uint256","name":"_maxCount","type":"uint256"}],"name":"getMultipleValuesBefore","outputs":[{"internalType":"bytes[]","name":"_values","type":"bytes[]"},{"internalType":"uint256[]","name":"_timestamps","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":"uint256","name":"_index","type":"uint256"}],"name":"getRegisteredQueryTypeByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredQueryTypeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_queryType","type":"string"}],"name":"getRegistration","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"string","name":"documentHash","type":"string"},{"internalType":"uint256","name":"expirationTime","type":"uint256"},{"internalType":"bool","name":"registered","type":"bool"}],"internalType":"struct DataSpecsRegistry.Spec","name":"","type":"tuple"}],"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":"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":"idMappingContract","outputs":[{"internalType":"contract IMappingContract","name":"","type":"address"}],"stateMutability":"view","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":"lastSavedTrbPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_queryType","type":"string"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registrationPricePerInifinityUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registrationPricePerYearUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"string","name":"_queryType","type":"string"},{"internalType":"string","name":"_documentHash","type":"string"}],"name":"setDocumentHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addy","type":"address"}],"name":"setIdMappingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_queryType","type":"string"},{"internalType":"address","name":"_manager","type":"address"}],"name":"setManagerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_queryType","type":"string"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwnerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"specs","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"string","name":"documentHash","type":"string"},{"internalType":"uint256","name":"expirationTime","type":"uint256"},{"internalType":"bool","name":"registered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tellor","outputs":[{"internalType":"contract ITellor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trbPriceQueryId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"valueFor","outputs":[{"internalType":"int256","name":"_value","type":"int256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"uint256","name":"_statusCode","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405267d02ab486cedc00006004553480156200001d57600080fd5b50604051620031bc380380620031bc83398101604081905262000040916200097b565b600080546001600160a01b0319166001600160a01b03868116919091179091558516620000b45760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f0000000060448201526064015b60405180910390fd5b6001600160a01b038416620001185760405162461bcd60e51b8152602060048201526024808201527f54656c6c6f72206f7261636c6520616464726573732063616e6e6f74206265206044820152637a65726f60e01b6064820152608401620000ab565b6001600160a01b0383166200017c5760405162461bcd60e51b8152602060048201526024808201527f46656520726563697069656e7420616464726573732063616e6e6f74206265206044820152637a65726f60e01b6064820152608401620000ab565b600280546001600160a01b038088166001600160a01b03199283161790925560038054928616929091169190911790556005819055620001be81601462000a2a565b600655604080516104e08101825260196104a082018181527f416d706c65666f727468437573746f6d53706f745072696365000000000000006104c0840152825282518084018452600f8082526e416d706c65666f727468555350434560881b602083810191909152808501929092528451808601865260108082526f4175746f70617941646472657373657360801b8285015285870191909152855180870187528281526e43686174475054526573706f6e736560881b81850152606086015285518087018752600a815269436f6d626f517565727960b01b81850152608086015285518087018752601181527043726f7373436861696e42616c616e636560781b8185015260a086015285518087018752600780825266437573746f6d3160c81b8286015260c0870191909152865180880188528181526621bab9ba37b69960c91b8186015260e08701528651808801885281815266437573746f6d3360c81b8186015261010087015286518088018852600b8082526a437573746f6d507269636560a81b8287015261012088019190915287518089018952600c81526b11125590541c9bdd1bd8dbdb60a21b81870152610140880152875180890189529384526e4461696c79566f6c6174696c69747960881b84860152610160870193909352865180880188529081526611559350d85b1b60ca1b818501526101808601528551808701875260098082526822ab26a432b0b232b960b91b828601526101a087019190915286518088018852600e81526d11559352195859195c9cdb1a5cdd60921b818601526101c087015286518088018852601681527f4578616d706c6546616e74617379466f6f7462616c6c00000000000000000000818601526101e0870152865180880188529485527f4578616d706c654e6674436f6c6c656374696f6e537461747300000000000000858501526102008601949094528551808701875260128082527146696c65636f696e4465616c53746174757360701b828601526102208701919091528651808801885281815271486973746f726963616c476173507269636560701b8186015261024087015286518088018852600d8082526c496e666c6174696f6e4461746160981b8287015261026088019190915287518089018952868152684c656167756544414f60b81b81870152610280880152875180890189528181526c131959d858de54995c5d595cdd609a1b818701526102a08801528751808901895260138082527f4c656e64696e6750616972546f78696369747900000000000000000000000000828801526102c08901919091528851808a018a5260158082527f4d696d69637279436f6c6c656374696f6e537461740000000000000000000000828901526102e08a01919091528951808b018b52601881527f4d696d696372794d6163726f4d61726b65744d61736875700000000000000000818901526103008a01528951808b018b529081527f4d696d696372794e46544d61726b6574496e6465780000000000000000000000818801526103208901528851808a018a52878152684d6f7270687761726560b81b818801526103408901528851808a018a52928352714e756d65726963417069526573706f6e736560701b8387015261036088019290925287518089018952600881526714db985c1cda1bdd60c21b81870152610380880152875180890189528681526853706f74507269636560b81b818701526103a0880152875180890189529384526a537472696e67517565727960a81b848601526103c08701939093528651808801885260048152630545741560e41b818601526103e087015286518088018852858152682a32b63637b925b83960b91b81860152610400870152865180880188529081527f54656c6c6f724f7261636c65416464726573730000000000000000000000000081850152610420860152855180870187529384526854656c6c6f72524e4760b81b84840152610440850193909352845180860186529081526c54726163657246696e616e636560981b8183015261046084015283518085019094529083526f54776974746572436f6e74657374563160801b9083015261048081019190915260005b6025811015620008c85760006007838360258110620007f357634e487b7160e01b600052603260045260246000fd5b6020020151604051620008079190620009ee565b90815260405190819003602001902080546001600160a01b0387166001600160a01b03199182168117835560018084018054909316909117909155600019600383015560048201805460ff19169091179055905060088383602581106200087e57634e487b7160e01b600052603260045260246000fd5b6020908102919091015182546001810184556000938452928290208151620008b09491909101929190910190620008d5565b50508080620008bf9062000a89565b915050620007c4565b5050505050505062000ad6565b828054620008e39062000a4c565b90600052602060002090601f01602090048101928262000907576000855562000952565b82601f106200092257805160ff191683800117855562000952565b8280016001018555821562000952579182015b828111156200095257825182559160200191906001019062000935565b506200096092915062000964565b5090565b5b8082111562000960576000815560010162000965565b600080600080600060a0868803121562000993578081fd5b8551620009a08162000abd565b6020870151909550620009b38162000abd565b6040870151909450620009c68162000abd565b6060870151909350620009d98162000abd565b80925050608086015190509295509295909350565b60008251815b8181101562000a105760208186018101518583015201620009f4565b8181111562000a1f5782828501525b509190910192915050565b600081600019048311821515161562000a475762000a4762000aa7565b500290565b600181811c9082168062000a6157607f821691505b6020821081141562000a8357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000aa05762000aa062000aa7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811462000ad357600080fd5b50565b6126d68062000ae66000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806394c320471161010f578063dffaf091116100a2578063f6ca945211610071578063f6ca945214610448578063f78eea831461046c578063fc0c546a1461049a578063fcd4a546146104ad576101f0565b8063dffaf091146103fc578063e07c54861461040f578063ea87152b14610422578063f66f49c314610435576101f0565b8063b675a06b116100de578063b675a06b146103b9578063bf409c1e146103c1578063c5958af9146103d6578063ce5e11bf146103e9576101f0565b806394c32047146103775780639aa9ade11461038a578063a792765f14610393578063b22ea069146103a6576101f0565b806344e87f911161018757806376660c691161015657806376660c691461033657806377b03e0d1461034957806389d6a6ac1461035c5780638fc03c1714610364576101f0565b806344e87f91146102bf57806346904840146102e2578063483b812c146102f557806364ee3c6d14610315576101f0565b80631959ad5b116101c35780631959ad5b1461024f5780631de4a86d1461027a57806329449085146102825780632af8aae0146102ac576101f0565b8063056059ab146101f55780631368e9c714610211578063193b505b1461021a57806319435a271461022f575b600080fd5b6101fe60045481565b6040519081526020015b60405180910390f35b6101fe60055481565b61022d610228366004611e71565b6104ce565b005b61024261023d366004611f43565b610506565b604051610208919061234d565b600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610208565b6101fe6105c4565b610295610290366004611f73565b610609565b604080519215158352602083019190915201610208565b600154610262906001600160a01b031681565b6102d26102cd366004611f73565b610698565b6040519015158152602001610208565b600354610262906001600160a01b031681565b610308610303366004611ff8565b610723565b604051610208919061249f565b610328610323366004611f73565b610848565b604051610208929190612360565b61022d61034436600461202c565b6108a1565b6101fe610357366004611f43565b6109d8565b6101fe610a5b565b61022d610372366004612081565b610b09565b61022d61038536600461202c565b610c3b565b6101fe60065481565b6103286103a1366004611f73565b610d65565b6102426103b4366004611f43565b610dfb565b6008546101fe565b6103c9610ea7565b60405161020891906122ec565b6102426103e4366004611f73565b610f80565b6101fe6103f7366004611f73565b611008565b61022d61040a3660046120ea565b61108c565b61026261041d366004611f73565b611261565b61022d6104303660046120ea565b6112e5565b610295610443366004611f73565b61158a565b61045b610456366004612134565b611746565b60405161020895949392919061220e565b61047f61047a366004611f43565b61181a565b60408051938452602084019290925290820152606001610208565b600254610262906001600160a01b031681565b6104c06104bb366004611f94565b6118ea565b604051610208929190612253565b6001546001600160a01b0316156104e457600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60606008828154811061052957634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461053e9061260c565b80601f016020809104026020016040519081016040528092919081815260200182805461056a9061260c565b80156105b75780601f1061058c576101008083540402835291602001916105b7565b820191906000526020600020905b81548152906001019060200180831161059a57829003601f168201915b505050505090505b919050565b6040516020016105d390612435565b60408051601f19818403018152908290526105f09160200161246c565b6040516020818303038152906040528051906020012081565b60008054604051632944908560e01b8152600481018590526024810184905282916001600160a01b031690632944908590604401604080518083038186803b15801561065457600080fd5b505afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c9190611f18565b915091505b9250929050565b600080546040516344e87f9160e01b815260048101859052602481018490526001600160a01b03909116906344e87f919060440160206040518083038186803b1580156106e457600080fd5b505afa1580156106f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611ea9565b9392505050565b6040805160a081018252600080825260208201819052606082840181905282018190526080820152905160079061075d90859085906121fe565b90815260408051918290036020908101832060a08401835280546001600160a01b0390811685526001820154169184019190915260028101805491928401916107a59061260c565b80601f01602080910402602001604051908101604052809291908181526020018280546107d19061260c565b801561081e5780601f106107f35761010080835404028352916020019161081e565b820191906000526020600020905b81548152906001019060200180831161080157829003601f168201915b50505091835250506003820154602082015260049091015460ff1615156040909101529392505050565b60606000806000610859868661158a565b91509150816108805760006040518060200160405280600081525090935093505050610691565b61088a8682611008565b92506108968684610f80565b935050509250929050565b6000600784846040516108b59291906121fe565b9081526040519081900360200190208054909150336001600160a01b03909116146109335760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206f776e65722063616e206368616e6765206f776e6572206164647260448201526265737360e81b60648201526084015b60405180910390fd5b8060030154421061097d5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b80546001600160a01b0319166001600160a01b0383161781556040517fb21408ee7eeb25c9e048362424beed1681201ad2c97fe1450fae50e9839b95e2906109ca90869086908690612382565b60405180910390a150505050565b600080546040516377b03e0d60e01b8152600481018490526001600160a01b03909116906377b03e0d9060240160206040518083038186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611f5b565b92915050565b6000806000610ab3604051602001610a7290612435565b60408051601f1981840301815290829052610a8f9160200161246c565b6040516020818303038152906040528051906020012061a8c0426103a191906125ae565b909250905060008115610adb5782806020019051810190610ad49190611f5b565b9050610ae0565b506004545b80600554670de0b6b3a7640000610af7919061258f565b610b01919061256f565b935050505090565b600060078585604051610b1d9291906121fe565b9081526040519081900360200190206001810154909150336001600160a01b0390911614610b9e5760405162461bcd60e51b815260206004820152602860248201527f4f6e6c792073706563206d616e616765722063616e2073657420636f6e74656e6044820152671d081c9958dbdc9960c21b606482015260840161092a565b80600301544210610be85760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b610bf6600282018484611d40565b507f2426e5ef81549a1aa031f8c0087512da324e37d3fb648ca51d684383dc26bd3285858585604051610c2c94939291906123df565b60405180910390a15050505050565b600060078484604051610c4f9291906121fe565b9081526040519081900360200190208054909150336001600160a01b0390911614610cca5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c792061646d696e2063616e206368616e6765206d616e61676572206164604482015264647265737360d81b606482015260840161092a565b80600301544210610d145760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b6001810180546001600160a01b0319166001600160a01b0384161790556040517fca34933fea0ffdb5b2791c1644e4ca9a2ab287e741991dd7be70aae8470da63d906109ca90869086908690612382565b6000805460405163a792765f60e01b81526004810185905260248101849052606092916001600160a01b03169063a792765f9060440160006040518083038186803b158015610db357600080fd5b505afa158015610dc7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610def9190810190611ec3565b90969095509350505050565b60088181548110610e0b57600080fd5b906000526020600020016000915090508054610e269061260c565b80601f0160208091040260200160405190810160405280929190818152602001828054610e529061260c565b8015610e9f5780601f10610e7457610100808354040283529160200191610e9f565b820191906000526020600020905b815481529060010190602001808311610e8257829003601f168201915b505050505081565b60606008805480602002602001604051908101604052809291908181526020016000905b82821015610f77578382906000526020600020018054610eea9061260c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f169061260c565b8015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505050505081526020019060010190610ecb565b50505050905090565b60005460405163c5958af960e01b815260048101849052602481018390526060916001600160a01b03169063c5958af99060440160006040518083038186803b158015610fcc57600080fd5b505afa158015610fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261071c9190810190611fc5565b6000805460405163ce5e11bf60e01b815260048101859052602481018490526001600160a01b039091169063ce5e11bf9060440160206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611f5b565b6000600784846040516110a09291906121fe565b90815260200160405180910390209050428160030154116111035760405162461bcd60e51b815260206004820152601960248201527f51756572792074797065206e6f74207265676973746572656400000000000000604482015260640161092a565b600061110e83611c49565b9050600654811061112657600019600383015561115a565b600554611137826301e1338061258f565b611141919061256f565b8260030160008282546111549190612557565b90915550505b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b1580156111b057600080fd5b505af11580156111c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190611ea9565b61122a5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b604482015260640161092a565b7f992f4e1cb3fad09f127c9739ad87c58cb4c39f9b64509f77055c11f41356937485858460030154604051610c2c93929190612411565b6000805460405163703e2a4360e11b815260048101859052602481018490526001600160a01b039091169063e07c54869060440160206040518083038186803b1580156112ad57600080fd5b505afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611e8d565b6000600784846040516112f99291906121fe565b908152602001604051809103902090504281600301541061135c5760405162461bcd60e51b815260206004820152601560248201527f5175657279207479706520726567697374657265640000000000000000000000604482015260640161092a565b600061136783611c49565b90506005548110156113c75760405162461bcd60e51b815260206004820152602360248201527f4d75737420726567697374657220666f72206174206c65617374206f6e65207960448201526232b0b960e91b606482015260840161092a565b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b15801561141d57600080fd5b505af1158015611431573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114559190611ea9565b6114975760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b604482015260640161092a565b60065481106114ad5760001960038301556114d8565b6005546114be826301e1338061258f565b6114c8919061256f565b6114d29042612557565b60038301555b8154336001600160a01b031991821681178455600184018054909216179055600482015460ff166115515760088054600181018255600091909152611540907ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018686611d40565b5060048201805460ff191660011790555b7f0a223061b8268a2ebaf138f9f6cb7f197f15d85a3b474395dedee6ff2394baeb8585338560030154604051610c2c94939291906123af565b6000806000611598856109d8565b9050806115ac576000809250925050610691565b806115b6816125f5565b91506001905060008083816115cb8a83611008565b90508881116115e65760008097509750505050505050610691565b6115f08a84611008565b9050888111156115ff57600094505b84156116b15760026116118484612557565b61161b919061256f565b93506116278a85611008565b9050888111156116685760006116428b6103f76001886125ae565b90508981116116545760009550611662565b61165f6001866125ae565b92505b506116ac565b60006116798b6103f7876001612557565b90508981111561169c57600095508461169181612641565b9550508091506116aa565b6116a7856001612557565b93505b505b6115ff565b6116bb8a82610698565b6116d15760018497509750505050505050610691565b6116db8a82610698565b80156116e657508584105b1561170957836116f581612641565b9450506117028a85611008565b90506116d1565b858414801561171d575061171d8a82610698565b156117345760008097509750505050505050610691565b60018497509750505050505050610691565b8051808201602090810180516007825292820191909301209152805460018201546002830180546001600160a01b039384169492909316926117879061260c565b80601f01602080910402602001604051908101604052809291908181526020018280546117b39061260c565b80156118005780601f106117d557610100808354040283529160200191611800565b820191906000526020600020905b8154815290600101906020018083116117e357829003601f168201915b50505050600383015460049093015491929160ff16905085565b6001546040516387a475fd60e01b8152600481018390526000918291829182916001600160a01b03909116906387a475fd9060240160206040518083038186803b15801561186757600080fd5b505afa15801561187b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189f9190611f5b565b905060606118b2826103a1426001612557565b94509050836118ce5760008061019494509450945050506118e3565b60006118d982611cdb565b955060c893505050505b9193909250565b6060806000806118fe88610443888a6125ae565b915091508161194f576040805160008082526020820190925290611932565b606081526020019060019003908161191d5790505b506040805160008152602081019091529094509250611c40915050565b600061195b8989610609565b9093509050826119ae576040805160008082526020820190925290611990565b606081526020019060019003908161197b5790505b506040805160008152602081019091529095509350611c4092505050565b60008060008867ffffffffffffffff8111156119da57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a03578160200160208202803683370190505b5090505b8883108015611a2a57508482611a1e866001612557565b611a2891906125ae565b115b15611a9c576000611a3f8d6103f785886125ae565b9050611a4b8d82610698565b611a895780828581518110611a7057634e487b7160e01b600052603260045260246000fd5b602090810291909101015283611a8581612641565b9450505b82611a9381612641565b93505050611a07565b60008367ffffffffffffffff811115611ac557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611af857816020015b6060815260200190600190039081611ae35790505b50905060008467ffffffffffffffff811115611b2457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b4d578160200160208202803683370190505b50905060005b85811015611c33578381611b686001896125ae565b611b7291906125ae565b81518110611b9057634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110611bb857634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611bf58f838381518110611be857634e487b7160e01b600052603260045260246000fd5b6020026020010151610f80565b838281518110611c1557634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611c2b90612641565b915050611b53565b5090985096505050505050505b94509492505050565b6000806000611c60604051602001610a7290612435565b909250905060008115611caf57600083806020019051810190611c839190611f5b565b9050670de0b6b3a7640000611c98828861258f565b611ca2919061256f565b6004919091559050611cd3565b670de0b6b3a764000060045486611cc6919061258f565b611cd0919061256f565b90505b949350505050565b6000805b8251811015611d3a57828181518110611d0857634e487b7160e01b600052603260045260246000fd5b016020015160f81c611d1c8361010061258f565b611d269190612557565b915080611d3281612641565b915050611cdf565b50919050565b828054611d4c9061260c565b90600052602060002090601f016020900481019282611d6e5760008555611db4565b82601f10611d875782800160ff19823516178555611db4565b82800160010185558215611db4579182015b82811115611db4578235825591602001919060010190611d99565b50611dc0929150611dc4565b5090565b5b80821115611dc05760008155600101611dc5565b805180151581146105bf57600080fd5b600082601f830112611df9578081fd5b8151611e0c611e078261252f565b6124fe565b818152846020838601011115611e20578283fd5b611cd38260208301602087016125c5565b60008083601f840112611e42578182fd5b50813567ffffffffffffffff811115611e59578182fd5b60208301915083602082850101111561069157600080fd5b600060208284031215611e82578081fd5b813561071c81612688565b600060208284031215611e9e578081fd5b815161071c81612688565b600060208284031215611eba578081fd5b61071c82611dd9565b600080600060608486031215611ed7578182fd5b611ee084611dd9565b9250602084015167ffffffffffffffff811115611efb578283fd5b611f0786828701611de9565b925050604084015190509250925092565b60008060408385031215611f2a578182fd5b611f3383611dd9565b9150602083015190509250929050565b600060208284031215611f54578081fd5b5035919050565b600060208284031215611f6c578081fd5b5051919050565b60008060408385031215611f85578182fd5b50508035926020909101359150565b60008060008060808587031215611fa9578081fd5b5050823594602084013594506040840135936060013592509050565b600060208284031215611fd6578081fd5b815167ffffffffffffffff811115611fec578182fd5b611cd384828501611de9565b6000806020838503121561200a578182fd5b823567ffffffffffffffff811115612020578283fd5b610def85828601611e31565b600080600060408486031215612040578283fd5b833567ffffffffffffffff811115612056578384fd5b61206286828701611e31565b909450925050602084013561207681612688565b809150509250925092565b60008060008060408587031215612096578182fd5b843567ffffffffffffffff808211156120ad578384fd5b6120b988838901611e31565b909650945060208701359150808211156120d1578384fd5b506120de87828801611e31565b95989497509550505050565b6000806000604084860312156120fe578081fd5b833567ffffffffffffffff811115612114578182fd5b61212086828701611e31565b909790965060209590950135949350505050565b600060208284031215612145578081fd5b813567ffffffffffffffff81111561215b578182fd5b8201601f8101841361216b578182fd5b8035612179611e078261252f565b81815285602083850101111561218d578384fd5b81602084016020830137908101602001929092525092915050565b600081518084526121c08160208601602086016125c5565b601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6000828483379101908152919050565b60006001600160a01b03808816835280871660208401525060a0604083015261223a60a08301866121a8565b6060830194909452509015156080909101529392505050565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b838110156122a957605f198887030185526122978683516121a8565b9550938201939082019060010161227b565b505085840381870152865180855287820194820193509150845b828110156122df578451845293810193928101926001016122c3565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561234057603f1988860301845261232e8583516121a8565b94509285019290850190600101612312565b5092979650505050505050565b60006020825261071c60208301846121a8565b60006040825261237360408301856121a8565b90508260208301529392505050565b6000604082526123966040830185876121d4565b90506001600160a01b0383166020830152949350505050565b6000606082526123c36060830186886121d4565b6001600160a01b03949094166020830152506040015292915050565b6000604082526123f36040830186886121d4565b82810360208401526124068185876121d4565b979650505050505050565b6000604082526124256040830185876121d4565b9050826020830152949350505050565b60408082526003908201819052623a393160e91b6060830152608060208301819052820152621d5cd960ea1b60a082015260c00190565b600060408252600960408301526853706f74507269636560b81b60608301526080602083015261071c60808301846121a8565b6000602082526001600160a01b0380845116602084015280602085015116604084015250604083015160a060608401526124dc60c08401826121a8565b9050606084015160808401526080840151151560a08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561252757612527612672565b604052919050565b600067ffffffffffffffff82111561254957612549612672565b50601f01601f191660200190565b6000821982111561256a5761256a61265c565b500190565b60008261258a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156125a9576125a961265c565b500290565b6000828210156125c0576125c061265c565b500390565b60005b838110156125e05781810151838201526020016125c8565b838111156125ef576000848401525b50505050565b6000816126045761260461265c565b506000190190565b600181811c9082168061262057607f821691505b60208210811415611d3a57634e487b7160e01b600052602260045260246000fd5b60006000198214156126555761265561265c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461269d57600080fd5b5056fea264697066735822122028cf1fe60901ca6fc2fa39d92913d19d4bd3999ed19df2c2a6a07c41a42febea64736f6c63430008030033000000000000000000000000e3322702bedaaed36cddab233360b939775ae5f1000000000000000000000000d9157453e2668b2fc45b7a803d3fef3642430cc0000000000000000000000000a3fe6d88f2ea92be357663ba9e747301e4cfc39b0000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e0900000000000000000000000000000000000000000000003635c9adc5dea00000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806394c320471161010f578063dffaf091116100a2578063f6ca945211610071578063f6ca945214610448578063f78eea831461046c578063fc0c546a1461049a578063fcd4a546146104ad576101f0565b8063dffaf091146103fc578063e07c54861461040f578063ea87152b14610422578063f66f49c314610435576101f0565b8063b675a06b116100de578063b675a06b146103b9578063bf409c1e146103c1578063c5958af9146103d6578063ce5e11bf146103e9576101f0565b806394c32047146103775780639aa9ade11461038a578063a792765f14610393578063b22ea069146103a6576101f0565b806344e87f911161018757806376660c691161015657806376660c691461033657806377b03e0d1461034957806389d6a6ac1461035c5780638fc03c1714610364576101f0565b806344e87f91146102bf57806346904840146102e2578063483b812c146102f557806364ee3c6d14610315576101f0565b80631959ad5b116101c35780631959ad5b1461024f5780631de4a86d1461027a57806329449085146102825780632af8aae0146102ac576101f0565b8063056059ab146101f55780631368e9c714610211578063193b505b1461021a57806319435a271461022f575b600080fd5b6101fe60045481565b6040519081526020015b60405180910390f35b6101fe60055481565b61022d610228366004611e71565b6104ce565b005b61024261023d366004611f43565b610506565b604051610208919061234d565b600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610208565b6101fe6105c4565b610295610290366004611f73565b610609565b604080519215158352602083019190915201610208565b600154610262906001600160a01b031681565b6102d26102cd366004611f73565b610698565b6040519015158152602001610208565b600354610262906001600160a01b031681565b610308610303366004611ff8565b610723565b604051610208919061249f565b610328610323366004611f73565b610848565b604051610208929190612360565b61022d61034436600461202c565b6108a1565b6101fe610357366004611f43565b6109d8565b6101fe610a5b565b61022d610372366004612081565b610b09565b61022d61038536600461202c565b610c3b565b6101fe60065481565b6103286103a1366004611f73565b610d65565b6102426103b4366004611f43565b610dfb565b6008546101fe565b6103c9610ea7565b60405161020891906122ec565b6102426103e4366004611f73565b610f80565b6101fe6103f7366004611f73565b611008565b61022d61040a3660046120ea565b61108c565b61026261041d366004611f73565b611261565b61022d6104303660046120ea565b6112e5565b610295610443366004611f73565b61158a565b61045b610456366004612134565b611746565b60405161020895949392919061220e565b61047f61047a366004611f43565b61181a565b60408051938452602084019290925290820152606001610208565b600254610262906001600160a01b031681565b6104c06104bb366004611f94565b6118ea565b604051610208929190612253565b6001546001600160a01b0316156104e457600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60606008828154811061052957634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461053e9061260c565b80601f016020809104026020016040519081016040528092919081815260200182805461056a9061260c565b80156105b75780601f1061058c576101008083540402835291602001916105b7565b820191906000526020600020905b81548152906001019060200180831161059a57829003601f168201915b505050505090505b919050565b6040516020016105d390612435565b60408051601f19818403018152908290526105f09160200161246c565b6040516020818303038152906040528051906020012081565b60008054604051632944908560e01b8152600481018590526024810184905282916001600160a01b031690632944908590604401604080518083038186803b15801561065457600080fd5b505afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c9190611f18565b915091505b9250929050565b600080546040516344e87f9160e01b815260048101859052602481018490526001600160a01b03909116906344e87f919060440160206040518083038186803b1580156106e457600080fd5b505afa1580156106f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611ea9565b9392505050565b6040805160a081018252600080825260208201819052606082840181905282018190526080820152905160079061075d90859085906121fe565b90815260408051918290036020908101832060a08401835280546001600160a01b0390811685526001820154169184019190915260028101805491928401916107a59061260c565b80601f01602080910402602001604051908101604052809291908181526020018280546107d19061260c565b801561081e5780601f106107f35761010080835404028352916020019161081e565b820191906000526020600020905b81548152906001019060200180831161080157829003601f168201915b50505091835250506003820154602082015260049091015460ff1615156040909101529392505050565b60606000806000610859868661158a565b91509150816108805760006040518060200160405280600081525090935093505050610691565b61088a8682611008565b92506108968684610f80565b935050509250929050565b6000600784846040516108b59291906121fe565b9081526040519081900360200190208054909150336001600160a01b03909116146109335760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206f776e65722063616e206368616e6765206f776e6572206164647260448201526265737360e81b60648201526084015b60405180910390fd5b8060030154421061097d5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b80546001600160a01b0319166001600160a01b0383161781556040517fb21408ee7eeb25c9e048362424beed1681201ad2c97fe1450fae50e9839b95e2906109ca90869086908690612382565b60405180910390a150505050565b600080546040516377b03e0d60e01b8152600481018490526001600160a01b03909116906377b03e0d9060240160206040518083038186803b158015610a1d57600080fd5b505afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190611f5b565b92915050565b6000806000610ab3604051602001610a7290612435565b60408051601f1981840301815290829052610a8f9160200161246c565b6040516020818303038152906040528051906020012061a8c0426103a191906125ae565b909250905060008115610adb5782806020019051810190610ad49190611f5b565b9050610ae0565b506004545b80600554670de0b6b3a7640000610af7919061258f565b610b01919061256f565b935050505090565b600060078585604051610b1d9291906121fe565b9081526040519081900360200190206001810154909150336001600160a01b0390911614610b9e5760405162461bcd60e51b815260206004820152602860248201527f4f6e6c792073706563206d616e616765722063616e2073657420636f6e74656e6044820152671d081c9958dbdc9960c21b606482015260840161092a565b80600301544210610be85760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b610bf6600282018484611d40565b507f2426e5ef81549a1aa031f8c0087512da324e37d3fb648ca51d684383dc26bd3285858585604051610c2c94939291906123df565b60405180910390a15050505050565b600060078484604051610c4f9291906121fe565b9081526040519081900360200190208054909150336001600160a01b0390911614610cca5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c792061646d696e2063616e206368616e6765206d616e61676572206164604482015264647265737360d81b606482015260840161092a565b80600301544210610d145760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b604482015260640161092a565b6001810180546001600160a01b0319166001600160a01b0384161790556040517fca34933fea0ffdb5b2791c1644e4ca9a2ab287e741991dd7be70aae8470da63d906109ca90869086908690612382565b6000805460405163a792765f60e01b81526004810185905260248101849052606092916001600160a01b03169063a792765f9060440160006040518083038186803b158015610db357600080fd5b505afa158015610dc7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610def9190810190611ec3565b90969095509350505050565b60088181548110610e0b57600080fd5b906000526020600020016000915090508054610e269061260c565b80601f0160208091040260200160405190810160405280929190818152602001828054610e529061260c565b8015610e9f5780601f10610e7457610100808354040283529160200191610e9f565b820191906000526020600020905b815481529060010190602001808311610e8257829003601f168201915b505050505081565b60606008805480602002602001604051908101604052809291908181526020016000905b82821015610f77578382906000526020600020018054610eea9061260c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f169061260c565b8015610f635780601f10610f3857610100808354040283529160200191610f63565b820191906000526020600020905b815481529060010190602001808311610f4657829003601f168201915b505050505081526020019060010190610ecb565b50505050905090565b60005460405163c5958af960e01b815260048101849052602481018390526060916001600160a01b03169063c5958af99060440160006040518083038186803b158015610fcc57600080fd5b505afa158015610fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261071c9190810190611fc5565b6000805460405163ce5e11bf60e01b815260048101859052602481018490526001600160a01b039091169063ce5e11bf9060440160206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611f5b565b6000600784846040516110a09291906121fe565b90815260200160405180910390209050428160030154116111035760405162461bcd60e51b815260206004820152601960248201527f51756572792074797065206e6f74207265676973746572656400000000000000604482015260640161092a565b600061110e83611c49565b9050600654811061112657600019600383015561115a565b600554611137826301e1338061258f565b611141919061256f565b8260030160008282546111549190612557565b90915550505b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b1580156111b057600080fd5b505af11580156111c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e89190611ea9565b61122a5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b604482015260640161092a565b7f992f4e1cb3fad09f127c9739ad87c58cb4c39f9b64509f77055c11f41356937485858460030154604051610c2c93929190612411565b6000805460405163703e2a4360e11b815260048101859052602481018490526001600160a01b039091169063e07c54869060440160206040518083038186803b1580156112ad57600080fd5b505afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071c9190611e8d565b6000600784846040516112f99291906121fe565b908152602001604051809103902090504281600301541061135c5760405162461bcd60e51b815260206004820152601560248201527f5175657279207479706520726567697374657265640000000000000000000000604482015260640161092a565b600061136783611c49565b90506005548110156113c75760405162461bcd60e51b815260206004820152602360248201527f4d75737420726567697374657220666f72206174206c65617374206f6e65207960448201526232b0b960e91b606482015260840161092a565b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b15801561141d57600080fd5b505af1158015611431573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114559190611ea9565b6114975760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b604482015260640161092a565b60065481106114ad5760001960038301556114d8565b6005546114be826301e1338061258f565b6114c8919061256f565b6114d29042612557565b60038301555b8154336001600160a01b031991821681178455600184018054909216179055600482015460ff166115515760088054600181018255600091909152611540907ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018686611d40565b5060048201805460ff191660011790555b7f0a223061b8268a2ebaf138f9f6cb7f197f15d85a3b474395dedee6ff2394baeb8585338560030154604051610c2c94939291906123af565b6000806000611598856109d8565b9050806115ac576000809250925050610691565b806115b6816125f5565b91506001905060008083816115cb8a83611008565b90508881116115e65760008097509750505050505050610691565b6115f08a84611008565b9050888111156115ff57600094505b84156116b15760026116118484612557565b61161b919061256f565b93506116278a85611008565b9050888111156116685760006116428b6103f76001886125ae565b90508981116116545760009550611662565b61165f6001866125ae565b92505b506116ac565b60006116798b6103f7876001612557565b90508981111561169c57600095508461169181612641565b9550508091506116aa565b6116a7856001612557565b93505b505b6115ff565b6116bb8a82610698565b6116d15760018497509750505050505050610691565b6116db8a82610698565b80156116e657508584105b1561170957836116f581612641565b9450506117028a85611008565b90506116d1565b858414801561171d575061171d8a82610698565b156117345760008097509750505050505050610691565b60018497509750505050505050610691565b8051808201602090810180516007825292820191909301209152805460018201546002830180546001600160a01b039384169492909316926117879061260c565b80601f01602080910402602001604051908101604052809291908181526020018280546117b39061260c565b80156118005780601f106117d557610100808354040283529160200191611800565b820191906000526020600020905b8154815290600101906020018083116117e357829003601f168201915b50505050600383015460049093015491929160ff16905085565b6001546040516387a475fd60e01b8152600481018390526000918291829182916001600160a01b03909116906387a475fd9060240160206040518083038186803b15801561186757600080fd5b505afa15801561187b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189f9190611f5b565b905060606118b2826103a1426001612557565b94509050836118ce5760008061019494509450945050506118e3565b60006118d982611cdb565b955060c893505050505b9193909250565b6060806000806118fe88610443888a6125ae565b915091508161194f576040805160008082526020820190925290611932565b606081526020019060019003908161191d5790505b506040805160008152602081019091529094509250611c40915050565b600061195b8989610609565b9093509050826119ae576040805160008082526020820190925290611990565b606081526020019060019003908161197b5790505b506040805160008152602081019091529095509350611c4092505050565b60008060008867ffffffffffffffff8111156119da57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611a03578160200160208202803683370190505b5090505b8883108015611a2a57508482611a1e866001612557565b611a2891906125ae565b115b15611a9c576000611a3f8d6103f785886125ae565b9050611a4b8d82610698565b611a895780828581518110611a7057634e487b7160e01b600052603260045260246000fd5b602090810291909101015283611a8581612641565b9450505b82611a9381612641565b93505050611a07565b60008367ffffffffffffffff811115611ac557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611af857816020015b6060815260200190600190039081611ae35790505b50905060008467ffffffffffffffff811115611b2457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b4d578160200160208202803683370190505b50905060005b85811015611c33578381611b686001896125ae565b611b7291906125ae565b81518110611b9057634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110611bb857634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611bf58f838381518110611be857634e487b7160e01b600052603260045260246000fd5b6020026020010151610f80565b838281518110611c1557634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611c2b90612641565b915050611b53565b5090985096505050505050505b94509492505050565b6000806000611c60604051602001610a7290612435565b909250905060008115611caf57600083806020019051810190611c839190611f5b565b9050670de0b6b3a7640000611c98828861258f565b611ca2919061256f565b6004919091559050611cd3565b670de0b6b3a764000060045486611cc6919061258f565b611cd0919061256f565b90505b949350505050565b6000805b8251811015611d3a57828181518110611d0857634e487b7160e01b600052603260045260246000fd5b016020015160f81c611d1c8361010061258f565b611d269190612557565b915080611d3281612641565b915050611cdf565b50919050565b828054611d4c9061260c565b90600052602060002090601f016020900481019282611d6e5760008555611db4565b82601f10611d875782800160ff19823516178555611db4565b82800160010185558215611db4579182015b82811115611db4578235825591602001919060010190611d99565b50611dc0929150611dc4565b5090565b5b80821115611dc05760008155600101611dc5565b805180151581146105bf57600080fd5b600082601f830112611df9578081fd5b8151611e0c611e078261252f565b6124fe565b818152846020838601011115611e20578283fd5b611cd38260208301602087016125c5565b60008083601f840112611e42578182fd5b50813567ffffffffffffffff811115611e59578182fd5b60208301915083602082850101111561069157600080fd5b600060208284031215611e82578081fd5b813561071c81612688565b600060208284031215611e9e578081fd5b815161071c81612688565b600060208284031215611eba578081fd5b61071c82611dd9565b600080600060608486031215611ed7578182fd5b611ee084611dd9565b9250602084015167ffffffffffffffff811115611efb578283fd5b611f0786828701611de9565b925050604084015190509250925092565b60008060408385031215611f2a578182fd5b611f3383611dd9565b9150602083015190509250929050565b600060208284031215611f54578081fd5b5035919050565b600060208284031215611f6c578081fd5b5051919050565b60008060408385031215611f85578182fd5b50508035926020909101359150565b60008060008060808587031215611fa9578081fd5b5050823594602084013594506040840135936060013592509050565b600060208284031215611fd6578081fd5b815167ffffffffffffffff811115611fec578182fd5b611cd384828501611de9565b6000806020838503121561200a578182fd5b823567ffffffffffffffff811115612020578283fd5b610def85828601611e31565b600080600060408486031215612040578283fd5b833567ffffffffffffffff811115612056578384fd5b61206286828701611e31565b909450925050602084013561207681612688565b809150509250925092565b60008060008060408587031215612096578182fd5b843567ffffffffffffffff808211156120ad578384fd5b6120b988838901611e31565b909650945060208701359150808211156120d1578384fd5b506120de87828801611e31565b95989497509550505050565b6000806000604084860312156120fe578081fd5b833567ffffffffffffffff811115612114578182fd5b61212086828701611e31565b909790965060209590950135949350505050565b600060208284031215612145578081fd5b813567ffffffffffffffff81111561215b578182fd5b8201601f8101841361216b578182fd5b8035612179611e078261252f565b81815285602083850101111561218d578384fd5b81602084016020830137908101602001929092525092915050565b600081518084526121c08160208601602086016125c5565b601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6000828483379101908152919050565b60006001600160a01b03808816835280871660208401525060a0604083015261223a60a08301866121a8565b6060830194909452509015156080909101529392505050565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b838110156122a957605f198887030185526122978683516121a8565b9550938201939082019060010161227b565b505085840381870152865180855287820194820193509150845b828110156122df578451845293810193928101926001016122c3565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561234057603f1988860301845261232e8583516121a8565b94509285019290850190600101612312565b5092979650505050505050565b60006020825261071c60208301846121a8565b60006040825261237360408301856121a8565b90508260208301529392505050565b6000604082526123966040830185876121d4565b90506001600160a01b0383166020830152949350505050565b6000606082526123c36060830186886121d4565b6001600160a01b03949094166020830152506040015292915050565b6000604082526123f36040830186886121d4565b82810360208401526124068185876121d4565b979650505050505050565b6000604082526124256040830185876121d4565b9050826020830152949350505050565b60408082526003908201819052623a393160e91b6060830152608060208301819052820152621d5cd960ea1b60a082015260c00190565b600060408252600960408301526853706f74507269636560b81b60608301526080602083015261071c60808301846121a8565b6000602082526001600160a01b0380845116602084015280602085015116604084015250604083015160a060608401526124dc60c08401826121a8565b9050606084015160808401526080840151151560a08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561252757612527612672565b604052919050565b600067ffffffffffffffff82111561254957612549612672565b50601f01601f191660200190565b6000821982111561256a5761256a61265c565b500190565b60008261258a57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156125a9576125a961265c565b500290565b6000828210156125c0576125c061265c565b500390565b60005b838110156125e05781810151838201526020016125c8565b838111156125ef576000848401525b50505050565b6000816126045761260461265c565b506000190190565b600181811c9082168061262057607f821691505b60208210811415611d3a57634e487b7160e01b600052602260045260246000fd5b60006000198214156126555761265561265c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461269d57600080fd5b5056fea264697066735822122028cf1fe60901ca6fc2fa39d92913d19d4bd3999ed19df2c2a6a07c41a42febea64736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e3322702bedaaed36cddab233360b939775ae5f1000000000000000000000000d9157453e2668b2fc45b7a803d3fef3642430cc0000000000000000000000000a3fe6d88f2ea92be357663ba9e747301e4cfc39b0000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e0900000000000000000000000000000000000000000000003635c9adc5dea00000
-----Decoded View---------------
Arg [0] : _token (address): 0xE3322702BEdaaEd36CdDAb233360B939775ae5f1
Arg [1] : _tellor (address): 0xD9157453E2668B2fc45b7A803D3FEF3642430cC0
Arg [2] : _feeRecipient (address): 0xa3fe6d88f2ea92be357663ba9e747301e4cfc39B
Arg [3] : _reservedOwner (address): 0x4d303B4F20d55B9D0eA269B45AB5610abAf53E09
Arg [4] : _registrationPricePerYearUSD (uint256): 1000000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3322702bedaaed36cddab233360b939775ae5f1
Arg [1] : 000000000000000000000000d9157453e2668b2fc45b7a803d3fef3642430cc0
Arg [2] : 000000000000000000000000a3fe6d88f2ea92be357663ba9e747301e4cfc39b
Arg [3] : 0000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e09
Arg [4] : 00000000000000000000000000000000000000000000003635c9adc5dea00000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.