Source Code
Overview
S Balance
More Info
ContractCreator
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x81CaFF07...fAd61d735 The constructor portion of the code might be different and could alter the actual behaviour of the contract
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"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce567146100515780634f49a9f014610065578063765a735c1461007b578063fc0c546a146100ba575b600080fd5b604051601281526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa3781565b6040516001600160a01b03909116815260200161005c565b6100a27f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad081565b60405163ad8dc75760e01b81526001600160a01b037f0000000000000000000000001570300e9cfec66c9fb0c8bc14366c86eb170ad08116600483015260009182917f000000000000000000000000189f3faee49f744b76dc0b2549a20146e836aa37169063ad8dc75790602401602060405180830381865afa15801561016c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101909190610196565b92915050565b6000602082840312156101a857600080fd5b505191905056fea26469706673582212207dc4d7e60cc4cb6ee23052c8036fa0eb469ea26beff2df659797ca90b283375264736f6c63430008120033
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.