Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ChainlinkV3OracleConfig
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity 0.8.28;import {IERC20Metadata} from "openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol";import {AggregatorV3Interface} from "chainlink/v0.8/interfaces/AggregatorV3Interface.sol";import {ISiloOracle} from "silo-core/contracts/interfaces/ISiloOracle.sol";import {IChainlinkV3Oracle} from "../interfaces/IChainlinkV3Oracle.sol";import {Layer1OracleConfig} from "../_common/Layer1OracleConfig.sol";contract ChainlinkV3OracleConfig is Layer1OracleConfig {/// @dev Chainlink aggregatorAggregatorV3Interface internal immutable _AGGREGATOR; // solhint-disable-line var-name-mixedcase/// @dev secondary Chainlink aggregator to convert price to quoteAggregatorV3Interface internal immutable _SECONDARY_AGGREGATOR; // solhint-disable-line var-name-mixedcase/// @dev Threshold used to determine if the price returned by the _SECONDARY_AGGREGATOR is validuint256 internal immutable _SECONDARY_HEARTBEAT; // solhint-disable-line var-name-mixedcase/// @dev this can be set to true to convert primary price into price denominated in quote/// assuming that both AGGREGATORS providing price in the same tokenbool internal immutable _CONVERT_TO_QUOTE; // solhint-disable-line var-name-mixedcase/// @dev all verification should be done by factoryconstructor(IChainlinkV3Oracle.ChainlinkV3DeploymentConfig memory _config)Layer1OracleConfig(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.20;import {IERC20} from "../IERC20.sol";/*** @dev Interface for the optional metadata functions from the ERC-20 standard.*/interface IERC20Metadata is IERC20 {/*** @dev Returns the name of the token.*/function name() external view returns (string memory);/*** @dev Returns the symbol of the token.*/function symbol() external view returns (string memory);/*** @dev Returns the decimals places of the token.*/function decimals() external view returns (uint8);}
12345678910111213141516171819// SPDX-License-Identifier: MITpragma solidity ^0.8.0;interface AggregatorV3Interface {function decimals() external view returns (uint8);function description() external view returns (string memory);function version() external view returns (uint256);function getRoundData(uint80 _roundId) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);function latestRoundData()externalviewreturns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);}
12345678910111213141516171819// SPDX-License-Identifier: MITpragma solidity >=0.5.0;interface ISiloOracle {/// @notice Hook function to call before `quote` function reads price/// @dev This hook function can be used to change state right before the price is read. For example it can be used/// for curve read only reentrancy protection. In majority of implementations this will be an empty function./// WARNING: reverts are propagated to Silo so if `beforeQuote` reverts, Silo reverts as well./// @param _baseToken Address of priced tokenfunction beforeQuote(address _baseToken) external;/// @return quoteAmount Returns quote price for _baseAmount of _baseToken/// @param _baseAmount Amount of priced token/// @param _baseToken Address of priced tokenfunction quote(uint256 _baseAmount, address _baseToken) external view returns (uint256 quoteAmount);/// @return address of token in which quote (price) is denominatedfunction quoteToken() external view returns (address);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.8.0;import {IERC20Metadata} from "openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol";import {AggregatorV3Interface} from "chainlink/v0.8/interfaces/AggregatorV3Interface.sol";import {ChainlinkV3OracleConfig} from "../chainlinkV3/ChainlinkV3OracleConfig.sol";interface IChainlinkV3Oracle {/// @dev config based on which new oracle will be deployed/// @notice there is no way to check if aggregators match tokens, so it is users job to verify config./// @param primaryAggregator used to read price from chainlink, if it can not provide price in quote token,/// then you have to setup secondary one that will do the job/// @param secondaryAggregator if set, it is used translate primary price into quote price eg:/// primary price is ABC/USD and secondary is ETH/USD, then result will be price in ABC/ETH/// @param baseToken base token address, it must have decimals() method available/// @param quoteToken quote toke address, it must have decimals() method available/// @param primaryHeartbeat heartbeat of primary price/// @param secondaryHeartbeat heartbeat of secondary price/// @param normalizationDivider divider that will be used in oracle to normalize price/// @param normalizationMultiplier multiplier that will be used in oracle to normalize pricestruct ChainlinkV3DeploymentConfig {IERC20Metadata baseToken;IERC20Metadata quoteToken;AggregatorV3Interface primaryAggregator;uint32 primaryHeartbeat;AggregatorV3Interface secondaryAggregator;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.28;import {IERC20Metadata} from "openzeppelin5/token/ERC20/extensions/IERC20Metadata.sol";/// @notice to keep config contract size low (this is the one that will be deployed each time)/// factory contract take over verification. You should not deploy or use config that was not created by factory./// @dev This is common config for Layer1 oraclesabstract contract Layer1OracleConfig {/// @dev price must be updated at least once every `_HEARTBEAT` seconds, otherwise something is wronguint256 internal immutable _HEARTBEAT; // solhint-disable-line var-name-mixedcase/// @dev constant used for normalising priceuint256 internal immutable _DECIMALS_NORMALIZATION_DIVIDER; // solhint-disable-line var-name-mixedcase/// @dev constant used for normalising priceuint256 internal immutable _DECIMALS_NORMALIZATION_MULTIPLIER; // solhint-disable-line var-name-mixedcaseIERC20Metadata internal immutable _BASE_TOKEN; // solhint-disable-line var-name-mixedcaseIERC20Metadata internal immutable _QUOTE_TOKEN; // solhint-disable-line var-name-mixedcase/// @dev all verification should be done by factoryconstructor(IERC20Metadata _baseToken,IERC20Metadata _quoteToken,uint256 _heartbeat,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.20;/*** @dev Interface of the ERC-20 standard as defined in the ERC.*/interface IERC20 {/*** @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);/*** @dev Returns the value of tokens in existence.*/
1234567891011121314151617181920212223242526{"remappings": ["forge-std/=gitmodules/forge-std/src/","silo-foundry-utils/=gitmodules/silo-foundry-utils/contracts/","properties/=gitmodules/crytic/properties/contracts/","silo-core/=silo-core/","silo-oracles/=silo-oracles/","silo-vaults/=silo-vaults/","ve-silo/=ve-silo/","@openzeppelin/=gitmodules/openzeppelin-contracts-5/contracts/","morpho-blue/=gitmodules/morpho-blue/src/","openzeppelin5/=gitmodules/openzeppelin-contracts-5/contracts/","openzeppelin5-upgradeable/=gitmodules/openzeppelin-contracts-upgradeable-5/contracts/","chainlink/=gitmodules/chainlink/contracts/src/","chainlink-ccip/=gitmodules/chainlink-ccip/contracts/src/","uniswap/=gitmodules/uniswap/","@uniswap/v3-core/=gitmodules/uniswap/v3-core/","balancer-labs/v2-solidity-utils/=external/balancer-v2-monorepo/pkg/solidity-utils/contracts/","balancer-labs/v2-interfaces/=external/balancer-v2-monorepo/pkg/interfaces/contracts/","balancer-labs/v2-liquidity-mining/=external/balancer-v2-monorepo/pkg/liquidity-mining/contracts/","pyth-sdk-solidity/=gitmodules/pyth-sdk-solidity/target_chains/ethereum/sdk/solidity/","@balancer-labs/=node_modules/@balancer-labs/","@ensdomains/=node_modules/@ensdomains/","@openzeppelin/contracts-upgradeable/=gitmodules/openzeppelin-contracts-upgradeable-5/contracts/","@openzeppelin/contracts/=gitmodules/openzeppelin-contracts-5/contracts/","@solidity-parser/=node_modules/@solidity-parser/",
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"components":[{"internalType":"contract IERC20Metadata","name":"baseToken","type":"address"},{"internalType":"contract IERC20Metadata","name":"quoteToken","type":"address"},{"internalType":"contract AggregatorV3Interface","name":"primaryAggregator","type":"address"},{"internalType":"uint32","name":"primaryHeartbeat","type":"uint32"},{"internalType":"contract AggregatorV3Interface","name":"secondaryAggregator","type":"address"},{"internalType":"uint32","name":"secondaryHeartbeat","type":"uint32"},{"internalType":"uint256","name":"normalizationDivider","type":"uint256"},{"internalType":"uint256","name":"normalizationMultiplier","type":"uint256"}],"internalType":"struct IChainlinkV3Oracle.ChainlinkV3DeploymentConfig","name":"_config","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getConfig","outputs":[{"components":[{"internalType":"contract AggregatorV3Interface","name":"primaryAggregator","type":"address"},{"internalType":"contract AggregatorV3Interface","name":"secondaryAggregator","type":"address"},{"internalType":"uint256","name":"primaryHeartbeat","type":"uint256"},{"internalType":"uint256","name":"secondaryHeartbeat","type":"uint256"},{"internalType":"uint256","name":"normalizationDivider","type":"uint256"},{"internalType":"uint256","name":"normalizationMultiplier","type":"uint256"},{"internalType":"contract IERC20Metadata","name":"baseToken","type":"address"},{"internalType":"contract IERC20Metadata","name":"quoteToken","type":"address"},{"internalType":"bool","name":"convertToQuote","type":"bool"}],"internalType":"struct IChainlinkV3Oracle.ChainlinkV3Config","name":"config","type":"tuple"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101a0604052348015610010575f5ffd5b5060405161047f38038061047f83398101604081905261002f916100ce565b80516020820151606083015160c08085015160e08087015160a09283529092526001600160a01b039485169091529183166101005263ffffffff9081166080908152604085015184166101205284018051841661014052919093015190921661016052905116151561018052610190565b80516001600160a01b03811681146100b6575f5ffd5b919050565b805163ffffffff811681146100b6575f5ffd5b5f6101008284031280156100e0575f5ffd5b5060405161010081016001600160401b038111828210171561011057634e487b7160e01b5f52604160045260245ffd5b60405261011c836100a0565b815261012a602084016100a0565b602082015261013b604084016100a0565b604082015261014c606084016100bb565b606082015261015d608084016100a0565b608082015261016e60a084016100bb565b60a082015260c0838101519082015260e0928301519281019290925250919050565b60805160a05160c05160e051610100516101205161014051610160516101805161028f6101f05f395f61017501525f60b401525f606701525f604201525f61014e01525f61012601525f61010001525f60da01525f608f015261028f5ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063c3f909d41461002d575b5f5ffd5b60408051610120810182526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301527f000000000000000000000000000000000000000000000000000000000000000060808301527f000000000000000000000000000000000000000000000000000000000000000060a08301527f0000000000000000000000000000000000000000000000000000000000000000811660c08301527f00000000000000000000000000000000000000000000000000000000000000001660e08201527f0000000000000000000000000000000000000000000000000000000000000000151561010082015290516101a891906101b1565b60405180910390f35b81516001600160a01b031681526020808301516101208301916101de908401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015161022160c08401826001600160a01b03169052565b5060e083015161023c60e08401826001600160a01b03169052565b5061010083015161025261010084018215159052565b509291505056fea264697066735822122089de3ddacef594b155d1ee58186bf003e06893c4c6f27a37378d47c2b443f35864736f6c634300081c003300000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894000000000000000000000000ad525f341368aa80093672278234ad364efcaf0a00000000000000000000000055bca887199d5520b3ce285d41e6dc10c08716c900000000000000000000000000000000000000000000000000000000000153d90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063c3f909d41461002d575b5f5ffd5b60408051610120810182526001600160a01b037f00000000000000000000000055bca887199d5520b3ce285d41e6dc10c08716c9811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f00000000000000000000000000000000000000000000000000000000000153d9828401527f000000000000000000000000000000000000000000000000000000000000000060608301527f000000000000000000000000000000000000000000000000000000000000000060808301527f000000000000000000000000000000000000000000000000000000000000271060a08301527f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894811660c08301527f000000000000000000000000ad525f341368aa80093672278234ad364efcaf0a1660e08201527f0000000000000000000000000000000000000000000000000000000000000000151561010082015290516101a891906101b1565b60405180910390f35b81516001600160a01b031681526020808301516101208301916101de908401826001600160a01b03169052565b5060408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015161022160c08401826001600160a01b03169052565b5060e083015161023c60e08401826001600160a01b03169052565b5061010083015161025261010084018215159052565b509291505056fea264697066735822122089de3ddacef594b155d1ee58186bf003e06893c4c6f27a37378d47c2b443f35864736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894000000000000000000000000ad525f341368aa80093672278234ad364efcaf0a00000000000000000000000055bca887199d5520b3ce285d41e6dc10c08716c900000000000000000000000000000000000000000000000000000000000153d90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710
-----Decoded View---------------
Arg [0] : _config (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894
Arg [1] : 000000000000000000000000ad525f341368aa80093672278234ad364efcaf0a
Arg [2] : 00000000000000000000000055bca887199d5520b3ce285d41e6dc10c08716c9
Arg [3] : 00000000000000000000000000000000000000000000000000000000000153d9
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000002710
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.