Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OracleWrapper
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: MIT
pragma solidity 0.6.12;
import "../interfaces/IChainlinkAggregator.sol";
contract OracleWrapper {
uint8 private constant DECIMALS = 8;
IChainlinkAggregator public immutable ethOracle;
IChainlinkAggregator public immutable underlyingOracle;
constructor(address _ethOracle, address _underlyingOracle) public {
ethOracle = IChainlinkAggregator(_ethOracle);
underlyingOracle = IChainlinkAggregator(_underlyingOracle);
}
function latestAnswer() external view returns (int256) {
int256 ethPricInUSD = ethOracle.latestAnswer();
int256 underlyingPriceInETH = underlyingOracle.latestAnswer();
return underlyingPriceInETH * ethPricInUSD / 10 ** 8;
}
function latestTimestamp() external view returns (uint256) {
return underlyingOracle.latestTimestamp();
}
function decimals() external view returns (uint8) {
return DECIMALS;
}
}// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;
interface IChainlinkAggregator {
function decimals() external view returns (uint8);
function latestAnswer() external view returns (int256);
function latestTimestamp() external view returns (uint256);
function latestRound() external view returns (uint256);
function getAnswer(uint256 roundId) external view returns (int256);
function getTimestamp(uint256 roundId) external view returns (uint256);
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
event NewRound(uint256 indexed roundId, address indexed startedBy);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_ethOracle","type":"address"},{"internalType":"address","name":"_underlyingOracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethOracle","outputs":[{"internalType":"contract IChainlinkAggregator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingOracle","outputs":[{"internalType":"contract IChainlinkAggregator","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60c060405234801561001057600080fd5b5060405161038d38038061038d8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c61030261008b6000398060ca5280610199528061022052508060f652806102aa52506103026000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806312c46e611461005c578063313ce5671461008057806350d25bcd1461009e5780638205bf6a146100b85780639c8762e1146100c0575b600080fd5b6100646100c8565b604080516001600160a01b039092168252519081900360200190f35b6100886100ec565b6040805160ff9092168252519081900360200190f35b6100a66100f1565b60408051918252519081900360200190f35b6100a661021c565b6100646102a8565b7f000000000000000000000000000000000000000000000000000000000000000081565b600890565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561014d57600080fd5b505afa158015610161573d6000803e3d6000fd5b505050506040513d602081101561017757600080fd5b5051604080516350d25bcd60e01b815290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916350d25bcd916004808301926020929190829003018186803b1580156101df57600080fd5b505afa1580156101f3573d6000803e3d6000fd5b505050506040513d602081101561020957600080fd5b50516305f5e10092029190910592915050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b5051905090565b7f00000000000000000000000000000000000000000000000000000000000000008156fea2646970667358221220b71deadfbf1f6998532d34674d559253465d59c69ca9714791d43aabf25edf9864736f6c634300060c003300000000000000000000000089e60b56efd70a1d4fbbae947bc33cae41e37a72000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc48
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806312c46e611461005c578063313ce5671461008057806350d25bcd1461009e5780638205bf6a146100b85780639c8762e1146100c0575b600080fd5b6100646100c8565b604080516001600160a01b039092168252519081900360200190f35b6100886100ec565b6040805160ff9092168252519081900360200190f35b6100a66100f1565b60408051918252519081900360200190f35b6100a661021c565b6100646102a8565b7f000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc4881565b600890565b6000807f00000000000000000000000089e60b56efd70a1d4fbbae947bc33cae41e37a726001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561014d57600080fd5b505afa158015610161573d6000803e3d6000fd5b505050506040513d602081101561017757600080fd5b5051604080516350d25bcd60e01b815290519192506000916001600160a01b037f000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc4816916350d25bcd916004808301926020929190829003018186803b1580156101df57600080fd5b505afa1580156101f3573d6000803e3d6000fd5b505050506040513d602081101561020957600080fd5b50516305f5e10092029190910592915050565b60007f000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc486001600160a01b0316638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027757600080fd5b505afa15801561028b573d6000803e3d6000fd5b505050506040513d60208110156102a157600080fd5b5051905090565b7f00000000000000000000000089e60b56efd70a1d4fbbae947bc33cae41e37a728156fea2646970667358221220b71deadfbf1f6998532d34674d559253465d59c69ca9714791d43aabf25edf9864736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000089e60b56efd70a1d4fbbae947bc33cae41e37a72000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc48
-----Decoded View---------------
Arg [0] : _ethOracle (address): 0x89e60b56efD70a1D4FBBaE947bC33cae41e37A72
Arg [1] : _underlyingOracle (address): 0x064D0ea578d42A315F5208068653383fc5D0fC48
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000089e60b56efd70a1d4fbbae947bc33cae41e37a72
Arg [1] : 000000000000000000000000064d0ea578d42a315f5208068653383fc5d0fc48
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.