Source Code
Overview
S Balance
More Info
ContractCreator
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; interface PriceLens { function getTokenPriceNative(address _token) external view returns (uint256 price); } contract PriceLensNativeAggregator { address public immutable token; address public immutable priceLens; constructor(address _token, address _priceLens) { token = _token; priceLens = _priceLens; } function latestAnser() public view returns (int) { uint price = PriceLens(priceLens).getTokenPriceNative(token); return int(price); } function decimals() public pure returns (uint8) { return 18; } }
{ "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":"latestAnser","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
60c060405234801561001057600080fd5b506040516102aa3803806102aa83398101604081905261002f91610062565b6001600160a01b039182166080521660a052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516101e56100c5600039600081816080015261012501526000818160bf015260f801526101e56000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce567146100515780634f49a9f014610065578063765a735c1461007b578063fc0c546a146100ba575b600080fd5b604051601281526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161005c565b6100a27f000000000000000000000000000000000000000000000000000000000000000081565b60405163ad8dc75760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260009182917f0000000000000000000000000000000000000000000000000000000000000000169063ad8dc75790602401602060405180830381865afa15801561016c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101909190610196565b92915050565b6000602082840312156101a857600080fd5b505191905056fea26469706673582212207dc4d7e60cc4cb6ee23052c8036fa0eb469ea26beff2df659797ca90b283375264736f6c634300081200330000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad0000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa37
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce567146100515780634f49a9f014610065578063765a735c1461007b578063fc0c546a146100ba575b600080fd5b604051601281526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa3781565b6040516001600160a01b03909116815260200161005c565b6100a27f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad081565b60405163ad8dc75760e01b81526001600160a01b037f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad08116600483015260009182917f000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa37169063ad8dc75790602401602060405180830381865afa15801561016c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101909190610196565b92915050565b6000602082840312156101a857600080fd5b505191905056fea26469706673582212207dc4d7e60cc4cb6ee23052c8036fa0eb469ea26beff2df659797ca90b283375264736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad0000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa37
-----Decoded View---------------
Arg [0] : _token (address): 0x1570300e9cFEC66c9Fb0C8bc14366C86EB170Ad0
Arg [1] : _priceLens (address): 0x189F3FAEE49F744b76dC0B2549a20146E836aa37
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad0
Arg [1] : 000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa37
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.