Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 12080291 | 1303 days ago | IN | 0 ETH | 0.25619481 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
20962682 | 15 hrs ago | 0 ETH | |||||
20962682 | 15 hrs ago | 0 ETH | |||||
20962682 | 15 hrs ago | 0 ETH | |||||
20962682 | 15 hrs ago | 0 ETH | |||||
20962682 | 15 hrs ago | 0 ETH | |||||
20952838 | 2 days ago | 0 ETH | |||||
20952838 | 2 days ago | 0 ETH | |||||
20952838 | 2 days ago | 0 ETH | |||||
20952838 | 2 days ago | 0 ETH | |||||
20952838 | 2 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20930566 | 5 days ago | 0 ETH | |||||
20880442 | 12 days ago | 0 ETH | |||||
20880442 | 12 days ago | 0 ETH | |||||
20880442 | 12 days ago | 0 ETH | |||||
20880442 | 12 days ago | 0 ETH | |||||
20880442 | 12 days ago | 0 ETH |
Loading...
Loading
Contract Name:
ChainlinkPriceOracle
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "../external/compound/PriceOracle.sol"; import "../external/compound/CToken.sol"; import "../external/compound/CErc20.sol"; import "../external/chainlink/AggregatorV3Interface.sol"; import "./BasePriceOracle.sol"; /** * @title PreferredPriceOracle * @notice Returns prices from Chainlink. * @dev Implements `PriceOracle`. * @author David Lucid <[email protected]> (https://github.com/davidlucid) */ contract ChainlinkPriceOracle is PriceOracle, BasePriceOracle { using SafeMathUpgradeable for uint256; /** * @notice Maps ERC20 token addresses to ETH-based Chainlink price feed contracts. */ mapping(address => AggregatorV3Interface) public ethPriceFeeds; /** * @notice Maps ERC20 token addresses to USD-based Chainlink price feed contracts. */ mapping(address => AggregatorV3Interface) public usdPriceFeeds; /** * @notice Maps ERC20 token addresses to BTC-based Chainlink price feed contracts. */ mapping(address => AggregatorV3Interface) public btcPriceFeeds; /** * @notice Chainlink ETH/USD price feed contracts. */ AggregatorV3Interface public constant ETH_USD_PRICE_FEED = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419); /** * @notice Chainlink BTC/ETH price feed contracts. */ AggregatorV3Interface public constant BTC_ETH_PRICE_FEED = AggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8); /** * @notice The maxmimum number of seconds elapsed since the round was last updated before the price is considered stale. If set to 0, no limit is enforced. */ uint256 public maxSecondsBeforePriceIsStale; /** * @dev Constructor to set `maxSecondsBeforePriceIsStale` as well as all Chainlink price feeds. */ constructor(uint256 _maxSecondsBeforePriceIsStale) public { // Set maxSecondsBeforePriceIsStale maxSecondsBeforePriceIsStale = _maxSecondsBeforePriceIsStale; // Set Chainlink ETH price feeds ethPriceFeeds[0x111111111117dC0aa78b770fA6A738034120C302] = AggregatorV3Interface(0x72AFAECF99C9d9C8215fF44C77B94B99C28741e8); // 1INCH ethPriceFeeds[0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9] = AggregatorV3Interface(0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012); // AAVE ethPriceFeeds[0xD46bA6D942050d489DBd938a2C909A5d5039A161] = AggregatorV3Interface(0x492575FDD11a0fCf2C6C719867890a7648d526eB); // AMPL ethPriceFeeds[0xa117000000f279D81A1D3cc75430fAA017FA5A2e] = AggregatorV3Interface(0x8f83670260F8f7708143b836a2a6F11eF0aBac01); // ANT ethPriceFeeds[0x3472A5A71965499acd81997a54BBA8D852C6E53d] = AggregatorV3Interface(0x58921Ac140522867bf50b9E009599Da0CA4A2379); // BADGER ethPriceFeeds[0xba100000625a3754423978a60c9317c58a424e3D] = AggregatorV3Interface(0xC1438AA3823A6Ba0C159CfA8D98dF5A994bA120b); // BAL ethPriceFeeds[0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55] = AggregatorV3Interface(0x0BDb051e10c9718d1C29efbad442E88D38958274); // BAND ethPriceFeeds[0x0D8775F648430679A709E98d2b0Cb6250d2887EF] = AggregatorV3Interface(0x0d16d4528239e9ee52fa531af613AcdB23D88c94); // BAT ethPriceFeeds[0xB8c77482e45F1F44dE1745F52C74426C631bDD52] = AggregatorV3Interface(0xc546d2d06144F9DD42815b8bA46Ee7B8FcAFa4a2); // BNB ethPriceFeeds[0x617aeCB6137B5108D1E7D4918e3725C8cEbdB848] = AggregatorV3Interface(0xc546d2d06144F9DD42815b8bA46Ee7B8FcAFa4a2); // sBNB = BNB ethPriceFeeds[0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C] = AggregatorV3Interface(0xCf61d1841B178fe82C8895fe60c2EDDa08314416); // BNT ethPriceFeeds[0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599] = AggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8); // WBTC = BTC ethPriceFeeds[0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D] = AggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8); // renBTC = BTC ethPriceFeeds[0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6] = AggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8); // sBTC = BTC ethPriceFeeds[0x0316EB71485b0Ab14103307bf65a021042c6d380] = AggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8); // HBTC = BTC ethPriceFeeds[0x4Fabb145d64652a948d72533023f6E7A623C7C53] = AggregatorV3Interface(0x614715d2Af89E6EC99A233818275142cE88d1Cfd); // BUSD ethPriceFeeds[0x56d811088235F11C8920698a204A5010a788f4b3] = AggregatorV3Interface(0x8f7C7181Ed1a2BA41cfC3f5d064eF91b67daef66); // BZRX ethPriceFeeds[0xaaAEBE6Fe48E54f431b0C390CfaF0b017d09D42d] = AggregatorV3Interface(0x75FbD83b4bd51dEe765b2a01e8D3aa1B020F9d33); // CEL ethPriceFeeds[0xc00e94Cb662C3520282E6f5717214004A7f26888] = AggregatorV3Interface(0x1B39Ee86Ec5979ba5C322b826B3ECb8C79991699); // COMP ethPriceFeeds[0x4688a8b1F292FDaB17E9a90c8Bc379dC1DBd8713] = AggregatorV3Interface(0x7B6230EF79D5E97C11049ab362c0b685faCBA0C2); // COVER ethPriceFeeds[0x2ba592F78dB6436527729929AAf6c908497cB200] = AggregatorV3Interface(0x82597CFE6af8baad7c0d441AA82cbC3b51759607); // CREAM ethPriceFeeds[0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b] = AggregatorV3Interface(0xcA696a9Eb93b81ADFE6435759A29aB4cf2991A96); // CRO ethPriceFeeds[0xD533a949740bb3306d119CC777fa900bA034cd52] = AggregatorV3Interface(0x8a12Be339B0cD1829b91Adc01977caa5E9ac121e); // CRV ethPriceFeeds[0x6B175474E89094C44Da98b954EedeAC495271d0F] = AggregatorV3Interface(0x773616E4d11A78F511299002da57A0a94577F1f4); // DAI ethPriceFeeds[0xEd91879919B71bB6905f23af0A68d231EcF87b14] = AggregatorV3Interface(0xD010e899f7ab723AC93f825cDC5Aa057669557c2); // DMG ethPriceFeeds[0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b] = AggregatorV3Interface(0x029849bbc0b1d93b85a8b6190e979fd38F5760E2); // DPI ethPriceFeeds[0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c] = AggregatorV3Interface(0x24D9aB51950F3d62E9144fdC2f3135DAA6Ce8D1B); // ENJ ethPriceFeeds[0x4E15361FD6b4BB609Fa63C81A2be19d873717870] = AggregatorV3Interface(0x2DE7E4a9488488e0058B95854CC2f7955B35dC9b); // FTM ethPriceFeeds[0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9] = AggregatorV3Interface(0xF0985f7E2CaBFf22CecC5a71282a89582c382EFE); // FTT ethPriceFeeds[0xc944E90C64B2c07662A292be6244BDf05Cda44a7] = AggregatorV3Interface(0x17D054eCac33D91F7340645341eFB5DE9009F1C1); // GRT ethPriceFeeds[0x584bC13c7D411c00c01A62e8019472dE68768430] = AggregatorV3Interface(0xAf5E8D9Cd9fC85725A83BF23C52f1C39A71588a6); // HEGIC ethPriceFeeds[0xdd974D5C2e2928deA5F71b9825b8b646686BD200] = AggregatorV3Interface(0x656c0544eF4C98A6a98491833A89204Abb045d6b); // KNC ethPriceFeeds[0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44] = AggregatorV3Interface(0xe7015CCb7E5F788B8c1010FC22343473EaaC3741); // KP3R ethPriceFeeds[0x514910771AF9Ca656af840dff83E8264EcF986CA] = AggregatorV3Interface(0xDC530D9457755926550b59e8ECcdaE7624181557); // LINK ethPriceFeeds[0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD] = AggregatorV3Interface(0x160AC928A16C93eD4895C2De6f81ECcE9a7eB7b4); // LRC ethPriceFeeds[0x0F5D2fB29fb7d3CFeE444a200298f468908cC942] = AggregatorV3Interface(0x82A44D92D6c329826dc557c5E1Be6ebeC5D5FeB9); // MANA ethPriceFeeds[0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2] = AggregatorV3Interface(0x24551a8Fb2A7211A25a17B1481f043A8a8adC7f2); // MKR ethPriceFeeds[0xec67005c4E498Ec7f55E092bd1d35cbC47C91892] = AggregatorV3Interface(0xDaeA8386611A157B08829ED4997A8A62B557014C); // MLN ethPriceFeeds[0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2] = AggregatorV3Interface(0x98334b85De2A8b998Ba844c5521e73D68AD69C00); // MTA ethPriceFeeds[0x1776e1F26f98b1A5dF9cD347953a26dd3Cb46671] = AggregatorV3Interface(0x9cB2A01A7E64992d32A34db7cEea4c919C391f6A); // NMR ethPriceFeeds[0xd26114cd6EE289AccF82350c8d8487fedB8A0C07] = AggregatorV3Interface(0x57C9aB3e56EE4a83752c181f241120a3DBba06a1); // OMG ethPriceFeeds[0x0258F474786DdFd37ABCE6df6BBb1Dd5dfC4434a] = AggregatorV3Interface(0xbA9B2a360eb8aBdb677d6d7f27E12De11AA052ef); // ORN ethPriceFeeds[0x8E870D67F660D95d5be530380D0eC0bd388289E1] = AggregatorV3Interface(0x3a08ebBaB125224b7b6474384Ee39fBb247D2200); // PAX ethPriceFeeds[0x45804880De22913dAFE09f4980848ECE6EcbAf78] = AggregatorV3Interface(0x9B97304EA12EFed0FAd976FBeCAad46016bf269e); // PAXG ethPriceFeeds[0x408e41876cCCDC0F92210600ef50372656052a38] = AggregatorV3Interface(0x3147D7203354Dc06D9fd350c7a2437bcA92387a4); // REN ethPriceFeeds[0x221657776846890989a759BA2973e427DfF5C9bB] = AggregatorV3Interface(0xD4CE430C3b67b3E2F7026D86E7128588629e2455); // REP ethPriceFeeds[0x607F4C5BB672230e8672085532f7e901544a7375] = AggregatorV3Interface(0x4cba1e1fdc738D0fe8DB3ee07728E2Bc4DA676c6); // RLC ethPriceFeeds[0x3155BA85D5F96b2d030a4966AF206230e46849cb] = AggregatorV3Interface(0x875D60C44cfbC38BaA4Eb2dDB76A767dEB91b97e); // RUNE ethPriceFeeds[0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F] = AggregatorV3Interface(0x79291A9d692Df95334B1a0B3B4AE6bC606782f8c); // SNX ethPriceFeeds[0x476c5E26a75bd202a9683ffD34359C0CC15be0fF] = AggregatorV3Interface(0x050c048c9a0CD0e76f166E2539F87ef2acCEC58f); // SRM ethPriceFeeds[0x57Ab1ec28D129707052df4dF418D58a2D46d5f51] = AggregatorV3Interface(0x8e0b7e6062272B5eF4524250bFFF8e5Bd3497757); // sUSD ethPriceFeeds[0x6B3595068778DD592e39A122f4f5a5cF09C90fE2] = AggregatorV3Interface(0xe572CeF69f43c2E488b33924AF04BDacE19079cf); // SUSHI ethPriceFeeds[0x0000000000085d4780B73119b644AE5ecd22b376] = AggregatorV3Interface(0x3886BA987236181D98F2401c507Fb8BeA7871dF2); // TUSD ethPriceFeeds[0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828] = AggregatorV3Interface(0xf817B69EA583CAFF291E287CaE00Ea329d22765C); // UMA ethPriceFeeds[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = AggregatorV3Interface(0xD6aA3D25116d8dA79Ea0246c4826EB951872e02e); // UNI ethPriceFeeds[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = AggregatorV3Interface(0x986b5E1e1755e3C2440e960477f25201B0a8bbD4); // USDC ethPriceFeeds[0xdAC17F958D2ee523a2206206994597C13D831ec7] = AggregatorV3Interface(0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46); // USDT ethPriceFeeds[0xa47c8bf37f92aBed4A126BDA807A7b7498661acD] = AggregatorV3Interface(0xa20623070413d42a5C01Db2c8111640DD7A5A03a); // UST ethPriceFeeds[0x0d438F3b5175Bebc262bF23753C1E53d03432bDE] = AggregatorV3Interface(0xe5Dc0A609Ab8bCF15d3f35cFaa1Ff40f521173Ea); // WNXM ethPriceFeeds[0xBd356a39BFf2cAda8E9248532DD879147221Cf76] = AggregatorV3Interface(0xcEBD2026d3C99F2a7CE028acf372C154aB4638a9); // WOM ethPriceFeeds[0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e] = AggregatorV3Interface(0x7c5d4F8345e66f68099581Db340cd65B078C41f4); // YFI ethPriceFeeds[0xa1d0E215a23d7030842FC67cE582a6aFa3CCaB83] = AggregatorV3Interface(0xaaB2f6b45B28E962B3aCd1ee4fC88aEdDf557756); // YFII ethPriceFeeds[0xE41d2489571d322189246DaFA5ebDe1F4699F498] = AggregatorV3Interface(0x2Da4983a622a8498bb1a21FaE9D8F6C664939962); // ZRX // USD price feeds usdPriceFeeds[0xe36E2D3c7c34281FA3bC737950a68571736880A1] = AggregatorV3Interface(0xAE48c91dF1fE419994FFDa27da09D5aC69c30f55); // sADA = ADA usdPriceFeeds[0xADE00C28244d5CE17D72E40330B1c318cD12B7c3] = AggregatorV3Interface(0x231e764B44b2C1b7Ca171fa8021A24ed520Cde10); // ADX usdPriceFeeds[0xF48e200EAF9906362BB1442fca31e0835773b8B4] = AggregatorV3Interface(0x77F9710E7d0A19669A13c055F62cd80d313dF022); // sAUD = AUD usdPriceFeeds[0x0F83287FF768D1c1e17a42F44d644D7F22e8ee1d] = AggregatorV3Interface(0x449d117117838fFA61263B61dA6301AA2a88B13A); // sCHF = CHF usdPriceFeeds[0xfE33ae95A9f0DA8A845aF33516EDc240DCD711d6] = AggregatorV3Interface(0xFb0cADFEa136E9E343cfb55B863a6Df8348ab912); // sDASH = DASH usdPriceFeeds[0x1715AC0743102BF5Cd58EfBB6Cf2dC2685d967b6] = AggregatorV3Interface(0x1C07AFb8E2B827c5A4739C6d59Ae3A5035f28734); // sDOT = DOT usdPriceFeeds[0x88C8Cf3A212c0369698D13FE98Fcb76620389841] = AggregatorV3Interface(0x10a43289895eAff840E8d45995BBa89f9115ECEe); // sEOS = EOS usdPriceFeeds[0x22602469d704BfFb0936c7A7cfcD18f7aA269375] = AggregatorV3Interface(0xaEA2808407B7319A31A383B6F8B60f04BCa23cE2); // sETC = ETC usdPriceFeeds[0xD71eCFF9342A5Ced620049e616c5035F1dB98620] = AggregatorV3Interface(0xb49f677943BC038e9857d61E7d053CaA2C1734C1); // sEUR = EUR usdPriceFeeds[0xeF9Cd7882c067686691B6fF49e650b43AFBBCC6B] = AggregatorV3Interface(0x80070f7151BdDbbB1361937ad4839317af99AE6c); // FNX usdPriceFeeds[0x97fe22E7341a0Cd8Db6F6C021A24Dc8f4DAD855F] = AggregatorV3Interface(0x5c0Ab2d9b5a7ed9f470386e82BB36A3613cDd4b5); // sGBP = GBP usdPriceFeeds[0xFA1a856Cfa3409CFa145Fa4e20Eb270dF3EB21ab] = AggregatorV3Interface(0xd0935838935349401c73a06FCde9d63f719e84E5); // IOST usdPriceFeeds[0xC14103C2141E842e228FBaC594579e798616ce7A] = AggregatorV3Interface(0x6AF09DF7563C363B5763b9102712EbeD3b9e859B); // sLTC = LTC usdPriceFeeds[0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0] = AggregatorV3Interface(0x7bAC85A8a13A4BcD8abb3eB7d6b4d632c5a57676); // MATIC usdPriceFeeds[0x4575f41308EC1483f3d399aa9a2826d74Da13Deb] = AggregatorV3Interface(0xd75AAaE4AF0c398ca13e2667Be57AF2ccA8B5de6); // OXT usdPriceFeeds[0x8CE9137d39326AD0cD6491fb5CC0CbA0e089b6A9] = AggregatorV3Interface(0xFb0CfD6c19e25DB4a08D8a204a387cEa48Cc138f); // SXP usdPriceFeeds[0x4C19596f5aAfF459fA38B0f7eD92F11AE6543784] = AggregatorV3Interface(0x26929b85fE284EeAB939831002e1928183a10fb1); // TRU usdPriceFeeds[0xf2E08356588EC5cd9E437552Da87C0076b4970B0] = AggregatorV3Interface(0xacD0D1A29759CC01E8D925371B72cb2b5610EA25); // sTRX = TRX usdPriceFeeds[0x918dA91Ccbc32B7a6A0cc4eCd5987bbab6E31e6D] = AggregatorV3Interface(0x1ceDaaB50936881B3e449e47e40A2cDAF5576A4a); // sTSLA = TSLA usdPriceFeeds[0x1c48f86ae57291F7686349F12601910BD8D470bb] = AggregatorV3Interface(0xfAC81Ea9Dd29D8E9b212acd6edBEb6dE38Cb43Af); // USDK usdPriceFeeds[0x6A22e5e94388464181578Aa7A6B869e00fE27846] = AggregatorV3Interface(0x379589227b15F1a12195D3f2d90bBc9F31f95235); // sXAG = XAG usdPriceFeeds[0x261EfCdD24CeA98652B9700800a13DfBca4103fF] = AggregatorV3Interface(0x214eD9Da11D2fbe465a6fc601a91E62EbEc1a0D6); // sXAU = XAU usdPriceFeeds[0x5299d6F7472DCc137D7f3C4BcfBBB514BaBF341A] = AggregatorV3Interface(0xFA66458Cce7Dd15D8650015c4fce4D278271618F); // sXMR = XMR usdPriceFeeds[0xa2B0fDe6D710e201d0d608e924A484d1A5fEd57c] = AggregatorV3Interface(0xCed2660c6Dd1Ffd856A5A82C67f3482d88C50b12); // sXRP = XRP usdPriceFeeds[0x2e59005c5c0f0a4D77CcA82653d48b46322EE5Cd] = AggregatorV3Interface(0x5239a625dEb44bF3EeAc2CD5366ba24b8e9DB63F); // sXTZ = XTZ usdPriceFeeds[0xeABACD844A196D7Faf3CE596edeBF9900341B420] = AggregatorV3Interface(0x283D433435cFCAbf00263beEF6A362b7cc5ed9f2); // sCEX usdPriceFeeds[0xe1aFe1Fd76Fd88f78cBf599ea1846231B8bA3B6B] = AggregatorV3Interface(0xa8E875F94138B0C5b51d1e1d5dE35bbDdd28EA87); // sDEFI // BTC price feeds btcPriceFeeds[0x798D1bE841a82a273720CE31c822C61a67a601C3] = AggregatorV3Interface(0x418a6C98CD5B8275955f08F0b8C1c6838c8b1685); // DIGG btcPriceFeeds[0xF970b8E36e23F7fC3FD752EeA86f8Be8D83375A6] = AggregatorV3Interface(0xEa0b3DCa635f4a4E77D9654C5c18836EE771566e); // RCN } /** * @dev Returns a boolean indicating if a price feed exists for the underlying asset. */ function hasPriceFeed(address underlying) external view returns (bool) { return address(ethPriceFeeds[underlying]) != address(0) || address(usdPriceFeeds[underlying]) != address(0) || address(btcPriceFeeds[underlying]) != address(0); } /** * @dev Internal function returning the price in ETH of `underlying`. */ function _price(address underlying) internal view returns (uint) { // Return 1e18 for WETH if (underlying == 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) return 1e18; // Get token/ETH price from Chainlink if (address(ethPriceFeeds[underlying]) != address(0)) { (, int256 tokenEthPrice, , uint256 updatedAt, ) = ethPriceFeeds[underlying].latestRoundData(); if (maxSecondsBeforePriceIsStale > 0) require(block.timestamp <= updatedAt + maxSecondsBeforePriceIsStale, "Token/ETH Chainlink price is stale."); return tokenEthPrice >= 0 ? uint256(tokenEthPrice) : 0; } else if (address(usdPriceFeeds[underlying]) != address(0)) { (, int256 ethUsdPrice, , uint256 updatedAt, ) = ETH_USD_PRICE_FEED.latestRoundData(); if (maxSecondsBeforePriceIsStale > 0) require(block.timestamp <= updatedAt + maxSecondsBeforePriceIsStale, "ETH/USD Chainlink price is stale."); if (ethUsdPrice <= 0) return 0; int256 tokenUsdPrice; (, tokenUsdPrice, , updatedAt, ) = usdPriceFeeds[underlying].latestRoundData(); if (maxSecondsBeforePriceIsStale > 0) require(block.timestamp <= updatedAt + maxSecondsBeforePriceIsStale, "Token/USD Chainlink price is stale."); return tokenUsdPrice >= 0 ? uint256(tokenUsdPrice).mul(1e18).div(uint256(ethUsdPrice)) : 0; } else if (address(btcPriceFeeds[underlying]) != address(0)) { (, int256 btcEthPrice, , uint256 updatedAt, ) = BTC_ETH_PRICE_FEED.latestRoundData(); if (maxSecondsBeforePriceIsStale > 0) require(block.timestamp <= updatedAt + maxSecondsBeforePriceIsStale, "BTC/ETH Chainlink price is stale."); if (btcEthPrice <= 0) return 0; int256 tokenBtcPrice; (, tokenBtcPrice, , updatedAt, ) = btcPriceFeeds[underlying].latestRoundData(); if (maxSecondsBeforePriceIsStale > 0) require(block.timestamp <= updatedAt + maxSecondsBeforePriceIsStale, "Token/BTC Chainlink price is stale."); return tokenBtcPrice >= 0 ? uint256(tokenBtcPrice).mul(uint256(btcEthPrice)).div(1e8) : 0; } else revert("No Chainlink price feed found for this underlying ERC20 token."); } /** * @dev Returns the price in ETH of `underlying` (implements `BasePriceOracle`). */ function price(address underlying) external override view returns (uint) { return _price(underlying); } /** * @notice Returns the price in ETH of the token underlying `cToken`. * @dev Implements the `PriceOracle` interface for Fuse pools (and Compound v2). * @return Price in ETH of the token underlying `cToken`, scaled by `10 ** (36 - underlyingDecimals)`. */ function getUnderlyingPrice(CToken cToken) external override view returns (uint) { // Return 1e18 for ETH if (cToken.isCEther()) return 1e18; // Get underlying token address address underlying = CErc20(address(cToken)).underlying(); // Get price uint256 chainlinkPrice = _price(underlying); // Format and return price uint256 underlyingDecimals = uint256(ERC20Upgradeable(underlying).decimals()); return underlyingDecimals <= 18 ? uint256(chainlinkPrice).mul(10 ** (18 - underlyingDecimals)) : uint256(chainlinkPrice).div(10 ** (underlyingDecimals - 18)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../GSN/ContextUpgradeable.sol"; import "./IERC20Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../proxy/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable { using SafeMathUpgradeable for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; // solhint-disable-next-line no-inline-assembly assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } 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; } uint256[50] private __gap; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; import "../external/compound/PriceOracle.sol"; /** * @title BasePriceOracle * @notice Returns prices of underlying tokens directly without the caller having to specify a cToken address. * @dev Implements the `PriceOracle` interface. * @author David Lucid <[email protected]> (https://github.com/davidlucid) */ interface BasePriceOracle is PriceOracle { /** * @notice Get the price of an underlying asset. * @param underlying The underlying asset to get the price of. * @return The underlying asset price in ETH as a mantissa (scaled by 1e18). * Zero means the price is unavailable. */ function price(address underlying) external view returns (uint); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.6.12; import "./CToken.sol"; interface PriceOracle { /** * @notice Get the underlying price of a cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18). * Zero means the price is unavailable. */ function getUnderlyingPrice(CToken cToken) external view returns (uint); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.6.12; /** * @title Compound's CToken Contract * @notice Abstract base for CTokens * @author Compound */ interface CToken { function admin() external view returns (address); function adminHasRights() external view returns (bool); function fuseAdminHasRights() external view returns (bool); function symbol() external view returns (string memory); function comptroller() external view returns (address); function adminFeeMantissa() external view returns (uint256); function fuseFeeMantissa() external view returns (uint256); function reserveFactorMantissa() external view returns (uint256); function totalReserves() external view returns (uint); function totalAdminFees() external view returns (uint); function totalFuseFees() external view returns (uint); function isCToken() external view returns (bool); function isCEther() external view returns (bool); function balanceOf(address owner) external view returns (uint); function balanceOfUnderlying(address owner) external returns (uint); function borrowRatePerBlock() external view returns (uint); function supplyRatePerBlock() external view returns (uint); function totalBorrowsCurrent() external returns (uint); function borrowBalanceStored(address account) external view returns (uint); function exchangeRateStored() external view returns (uint); function getCash() external view returns (uint); function redeem(uint redeemTokens) external returns (uint); function redeemUnderlying(uint redeemAmount) external returns (uint); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.6.12; import "./CToken.sol"; /** * @title Compound's CErc20 Contract * @notice CTokens which wrap an EIP-20 underlying * @author Compound */ interface CErc20 is CToken { function underlying() external view returns (address); function liquidateBorrow(address borrower, uint repayAmount, CToken cTokenCollateral) external returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_maxSecondsBeforePriceIsStale","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BTC_ETH_PRICE_FEED","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETH_USD_PRICE_FEED","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"btcPriceFeeds","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ethPriceFeeds","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract CToken","name":"cToken","type":"address"}],"name":"getUnderlyingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlying","type":"address"}],"name":"hasPriceFeed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSecondsBeforePriceIsStale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlying","type":"address"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usdPriceFeeds","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516122a83803806122a88339818101604052602081101561003357600080fd5b50516003557f922605635d8625baeee2632c4abd30ed3e656c608e4e1d527ac798b2e7bbaf8080546001600160a01b03199081167372afaecf99c9d9c8215ff44c77b94b99c28741e8179091557f7145bb02480b505fc02ccfdba07d3ba3a9d821606f0688263abedd0ac6e5bec580548216736df09e975c830ecae5bd4ed9d90f3a95a4f880121790557f652f71c42b843343e1ef371dbb9eee4ae200cef6c0330cc356d68047e9c79b628054821673492575fdd11a0fcf2c6c719867890a7648d526eb1790557f6aa415b64acb0a434cca4219caf83aa35a6e08e958efcfbc0a11e6938dcca50b80548216738f83670260f8f7708143b836a2a6f11ef0abac011790557f8dd1acf2f417f842f399a5c6c5a803e3017458a53801bad96df1fe1972a4537c805482167358921ac140522867bf50b9e009599da0ca4a23791790557f2bc93a8060526cefdf8802183664660d7d7310808def67df12894f0e5193b4338054821673c1438aa3823a6ba0c159cfa8d98df5a994ba120b1790557f60788a10714095b4b847dd17e28e2482eb05bcedcbe89ea8d5fa139281c227ff80548216730bdb051e10c9718d1c29efbad442e88d389582741790557f9d36796f595ad8c503b82568e7e967e06e60c0e85648af5d26070800c033c7f080548216730d16d4528239e9ee52fa531af613acdb23d88c941790557f2ada67348576a5f43965aeed43cfc775fb3796c746b8d7e063e9e31abe7756108054821673c546d2d06144f9dd42815b8ba46ee7b8fcafa4a29081179091557f98d1e320c17e2a1a87baab27194cf61fc6f4cbb6cda0040c2dbf58758d8effb78054831690911790557f72ecb6b277d69e65f266d635816977482f3bd43f38cd571ba98aab196b191eb28054821673cf61d1841b178fe82c8895fe60c2edda083144161790557ff0b998666205e50af945dcd5198861491334a6162cc24264d9a801634ee07ec88054821673deb288f737066589598e9214e782fa5a8ed689e89081179091557f0ad657e79cb9f74bdf6f33badc318d69537edcaf175eb59af2e123b577dd466580548316821790557f8237a75246863a956acc84e18f74a40be5a5e45c1449659b16fff884d97b2d2180548316821790557fc58542b7442a09818236d2c23eecf870f3688f99e43a40b094f6ed48f76581118054831690911790557f939f7cabc28bdbedc4485191b21a60d41b948f6b2be04fad8a9bba962c7a74b18054821673614715d2af89e6ec99a233818275142ce88d1cfd1790557f714d08b158d6cc294ffeb4a3b345613fb0e642c104a5bce757c5f7f16bd4df5480548216738f7c7181ed1a2ba41cfc3f5d064ef91b67daef661790557fc19dbee4376f33a2c7d0d8afb05074ae4879269d0731097362888a48b88cbe4e805482167375fbd83b4bd51dee765b2a01e8d3aa1b020f9d331790557f511cc89fca1810b4d2868146b87932d94ee0e38147e04dc2f8572df83cf520a880548216731b39ee86ec5979ba5c322b826b3ecb8c799916991790557f74b21504d6ce8d3085ff4d3c40f4f6f826f045fe400f691809753490c1113ccc80548216737b6230ef79d5e97c11049ab362c0b685facba0c21790557fa321655a2bbe4fb76e06e998714ab65c52c1c2c1d83195276a2c435589568d76805482167382597cfe6af8baad7c0d441aa82cbc3b517596071790557ff7b15f98e94b56adc7bc4251d8e5bab2a85df3c658d291f469be1863917931e98054821673ca696a9eb93b81adfe6435759a29ab4cf2991a961790557f70c3dba262fa5eaaf3e393830b86a1923f032bbcdc463b5d2b22ed5f11b1e68580548216738a12be339b0cd1829b91adc01977caa5e9ac121e1790557f5306b8fbe80b30a74098357ee8e26fad8dc069da9011cca5f0870a0a5982e5418054821673773616e4d11a78f511299002da57a0a94577f1f41790557f2dd12e72a092c6022dd4b244c76871f9fba900e3c17d078fa30123d4cc431b5f8054821673d010e899f7ab723ac93f825cdc5aa057669557c21790557f1bc36087bcda8c8f0a1d3644ff9e81045f37abda2f3e48c9950fe55b89d0df568054821673029849bbc0b1d93b85a8b6190e979fd38f5760e21790557f2a792ecbe4cc20859315764ffd1173cc3d655abe0eab051e1b91505d05664e5f805482167324d9ab51950f3d62e9144fdc2f3135daa6ce8d1b1790557f69385f4f59c73b47d354995d37e8afb2d12626a98f707577a862ca34c9b8dfab80548216732de7e4a9488488e0058b95854cc2f7955b35dc9b1790557f7fa58701f5444cd8686e8db74991cfac490ac6c67543759a064d4a1d9437208b8054821673f0985f7e2cabff22cecc5a71282a89582c382efe1790557f1937f4929bf506eeb2c6a1d0a2fcd058a6c656179f2f8b4280efa139cc62bcba805482167317d054ecac33d91f7340645341efb5de9009f1c11790557f65ddfc0b22efd48a70a9225c1497ac6013365784568b598beb41c24a618196638054821673af5e8d9cd9fc85725a83bf23c52f1c39a71588a61790557ff3da0919264f7c718053ecd775aaadf3e60482b8a48602c1a29f9e3fa1891d1c8054821673656c0544ef4c98a6a98491833a89204abb045d6b1790557fcf66ea24a3a22ace3478fe5474bcc1fe794b64f2f3e3e510121d34175d9fca748054821673e7015ccb7e5f788b8c1010fc22343473eaac37411790557f730d6fdf8f2d5e5e75a62ad49cc4d175b7750703aa72e452e1e22258c77079fb8054821673dc530d9457755926550b59e8eccdae76241815571790557ffde91a0e4ce347aee87f50e1828f560ac227f5a85b774d40a730df907420cbdd8054821673160ac928a16c93ed4895c2de6f81ecce9a7eb7b41790557fe9ac309054ae3ea057b8ba5ade5fbdb631fd2a69208b4c4996b5da5c0c28541a805482167382a44d92d6c329826dc557c5e1be6ebec5d5feb91790557fdda00a57bee26ed4ac93f73d0238caf2b0b80d455de521e247ae994efa80def5805482167324551a8fb2a7211a25a17b1481f043a8a8adc7f21790557fd85a4d964d4d582b84640f5fb5e87df4a5d5298bb387091004bd9260d56a89e38054821673daea8386611a157b08829ed4997a8a62b557014c1790557f8368c25c4b2f30d7b2ab019df22a73e277c773d0fb7cde331e90efc89d2692fb805482167398334b85de2a8b998ba844c5521e73d68ad69c001790557f7b66cee30b2b198fbf35e728c76f17d88c3a425bd48097e22eafaff9da2e7e8f80548216739cb2a01a7e64992d32a34db7ceea4c919c391f6a1790557f692c63a03bf35f688365fdce87bd4530629214d76f11021ca81cb251428807a9805482167357c9ab3e56ee4a83752c181f241120a3dbba06a11790557f629da0e8ff2229b61f23ea59f6fc9fae5385ec7d86836d69d66518b801a1a2b98054821673ba9b2a360eb8abdb677d6d7f27e12de11aa052ef1790557fc13b7ee270ec43e8a6443e3b8f180d8f4fca097dedaede03fcc04df7145c999a80548216733a08ebbab125224b7b6474384ee39fbb247d22001790557fdfcc185e406aad40b3880bc723dcc773f9b6e7bc42904ab3f9845c594921f49d80548216739b97304ea12efed0fad976fbecaad46016bf269e1790557f72d1ea1bd06e478789ce223c9d4541833ee2f7ebeef7a8270683f3d403f32f9480548216733147d7203354dc06d9fd350c7a2437bca92387a41790557f5048cdc78b2b28093fa136992d1ca5cef83e144d947de68225926a0ff2827a6c8054821673d4ce430c3b67b3e2f7026d86e7128588629e24551790557f915ea3178cf8d84ce8970365961a708ef05e98859d8d4717485c47bf3cbcb26480548216734cba1e1fdc738d0fe8db3ee07728e2bc4da676c61790557f3a366db8310f607ec90a3e157b2d9c96b54e5b9058a23c07ffef108dcac299bf8054821673875d60c44cfbc38baa4eb2ddb76a767deb91b97e1790557f6cd63715d5f0db03eec592ada4e78050279222b9583fb20a52ef8a37c8e911b9805482167379291a9d692df95334b1a0b3b4ae6bc606782f8c1790557f86533f34a757e46c0721fbd7d349a6f1936fb78c3f41968b01245132d7a80c658054821673050c048c9a0cd0e76f166e2539f87ef2accec58f1790557f891368e9fb55bce905a27799ff398f5706410e14205316f805cafda2a6c93be480548216738e0b7e6062272b5ef4524250bfff8e5bd34977571790557fb738e63d4f4906dfb172df67af9f36b70db9ec183d59b161eabe70a6ea8083e68054821673e572cef69f43c2e488b33924af04bdace19079cf1790557f690bb39a0a5e54120bf07b6463b8fcd7bea90578d8ae77d1e573a88ddc40bfec80548216733886ba987236181d98f2401c507fb8bea7871df21790557fef188c9425e10b9ff1f1fb69b77afe1d1874b5bbe31bfcba2584fae894ee14478054821673f817b69ea583caff291e287cae00ea329d22765c1790557f6da98f1d47bb0bc5549e1497f71ab684f8d693b19b458fbccae05e126d246e908054821673d6aa3d25116d8da79ea0246c4826eb951872e02e1790557fc6521c8ea4247e8beb499344e591b9401fb2807ff9997dd598fd9e56c73a264d8054821673986b5e1e1755e3c2440e960477f25201b0a8bbd41790557fa934b07068f5d95a11413ed6d08a4a1122dc4b8c14a6ab2d94f8b279dac630428054821673ee9f2375b4bdf6387aa8265dd4fb8f16512a1d461790557fbfbb6e0ba78daf468733c76bad8771bca2c4b9e50f4caf63c623fea7eda8d6028054821673a20623070413d42a5c01db2c8111640dd7a5a03a1790557fe2f5263ab0aff2d245fbc15bf86f3654aada3c07fe237aa7b35d5a4307de57698054821673e5dc0a609ab8bcf15d3f35cfaa1ff40f521173ea1790557fca39940d9fe8cb630469ab5caba946836b0cc51b0835f081f9fe5be60d1be4ca8054821673cebd2026d3c99f2a7ce028acf372c154ab4638a91790557f828ac2cfae8391df6fe4c86c1beb4a85a14c88f651908f41682259723170b5dc80548216737c5d4f8345e66f68099581db340cd65b078c41f41790557f1ce7425dcaab438b3aa06773f467c327bc5dafb088bd4b5574d752d6ef71f7d78054821673aab2f6b45b28e962b3acd1ee4fc88aeddf5577561790557fd3bdcf34226f9e810a1afecc8561c82ca9d9fd3955869ad47d9842f2dba8fa1e80548216732da4983a622a8498bb1a21fae9d8f6c6649399621790557fc16ce42b99dfd9b3e8f651b2f0b0ba7f21a54924ccfc1edbab49a269b7c4e4358054821673ae48c91df1fe419994ffda27da09d5ac69c30f551790557f228b035097642596abbc6f7f0758ba63a695d310ef53868d044ec2dc14fe61e38054821673231e764b44b2c1b7ca171fa8021a24ed520cde101790557fcfaddbd6ace3a979cf8d823997c93cc8a906b3474c7c04f7ead4ed4386dc3402805482167377f9710e7d0a19669a13c055f62cd80d313df0221790557ff84f2148991de777f629d59c7b1bf4c1e645096d98447d3406dc8a49e573c9128054821673449d117117838ffa61263b61da6301aa2a88b13a1790557f363d907798d05e664f1ad8bea95d518f44f828b18fee97195d3a12419b4d99968054821673fb0cadfea136e9e343cfb55b863a6df8348ab9121790557f1d5dd85bf54141e1e9825d67c3e9d9099cd3f284f85b90ce8fdb48fbe7587fa080548216731c07afb8e2b827c5a4739c6d59ae3a5035f287341790557f045c4c1a1887c6351dd9b50a806c6f3b969a704c2a71296883f55e466a2911dc805482167310a43289895eaff840e8d45995bba89f9115ecee1790557f29fdff8d3c2f67b2e13270227e40ac2535955bc3d63b7251c804d64b03e714348054821673aea2808407b7319a31a383b6f8b60f04bca23ce21790557fdf8318910f030d17d9af780fe90952ef38366f74eda98a29c961fc58d2506d6d8054821673b49f677943bc038e9857d61e7d053caa2c1734c11790557fdf99644981f13d8b18357d5d983b2f719203481d0d4a1c649a4b2d67d7e456b3805482167380070f7151bddbbb1361937ad4839317af99ae6c1790557fa134e427ef6529de95c7765b9831befbe26d2405ec3c4e872f967e2dfdeb2b1980548216735c0ab2d9b5a7ed9f470386e82bb36a3613cdd4b51790557f10db6a6613161f0e0a549f1f0c4bad6fd3d4dca1a45778499973aa27ae242c258054821673d0935838935349401c73a06fcde9d63f719e84e51790557ff03828b358f7faf17cd412f0c681ddd3c48f493565d84f6640a42fb86eb389a580548216736af09df7563c363b5763b9102712ebed3b9e859b1790557f422f9fa51c3ebf73c3fd74a817bc14bebb8d41805604ee0e2943143a024fcc5380548216737bac85a8a13a4bcd8abb3eb7d6b4d632c5a576761790557fce4c145f89f04763ecd4949aa72a46f7b1cf90c8e8cfea822705f79653b30bd58054821673d75aaae4af0c398ca13e2667be57af2cca8b5de61790557f7a08f1a05d6f24183b50d93ad9678cd6a18b49fd99d86f4b3f052a07b2c5938d8054821673fb0cfd6c19e25db4a08d8a204a387cea48cc138f1790557f5be6a1eae107afa7bddcea28ecc6a0b9200d088fac46ebde1b0899da28675fd9805482167326929b85fe284eeab939831002e1928183a10fb11790557f67aa7916c724f9f4889561f854c87d81b72d222616ad75f627be8b9da1bd3e7f8054821673acd0d1a29759cc01e8d925371b72cb2b5610ea251790557f1e8be566fcb0087c849bfa725bf2f34a4a7d61340491f533e4d911ecdcb0c72080548216731cedaab50936881b3e449e47e40a2cdaf5576a4a1790557fded36a01f3cd1f3dfbc4133230ddd9496f6aed7b580122c52fead359496a27c08054821673fac81ea9dd29d8e9b212acd6edbeb6de38cb43af1790557f5fc8b5a5372582c92ca1f5fc34b2fc67ecab129876bc197e421abf3ae3b194248054821673379589227b15f1a12195d3f2d90bbc9f31f952351790557f73d276fb9ee560332ea673c295519551375beccedfa7958021f64ecec0704a1a8054821673214ed9da11d2fbe465a6fc601a91e62ebec1a0d61790557f7aed1cbd1e9f97c301a09e560743c612867d0c3c140b9154207868811d8d02a48054821673fa66458cce7dd15d8650015c4fce4d278271618f1790557f2f2e13da20646f0b6f1b541c9f8163d18fa60c60eb923a097bb66e5419e01a328054821673ced2660c6dd1ffd856a5a82c67f3482d88c50b121790557fbac4733c84e9b7c5f58930c8b72ed3a84e28397c77f4d2a0ea79414e9dc1768d80548216735239a625deb44bf3eeac2cd5366ba24b8e9db63f1790557f4caf056ab4b9e3eea26c6d6d0e54b16f1d0982867848072f0cd1369efbfea7928054821673283d433435cfcabf00263beef6a362b7cc5ed9f21790557f9d30438784fca7535cf1019a1c35e8440741f3b7114721a1363f20893e998f378054821673a8e875f94138b0c5b51d1e1d5de35bbddd28ea8717905560026020527f7cbd64aab4b04ae4829b2aa2d6141aed77c1ac938af266e79812be8c48d67c9e8054821673418a6c98cd5b8275955f08f0b8c1c6838c8b168517905573f970b8e36e23f7fc3fd752eea86f8be8d83375a66000527f7907f4cd94db47062093d965fccb17a1a5b0ea0aadfc6b16658c8c50ac50163a805490911673ea0b3dca635f4a4e77d9654c5c18836ee771566e179055610c94806116146000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063b0f0abe911610066578063b0f0abe914610172578063cf0b06131461017a578063e073a24114610182578063f0e0626f1461018a578063fc57d4df146101b057610093565b80630b7983a2146100985780631c5ed620146100d257806336bfdf7214610114578063aea910781461013a575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b03166101d6565b604080519115158252519081900360200190f35b6100f8600480360360208110156100e857600080fd5b50356001600160a01b0316610245565b604080516001600160a01b039092168252519081900360200190f35b6100f86004803603602081101561012a57600080fd5b50356001600160a01b0316610260565b6101606004803603602081101561015057600080fd5b50356001600160a01b031661027b565b60408051918252519081900360200190f35b6100f8610286565b6100f861029e565b6101606102b6565b6100f8600480360360208110156101a057600080fd5b50356001600160a01b03166102bc565b610160600480360360208110156101c657600080fd5b50356001600160a01b03166102d7565b6001600160a01b0381811660009081526020819052604081205490911615158061021957506001600160a01b038281166000908152600160205260409020541615155b8061023d57506001600160a01b038281166000908152600260205260409020541615155b90505b919050565b6000602081905290815260409020546001600160a01b031681565b6002602052600090815260409020546001600160a01b031681565b600061023d8261046d565b735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b73deb288f737066589598e9214e782fa5a8ed689e881565b60035481565b6001602052600090815260409020546001600160a01b031681565b6000816001600160a01b031663ac784ddc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031257600080fd5b505afa158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b5051156103525750670de0b6b3a7640000610240565b6000826001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561038d57600080fd5b505afa1580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b5051905060006103c68261046d565b90506000826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561040357600080fd5b505afa158015610417573d6000803e3d6000fd5b505050506040513d602081101561042d57600080fd5b505160ff16905060128111156104535761044e826011198301600a0a610a0e565b610464565b610464826012839003600a0a610a59565b95945050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03831614156104a35750670de0b6b3a7640000610240565b6001600160a01b0382811660009081526020819052604090205416156105b9576001600160a01b03808316600090815260208190526040808220548151633fabe5a360e21b815291519293849391169163feaf968c9160048083019260a0929190829003018186803b15801561051857600080fd5b505afa15801561052c573d6000803e3d6000fd5b505050506040513d60a081101561054257600080fd5b50602081015160609091015160035491935091501561059e57600354810142111561059e5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b766023913960400191505060405180910390fd5b60008212156105ae5760006105b0565b815b92505050610240565b6001600160a01b0382811660009081526001602052604090205416156107d257600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d60a081101561065357600080fd5b5060208101516060909101516003549193509150156106af5760035481014211156106af5760405162461bcd60e51b8152600401808060200182810382526021815260200180610bbc6021913960400191505060405180910390fd5b600082136106c257600092505050610240565b6001600160a01b03808516600090815260016020526040808220548151633fabe5a360e21b815291519293169163feaf968c9160048082019260a092909190829003018186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d60a081101561073f57600080fd5b5060208101516060909101516003549093509091501561079c57600354820142111561079c5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b996023913960400191505060405180910390fd5b60008112156107ac5760006107c8565b6107c8836107c283670de0b6b3a7640000610a59565b90610a0e565b9350505050610240565b6001600160a01b0382811660009081526002602052604090205416156109d75760008073deb288f737066589598e9214e782fa5a8ed689e86001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d60a081101561086c57600080fd5b5060208101516060909101516003549193509150156108c85760035481014211156108c85760405162461bcd60e51b8152600401808060200182810382526021815260200180610b556021913960400191505060405180910390fd5b600082136108db57600092505050610240565b6001600160a01b03808516600090815260026020526040808220548151633fabe5a360e21b815291519293169163feaf968c9160048082019260a092909190829003018186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d60a081101561095857600080fd5b506020810151606090910151600354909350909150156109b55760035482014211156109b55760405162461bcd60e51b8152600401808060200182810382526023815260200180610c3c6023913960400191505060405180910390fd5b60008112156109c55760006107c8565b6107c86305f5e1006107c28386610a59565b60405162461bcd60e51b815260040180806020018281038252603e815260200180610bdd603e913960400191505060405180910390fd5b6000610a5083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ab2565b90505b92915050565b600082610a6857506000610a53565b82820282848281610a7557fe5b0414610a505760405162461bcd60e51b8152600401808060200182810382526021815260200180610c1b6021913960400191505060405180910390fd5b60008183610b3e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b03578181015183820152602001610aeb565b50505050905090810190601f168015610b305780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b4a57fe5b049594505050505056fe4254432f45544820436861696e6c696e6b207072696365206973207374616c652e546f6b656e2f45544820436861696e6c696e6b207072696365206973207374616c652e546f6b656e2f55534420436861696e6c696e6b207072696365206973207374616c652e4554482f55534420436861696e6c696e6b207072696365206973207374616c652e4e6f20436861696e6c696e6b207072696365206665656420666f756e6420666f72207468697320756e6465726c79696e6720455243323020746f6b656e2e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e2f42544320436861696e6c696e6b207072696365206973207374616c652ea26469706673582212200c83034372f9b00af05a99b751418c9060ff84f60f0ada5242c8411f58f1c75964736f6c634300060c00330000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063b0f0abe911610066578063b0f0abe914610172578063cf0b06131461017a578063e073a24114610182578063f0e0626f1461018a578063fc57d4df146101b057610093565b80630b7983a2146100985780631c5ed620146100d257806336bfdf7214610114578063aea910781461013a575b600080fd5b6100be600480360360208110156100ae57600080fd5b50356001600160a01b03166101d6565b604080519115158252519081900360200190f35b6100f8600480360360208110156100e857600080fd5b50356001600160a01b0316610245565b604080516001600160a01b039092168252519081900360200190f35b6100f86004803603602081101561012a57600080fd5b50356001600160a01b0316610260565b6101606004803603602081101561015057600080fd5b50356001600160a01b031661027b565b60408051918252519081900360200190f35b6100f8610286565b6100f861029e565b6101606102b6565b6100f8600480360360208110156101a057600080fd5b50356001600160a01b03166102bc565b610160600480360360208110156101c657600080fd5b50356001600160a01b03166102d7565b6001600160a01b0381811660009081526020819052604081205490911615158061021957506001600160a01b038281166000908152600160205260409020541615155b8061023d57506001600160a01b038281166000908152600260205260409020541615155b90505b919050565b6000602081905290815260409020546001600160a01b031681565b6002602052600090815260409020546001600160a01b031681565b600061023d8261046d565b735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b73deb288f737066589598e9214e782fa5a8ed689e881565b60035481565b6001602052600090815260409020546001600160a01b031681565b6000816001600160a01b031663ac784ddc6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031257600080fd5b505afa158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b5051156103525750670de0b6b3a7640000610240565b6000826001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561038d57600080fd5b505afa1580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b5051905060006103c68261046d565b90506000826001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561040357600080fd5b505afa158015610417573d6000803e3d6000fd5b505050506040513d602081101561042d57600080fd5b505160ff16905060128111156104535761044e826011198301600a0a610a0e565b610464565b610464826012839003600a0a610a59565b95945050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03831614156104a35750670de0b6b3a7640000610240565b6001600160a01b0382811660009081526020819052604090205416156105b9576001600160a01b03808316600090815260208190526040808220548151633fabe5a360e21b815291519293849391169163feaf968c9160048083019260a0929190829003018186803b15801561051857600080fd5b505afa15801561052c573d6000803e3d6000fd5b505050506040513d60a081101561054257600080fd5b50602081015160609091015160035491935091501561059e57600354810142111561059e5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b766023913960400191505060405180910390fd5b60008212156105ae5760006105b0565b815b92505050610240565b6001600160a01b0382811660009081526001602052604090205416156107d257600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d60a081101561065357600080fd5b5060208101516060909101516003549193509150156106af5760035481014211156106af5760405162461bcd60e51b8152600401808060200182810382526021815260200180610bbc6021913960400191505060405180910390fd5b600082136106c257600092505050610240565b6001600160a01b03808516600090815260016020526040808220548151633fabe5a360e21b815291519293169163feaf968c9160048082019260a092909190829003018186803b15801561071557600080fd5b505afa158015610729573d6000803e3d6000fd5b505050506040513d60a081101561073f57600080fd5b5060208101516060909101516003549093509091501561079c57600354820142111561079c5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b996023913960400191505060405180910390fd5b60008112156107ac5760006107c8565b6107c8836107c283670de0b6b3a7640000610a59565b90610a0e565b9350505050610240565b6001600160a01b0382811660009081526002602052604090205416156109d75760008073deb288f737066589598e9214e782fa5a8ed689e86001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d60a081101561086c57600080fd5b5060208101516060909101516003549193509150156108c85760035481014211156108c85760405162461bcd60e51b8152600401808060200182810382526021815260200180610b556021913960400191505060405180910390fd5b600082136108db57600092505050610240565b6001600160a01b03808516600090815260026020526040808220548151633fabe5a360e21b815291519293169163feaf968c9160048082019260a092909190829003018186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d60a081101561095857600080fd5b506020810151606090910151600354909350909150156109b55760035482014211156109b55760405162461bcd60e51b8152600401808060200182810382526023815260200180610c3c6023913960400191505060405180910390fd5b60008112156109c55760006107c8565b6107c86305f5e1006107c28386610a59565b60405162461bcd60e51b815260040180806020018281038252603e815260200180610bdd603e913960400191505060405180910390fd5b6000610a5083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ab2565b90505b92915050565b600082610a6857506000610a53565b82820282848281610a7557fe5b0414610a505760405162461bcd60e51b8152600401808060200182810382526021815260200180610c1b6021913960400191505060405180910390fd5b60008183610b3e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b03578181015183820152602001610aeb565b50505050905090810190601f168015610b305780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b4a57fe5b049594505050505056fe4254432f45544820436861696e6c696e6b207072696365206973207374616c652e546f6b656e2f45544820436861696e6c696e6b207072696365206973207374616c652e546f6b656e2f55534420436861696e6c696e6b207072696365206973207374616c652e4554482f55534420436861696e6c696e6b207072696365206973207374616c652e4e6f20436861696e6c696e6b207072696365206665656420666f756e6420666f72207468697320756e6465726c79696e6720455243323020746f6b656e2e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e2f42544320436861696e6c696e6b207072696365206973207374616c652ea26469706673582212200c83034372f9b00af05a99b751418c9060ff84f60f0ada5242c8411f58f1c75964736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _maxSecondsBeforePriceIsStale (uint256): 0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.