Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DolaFixedPriceFeed
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 10000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; /** * @title DolaFixedPriceFeed * @notice Fixed price feed for Dola * @dev This contract is used to provide a fixed price feed for DOLA within Inverse FiRM Protocol * Don't use it for external integrations */ contract DolaFixedPriceFeed { uint8 public constant DECIMALS = 18; int256 public constant PRICE = 1e18; string public constant description = "DOLA / USD"; /** * @notice Retrieves the price and current timestamp for DOLA price feed * @dev This function doens't return the round ID, startedAt and answeredInRound as it's not relevant for DOLA price within Inverse Feeds system * @return roundId * @return usdPrice The fixed price of DOLA * @return startedAt * @return updatedAt The current timestamp * @return answeredInRound */ function latestRoundData() public view returns ( uint80 roundId, int256 usdPrice, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { return (0, PRICE, 0, block.timestamp, 0); } /** * @notice Returns the latest price only * @dev Unlike chainlink oracles, the latestAnswer will always be the same as in the latestRoundData * @return int256 Returns the finalized price */ function latestAnswer() external view returns (int256) { (, int256 latestPrice, , , ) = latestRoundData(); return latestPrice; } /** * @notice Retrieves number of decimals for the DOLA price feed conforming to the Chainlink standard * @return decimals The number of decimals */ function decimals() public pure returns (uint8) { return DECIMALS; } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"usdPrice","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b506101da8061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061006f575f3560e01c80637284e4161161004d5780637284e416146100b15780638d859f3e146100fa578063feaf968c14610109575f80fd5b80632e0f262514610073578063313ce5671461009257806350d25bcd14610099575b5f80fd5b61007b601281565b60405160ff90911681526020015b60405180910390f35b601261007b565b670de0b6b3a76400005b604051908152602001610089565b6100ed6040518060400160405280600a81526020017f444f4c41202f205553440000000000000000000000000000000000000000000081525081565b604051610089919061013b565b6100a3670de0b6b3a764000081565b604080515f808252670de0b6b3a76400006020830152918101829052426060820152608081019190915260a001610089565b5f6020808352835180828501525f5b818110156101665785810183015185820160400152820161014a565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509291505056fea26469706673582212208ccb91e2d9b41700fbf40b5060990740d54c748a513d776337bf7ca72222c71f64736f6c63430008140033
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061006f575f3560e01c80637284e4161161004d5780637284e416146100b15780638d859f3e146100fa578063feaf968c14610109575f80fd5b80632e0f262514610073578063313ce5671461009257806350d25bcd14610099575b5f80fd5b61007b601281565b60405160ff90911681526020015b60405180910390f35b601261007b565b670de0b6b3a76400005b604051908152602001610089565b6100ed6040518060400160405280600a81526020017f444f4c41202f205553440000000000000000000000000000000000000000000081525081565b604051610089919061013b565b6100a3670de0b6b3a764000081565b604080515f808252670de0b6b3a76400006020830152918101829052426060820152608081019190915260a001610089565b5f6020808352835180828501525f5b818110156101665785810183015185820160400152820161014a565b505f6040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116850101925050509291505056fea26469706673582212208ccb91e2d9b41700fbf40b5060990740d54c748a513d776337bf7ca72222c71f64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.