Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PythAggregatorV3
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache 2 pragma solidity >=0.8.24 <0.9.0; import {PythStructs} from "./PythStructs.sol"; import {IPyth} from "./IPyth.sol"; // This interface is forked from the Zerolend Adapter found here: // https://github.com/zerolend/pyth-oracles/blob/master/contracts/PythAggregatorV3.sol // Original license found under licenses/zerolend-pyth-oracles.md /** * @title A port of the ChainlinkAggregatorV3 interface that supports Pyth price feeds * @notice This does not store any roundId information on-chain. Please review the code before using this implementation. * Users should deploy an instance of this contract to wrap every price feed id that they need to use. */ contract PythAggregatorV3 { bytes32 public priceId; IPyth public pyth; constructor(address _pyth, bytes32 _priceId) { pyth = IPyth(_pyth); priceId = _priceId; } // Wrapper function to update the underlying Pyth price feeds. Not part of the AggregatorV3 interface but useful. function updateFeeds(bytes[] calldata priceUpdateData) public payable { // Update the prices to the latest available values and pay the required fee for it. The `priceUpdateData` data // should be retrieved from our off-chain Price Service API using the `pyth-evm-js` package. // See section "How Pyth Works on EVM Chains" below for more information. uint fee = pyth.getUpdateFee(priceUpdateData); pyth.updatePriceFeeds{value: fee}(priceUpdateData); // refund remaining eth payable(msg.sender).call{value: address(this).balance}(""); } function decimals() public view virtual returns (uint8) { PythStructs.Price memory price = pyth.getPriceUnsafe(priceId); return uint8(-1 * int8(price.expo)); } function description() public pure returns (string memory) { return "A port of a chainlink aggregator powered by pyth network feeds"; } function version() public pure returns (uint256) { return 1; } function latestAnswer() public view virtual returns (int256) { PythStructs.Price memory price = pyth.getPriceUnsafe(priceId); return int256(price.price); } function latestTimestamp() public view returns (uint256) { PythStructs.Price memory price = pyth.getPriceUnsafe(priceId); return price.publishTime; } function latestRound() public view returns (uint256) { // use timestamp as the round id return latestTimestamp(); } function getAnswer(uint256) public view returns (int256) { return latestAnswer(); } function getTimestamp(uint256) external view returns (uint256) { return latestTimestamp(); } function getRoundData( uint80 _roundId ) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { PythStructs.Price memory price = pyth.getPriceUnsafe(priceId); return ( _roundId, int256(price.price), price.publishTime, price.publishTime, _roundId ); } function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { PythStructs.Price memory price = pyth.getPriceUnsafe(priceId); roundId = uint80(price.publishTime); return ( roundId, int256(price.price), price.publishTime, price.publishTime, roundId ); } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.8.24 <0.9.0; import "./PythStructs.sol"; import "./IPythEvents.sol"; /// @title Consume prices from the Pyth Network (https://pyth.network/). /// @dev Please refer to the guidance at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how to consume prices safely. /// @author Pyth Data Association interface IPyth is IPythEvents { /// @notice Returns the price of a price feed without any sanity checks. /// @dev This function returns the most recent price update in this contract without any recency checks. /// This function is unsafe as the returned price update may be arbitrarily far in the past. /// /// Users of this function should check the `publishTime` in the price to ensure that the returned price is /// sufficiently recent for their application. If you are considering using this function, it may be /// safer / easier to use `getPriceNoOlderThan`. /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely. function getPriceUnsafe( bytes32 id ) external view returns (PythStructs.Price memory price); /// @notice Returns the price that is no older than `age` seconds of the current time. /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently /// recently. /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely. function getPriceNoOlderThan( bytes32 id, uint age ) external view returns (PythStructs.Price memory price); /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks. /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available. /// However, if the price is not recent this function returns the latest available price. /// /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that /// the returned price is recent or useful for any particular application. /// /// Users of this function should check the `publishTime` in the price to ensure that the returned price is /// sufficiently recent for their application. If you are considering using this function, it may be /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`. /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely. function getEmaPriceUnsafe( bytes32 id ) external view returns (PythStructs.Price memory price); /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds /// of the current time. /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently /// recently. /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely. function getEmaPriceNoOlderThan( bytes32 id, uint age ) external view returns (PythStructs.Price memory price); /// @notice Update price feeds with given update messages. /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling /// `getUpdateFee` with the length of the `updateData` array. /// Prices will be updated if they are more recent than the current stored prices. /// The call will succeed even if the update is not the most recent. /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid. /// @param updateData Array of price update data. function updatePriceFeeds(bytes[] calldata updateData) external payable; /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the /// given `publishTimes` for the price feeds and does not read the actual price update publish time within `updateData`. /// /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling /// `getUpdateFee` with the length of the `updateData` array. /// /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas. /// Otherwise, it calls updatePriceFeeds method to update the prices. /// /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid. /// @param updateData Array of price update data. /// @param priceIds Array of price ids. /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]` function updatePriceFeedsIfNecessary( bytes[] calldata updateData, bytes32[] calldata priceIds, uint64[] calldata publishTimes ) external payable; /// @notice Returns the required fee to update an array of price updates. /// @param updateData Array of price update data. /// @return feeAmount The required fee in Wei. function getUpdateFee( bytes[] calldata updateData ) external view returns (uint feeAmount); /// @notice Parse `updateData` and return price feeds of the given `priceIds` if they are all published /// within `minPublishTime` and `maxPublishTime`. /// /// You can use this method if you want to use a Pyth price at a fixed time and not the most recent price; /// otherwise, please consider using `updatePriceFeeds`. This method may store the price updates on-chain, if they /// are more recent than the current stored prices. /// /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling /// `getUpdateFee` with the length of the `updateData` array. /// /// /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is /// no update for any of the given `priceIds` within the given time range. /// @param updateData Array of price update data. /// @param priceIds Array of price ids. /// @param minPublishTime minimum acceptable publishTime for the given `priceIds`. /// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`. /// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order). function parsePriceFeedUpdates( bytes[] calldata updateData, bytes32[] calldata priceIds, uint64 minPublishTime, uint64 maxPublishTime ) external payable returns (PythStructs.PriceFeed[] memory priceFeeds); /// @notice Similar to `parsePriceFeedUpdates` but ensures the updates returned are /// the first updates published in minPublishTime. That is, if there are multiple updates for a given timestamp, /// this method will return the first update. This method may store the price updates on-chain, if they /// are more recent than the current stored prices. /// /// /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid or there is /// no update for any of the given `priceIds` within the given time range and uniqueness condition. /// @param updateData Array of price update data. /// @param priceIds Array of price ids. /// @param minPublishTime minimum acceptable publishTime for the given `priceIds`. /// @param maxPublishTime maximum acceptable publishTime for the given `priceIds`. /// @return priceFeeds Array of the price feeds corresponding to the given `priceIds` (with the same order). function parsePriceFeedUpdatesUnique( bytes[] calldata updateData, bytes32[] calldata priceIds, uint64 minPublishTime, uint64 maxPublishTime ) external payable returns (PythStructs.PriceFeed[] memory priceFeeds); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.8.24 <0.9.0; /// @title IPythEvents contains the events that Pyth contract emits. /// @dev This interface can be used for listening to the updates for off-chain and testing purposes. interface IPythEvents { /// @dev Emitted when the price feed with `id` has received a fresh update. /// @param id The Pyth Price Feed ID. /// @param publishTime Publish time of the given price update. /// @param price Price of the given price update. /// @param conf Confidence interval of the given price update. event PriceFeedUpdate( bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf ); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.8.24 <0.9.0; contract PythStructs { // A price with a degree of uncertainty, represented as a price +- a confidence interval. // // The confidence interval roughly corresponds to the standard error of a normal distribution. // Both the price and confidence are stored in a fixed-point numeric representation, // `x * (10^expo)`, where `expo` is the exponent. // // Please refer to the documentation at https://docs.pyth.network/documentation/pythnet-price-feeds/best-practices for how // to how this price safely. struct Price { // Price int64 price; // Confidence interval around the price uint64 conf; // Price exponent int32 expo; // Unix timestamp describing when the price was published uint publishTime; } // PriceFeed represents a current aggregate price from pyth publisher feeds. struct PriceFeed { // The price ID. bytes32 id; // Latest available price Price price; // Latest available exponentially-weighted moving average price Price emaPrice; } }
{ "viaIR": true, "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_pyth","type":"address"},{"internalType":"bytes32","name":"_priceId","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pyth","outputs":[{"internalType":"contract IPyth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"priceUpdateData","type":"bytes[]"}],"name":"updateFeeds","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60806040523462000038576200001f6200001862000154565b9062000277565b620000296200003e565b6113426200029e823961134290f35b62000044565b60405190565b600080fd5b601f801991011690565b634e487b7160e01b600052604160045260246000fd5b90620000759062000049565b810190811060018060401b038211176200008e57604052565b62000053565b90620000ab620000a36200003e565b928362000069565b565b600080fd5b60018060a01b031690565b620000c890620000b2565b90565b620000d681620000bd565b03620000de57565b600080fd5b90505190620000f282620000cb565b565b90565b6200010281620000f4565b036200010a57565b600080fd5b905051906200011e82620000f7565b565b91906040838203126200014e5780620001416200014b9260008601620000e3565b936020016200010f565b90565b620000ad565b62000177620015e0803803806200016b8162000094565b92833981019062000120565b9091565b90565b62000197620001916200019d92620000b2565b6200017b565b620000b2565b90565b620001ab906200017e565b90565b620001b990620001a0565b90565b60001b90565b90620001d560018060a01b0391620001bc565b9181191691161790565b620001ea90620001a0565b90565b90565b906200020a620002046200021292620001df565b620001ed565b8254620001c2565b9055565b906200022560001991620001bc565b9181191691161790565b6200023a90620000f4565b90565b60001c90565b6200024e906200023d565b90565b906200026b6200026562000273926200022f565b62000243565b825462000216565b9055565b90620002936200028b6200029b93620001ae565b6001620001f0565b600062000251565b56fe60806040526004361015610013575b610743565b61001e6000356100ed565b806331189334146100e8578063313ce567146100e357806350d25bcd146100de57806354fd4d50146100d9578063668a0f02146100d45780637284e416146100cf5780638205bf6a146100ca5780639a6fc8f5146100c5578063b5ab58dc146100c0578063b633620c146100bb578063bc36c0a9146100b6578063f98d06f0146100b15763feaf968c0361000e5761070a565b6106d5565b610605565b610545565b610510565b610494565b6103ad565b610378565b6102bd565b610288565b61022d565b6101d2565b610174565b60e01c90565b60405190565b600080fd5b600080fd5b600091031261010e57565b6100fe565b1c90565b90565b61012a90600861012f9302610113565b610117565b90565b9061013d915461011a565b90565b61014b600080610132565b90565b90565b61015a9061014e565b9052565b919061017290600060208501940190610151565b565b346101a457610184366004610103565b6101a061018f610140565b6101976100f3565b9182918261015e565b0390f35b6100f9565b60ff1690565b6101b8906101a9565b9052565b91906101d0906000602085019401906101af565b565b34610202576101e2366004610103565b6101fe6101ed6109cd565b6101f56100f3565b918291826101bc565b0390f35b6100f9565b90565b61021390610207565b9052565b919061022b9060006020850194019061020a565b565b3461025d5761023d366004610103565b610259610248610aca565b6102506100f3565b91829182610217565b0390f35b6100f9565b90565b61026e90610262565b9052565b919061028690600060208501940190610265565b565b346102b857610298366004610103565b6102b46102a3610b9e565b6102ab6100f3565b91829182610272565b0390f35b6100f9565b346102ed576102cd366004610103565b6102e96102d8610bb4565b6102e06100f3565b91829182610272565b0390f35b6100f9565b5190565b60209181520190565b60005b838110610313575050906000910152565b806020918301518185015201610302565b601f801991011690565b61034d61035660209361035b93610344816102f2565b938480936102f6565b958691016102ff565b610324565b0190565b610375916020820191600081840391015261032e565b90565b346103a857610388366004610103565b6103a4610393610c79565b61039b6100f3565b9182918261035f565b0390f35b6100f9565b346103dd576103bd366004610103565b6103d96103c8610c9a565b6103d06100f3565b91829182610272565b0390f35b6100f9565b600080fd5b69ffffffffffffffffffff1690565b6103ff816103e7565b0361040657565b600080fd5b90503590610418826103f6565b565b90602082820312610434576104319160000161040b565b90565b6100fe565b610442906103e7565b9052565b909594926104929461048161048b9261047760809661046d60a088019c6000890190610439565b602087019061020a565b6040850190610265565b6060830190610265565b0190610439565b565b346104c8576104c46104af6104aa36600461041a565b610d49565b916104bb9593956100f3565b95869586610446565b0390f35b6100f9565b6104d681610262565b036104dd57565b600080fd5b905035906104ef826104cd565b565b9060208282031261050b57610508916000016104e2565b90565b6100fe565b346105405761053c61052b6105263660046104f1565b610e3e565b6105336100f3565b91829182610217565b0390f35b6100f9565b346105755761057161056061055b3660046104f1565b610e53565b6105686100f3565b91829182610272565b0390f35b6100f9565b600080fd5b600080fd5b600080fd5b909182601f830112156105c35781359167ffffffffffffffff83116105be5760200192602083028401116105b957565b610584565b61057f565b61057a565b906020828203126105fa57600082013567ffffffffffffffff81116105f5576105f19201610589565b9091565b6103e2565b6100fe565b60000190565b6106196106133660046105c8565b90611086565b6106216100f3565b8061062b816105ff565b0390f35b60018060a01b031690565b61064a90600861064f9302610113565b61062f565b90565b9061065d915461063a565b90565b61066d6001600090610652565b90565b60018060a01b031690565b90565b61069261068d61069792610670565b61067b565b610670565b90565b6106a39061067e565b90565b6106af9061069a565b90565b6106bb906106a6565b9052565b91906106d3906000602085019401906106b2565b565b34610705576106e5366004610103565b6107016106f0610660565b6106f86100f3565b918291826106bf565b0390f35b6100f9565b3461073e5761071a366004610103565b61073a610725611204565b916107319593956100f3565b95869586610446565b0390f35b6100f9565b600080fd5b600090565b60001c90565b61075f6107649161074d565b61062f565b90565b6107719054610753565b90565b6107806107859161074d565b610117565b90565b6107929054610774565b90565b600080fd5b634e487b7160e01b600052604160045260246000fd5b906107ba90610324565b810190811067ffffffffffffffff8211176107d457604052565b61079a565b60e01b90565b600080fd5b906107f76107f06100f3565b92836107b0565b565b60070b90565b610808816107f9565b0361080f57565b600080fd5b90505190610821826107ff565b565b67ffffffffffffffff1690565b61083981610823565b0361084057565b600080fd5b9050519061085282610830565b565b60030b90565b61086381610854565b0361086a57565b600080fd5b9050519061087c8261085a565b565b9050519061088b826104cd565b565b91906080838203126108ed576108e6906108a760806107e4565b936108b58260008301610814565b60008601526108c78260208301610845565b60208601526108d9826040830161086f565b604086015260600161087e565b6060830152565b6107df565b9060808282031261090c576109099160000161088d565b90565b6100fe565b6109196100f3565b3d6000823e3d90fd5b61092c9051610854565b90565b60000b90565b61094961094461094e92610854565b61067b565b61092f565b90565b90565b61096861096361096d92610951565b61067b565b61092f565b90565b634e487b7160e01b600052601160045260246000fd5b6109926109989161092f565b9161092f565b02906109a38261092f565b9182036109ac57565b610970565b6109c56109c06109ca9261092f565b61067b565b6101a9565b90565b6109d5610748565b50610a2060806109ed6109e86001610767565b6106a6565b6396834ad390610a15610a006000610788565b92610a096100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610a9757610a6691610a6191600091610a69575b50610a5c610a56610a5160406000199401610922565b610935565b91610954565b610986565b6109b1565b90565b610a8a915060803d8111610a90575b610a8281836107b0565b8101906108f2565b38610a3b565b503d610a78565b610911565b600090565b610aab90516107f9565b90565b610ac2610abd610ac7926107f9565b61067b565b610207565b90565b610ad2610a9c565b50610b1d6080610aea610ae56001610767565b6106a6565b6396834ad390610b12610afd6000610788565b92610b066100f3565b958694859384936107d9565b83526004830161015e565b03915afa8015610b75576000610b3f91610b44938291610b47575b5001610aa1565b610aae565b90565b610b68915060803d8111610b6e575b610b6081836107b0565b8101906108f2565b38610b38565b503d610b56565b610911565b600090565b90565b610b96610b91610b9b92610b7f565b61067b565b610262565b90565b610ba6610b7a565b50610bb16001610b82565b90565b610bbc610b7a565b50610bc5610c9a565b90565b606090565b67ffffffffffffffff8111610beb57610be7602091610324565b0190565b61079a565b90610c02610bfd83610bcd565b6107e4565b918252565b60207f20706f77657265642062792070797468206e6574776f726b2066656564730000917f4120706f7274206f66206120636861696e6c696e6b2061676772656761746f7260008201520152565b610c5f603e610bf0565b90610c6c60208301610c07565b565b610c76610c55565b90565b610c81610bc8565b50610c8a610c6e565b90565b610c979051610262565b90565b610ca2610b7a565b50610ced6080610cba610cb56001610767565b6106a6565b6396834ad390610ce2610ccd6000610788565b92610cd66100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610d3f57610d0e91606091600091610d11575b5001610c8d565b90565b610d32915060803d8111610d38575b610d2a81836107b0565b8101906108f2565b38610d07565b503d610d20565b610911565b600090565b610d51610d44565b50610d5a610a9c565b50610d63610b7a565b50610d6c610b7a565b50610d75610d44565b50610dc06080610d8d610d886001610767565b6106a6565b6396834ad390610db5610da06000610788565b92610da96100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610e3957600091610e0b575b509080610dea610de560008501610aa1565b610aae565b93610e026060610dfb818701610c8d565b9501610c8d565b92919493929190565b610e2c915060803d8111610e32575b610e2481836107b0565b8101906108f2565b38610dd3565b503d610e1a565b610911565b50610e47610a9c565b50610e50610aca565b90565b50610e5c610b7a565b50610e65610c9a565b90565b90602082820312610e8257610e7f9160000161087e565b90565b6100fe565b60209181520190565b90565b60209181520190565b90826000939282370152565b9190610ec281610ebb81610ec795610e93565b8095610e9c565b610324565b0190565b90610ed69291610ea8565b90565b600080fd5b600080fd5b600080fd5b9035600160200382360303811215610f2957016020813591019167ffffffffffffffff8211610f24576001820236038313610f1f57565b610ede565b610ed9565b610ee3565b60200190565b9181610f3f91610e87565b9081610f5060208302840194610e90565b92836000925b848410610f665750505050505090565b9091929394956020610f92610f8c8385600195038852610f868b88610ee8565b90610ecb565b98610f2e565b940194019294939190610f56565b9091610fb89260208301926000818503910152610f34565b90565b6000910312610fc657565b6100fe565b610fd49061067e565b90565b610fe090610fcb565b90565b610fec9061069a565b90565b610ff89061069a565b90565b905090565b61100c60008092610ffb565b0190565b61101990611000565b90565b67ffffffffffffffff811161103a57611036602091610324565b0190565b61079a565b9061105161104c8361101c565b6107e4565b918252565b606090565b3d6000146110785761106c3d61103f565b903d6000602084013e5b565b611080611056565b90611076565b6110986110936001610767565b6106a6565b602063d47eed459183906110be86946110c96110b26100f3565b968795869485946107d9565b845260048401610fa0565b03915afa9081156111e3576000916111b5575b50916110f06110eb6001610767565b6106a6565b9263ef9e5e2890939093929193813b156111b0576000936111229161112d6111166100f3565b978896879586946107d9565b845260048401610fa0565b03925af180156111ab5761117e575b5060008061115161114c33610fd7565b610fe3565b61115a30610fef565b316111636100f3565b908161116e81611010565b03925af15061117b61105b565b50565b61119e9060003d81116111a4575b61119681836107b0565b810190610fbb565b3861113c565b503d61118c565b610911565b610795565b6111d6915060203d81116111dc575b6111ce81836107b0565b810190610e68565b386110dc565b503d6111c4565b610911565b6111fc6111f761120192610262565b61067b565b6103e7565b90565b61120c610d44565b50611215610a9c565b5061121e610b7a565b50611227610b7a565b50611230610d44565b5061127b60806112486112436001610767565b6106a6565b6396834ad39061127061125b6000610788565b926112646100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115611307576000916112d9575b506112a361129e60608301610c8d565b6111e8565b806112b86112b360008501610aa1565b610aae565b936112d060606112c9818701610c8d565b9501610c8d565b92919493929190565b6112fa915060803d8111611300575b6112f281836107b0565b8101906108f2565b3861128e565b503d6112e8565b61091156fea26469706673582212206cb9a54818ce6aa7275fb8abd795786e0bd2f4e6a8d83c36f9da058792913cc464736f6c634300081800330000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43f490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d
Deployed Bytecode
0x60806040526004361015610013575b610743565b61001e6000356100ed565b806331189334146100e8578063313ce567146100e357806350d25bcd146100de57806354fd4d50146100d9578063668a0f02146100d45780637284e416146100cf5780638205bf6a146100ca5780639a6fc8f5146100c5578063b5ab58dc146100c0578063b633620c146100bb578063bc36c0a9146100b6578063f98d06f0146100b15763feaf968c0361000e5761070a565b6106d5565b610605565b610545565b610510565b610494565b6103ad565b610378565b6102bd565b610288565b61022d565b6101d2565b610174565b60e01c90565b60405190565b600080fd5b600080fd5b600091031261010e57565b6100fe565b1c90565b90565b61012a90600861012f9302610113565b610117565b90565b9061013d915461011a565b90565b61014b600080610132565b90565b90565b61015a9061014e565b9052565b919061017290600060208501940190610151565b565b346101a457610184366004610103565b6101a061018f610140565b6101976100f3565b9182918261015e565b0390f35b6100f9565b60ff1690565b6101b8906101a9565b9052565b91906101d0906000602085019401906101af565b565b34610202576101e2366004610103565b6101fe6101ed6109cd565b6101f56100f3565b918291826101bc565b0390f35b6100f9565b90565b61021390610207565b9052565b919061022b9060006020850194019061020a565b565b3461025d5761023d366004610103565b610259610248610aca565b6102506100f3565b91829182610217565b0390f35b6100f9565b90565b61026e90610262565b9052565b919061028690600060208501940190610265565b565b346102b857610298366004610103565b6102b46102a3610b9e565b6102ab6100f3565b91829182610272565b0390f35b6100f9565b346102ed576102cd366004610103565b6102e96102d8610bb4565b6102e06100f3565b91829182610272565b0390f35b6100f9565b5190565b60209181520190565b60005b838110610313575050906000910152565b806020918301518185015201610302565b601f801991011690565b61034d61035660209361035b93610344816102f2565b938480936102f6565b958691016102ff565b610324565b0190565b610375916020820191600081840391015261032e565b90565b346103a857610388366004610103565b6103a4610393610c79565b61039b6100f3565b9182918261035f565b0390f35b6100f9565b346103dd576103bd366004610103565b6103d96103c8610c9a565b6103d06100f3565b91829182610272565b0390f35b6100f9565b600080fd5b69ffffffffffffffffffff1690565b6103ff816103e7565b0361040657565b600080fd5b90503590610418826103f6565b565b90602082820312610434576104319160000161040b565b90565b6100fe565b610442906103e7565b9052565b909594926104929461048161048b9261047760809661046d60a088019c6000890190610439565b602087019061020a565b6040850190610265565b6060830190610265565b0190610439565b565b346104c8576104c46104af6104aa36600461041a565b610d49565b916104bb9593956100f3565b95869586610446565b0390f35b6100f9565b6104d681610262565b036104dd57565b600080fd5b905035906104ef826104cd565b565b9060208282031261050b57610508916000016104e2565b90565b6100fe565b346105405761053c61052b6105263660046104f1565b610e3e565b6105336100f3565b91829182610217565b0390f35b6100f9565b346105755761057161056061055b3660046104f1565b610e53565b6105686100f3565b91829182610272565b0390f35b6100f9565b600080fd5b600080fd5b600080fd5b909182601f830112156105c35781359167ffffffffffffffff83116105be5760200192602083028401116105b957565b610584565b61057f565b61057a565b906020828203126105fa57600082013567ffffffffffffffff81116105f5576105f19201610589565b9091565b6103e2565b6100fe565b60000190565b6106196106133660046105c8565b90611086565b6106216100f3565b8061062b816105ff565b0390f35b60018060a01b031690565b61064a90600861064f9302610113565b61062f565b90565b9061065d915461063a565b90565b61066d6001600090610652565b90565b60018060a01b031690565b90565b61069261068d61069792610670565b61067b565b610670565b90565b6106a39061067e565b90565b6106af9061069a565b90565b6106bb906106a6565b9052565b91906106d3906000602085019401906106b2565b565b34610705576106e5366004610103565b6107016106f0610660565b6106f86100f3565b918291826106bf565b0390f35b6100f9565b3461073e5761071a366004610103565b61073a610725611204565b916107319593956100f3565b95869586610446565b0390f35b6100f9565b600080fd5b600090565b60001c90565b61075f6107649161074d565b61062f565b90565b6107719054610753565b90565b6107806107859161074d565b610117565b90565b6107929054610774565b90565b600080fd5b634e487b7160e01b600052604160045260246000fd5b906107ba90610324565b810190811067ffffffffffffffff8211176107d457604052565b61079a565b60e01b90565b600080fd5b906107f76107f06100f3565b92836107b0565b565b60070b90565b610808816107f9565b0361080f57565b600080fd5b90505190610821826107ff565b565b67ffffffffffffffff1690565b61083981610823565b0361084057565b600080fd5b9050519061085282610830565b565b60030b90565b61086381610854565b0361086a57565b600080fd5b9050519061087c8261085a565b565b9050519061088b826104cd565b565b91906080838203126108ed576108e6906108a760806107e4565b936108b58260008301610814565b60008601526108c78260208301610845565b60208601526108d9826040830161086f565b604086015260600161087e565b6060830152565b6107df565b9060808282031261090c576109099160000161088d565b90565b6100fe565b6109196100f3565b3d6000823e3d90fd5b61092c9051610854565b90565b60000b90565b61094961094461094e92610854565b61067b565b61092f565b90565b90565b61096861096361096d92610951565b61067b565b61092f565b90565b634e487b7160e01b600052601160045260246000fd5b6109926109989161092f565b9161092f565b02906109a38261092f565b9182036109ac57565b610970565b6109c56109c06109ca9261092f565b61067b565b6101a9565b90565b6109d5610748565b50610a2060806109ed6109e86001610767565b6106a6565b6396834ad390610a15610a006000610788565b92610a096100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610a9757610a6691610a6191600091610a69575b50610a5c610a56610a5160406000199401610922565b610935565b91610954565b610986565b6109b1565b90565b610a8a915060803d8111610a90575b610a8281836107b0565b8101906108f2565b38610a3b565b503d610a78565b610911565b600090565b610aab90516107f9565b90565b610ac2610abd610ac7926107f9565b61067b565b610207565b90565b610ad2610a9c565b50610b1d6080610aea610ae56001610767565b6106a6565b6396834ad390610b12610afd6000610788565b92610b066100f3565b958694859384936107d9565b83526004830161015e565b03915afa8015610b75576000610b3f91610b44938291610b47575b5001610aa1565b610aae565b90565b610b68915060803d8111610b6e575b610b6081836107b0565b8101906108f2565b38610b38565b503d610b56565b610911565b600090565b90565b610b96610b91610b9b92610b7f565b61067b565b610262565b90565b610ba6610b7a565b50610bb16001610b82565b90565b610bbc610b7a565b50610bc5610c9a565b90565b606090565b67ffffffffffffffff8111610beb57610be7602091610324565b0190565b61079a565b90610c02610bfd83610bcd565b6107e4565b918252565b60207f20706f77657265642062792070797468206e6574776f726b2066656564730000917f4120706f7274206f66206120636861696e6c696e6b2061676772656761746f7260008201520152565b610c5f603e610bf0565b90610c6c60208301610c07565b565b610c76610c55565b90565b610c81610bc8565b50610c8a610c6e565b90565b610c979051610262565b90565b610ca2610b7a565b50610ced6080610cba610cb56001610767565b6106a6565b6396834ad390610ce2610ccd6000610788565b92610cd66100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610d3f57610d0e91606091600091610d11575b5001610c8d565b90565b610d32915060803d8111610d38575b610d2a81836107b0565b8101906108f2565b38610d07565b503d610d20565b610911565b600090565b610d51610d44565b50610d5a610a9c565b50610d63610b7a565b50610d6c610b7a565b50610d75610d44565b50610dc06080610d8d610d886001610767565b6106a6565b6396834ad390610db5610da06000610788565b92610da96100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115610e3957600091610e0b575b509080610dea610de560008501610aa1565b610aae565b93610e026060610dfb818701610c8d565b9501610c8d565b92919493929190565b610e2c915060803d8111610e32575b610e2481836107b0565b8101906108f2565b38610dd3565b503d610e1a565b610911565b50610e47610a9c565b50610e50610aca565b90565b50610e5c610b7a565b50610e65610c9a565b90565b90602082820312610e8257610e7f9160000161087e565b90565b6100fe565b60209181520190565b90565b60209181520190565b90826000939282370152565b9190610ec281610ebb81610ec795610e93565b8095610e9c565b610324565b0190565b90610ed69291610ea8565b90565b600080fd5b600080fd5b600080fd5b9035600160200382360303811215610f2957016020813591019167ffffffffffffffff8211610f24576001820236038313610f1f57565b610ede565b610ed9565b610ee3565b60200190565b9181610f3f91610e87565b9081610f5060208302840194610e90565b92836000925b848410610f665750505050505090565b9091929394956020610f92610f8c8385600195038852610f868b88610ee8565b90610ecb565b98610f2e565b940194019294939190610f56565b9091610fb89260208301926000818503910152610f34565b90565b6000910312610fc657565b6100fe565b610fd49061067e565b90565b610fe090610fcb565b90565b610fec9061069a565b90565b610ff89061069a565b90565b905090565b61100c60008092610ffb565b0190565b61101990611000565b90565b67ffffffffffffffff811161103a57611036602091610324565b0190565b61079a565b9061105161104c8361101c565b6107e4565b918252565b606090565b3d6000146110785761106c3d61103f565b903d6000602084013e5b565b611080611056565b90611076565b6110986110936001610767565b6106a6565b602063d47eed459183906110be86946110c96110b26100f3565b968795869485946107d9565b845260048401610fa0565b03915afa9081156111e3576000916111b5575b50916110f06110eb6001610767565b6106a6565b9263ef9e5e2890939093929193813b156111b0576000936111229161112d6111166100f3565b978896879586946107d9565b845260048401610fa0565b03925af180156111ab5761117e575b5060008061115161114c33610fd7565b610fe3565b61115a30610fef565b316111636100f3565b908161116e81611010565b03925af15061117b61105b565b50565b61119e9060003d81116111a4575b61119681836107b0565b810190610fbb565b3861113c565b503d61118c565b610911565b610795565b6111d6915060203d81116111dc575b6111ce81836107b0565b810190610e68565b386110dc565b503d6111c4565b610911565b6111fc6111f761120192610262565b61067b565b6103e7565b90565b61120c610d44565b50611215610a9c565b5061121e610b7a565b50611227610b7a565b50611230610d44565b5061127b60806112486112436001610767565b6106a6565b6396834ad39061127061125b6000610788565b926112646100f3565b958694859384936107d9565b83526004830161015e565b03915afa908115611307576000916112d9575b506112a361129e60608301610c8d565b6111e8565b806112b86112b360008501610aa1565b610aae565b936112d060606112c9818701610c8d565b9501610c8d565b92919493929190565b6112fa915060803d8111611300575b6112f281836107b0565b8101906108f2565b3861128e565b503d6112e8565b61091156fea26469706673582212206cb9a54818ce6aa7275fb8abd795786e0bd2f4e6a8d83c36f9da058792913cc464736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43f490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d
-----Decoded View---------------
Arg [0] : _pyth (address): 0x2880aB155794e7179c9eE2e38200202908C17B43
Arg [1] : _priceId (bytes32): 0xf490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002880ab155794e7179c9ee2e38200202908c17b43
Arg [1] : f490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.