Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multi Chain
Multichain Addresses
1 address found via
Latest 19 from a total of 19 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Register | 4108168 | 113 days 24 mins ago | IN | 0 ETH | 0.00208338 | ||||
Register | 4107872 | 113 days 1 hr ago | IN | 0 ETH | 0.00148835 | ||||
Register | 4102262 | 113 days 23 hrs ago | IN | 0 ETH | 0.00107014 | ||||
Set Document Has... | 3950003 | 138 days 1 hr ago | IN | 0 ETH | 0.00007871 | ||||
Set Owner Addres... | 3949991 | 138 days 1 hr ago | IN | 0 ETH | 0.00006229 | ||||
Set Manager Addr... | 3949990 | 138 days 1 hr ago | IN | 0 ETH | 0.00006619 | ||||
Set Owner Addres... | 3949987 | 138 days 1 hr ago | IN | 0 ETH | 0.00005294 | ||||
Set Owner Addres... | 3949965 | 138 days 1 hr ago | IN | 0 ETH | 0.00004816 | ||||
Set Id Mapping C... | 3949870 | 138 days 2 hrs ago | IN | 0 ETH | 0.00006622 | ||||
Update Tellor Ad... | 3949823 | 138 days 2 hrs ago | IN | 0 ETH | 0.00005599 | ||||
Extend Registrat... | 3949774 | 138 days 2 hrs ago | IN | 0 ETH | 0.00022755 | ||||
Extend Registrat... | 3949750 | 138 days 2 hrs ago | IN | 0 ETH | 0.00022326 | ||||
Extend Registrat... | 3930606 | 141 days 3 hrs ago | IN | 0 ETH | 0.00022457 | ||||
Register | 3930596 | 141 days 3 hrs ago | IN | 0 ETH | 0.00039352 | ||||
Register | 3930361 | 141 days 4 hrs ago | IN | 0 ETH | 0.00010241 | ||||
Register | 3884897 | 148 days 33 mins ago | IN | 0 ETH | 0.00039615 | ||||
Set Document Has... | 3872051 | 149 days 23 hrs ago | IN | 0 ETH | 0.00018072 | ||||
Set Document Has... | 3872034 | 149 days 23 hrs ago | IN | 0 ETH | 0.00018075 | ||||
0x60806040 | 3871734 | 150 days 30 mins ago | IN | Create: DataSpecsRegistry | 0 ETH | 0.00955993 |
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/ITellorMaster.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 { ITellorMaster public token; // TRB token used for registration fee, also TellorMaster contract 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 _tellorMaster tellor master and 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 _tellorMaster, address payable _tellor, address _feeRecipient, address _reservedOwner, uint256 _registrationPricePerYearUSD ) UsingTellor(_tellor) { require( _tellorMaster != address(0), "Tellor master 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 = ITellorMaster(_tellorMaster); feeRecipient = _feeRecipient; registrationPricePerYearUSD = _registrationPricePerYearUSD; registrationPricePerInifinityUSD = _registrationPricePerYearUSD * 20; string[35] memory _reservedQueries = [ "AmpleforthCustomSpotPrice", "AmpleforthUSPCE", "AutopayAddresses", "ChatGPTResponse", "ComboQuery", "CrossChainBalance", "Custom1", "Custom2", "Custom3", "CustomPrice", "DIVAProtocol", "DailyVolatility", "EVMCall", "EVMHeader", "EVMHeaderslist", "ExampleFantasyFootball", "ExampleNftCollectionStats", "FilecoinDealStatus", "GasPriceOracle", "LeagueDAO", "LegacyRequest", "LendingPairToxicity", "MimicryCollectionStat", "MimicryMacroMarketMashup", "MimicryNFTMarketIndex", "Morphware", "NumericApiResponse", "Snapshot", "SpotPrice", "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); } /** * @dev Sets a new Tellor oracle address by reading from Tellor Master's storage */ function updateTellorAddress() public { tellor = ITellor(token.getAddressVars(keccak256("_ORACLE_CONTRACT"))); emit TellorAddressUpdated(address(tellor)); } // 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 ITellorMaster { function transfer(address _to, uint256 _amount) external returns(bool); function transferFrom(address _from, address _to, uint256 _amount) external returns(bool); function getAddressVars(bytes32 _hash) external returns(address); }
// 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": {} }
[{"inputs":[{"internalType":"address","name":"_tellorMaster","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 ITellorMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trbPriceQueryId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateTellorAddress","outputs":[],"stateMutability":"nonpayable","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
608060405267d02ab486cedc00006004553480156200001d57600080fd5b506040516200328638038062003286833981016040819052620000409162000941565b600080546001600160a01b0319166001600160a01b03868116919091179091558516620000c05760405162461bcd60e51b8152602060048201526024808201527f54656c6c6f72206d617374657220616464726573732063616e6e6f74206265206044820152637a65726f60e01b60648201526084015b60405180910390fd5b6001600160a01b038416620001245760405162461bcd60e51b8152602060048201526024808201527f54656c6c6f72206f7261636c6520616464726573732063616e6e6f74206265206044820152637a65726f60e01b6064820152608401620000b7565b6001600160a01b038316620001885760405162461bcd60e51b8152602060048201526024808201527f46656520726563697069656e7420616464726573732063616e6e6f74206265206044820152637a65726f60e01b6064820152608401620000b7565b600280546001600160a01b038088166001600160a01b03199283161790925560038054928616929091169190911790556005819055620001ca816014620009f0565b600655604080516104a081018252601961046082018181527f416d706c65666f727468437573746f6d53706f74507269636500000000000000610480840152825282518084018452600f8082526e416d706c65666f727468555350434560881b602083810191909152808501929092528451808601865260108082526f4175746f70617941646472657373657360801b8285015285870191909152855180870187528281526e43686174475054526573706f6e736560881b81850152606086015285518087018752600a815269436f6d626f517565727960b01b81850152608086015285518087018752601181527043726f7373436861696e42616c616e636560781b8185015260a086015285518087018752600780825266437573746f6d3160c81b8286015260c0870191909152865180880188528181526621bab9ba37b69960c91b8186015260e08701528651808801885281815266437573746f6d3360c81b8186015261010087015286518088018852600b81526a437573746f6d507269636560a81b8186015261012087015286518088018852600c81526b11125590541c9bdd1bd8dbdb60a21b81860152610140870152865180880188529283526e4461696c79566f6c6174696c69747960881b83850152610160860192909252855180870187529182526611559350d85b1b60ca1b828401526101808501919091528451808601865260098082526822ab26a432b0b232b960b91b828501526101a086019190915285518087018752600e8082526d11559352195859195c9cdb1a5cdd60921b828601526101c087019190915286518088018852601681527f4578616d706c6546616e74617379466f6f7462616c6c00000000000000000000818601526101e0870152865180880188529485527f4578616d706c654e6674436f6c6c656374696f6e537461747300000000000000858501526102008601949094528551808701875260128082527146696c65636f696e4465616c53746174757360701b82860152610220870191909152865180880188529485526d47617350726963654f7261636c6560901b8585015261024086019490945285518087018752818152684c656167756544414f60b81b8185015261026086015285518087018752600d8082526c131959d858de54995c5d595cdd609a1b828601526102808701919091528651808801885260138082527f4c656e64696e6750616972546f78696369747900000000000000000000000000828701526102a08801919091528751808901895260158082527f4d696d69637279436f6c6c656374696f6e537461740000000000000000000000828801526102c08901919091528851808a018a52601881527f4d696d696372794d6163726f4d61726b65744d61736875700000000000000000818801526102e08901528851808a018a529081527f4d696d696372794e46544d61726b6574496e64657800000000000000000000008187015261030088015287518089018952838152684d6f7270687761726560b81b8187015261032088015287518089018952958652714e756d65726963417069526573706f6e736560701b8686015261034087019590955286518088018852600881526714db985c1cda1bdd60c21b81860152610360870152865180880188528281526853706f74507269636560b81b818601526103808701528651808801885260048152630545741560e41b818601526103a087015286518088018852828152682a32b63637b925b83960b91b818601526103c0870152865180880188529485527f54656c6c6f724f7261636c654164647265737300000000000000000000000000858501526103e0860194909452855180870187529081526854656c6c6f72524e4760b81b81840152610400850152845180860186529283526c54726163657246696e616e636560981b8383015261042084019290925283518085019094529083526f54776974746572436f6e74657374563160801b9083015261044081019190915260005b60238110156200088e5760006007838360238110620007b957634e487b7160e01b600052603260045260246000fd5b6020020151604051620007cd9190620009b4565b90815260405190819003602001902080546001600160a01b0387166001600160a01b03199182168117835560018084018054909316909117909155600019600383015560048201805460ff19169091179055905060088383602381106200084457634e487b7160e01b600052603260045260246000fd5b60209081029190910151825460018101845560009384529282902081516200087694919091019291909101906200089b565b50508080620008859062000a4f565b9150506200078a565b5050505050505062000a9c565b828054620008a99062000a12565b90600052602060002090601f016020900481019282620008cd576000855562000918565b82601f10620008e857805160ff191683800117855562000918565b8280016001018555821562000918579182015b8281111562000918578251825591602001919060010190620008fb565b50620009269291506200092a565b5090565b5b808211156200092657600081556001016200092b565b600080600080600060a0868803121562000959578081fd5b8551620009668162000a83565b6020870151909550620009798162000a83565b60408701519094506200098c8162000a83565b60608701519093506200099f8162000a83565b80925050608086015190509295509295909350565b60008251815b81811015620009d65760208186018101518583015201620009ba565b81811115620009e55782828501525b509190910192915050565b600081600019048311821515161562000a0d5762000a0d62000a6d565b500290565b600181811c9082168062000a2757607f821691505b6020821081141562000a4957634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000a665762000a6662000a6d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811462000a9957600080fd5b50565b6127da8062000aac6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638fc03c171161011a578063ce5e11bf116100ad578063f66f49c31161007c578063f66f49c314610448578063f6ca94521461045b578063f78eea831461047f578063fc0c546a146104ad578063fcd4a546146104c0576101fb565b8063ce5e11bf146103fc578063dffaf0911461040f578063e07c548614610422578063ea87152b14610435576101fb565b8063b22ea069116100e9578063b22ea069146103b9578063b675a06b146103cc578063bf409c1e146103d4578063c5958af9146103e9576101fb565b80638fc03c171461037757806394c320471461038a5780639aa9ade11461039d578063a792765f146103a6576101fb565b80632af8aae01161019257806364ee3c6d1161016157806364ee3c6d1461032857806376660c691461034957806377b03e0d1461035c57806389d6a6ac1461036f576101fb565b80632af8aae0146102bf57806344e87f91146102d257806346904840146102f5578063483b812c14610308576101fb565b806319435a27116101ce57806319435a27146102425780631959ad5b146102625780631de4a86d1461028d5780632944908514610295576101fb565b8063056059ab14610200578063093320281461021c5780631368e9c714610226578063193b505b1461022f575b600080fd5b61020960045481565b6040519081526020015b60405180910390f35b6102246104e1565b005b61020960055481565b61022461023d366004611f75565b6105d2565b610255610250366004612047565b61060a565b6040516102139190612451565b600054610275906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b6102096106c8565b6102a86102a3366004612077565b61070d565b604080519215158352602083019190915201610213565b600154610275906001600160a01b031681565b6102e56102e0366004612077565b61079c565b6040519015158152602001610213565b600354610275906001600160a01b031681565b61031b6103163660046120fc565b610827565b60405161021391906125a3565b61033b610336366004612077565b61094c565b604051610213929190612464565b610224610357366004612130565b6109a5565b61020961036a366004612047565b610adc565b610209610b5f565b610224610385366004612185565b610c0d565b610224610398366004612130565b610d3f565b61020960065481565b61033b6103b4366004612077565b610e69565b6102556103c7366004612047565b610eff565b600854610209565b6103dc610fab565b60405161021391906123f0565b6102556103f7366004612077565b611084565b61020961040a366004612077565b61110c565b61022461041d3660046121ee565b611190565b610275610430366004612077565b611365565b6102246104433660046121ee565b6113e9565b6102a8610456366004612077565b61168e565b61046e610469366004612238565b61184a565b604051610213959493929190612312565b61049261048d366004612047565b61191e565b60408051938452602084019290925290820152606001610213565b600254610275906001600160a01b031681565b6104d36104ce366004612098565b6119ee565b604051610213929190612357565b60025460405163099df72f60e11b81527ffa522e460446113e8fd353d7fa015625a68bc0369712213a42e006346440891e60048201526001600160a01b039091169063133bee5e90602401602060405180830381600087803b15801561054657600080fd5b505af115801561055a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057e9190611f91565b600080546001600160a01b0319166001600160a01b039290921691821790556040519081527fbe208ccb2f4ccb43a5a1dbb6fda63375a95c766ebcc49bc6b751b58a88e80ef29060200160405180910390a1565b6001546001600160a01b0316156105e857600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60606008828154811061062d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461064290612710565b80601f016020809104026020016040519081016040528092919081815260200182805461066e90612710565b80156106bb5780601f10610690576101008083540402835291602001916106bb565b820191906000526020600020905b81548152906001019060200180831161069e57829003601f168201915b505050505090505b919050565b6040516020016106d790612539565b60408051601f19818403018152908290526106f491602001612570565b6040516020818303038152906040528051906020012081565b60008054604051632944908560e01b8152600481018590526024810184905282916001600160a01b031690632944908590604401604080518083038186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610790919061201c565b915091505b9250929050565b600080546040516344e87f9160e01b815260048101859052602481018490526001600160a01b03909116906344e87f919060440160206040518083038186803b1580156107e857600080fd5b505afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108209190611fad565b9392505050565b6040805160a08101825260008082526020820181905260608284018190528201819052608082015290516007906108619085908590612302565b90815260408051918290036020908101832060a08401835280546001600160a01b0390811685526001820154169184019190915260028101805491928401916108a990612710565b80601f01602080910402602001604051908101604052809291908181526020018280546108d590612710565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b50505091835250506003820154602082015260049091015460ff1615156040909101529392505050565b6060600080600061095d868661168e565b91509150816109845760006040518060200160405280600081525090935093505050610795565b61098e868261110c565b925061099a8684611084565b935050509250929050565b6000600784846040516109b9929190612302565b9081526040519081900360200190208054909150336001600160a01b0390911614610a375760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206f776e65722063616e206368616e6765206f776e6572206164647260448201526265737360e81b60648201526084015b60405180910390fd5b80600301544210610a815760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b80546001600160a01b0319166001600160a01b0383161781556040517fb21408ee7eeb25c9e048362424beed1681201ad2c97fe1450fae50e9839b95e290610ace90869086908690612486565b60405180910390a150505050565b600080546040516377b03e0d60e01b8152600481018490526001600160a01b03909116906377b03e0d9060240160206040518083038186803b158015610b2157600080fd5b505afa158015610b35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b59919061205f565b92915050565b6000806000610bb7604051602001610b7690612539565b60408051601f1981840301815290829052610b9391602001612570565b6040516020818303038152906040528051906020012061a8c0426103b491906126b2565b909250905060008115610bdf5782806020019051810190610bd8919061205f565b9050610be4565b506004545b80600554670de0b6b3a7640000610bfb9190612693565b610c059190612673565b935050505090565b600060078585604051610c21929190612302565b9081526040519081900360200190206001810154909150336001600160a01b0390911614610ca25760405162461bcd60e51b815260206004820152602860248201527f4f6e6c792073706563206d616e616765722063616e2073657420636f6e74656e6044820152671d081c9958dbdc9960c21b6064820152608401610a2e565b80600301544210610cec5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b610cfa600282018484611e44565b507f2426e5ef81549a1aa031f8c0087512da324e37d3fb648ca51d684383dc26bd3285858585604051610d3094939291906124e3565b60405180910390a15050505050565b600060078484604051610d53929190612302565b9081526040519081900360200190208054909150336001600160a01b0390911614610dce5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c792061646d696e2063616e206368616e6765206d616e61676572206164604482015264647265737360d81b6064820152608401610a2e565b80600301544210610e185760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b6001810180546001600160a01b0319166001600160a01b0384161790556040517fca34933fea0ffdb5b2791c1644e4ca9a2ab287e741991dd7be70aae8470da63d90610ace90869086908690612486565b6000805460405163a792765f60e01b81526004810185905260248101849052606092916001600160a01b03169063a792765f9060440160006040518083038186803b158015610eb757600080fd5b505afa158015610ecb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ef39190810190611fc7565b90969095509350505050565b60088181548110610f0f57600080fd5b906000526020600020016000915090508054610f2a90612710565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5690612710565b8015610fa35780601f10610f7857610100808354040283529160200191610fa3565b820191906000526020600020905b815481529060010190602001808311610f8657829003601f168201915b505050505081565b60606008805480602002602001604051908101604052809291908181526020016000905b8282101561107b578382906000526020600020018054610fee90612710565b80601f016020809104026020016040519081016040528092919081815260200182805461101a90612710565b80156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b505050505081526020019060010190610fcf565b50505050905090565b60005460405163c5958af960e01b815260048101849052602481018390526060916001600160a01b03169063c5958af99060440160006040518083038186803b1580156110d057600080fd5b505afa1580156110e4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261082091908101906120c9565b6000805460405163ce5e11bf60e01b815260048101859052602481018490526001600160a01b039091169063ce5e11bf9060440160206040518083038186803b15801561115857600080fd5b505afa15801561116c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610820919061205f565b6000600784846040516111a4929190612302565b90815260200160405180910390209050428160030154116112075760405162461bcd60e51b815260206004820152601960248201527f51756572792074797065206e6f742072656769737465726564000000000000006044820152606401610a2e565b600061121283611d4d565b9050600654811061122a57600019600383015561125e565b60055461123b826301e13380612693565b6112459190612673565b826003016000828254611258919061265b565b90915550505b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ec9190611fad565b61132e5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610a2e565b7f992f4e1cb3fad09f127c9739ad87c58cb4c39f9b64509f77055c11f41356937485858460030154604051610d3093929190612515565b6000805460405163703e2a4360e11b815260048101859052602481018490526001600160a01b039091169063e07c54869060440160206040518083038186803b1580156113b157600080fd5b505afa1580156113c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108209190611f91565b6000600784846040516113fd929190612302565b90815260200160405180910390209050428160030154106114605760405162461bcd60e51b815260206004820152601560248201527f51756572792074797065207265676973746572656400000000000000000000006044820152606401610a2e565b600061146b83611d4d565b90506005548110156114cb5760405162461bcd60e51b815260206004820152602360248201527f4d75737420726567697374657220666f72206174206c65617374206f6e65207960448201526232b0b960e91b6064820152608401610a2e565b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b15801561152157600080fd5b505af1158015611535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115599190611fad565b61159b5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610a2e565b60065481106115b15760001960038301556115dc565b6005546115c2826301e13380612693565b6115cc9190612673565b6115d6904261265b565b60038301555b8154336001600160a01b031991821681178455600184018054909216179055600482015460ff166116555760088054600181018255600091909152611644907ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018686611e44565b5060048201805460ff191660011790555b7f0a223061b8268a2ebaf138f9f6cb7f197f15d85a3b474395dedee6ff2394baeb8585338560030154604051610d3094939291906124b3565b600080600061169c85610adc565b9050806116b0576000809250925050610795565b806116ba816126f9565b91506001905060008083816116cf8a8361110c565b90508881116116ea5760008097509750505050505050610795565b6116f48a8461110c565b90508881111561170357600094505b84156117b5576002611715848461265b565b61171f9190612673565b935061172b8a8561110c565b90508881111561176c5760006117468b61040a6001886126b2565b90508981116117585760009550611766565b6117636001866126b2565b92505b506117b0565b600061177d8b61040a87600161265b565b9050898111156117a057600095508461179581612745565b9550508091506117ae565b6117ab85600161265b565b93505b505b611703565b6117bf8a8261079c565b6117d55760018497509750505050505050610795565b6117df8a8261079c565b80156117ea57508584105b1561180d57836117f981612745565b9450506118068a8561110c565b90506117d5565b858414801561182157506118218a8261079c565b156118385760008097509750505050505050610795565b60018497509750505050505050610795565b8051808201602090810180516007825292820191909301209152805460018201546002830180546001600160a01b0393841694929093169261188b90612710565b80601f01602080910402602001604051908101604052809291908181526020018280546118b790612710565b80156119045780601f106118d957610100808354040283529160200191611904565b820191906000526020600020905b8154815290600101906020018083116118e757829003601f168201915b50505050600383015460049093015491929160ff16905085565b6001546040516387a475fd60e01b8152600481018390526000918291829182916001600160a01b03909116906387a475fd9060240160206040518083038186803b15801561196b57600080fd5b505afa15801561197f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a3919061205f565b905060606119b6826103b442600161265b565b94509050836119d25760008061019494509450945050506119e7565b60006119dd82611ddf565b955060c893505050505b9193909250565b606080600080611a0288610456888a6126b2565b9150915081611a53576040805160008082526020820190925290611a36565b6060815260200190600190039081611a215790505b506040805160008152602081019091529094509250611d44915050565b6000611a5f898961070d565b909350905082611ab2576040805160008082526020820190925290611a94565b6060815260200190600190039081611a7f5790505b506040805160008152602081019091529095509350611d4492505050565b60008060008867ffffffffffffffff811115611ade57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b07578160200160208202803683370190505b5090505b8883108015611b2e57508482611b2286600161265b565b611b2c91906126b2565b115b15611ba0576000611b438d61040a85886126b2565b9050611b4f8d8261079c565b611b8d5780828581518110611b7457634e487b7160e01b600052603260045260246000fd5b602090810291909101015283611b8981612745565b9450505b82611b9781612745565b93505050611b0b565b60008367ffffffffffffffff811115611bc957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611bfc57816020015b6060815260200190600190039081611be75790505b50905060008467ffffffffffffffff811115611c2857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c51578160200160208202803683370190505b50905060005b85811015611d37578381611c6c6001896126b2565b611c7691906126b2565b81518110611c9457634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110611cbc57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611cf98f838381518110611cec57634e487b7160e01b600052603260045260246000fd5b6020026020010151611084565b838281518110611d1957634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611d2f90612745565b915050611c57565b5090985096505050505050505b94509492505050565b6000806000611d64604051602001610b7690612539565b909250905060008115611db357600083806020019051810190611d87919061205f565b9050670de0b6b3a7640000611d9c8288612693565b611da69190612673565b6004919091559050611dd7565b670de0b6b3a764000060045486611dca9190612693565b611dd49190612673565b90505b949350505050565b6000805b8251811015611e3e57828181518110611e0c57634e487b7160e01b600052603260045260246000fd5b016020015160f81c611e2083610100612693565b611e2a919061265b565b915080611e3681612745565b915050611de3565b50919050565b828054611e5090612710565b90600052602060002090601f016020900481019282611e725760008555611eb8565b82601f10611e8b5782800160ff19823516178555611eb8565b82800160010185558215611eb8579182015b82811115611eb8578235825591602001919060010190611e9d565b50611ec4929150611ec8565b5090565b5b80821115611ec45760008155600101611ec9565b805180151581146106c357600080fd5b600082601f830112611efd578081fd5b8151611f10611f0b82612633565b612602565b818152846020838601011115611f24578283fd5b611dd78260208301602087016126c9565b60008083601f840112611f46578182fd5b50813567ffffffffffffffff811115611f5d578182fd5b60208301915083602082850101111561079557600080fd5b600060208284031215611f86578081fd5b81356108208161278c565b600060208284031215611fa2578081fd5b81516108208161278c565b600060208284031215611fbe578081fd5b61082082611edd565b600080600060608486031215611fdb578182fd5b611fe484611edd565b9250602084015167ffffffffffffffff811115611fff578283fd5b61200b86828701611eed565b925050604084015190509250925092565b6000806040838503121561202e578182fd5b61203783611edd565b9150602083015190509250929050565b600060208284031215612058578081fd5b5035919050565b600060208284031215612070578081fd5b5051919050565b60008060408385031215612089578182fd5b50508035926020909101359150565b600080600080608085870312156120ad578081fd5b5050823594602084013594506040840135936060013592509050565b6000602082840312156120da578081fd5b815167ffffffffffffffff8111156120f0578182fd5b611dd784828501611eed565b6000806020838503121561210e578182fd5b823567ffffffffffffffff811115612124578283fd5b610ef385828601611f35565b600080600060408486031215612144578283fd5b833567ffffffffffffffff81111561215a578384fd5b61216686828701611f35565b909450925050602084013561217a8161278c565b809150509250925092565b6000806000806040858703121561219a578182fd5b843567ffffffffffffffff808211156121b1578384fd5b6121bd88838901611f35565b909650945060208701359150808211156121d5578384fd5b506121e287828801611f35565b95989497509550505050565b600080600060408486031215612202578081fd5b833567ffffffffffffffff811115612218578182fd5b61222486828701611f35565b909790965060209590950135949350505050565b600060208284031215612249578081fd5b813567ffffffffffffffff81111561225f578182fd5b8201601f8101841361226f578182fd5b803561227d611f0b82612633565b818152856020838501011115612291578384fd5b81602084016020830137908101602001929092525092915050565b600081518084526122c48160208601602086016126c9565b601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6000828483379101908152919050565b60006001600160a01b03808816835280871660208401525060a0604083015261233e60a08301866122ac565b6060830194909452509015156080909101529392505050565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b838110156123ad57605f1988870301855261239b8683516122ac565b9550938201939082019060010161237f565b505085840381870152865180855287820194820193509150845b828110156123e3578451845293810193928101926001016123c7565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561244457603f198886030184526124328583516122ac565b94509285019290850190600101612416565b5092979650505050505050565b60006020825261082060208301846122ac565b60006040825261247760408301856122ac565b90508260208301529392505050565b60006040825261249a6040830185876122d8565b90506001600160a01b0383166020830152949350505050565b6000606082526124c76060830186886122d8565b6001600160a01b03949094166020830152506040015292915050565b6000604082526124f76040830186886122d8565b828103602084015261250a8185876122d8565b979650505050505050565b6000604082526125296040830185876122d8565b9050826020830152949350505050565b60408082526003908201819052623a393160e91b6060830152608060208301819052820152621d5cd960ea1b60a082015260c00190565b600060408252600960408301526853706f74507269636560b81b60608301526080602083015261082060808301846122ac565b6000602082526001600160a01b0380845116602084015280602085015116604084015250604083015160a060608401526125e060c08401826122ac565b9050606084015160808401526080840151151560a08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561262b5761262b612776565b604052919050565b600067ffffffffffffffff82111561264d5761264d612776565b50601f01601f191660200190565b6000821982111561266e5761266e612760565b500190565b60008261268e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156126ad576126ad612760565b500290565b6000828210156126c4576126c4612760565b500390565b60005b838110156126e45781810151838201526020016126cc565b838111156126f3576000848401525b50505050565b60008161270857612708612760565b506000190190565b600181811c9082168061272457607f821691505b60208210811415611e3e57634e487b7160e01b600052602260045260246000fd5b600060001982141561275957612759612760565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146127a157600080fd5b5056fea2646970667358221220a414f111c9e4e69da23f14b63532e12577bd28a1ba1352c830103884f6bbc52a64736f6c6343000803003300000000000000000000000080fc34a2f9ffe86f41580f47368289c402dec660000000000000000000000000199839a4907abec8240d119b606c98c405bb0b3300000000000000000000000034fae97547e990ef0e05e05286c51e4645bf1a850000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e0900000000000000000000000000000000000000000000003635c9adc5dea00000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80638fc03c171161011a578063ce5e11bf116100ad578063f66f49c31161007c578063f66f49c314610448578063f6ca94521461045b578063f78eea831461047f578063fc0c546a146104ad578063fcd4a546146104c0576101fb565b8063ce5e11bf146103fc578063dffaf0911461040f578063e07c548614610422578063ea87152b14610435576101fb565b8063b22ea069116100e9578063b22ea069146103b9578063b675a06b146103cc578063bf409c1e146103d4578063c5958af9146103e9576101fb565b80638fc03c171461037757806394c320471461038a5780639aa9ade11461039d578063a792765f146103a6576101fb565b80632af8aae01161019257806364ee3c6d1161016157806364ee3c6d1461032857806376660c691461034957806377b03e0d1461035c57806389d6a6ac1461036f576101fb565b80632af8aae0146102bf57806344e87f91146102d257806346904840146102f5578063483b812c14610308576101fb565b806319435a27116101ce57806319435a27146102425780631959ad5b146102625780631de4a86d1461028d5780632944908514610295576101fb565b8063056059ab14610200578063093320281461021c5780631368e9c714610226578063193b505b1461022f575b600080fd5b61020960045481565b6040519081526020015b60405180910390f35b6102246104e1565b005b61020960055481565b61022461023d366004611f75565b6105d2565b610255610250366004612047565b61060a565b6040516102139190612451565b600054610275906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b6102096106c8565b6102a86102a3366004612077565b61070d565b604080519215158352602083019190915201610213565b600154610275906001600160a01b031681565b6102e56102e0366004612077565b61079c565b6040519015158152602001610213565b600354610275906001600160a01b031681565b61031b6103163660046120fc565b610827565b60405161021391906125a3565b61033b610336366004612077565b61094c565b604051610213929190612464565b610224610357366004612130565b6109a5565b61020961036a366004612047565b610adc565b610209610b5f565b610224610385366004612185565b610c0d565b610224610398366004612130565b610d3f565b61020960065481565b61033b6103b4366004612077565b610e69565b6102556103c7366004612047565b610eff565b600854610209565b6103dc610fab565b60405161021391906123f0565b6102556103f7366004612077565b611084565b61020961040a366004612077565b61110c565b61022461041d3660046121ee565b611190565b610275610430366004612077565b611365565b6102246104433660046121ee565b6113e9565b6102a8610456366004612077565b61168e565b61046e610469366004612238565b61184a565b604051610213959493929190612312565b61049261048d366004612047565b61191e565b60408051938452602084019290925290820152606001610213565b600254610275906001600160a01b031681565b6104d36104ce366004612098565b6119ee565b604051610213929190612357565b60025460405163099df72f60e11b81527ffa522e460446113e8fd353d7fa015625a68bc0369712213a42e006346440891e60048201526001600160a01b039091169063133bee5e90602401602060405180830381600087803b15801561054657600080fd5b505af115801561055a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057e9190611f91565b600080546001600160a01b0319166001600160a01b039290921691821790556040519081527fbe208ccb2f4ccb43a5a1dbb6fda63375a95c766ebcc49bc6b751b58a88e80ef29060200160405180910390a1565b6001546001600160a01b0316156105e857600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60606008828154811061062d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461064290612710565b80601f016020809104026020016040519081016040528092919081815260200182805461066e90612710565b80156106bb5780601f10610690576101008083540402835291602001916106bb565b820191906000526020600020905b81548152906001019060200180831161069e57829003601f168201915b505050505090505b919050565b6040516020016106d790612539565b60408051601f19818403018152908290526106f491602001612570565b6040516020818303038152906040528051906020012081565b60008054604051632944908560e01b8152600481018590526024810184905282916001600160a01b031690632944908590604401604080518083038186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610790919061201c565b915091505b9250929050565b600080546040516344e87f9160e01b815260048101859052602481018490526001600160a01b03909116906344e87f919060440160206040518083038186803b1580156107e857600080fd5b505afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108209190611fad565b9392505050565b6040805160a08101825260008082526020820181905260608284018190528201819052608082015290516007906108619085908590612302565b90815260408051918290036020908101832060a08401835280546001600160a01b0390811685526001820154169184019190915260028101805491928401916108a990612710565b80601f01602080910402602001604051908101604052809291908181526020018280546108d590612710565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b50505091835250506003820154602082015260049091015460ff1615156040909101529392505050565b6060600080600061095d868661168e565b91509150816109845760006040518060200160405280600081525090935093505050610795565b61098e868261110c565b925061099a8684611084565b935050509250929050565b6000600784846040516109b9929190612302565b9081526040519081900360200190208054909150336001600160a01b0390911614610a375760405162461bcd60e51b815260206004820152602360248201527f4f6e6c79206f776e65722063616e206368616e6765206f776e6572206164647260448201526265737360e81b60648201526084015b60405180910390fd5b80600301544210610a815760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b80546001600160a01b0319166001600160a01b0383161781556040517fb21408ee7eeb25c9e048362424beed1681201ad2c97fe1450fae50e9839b95e290610ace90869086908690612486565b60405180910390a150505050565b600080546040516377b03e0d60e01b8152600481018490526001600160a01b03909116906377b03e0d9060240160206040518083038186803b158015610b2157600080fd5b505afa158015610b35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b59919061205f565b92915050565b6000806000610bb7604051602001610b7690612539565b60408051601f1981840301815290829052610b9391602001612570565b6040516020818303038152906040528051906020012061a8c0426103b491906126b2565b909250905060008115610bdf5782806020019051810190610bd8919061205f565b9050610be4565b506004545b80600554670de0b6b3a7640000610bfb9190612693565b610c059190612673565b935050505090565b600060078585604051610c21929190612302565b9081526040519081900360200190206001810154909150336001600160a01b0390911614610ca25760405162461bcd60e51b815260206004820152602860248201527f4f6e6c792073706563206d616e616765722063616e2073657420636f6e74656e6044820152671d081c9958dbdc9960c21b6064820152608401610a2e565b80600301544210610cec5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b610cfa600282018484611e44565b507f2426e5ef81549a1aa031f8c0087512da324e37d3fb648ca51d684383dc26bd3285858585604051610d3094939291906124e3565b60405180910390a15050505050565b600060078484604051610d53929190612302565b9081526040519081900360200190208054909150336001600160a01b0390911614610dce5760405162461bcd60e51b815260206004820152602560248201527f4f6e6c792061646d696e2063616e206368616e6765206d616e61676572206164604482015264647265737360d81b6064820152608401610a2e565b80600301544210610e185760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb88195e1c1a5c995960621b6044820152606401610a2e565b6001810180546001600160a01b0319166001600160a01b0384161790556040517fca34933fea0ffdb5b2791c1644e4ca9a2ab287e741991dd7be70aae8470da63d90610ace90869086908690612486565b6000805460405163a792765f60e01b81526004810185905260248101849052606092916001600160a01b03169063a792765f9060440160006040518083038186803b158015610eb757600080fd5b505afa158015610ecb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ef39190810190611fc7565b90969095509350505050565b60088181548110610f0f57600080fd5b906000526020600020016000915090508054610f2a90612710565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5690612710565b8015610fa35780601f10610f7857610100808354040283529160200191610fa3565b820191906000526020600020905b815481529060010190602001808311610f8657829003601f168201915b505050505081565b60606008805480602002602001604051908101604052809291908181526020016000905b8282101561107b578382906000526020600020018054610fee90612710565b80601f016020809104026020016040519081016040528092919081815260200182805461101a90612710565b80156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b505050505081526020019060010190610fcf565b50505050905090565b60005460405163c5958af960e01b815260048101849052602481018390526060916001600160a01b03169063c5958af99060440160006040518083038186803b1580156110d057600080fd5b505afa1580156110e4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261082091908101906120c9565b6000805460405163ce5e11bf60e01b815260048101859052602481018490526001600160a01b039091169063ce5e11bf9060440160206040518083038186803b15801561115857600080fd5b505afa15801561116c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610820919061205f565b6000600784846040516111a4929190612302565b90815260200160405180910390209050428160030154116112075760405162461bcd60e51b815260206004820152601960248201527f51756572792074797065206e6f742072656769737465726564000000000000006044820152606401610a2e565b600061121283611d4d565b9050600654811061122a57600019600383015561125e565b60055461123b826301e13380612693565b6112459190612673565b826003016000828254611258919061265b565b90915550505b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b1580156112b457600080fd5b505af11580156112c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ec9190611fad565b61132e5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610a2e565b7f992f4e1cb3fad09f127c9739ad87c58cb4c39f9b64509f77055c11f41356937485858460030154604051610d3093929190612515565b6000805460405163703e2a4360e11b815260048101859052602481018490526001600160a01b039091169063e07c54869060440160206040518083038186803b1580156113b157600080fd5b505afa1580156113c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108209190611f91565b6000600784846040516113fd929190612302565b90815260200160405180910390209050428160030154106114605760405162461bcd60e51b815260206004820152601560248201527f51756572792074797065207265676973746572656400000000000000000000006044820152606401610a2e565b600061146b83611d4d565b90506005548110156114cb5760405162461bcd60e51b815260206004820152602360248201527f4d75737420726567697374657220666f72206174206c65617374206f6e65207960448201526232b0b960e91b6064820152608401610a2e565b6002546003546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018690529116906323b872dd90606401602060405180830381600087803b15801561152157600080fd5b505af1158015611535573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115599190611fad565b61159b5760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b6044820152606401610a2e565b60065481106115b15760001960038301556115dc565b6005546115c2826301e13380612693565b6115cc9190612673565b6115d6904261265b565b60038301555b8154336001600160a01b031991821681178455600184018054909216179055600482015460ff166116555760088054600181018255600091909152611644907ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018686611e44565b5060048201805460ff191660011790555b7f0a223061b8268a2ebaf138f9f6cb7f197f15d85a3b474395dedee6ff2394baeb8585338560030154604051610d3094939291906124b3565b600080600061169c85610adc565b9050806116b0576000809250925050610795565b806116ba816126f9565b91506001905060008083816116cf8a8361110c565b90508881116116ea5760008097509750505050505050610795565b6116f48a8461110c565b90508881111561170357600094505b84156117b5576002611715848461265b565b61171f9190612673565b935061172b8a8561110c565b90508881111561176c5760006117468b61040a6001886126b2565b90508981116117585760009550611766565b6117636001866126b2565b92505b506117b0565b600061177d8b61040a87600161265b565b9050898111156117a057600095508461179581612745565b9550508091506117ae565b6117ab85600161265b565b93505b505b611703565b6117bf8a8261079c565b6117d55760018497509750505050505050610795565b6117df8a8261079c565b80156117ea57508584105b1561180d57836117f981612745565b9450506118068a8561110c565b90506117d5565b858414801561182157506118218a8261079c565b156118385760008097509750505050505050610795565b60018497509750505050505050610795565b8051808201602090810180516007825292820191909301209152805460018201546002830180546001600160a01b0393841694929093169261188b90612710565b80601f01602080910402602001604051908101604052809291908181526020018280546118b790612710565b80156119045780601f106118d957610100808354040283529160200191611904565b820191906000526020600020905b8154815290600101906020018083116118e757829003601f168201915b50505050600383015460049093015491929160ff16905085565b6001546040516387a475fd60e01b8152600481018390526000918291829182916001600160a01b03909116906387a475fd9060240160206040518083038186803b15801561196b57600080fd5b505afa15801561197f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a3919061205f565b905060606119b6826103b442600161265b565b94509050836119d25760008061019494509450945050506119e7565b60006119dd82611ddf565b955060c893505050505b9193909250565b606080600080611a0288610456888a6126b2565b9150915081611a53576040805160008082526020820190925290611a36565b6060815260200190600190039081611a215790505b506040805160008152602081019091529094509250611d44915050565b6000611a5f898961070d565b909350905082611ab2576040805160008082526020820190925290611a94565b6060815260200190600190039081611a7f5790505b506040805160008152602081019091529095509350611d4492505050565b60008060008867ffffffffffffffff811115611ade57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b07578160200160208202803683370190505b5090505b8883108015611b2e57508482611b2286600161265b565b611b2c91906126b2565b115b15611ba0576000611b438d61040a85886126b2565b9050611b4f8d8261079c565b611b8d5780828581518110611b7457634e487b7160e01b600052603260045260246000fd5b602090810291909101015283611b8981612745565b9450505b82611b9781612745565b93505050611b0b565b60008367ffffffffffffffff811115611bc957634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611bfc57816020015b6060815260200190600190039081611be75790505b50905060008467ffffffffffffffff811115611c2857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c51578160200160208202803683370190505b50905060005b85811015611d37578381611c6c6001896126b2565b611c7691906126b2565b81518110611c9457634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110611cbc57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611cf98f838381518110611cec57634e487b7160e01b600052603260045260246000fd5b6020026020010151611084565b838281518110611d1957634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080611d2f90612745565b915050611c57565b5090985096505050505050505b94509492505050565b6000806000611d64604051602001610b7690612539565b909250905060008115611db357600083806020019051810190611d87919061205f565b9050670de0b6b3a7640000611d9c8288612693565b611da69190612673565b6004919091559050611dd7565b670de0b6b3a764000060045486611dca9190612693565b611dd49190612673565b90505b949350505050565b6000805b8251811015611e3e57828181518110611e0c57634e487b7160e01b600052603260045260246000fd5b016020015160f81c611e2083610100612693565b611e2a919061265b565b915080611e3681612745565b915050611de3565b50919050565b828054611e5090612710565b90600052602060002090601f016020900481019282611e725760008555611eb8565b82601f10611e8b5782800160ff19823516178555611eb8565b82800160010185558215611eb8579182015b82811115611eb8578235825591602001919060010190611e9d565b50611ec4929150611ec8565b5090565b5b80821115611ec45760008155600101611ec9565b805180151581146106c357600080fd5b600082601f830112611efd578081fd5b8151611f10611f0b82612633565b612602565b818152846020838601011115611f24578283fd5b611dd78260208301602087016126c9565b60008083601f840112611f46578182fd5b50813567ffffffffffffffff811115611f5d578182fd5b60208301915083602082850101111561079557600080fd5b600060208284031215611f86578081fd5b81356108208161278c565b600060208284031215611fa2578081fd5b81516108208161278c565b600060208284031215611fbe578081fd5b61082082611edd565b600080600060608486031215611fdb578182fd5b611fe484611edd565b9250602084015167ffffffffffffffff811115611fff578283fd5b61200b86828701611eed565b925050604084015190509250925092565b6000806040838503121561202e578182fd5b61203783611edd565b9150602083015190509250929050565b600060208284031215612058578081fd5b5035919050565b600060208284031215612070578081fd5b5051919050565b60008060408385031215612089578182fd5b50508035926020909101359150565b600080600080608085870312156120ad578081fd5b5050823594602084013594506040840135936060013592509050565b6000602082840312156120da578081fd5b815167ffffffffffffffff8111156120f0578182fd5b611dd784828501611eed565b6000806020838503121561210e578182fd5b823567ffffffffffffffff811115612124578283fd5b610ef385828601611f35565b600080600060408486031215612144578283fd5b833567ffffffffffffffff81111561215a578384fd5b61216686828701611f35565b909450925050602084013561217a8161278c565b809150509250925092565b6000806000806040858703121561219a578182fd5b843567ffffffffffffffff808211156121b1578384fd5b6121bd88838901611f35565b909650945060208701359150808211156121d5578384fd5b506121e287828801611f35565b95989497509550505050565b600080600060408486031215612202578081fd5b833567ffffffffffffffff811115612218578182fd5b61222486828701611f35565b909790965060209590950135949350505050565b600060208284031215612249578081fd5b813567ffffffffffffffff81111561225f578182fd5b8201601f8101841361226f578182fd5b803561227d611f0b82612633565b818152856020838501011115612291578384fd5b81602084016020830137908101602001929092525092915050565b600081518084526122c48160208601602086016126c9565b601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6000828483379101908152919050565b60006001600160a01b03808816835280871660208401525060a0604083015261233e60a08301866122ac565b6060830194909452509015156080909101529392505050565b6000604082016040835280855180835260608501915060608160051b86010192506020808801855b838110156123ad57605f1988870301855261239b8683516122ac565b9550938201939082019060010161237f565b505085840381870152865180855287820194820193509150845b828110156123e3578451845293810193928101926001016123c7565b5091979650505050505050565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561244457603f198886030184526124328583516122ac565b94509285019290850190600101612416565b5092979650505050505050565b60006020825261082060208301846122ac565b60006040825261247760408301856122ac565b90508260208301529392505050565b60006040825261249a6040830185876122d8565b90506001600160a01b0383166020830152949350505050565b6000606082526124c76060830186886122d8565b6001600160a01b03949094166020830152506040015292915050565b6000604082526124f76040830186886122d8565b828103602084015261250a8185876122d8565b979650505050505050565b6000604082526125296040830185876122d8565b9050826020830152949350505050565b60408082526003908201819052623a393160e91b6060830152608060208301819052820152621d5cd960ea1b60a082015260c00190565b600060408252600960408301526853706f74507269636560b81b60608301526080602083015261082060808301846122ac565b6000602082526001600160a01b0380845116602084015280602085015116604084015250604083015160a060608401526125e060c08401826122ac565b9050606084015160808401526080840151151560a08401528091505092915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561262b5761262b612776565b604052919050565b600067ffffffffffffffff82111561264d5761264d612776565b50601f01601f191660200190565b6000821982111561266e5761266e612760565b500190565b60008261268e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156126ad576126ad612760565b500290565b6000828210156126c4576126c4612760565b500390565b60005b838110156126e45781810151838201526020016126cc565b838111156126f3576000848401525b50505050565b60008161270857612708612760565b506000190190565b600181811c9082168061272457607f821691505b60208210811415611e3e57634e487b7160e01b600052602260045260246000fd5b600060001982141561275957612759612760565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146127a157600080fd5b5056fea2646970667358221220a414f111c9e4e69da23f14b63532e12577bd28a1ba1352c830103884f6bbc52a64736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000080fc34a2f9ffe86f41580f47368289c402dec660000000000000000000000000199839a4907abec8240d119b606c98c405bb0b3300000000000000000000000034fae97547e990ef0e05e05286c51e4645bf1a850000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e0900000000000000000000000000000000000000000000003635c9adc5dea00000
-----Decoded View---------------
Arg [0] : _tellorMaster (address): 0x80fc34a2f9FfE86F41580F47368289C402DEc660
Arg [1] : _tellor (address): 0x199839a4907ABeC8240D119B606C98c405Bb0B33
Arg [2] : _feeRecipient (address): 0x34Fae97547E990ef0E05e05286c51E4645bf1A85
Arg [3] : _reservedOwner (address): 0x4d303B4F20d55B9D0eA269B45AB5610abAf53E09
Arg [4] : _registrationPricePerYearUSD (uint256): 1000000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000080fc34a2f9ffe86f41580f47368289c402dec660
Arg [1] : 000000000000000000000000199839a4907abec8240d119b606c98c405bb0b33
Arg [2] : 00000000000000000000000034fae97547e990ef0e05e05286c51e4645bf1a85
Arg [3] : 0000000000000000000000004d303b4f20d55b9d0ea269b45ab5610abaf53e09
Arg [4] : 00000000000000000000000000000000000000000000003635c9adc5dea00000
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.