Contract 0xDA7a001b254CD22e46d3eAB04d937489c93174C3

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd50c8e74156ea5bcfcfa9c10be7cc43830471caf03674ca74e9066141c1cf6750x6080604010539542022-05-27 7:58:18299 days 2 hrs ago0x6a885bd0086368b56dbf2005bb72bbcc5fd7e2b9 IN  Create: StdReferenceProxy0 CLV0.029814225
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StdReferenceProxy

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license
/**
 *Submitted for verification at clvscan.com on 2022-05-30
*/

/**
 *Submitted for verification at Etherscan.io on 2021-02-11
*/

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * onlyOwner, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * onlyOwner functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

interface IStdReference {
    /// A structure returned whenever someone requests for standard reference data.
    struct ReferenceData {
        uint256 rate; // base/quote exchange rate, multiplied by 1e18.
        uint256 lastUpdatedBase; // UNIX epoch of the last time when base price gets updated.
        uint256 lastUpdatedQuote; // UNIX epoch of the last time when quote price gets updated.
    }

    /// Returns the price data for the given base/quote pair. Revert if not available.
    function getReferenceData(string memory _base, string memory _quote)
        external
        view
        returns (ReferenceData memory);

    /// Similar to getReferenceData, but with multiple base/quote pairs at once.
    function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes)
        external
        view
        returns (ReferenceData[] memory);
}

abstract contract StdReferenceBase is IStdReference {
    function getReferenceData(string memory _base, string memory _quote)
        public
        virtual
        override
        view
        returns (ReferenceData memory);

    function getReferenceDataBulk(string[] memory _bases, string[] memory _quotes)
        public
        override
        view
        returns (ReferenceData[] memory)
    {
        require(_bases.length == _quotes.length, "BAD_INPUT_LENGTH");
        uint256 len = _bases.length;
        ReferenceData[] memory results = new ReferenceData[](len);
        for (uint256 idx = 0; idx < len; idx++) {
            results[idx] = getReferenceData(_bases[idx], _quotes[idx]);
        }
        return results;
    }
}

