Source Code
Overview
S Balance
More Info
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
25926752 | 25 hrs ago | 0 S | ||||
25926752 | 25 hrs ago | 0 S | ||||
25563270 | 3 days ago | 0 S | ||||
25563270 | 3 days ago | 0 S | ||||
25464589 | 3 days ago | 0 S | ||||
25464589 | 3 days ago | 0 S | ||||
25464589 | 3 days ago | 0 S | ||||
25464589 | 3 days ago | 0 S | ||||
24705076 | 8 days ago | 0 S | ||||
24705076 | 8 days ago | 0 S | ||||
24704716 | 8 days ago | 0 S | ||||
24704716 | 8 days ago | 0 S | ||||
24704594 | 8 days ago | 0 S | ||||
24704594 | 8 days ago | 0 S | ||||
24704357 | 8 days ago | 0 S | ||||
24704357 | 8 days ago | 0 S | ||||
24703989 | 8 days ago | 0 S | ||||
24703989 | 8 days ago | 0 S | ||||
24703665 | 8 days ago | 0 S | ||||
24703665 | 8 days ago | 0 S | ||||
24539905 | 9 days ago | 0 S | ||||
24539905 | 9 days ago | 0 S | ||||
24536860 | 9 days ago | 0 S | ||||
24536860 | 9 days ago | 0 S | ||||
24536860 | 9 days ago | 0 S |
Loading...
Loading
Contract Name:
PriceLensNativeAggregator
Compiler Version
v0.8.18+commit.87f61d96
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.8.18; import {Aggregator} from "../interfaces/IPriceFeedOracle.sol"; interface PriceLens { function getTokenPriceNative(address _token) external view returns (uint256 price); } contract PriceLensNativeAggregator is Aggregator { address public immutable token; address public immutable priceLens; constructor(address _token, address _priceLens) { token = _token; priceLens = _priceLens; } function latestAnswer() public view returns (int) { uint price = PriceLens(priceLens).getTokenPriceNative(token); return int(price); } function decimals() public pure returns (uint8) { return 18; } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface Aggregator { function decimals() external view returns (uint8); function latestAnswer() external view returns (int); } interface IPriceFeedOracle { struct OracleAsset { Aggregator aggregator; uint8 decimals; } function ETH() external view returns (address); function assets(address) external view returns (Aggregator, uint8); function getAssetToEthRate(address asset) external view returns (uint); function getAssetForEth(address asset, uint ethIn) external view returns (uint); function getEthForAsset(address asset, uint amount) external view returns (uint); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_priceLens","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceLens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b506040516102aa3803806102aa83398101604081905261002f91610062565b6001600160a01b039182166080521660a052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516101e56100c5600039600081816080015261012501526000818160bf015260f801526101e56000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce5671461005157806350d25bcd14610065578063765a735c1461007b578063fc0c546a146100ba575b600080fd5b604051601281526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161005c565b6100a27f000000000000000000000000000000000000000000000000000000000000000081565b60405163ad8dc75760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260009182917f0000000000000000000000000000000000000000000000000000000000000000169063ad8dc75790602401602060405180830381865afa15801561016c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101909190610196565b92915050565b6000602082840312156101a857600080fd5b505191905056fea2646970667358221220330dc705ee08d47cd5e26cc0cad339936498242364b7edd0875c75349f57fb3364736f6c634300081200330000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad000000000000000000000000096f4df3e7ee90479d3a3cfe4f9557389dfb1c54b
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce5671461005157806350d25bcd14610065578063765a735c1461007b578063fc0c546a146100ba575b600080fd5b604051601281526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f00000000000000000000000096f4df3e7ee90479d3a3cfe4f9557389dfb1c54b81565b6040516001600160a01b03909116815260200161005c565b6100a27f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad081565b60405163ad8dc75760e01b81526001600160a01b037f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad08116600483015260009182917f00000000000000000000000096f4df3e7ee90479d3a3cfe4f9557389dfb1c54b169063ad8dc75790602401602060405180830381865afa15801561016c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101909190610196565b92915050565b6000602082840312156101a857600080fd5b505191905056fea2646970667358221220330dc705ee08d47cd5e26cc0cad339936498242364b7edd0875c75349f57fb3364736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad000000000000000000000000096f4df3e7ee90479d3a3cfe4f9557389dfb1c54b
-----Decoded View---------------
Arg [0] : _token (address): 0x1570300e9cFEC66c9Fb0C8bc14366C86EB170Ad0
Arg [1] : _priceLens (address): 0x96F4DF3E7ee90479d3A3cFe4f9557389DFB1C54b
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad0
Arg [1] : 00000000000000000000000096f4df3e7ee90479d3a3cfe4f9557389dfb1c54b
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.