Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
SPriceOracle
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.20; interface AggregatorV3Interface { function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } contract SPriceOracle { AggregatorV3Interface public priceFeed; constructor() { priceFeed = AggregatorV3Interface(0x726D2E87d73567ecA1b75C063Bd09c1493655918); } /// @notice Returns the USD price of S in 1e18 based on API3 function getLatestPrice() external view returns (uint256) { (, int256 price,,,) = priceFeed.latestRoundData(); require(price > 0, "Invalid price from Chainlink"); return uint256(price); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "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":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b03191673726d2e87d73567eca1b75c063bd09c14936559181790556101ee806100466000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063741bef1a1461003b5780638e15f4731461006b575b600080fd5b60005461004e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610073610081565b604051908152602001610062565b6000805460408051633fabe5a360e21b8152905183926001600160a01b03169163feaf968c9160048083019260a09291908290030181865afa1580156100cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ef9190610168565b505050915050600081136101495760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642070726963652066726f6d20436861696e6c696e6b00000000604482015260640160405180910390fd5b919050565b805169ffffffffffffffffffff8116811461014957600080fd5b600080600080600060a0868803121561018057600080fd5b6101898661014e565b94506020860151935060408601519250606086015191506101ac6080870161014e565b9050929550929590935056fea2646970667358221220db0ea28790ba4ea60604247be6aa26c58d266032187c2b2142de8fd4342fb92064736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063741bef1a1461003b5780638e15f4731461006b575b600080fd5b60005461004e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610073610081565b604051908152602001610062565b6000805460408051633fabe5a360e21b8152905183926001600160a01b03169163feaf968c9160048083019260a09291908290030181865afa1580156100cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ef9190610168565b505050915050600081136101495760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642070726963652066726f6d20436861696e6c696e6b00000000604482015260640160405180910390fd5b919050565b805169ffffffffffffffffffff8116811461014957600080fd5b600080600080600060a0868803121561018057600080fd5b6101898661014e565b94506020860151935060408601519250606086015191506101ac6080870161014e565b9050929550929590935056fea2646970667358221220db0ea28790ba4ea60604247be6aa26c58d266032187c2b2142de8fd4342fb92064736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.