contract StdReferenceProxy is Ownable, StdReferenceBase {
    IStdReference public ref;

    constructor(IStdReference _ref) public {
        ref = _ref;
    }

    /// Updates standard reference implementation. Only callable by the owner.
    function setRef(IStdReference _ref) public onlyOwner {
        ref = _ref;
    }

    /// Returns the price data for the given base/quote pair. Revert if not available.
    function getReferenceData(string memory _base, string memory _quote)
        public
        override
        view
        returns (ReferenceData memory)
    {
        return ref.getReferenceData(_base, _quote);
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract IStdReference","name":"_ref","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"string","name":"_base","type":"string"},{"internalType":"string","name":"_quote","type":"string"}],"name":"getReferenceData","outputs":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedBase","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedQuote","type":"uint256"}],"internalType":"struct IStdReference.ReferenceData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"_bases","type":"string[]"},{"internalType":"string[]","name":"_quotes","type":"string[]"}],"name":"getReferenceDataBulk","outputs":[{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedBase","type":"uint256"},{"internalType":"uint256","name":"lastUpdatedQuote","type":"uint256"}],"internalType":"struct IStdReference.ReferenceData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ref","outputs":[{"internalType":"contract IStdReference","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IStdReference","name":"_ref","type":"address"}],"name":"setRef","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161096738038061096783398101604081905261002f916100b5565b60006100426001600160e01b036100b116565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100e3565b3390565b6000602082840312156100c6578081fd5b81516001600160a01b03811681146100dc578182fd5b9392505050565b610875806100f26000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100d55780638da5cb5b146100dd578063e42a071b146100e5578063f2fde38b146101055761007d565b806321a78f681461008257806365555bcc146100a05780636bc855cc146100c0575b600080fd5b61008a610118565b60405161009791906106bd565b60405180910390f35b6100b36100ae3660046105c5565b610127565b60405161009791906107f2565b6100d36100ce366004610541565b6101ba565b005b6100d361021a565b61008a610299565b6100f86100f3366004610564565b6102a8565b60405161009791906106d1565b6100d3610113366004610541565b610386565b6001546001600160a01b031681565b61012f610440565b60015460405163195556f360e21b81526001600160a01b03909116906365555bcc90610161908690869060040161071f565b60606040518083038186803b15801561017957600080fd5b505afa15801561018d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b1919061061c565b90505b92915050565b6101c261043c565b6000546001600160a01b039081169116146101f85760405162461bcd60e51b81526004016101ef906107bd565b60405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b61022261043c565b6000546001600160a01b0390811691161461024f5760405162461bcd60e51b81526004016101ef906107bd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b606081518351146102cb5760405162461bcd60e51b81526004016101ef9061074d565b825160608167ffffffffffffffff811180156102e657600080fd5b5060405190808252806020026020018201604052801561032057816020015b61030d610440565b8152602001906001900390816103055790505b50905060005b8281101561037d5761035e86828151811061033d57fe5b602002602001015186838151811061035157fe5b6020026020010151610127565b82828151811061036a57fe5b6020908102919091010152600101610326565b50949350505050565b61038e61043c565b6000546001600160a01b039081169116146103bb5760405162461bcd60e51b81526004016101ef906107bd565b6001600160a01b0381166103e15760405162461bcd60e51b81526004016101ef90610777565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60405180606001604052806000815260200160008152602001600081525090565b600082601f830112610471578081fd5b813567ffffffffffffffff811115610487578182fd5b60206104968182840201610800565b828152925080830184820160005b848110156104cd576104bb888584358a01016104d8565b835291830191908301906001016104a4565b505050505092915050565b600082601f8301126104e8578081fd5b813567ffffffffffffffff8111156104fe578182fd5b610511601f8201601f1916602001610800565b915080825283602082850101111561052857600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215610552578081fd5b813561055d81610827565b9392505050565b60008060408385031215610576578081fd5b823567ffffffffffffffff8082111561058d578283fd5b61059986838701610461565b935060208501359150808211156105ae578283fd5b506105bb85828601610461565b9150509250929050565b600080604083850312156105d7578182fd5b823567ffffffffffffffff808211156105ee578384fd5b6105fa868387016104d8565b9350602085013591508082111561060f578283fd5b506105bb858286016104d8565b60006060828403121561062d578081fd5b6106376060610800565b8251815260208301516020820152604083015160408201528091505092915050565b60008151808452815b8181101561067e57602081850181015186830182015201610662565b8181111561068f5782602083870101525b50601f01601f19169290920160200192915050565b8051825260208082015190830152604090810151910152565b6001600160a01b0391909116815260200190565b6020808252825182820181905260009190848201906040850190845b81811015610713576107008385516106a4565b92840192606092909201916001016106ed565b50909695505050505050565b6000604082526107326040830185610659565b82810360208401526107448185610659565b95945050505050565b60208082526010908201526f0848288be929ca0aaa8be988a9c8ea8960831b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b606081016101b482846106a4565b60405181810167ffffffffffffffff8111828210171561081f57600080fd5b604052919050565b6001600160a01b038116811461083c57600080fd5b5056fea26469706673582212209eefd9a35c715d63a2495dda784e00be232e9d323660430832b0104b4ee8144b64736f6c634300060b0033000000000000000000000000a55d9ef16af921b70fed1421c1d298ca5a3a18f1

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a55d9ef16af921b70fed1421c1d298ca5a3a18f1

-----Decoded View---------------
Arg [0] : _ref (address): 0xa55d9ef16af921b70fed1421c1d298ca5a3a18f1

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a55d9ef16af921b70fed1421c1d298ca5a3a18f1


Deployed ByteCode Sourcemap

4933:656:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4996:24;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5363:223;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;5185:82::-;;;;;;:::i;:::-;;:::i;:::-;;2716:148;;;:::i;2076:79::-;;;:::i;4407:519::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3019:244::-;;;;;;:::i;:::-;;:::i;4996:24::-;;;-1:-1:-1;;;;;4996:24:0;;:::o;5363:223::-;5498:20;;:::i;:::-;5543:3;;:35;;-1:-1:-1;;;5543:35:0;;-1:-1:-1;;;;;5543:3:0;;;;:20;;:35;;5564:5;;5571:6;;5543:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5536:42;;5363:223;;;;;:::o;5185:82::-;2298:12;:10;:12::i;:::-;2288:6;;-1:-1:-1;;;;;2288:6:0;;;:22;;;2280:67;;;;-1:-1:-1;;;2280:67:0;;;;;;;:::i;:::-;;;;;;;;;5249:3:::1;:10:::0;;-1:-1:-1;;;;;;5249:10:0::1;-1:-1:-1::0;;;;;5249:10:0;;;::::1;::::0;;;::::1;::::0;;5185:82::o;2716:148::-;2298:12;:10;:12::i;:::-;2288:6;;-1:-1:-1;;;;;2288:6:0;;;:22;;;2280:67;;;;-1:-1:-1;;;2280:67:0;;;;;;;:::i;:::-;2823:1:::1;2807:6:::0;;2786:40:::1;::::0;-1:-1:-1;;;;;2807:6:0;;::::1;::::0;2786:40:::1;::::0;2823:1;;2786:40:::1;2854:1;2837:19:::0;;-1:-1:-1;;;;;;2837:19:0::1;::::0;;2716:148::o;2076:79::-;2114:7;2141:6;-1:-1:-1;;;;;2141:6:0;2076:79;:::o;4407:519::-;4552:22;4617:7;:14;4600:6;:13;:31;4592:60;;;;-1:-1:-1;;;4592:60:0;;;;;;;:::i;:::-;4677:13;;4701:30;4677:13;4734:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;4701:57:0;-1:-1:-1;4774:11:0;4769:125;4797:3;4791;:9;4769:125;;;4839:43;4856:6;4863:3;4856:11;;;;;;;;;;;;;;4869:7;4877:3;4869:12;;;;;;;;;;;;;;4839:16;:43::i;:::-;4824:7;4832:3;4824:12;;;;;;;;;;;;;;;;;:58;4802:5;;4769:125;;;-1:-1:-1;4911:7:0;4407:519;-1:-1:-1;;;;4407:519:0:o;3019:244::-;2298:12;:10;:12::i;:::-;2288:6;;-1:-1:-1;;;;;2288:6:0;;;:22;;;2280:67;;;;-1:-1:-1;;;2280:67:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;3108:22:0;::::1;3100:73;;;;-1:-1:-1::0;;;3100:73:0::1;;;;;;;:::i;:::-;3210:6;::::0;;3189:38:::1;::::0;-1:-1:-1;;;;;3189:38:0;;::::1;::::0;3210:6;::::1;::::0;3189:38:::1;::::0;::::1;3238:6;:17:::0;;-1:-1:-1;;;;;;3238:17:0::1;-1:-1:-1::0;;;;;3238:17:0;;;::::1;::::0;;;::::1;::::0;;3019:244::o;716:106::-;804:10;716:106;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;159:708::-;;286:3;279:4;271:6;267:17;263:27;253:2;;-1:-1;;294:12;253:2;341:6;328:20;12700:18;12692:6;12689:30;12686:2;;;-1:-1;;12722:12;12686:2;12767:4;363:90;12767:4;;12759:6;12755:17;12820:15;363:90;:::i;:::-;481:21;;;354:99;-1:-1;538:14;;;513:17;;;633:1;618:243;643:6;640:1;637:13;618:243;;;750:47;793:3;12767:4;726:3;713:17;517:6;701:30;;750:47;:::i;:::-;738:60;;812:14;;;;840;;;;665:1;658:9;618:243;;;622:14;;;;;246:621;;;;:::o;1055:442::-;;1157:3;1150:4;1142:6;1138:17;1134:27;1124:2;;-1:-1;;1165:12;1124:2;1212:6;1199:20;12996:18;12988:6;12985:30;12982:2;;;-1:-1;;13018:12;12982:2;1234:65;13091:9;13072:17;;-1:-1;;13068:33;13159:4;13149:15;1234:65;:::i;:::-;1225:74;;1319:6;1312:5;1305:21;1423:3;13159:4;1414:6;1347;1405:16;;1402:25;1399:2;;;1440:1;;1430:12;1399:2;15018:6;13159:4;1347:6;1343:17;13159:4;1381:5;1377:16;14995:30;15074:1;15056:16;;;13159:4;15056:16;15049:27;1381:5;1117:380;-1:-1;;1117:380::o;2377:241::-;;2481:2;2469:9;2460:7;2456:23;2452:32;2449:2;;;-1:-1;;2487:12;2449:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2539:63;2443:175;-1:-1;;;2443:175::o;2625:678::-;;;2816:2;2804:9;2795:7;2791:23;2787:32;2784:2;;;-1:-1;;2822:12;2784:2;2880:17;2867:31;2918:18;;2910:6;2907:30;2904:2;;;-1:-1;;2940:12;2904:2;2970:88;3050:7;3041:6;3030:9;3026:22;2970:88;:::i;:::-;2960:98;;3123:2;3112:9;3108:18;3095:32;3081:46;;2918:18;3139:6;3136:30;3133:2;;;-1:-1;;3169:12;3133:2;;3199:88;3279:7;3270:6;3259:9;3255:22;3199:88;:::i;:::-;3189:98;;;2778:525;;;;;:::o;3600:578::-;;;3741:2;3729:9;3720:7;3716:23;3712:32;3709:2;;;-1:-1;;3747:12;3709:2;3805:17;3792:31;3843:18;;3835:6;3832:30;3829:2;;;-1:-1;;3865:12;3829:2;3895:63;3950:7;3941:6;3930:9;3926:22;3895:63;:::i;:::-;3885:73;;4023:2;4012:9;4008:18;3995:32;3981:46;;3843:18;4039:6;4036:30;4033:2;;;-1:-1;;4069:12;4033:2;;4099:63;4154:7;4145:6;4134:9;4130:22;4099:63;:::i;4185:323::-;;4330:2;4318:9;4309:7;4305:23;4301:32;4298:2;;;-1:-1;;4336:12;4298:2;1712:20;4330:2;1712:20;:::i;:::-;1846:22;2314:13;1796:16;1789:86;1947:2;2016:9;2012:22;2314:13;1947:2;1966:5;1962:16;1955:86;2114:2;2183:9;2179:22;2314:13;2114:2;2133:5;2129:16;2122:86;4388:104;;;;4292:216;;;;:::o;6135:347::-;;6280:5;13502:12;13978:6;13973:3;13966:19;-1:-1;15163:101;15177:6;15174:1;15171:13;15163:101;;;14015:4;15244:11;;;;;15238:18;15225:11;;;;;15218:39;15192:10;15163:101;;;15279:6;15276:1;15273:13;15270:2;;;-1:-1;14015:4;15335:6;14010:3;15326:16;;15319:27;15270:2;-1:-1;13091:9;15435:14;-1:-1;;15431:28;6438:39;;;;14015:4;6438:39;;6227:255;-1:-1;;6227:255::o;7618:653::-;7827:23;;9088:37;;8009:4;7998:16;;;7992:23;8069:14;;;9088:37;8175:4;8164:16;;;8158:23;8235:14;;9088:37;7734:537::o;9137:222::-;-1:-1;;;;;14485:54;;;;4888:37;;9264:2;9249:18;;9235:124::o;9366:490::-;9603:2;9617:47;;;13502:12;;9588:18;;;13966:19;;;9366:490;;9603:2;13326:14;;;;14006;;;;9366:490;5580:350;5605:6;5602:1;5599:13;5580:350;;;4663:106;4765:3;5672:6;5666:13;4663:106;:::i;:::-;13791:14;;;;4798:4;4789:14;;;;;5627:1;5620:9;5580:350;;;-1:-1;9670:176;;9574:282;-1:-1;;;;;;9574:282::o;10134:509::-;;10329:2;10350:17;10343:47;10404:78;10329:2;10318:9;10314:18;10468:6;10404:78;:::i;:::-;10530:9;10524:4;10520:20;10515:2;10504:9;10500:18;10493:48;10555:78;10628:4;10619:6;10555:78;:::i;:::-;10547:86;10300:343;-1:-1;;;;;10300:343::o;10650:416::-;10850:2;10864:47;;;6714:2;10835:18;;;13966:19;-1:-1;;;14006:14;;;6730:39;6788:12;;;10821:245::o;11073:416::-;11273:2;11287:47;;;7039:2;11258:18;;;13966:19;7075:34;14006:14;;;7055:55;-1:-1;;;7130:12;;;7123:30;7172:12;;;11244:245::o;11496:416::-;11696:2;11710:47;;;11681:18;;;13966:19;7459:34;14006:14;;;7439:55;7513:12;;;11667:245::o;11919:342::-;12106:2;12091:18;;12120:131;12095:9;12224:6;12120:131;:::i;12268:256::-;12330:2;12324:9;12356:17;;;12431:18;12416:34;;12452:22;;;12413:62;12410:2;;;12488:1;;12478:12;12410:2;12330;12497:22;12308:216;;-1:-1;12308:216::o;15472:117::-;-1:-1;;;;;14485:54;;15531:35;;15521:2;;15580:1;;15570:12;15521:2;15515:74;:::o

Swarm Source

ipfs://9eefd9a35c715d63a2495dda784e00be232e9d323660430832b0104b4ee8144b
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.