Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x60806040 | 24324587 | 18 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OneUSDFixedAdapter
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IBasicFeed} from '../../interfaces/IBasicFeed.sol';
import {IExtendedFeed} from '../../interfaces/IExtendedFeed.sol';
/**
* @title OneUSDFixedAdapter
* @author BGD Labs
* @notice Price adapter returning a fixed 1 USD price with 8 decimals (Chainlink-standard)
*/
contract OneUSDFixedAdapter is IExtendedFeed {
int256 public constant ONE_USD = 1e8;
/// @inheritdoc IBasicFeed
function description() external pure returns (string memory) {
return 'ONE USD';
}
/// @inheritdoc IBasicFeed
function DECIMALS() public pure returns (uint8) {
return 8;
}
/// @inheritdoc IBasicFeed
function decimals() external pure returns (uint8) {
return DECIMALS();
}
/// @inheritdoc IBasicFeed
function latestAnswer() public pure returns (int256) {
return ONE_USD;
}
/// @inheritdoc IExtendedFeed
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
)
{
uint256 ts = block.timestamp;
// The roundId (and answeredInRound) concept in this type of "static" feed is unapplicable,
// so returning explicitly zero to indicate it should not be consumed
return (0, latestAnswer(), ts, ts, 0);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBasicFeed {
/**
* @notice Returns the description of the feed
* @return string description
*/
function description() external view returns (string memory);
/**
* @notice Returns the feed decimals (for tooling compatibility)
* @return uint8 decimals
*/
function DECIMALS() external view returns (uint8);
/**
* @notice Returns the feed decimals
* @return uint8 decimals
*/
function decimals() external view returns (uint8);
/**
* @notice Returns the fixed hardcoded price of the feed
* @return int256 latestAnswer
*/
function latestAnswer() external view returns (int256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IBasicFeed} from './IBasicFeed.sol';
interface IExtendedFeed is IBasicFeed {
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"aave-address-book/=lib/aave-address-book/src/",
"aave-helpers/=lib/aave-helpers/src/",
"solidity-utils/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/src/",
"aave-v3-origin/=lib/aave-address-book/lib/aave-v3-origin/src/",
"@openzeppelin/contracts-upgradeable/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"aave-v3-origin-tests/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/tests/",
"cl-synchronicity-price-adapter/=lib/cl-synchronicity-price-adapter/",
"ds-test/=lib/cl-synchronicity-price-adapter/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"ONE_USD","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":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","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
6080604052348015600e575f5ffd5b5061017f8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80632e0f262514610064578063313ce5671461007e57806350d25bcd1461008557806367781c0e146100995780637284e416146100a4578063feaf968c146100cd575b5f5ffd5b60085b60405160ff90911681526020015b60405180910390f35b6008610067565b6305f5e1005b604051908152602001610075565b61008b6305f5e10081565b604080518082018252600781526613d391481554d160ca1b6020820152905161007591906100fe565b604080515f8082526305f5e1006020830152429282018390526060820192909252608081019190915260a001610075565b602081525f82518060208401525f5b8181101561012a576020818601810151604086840101520161010d565b505f604082850101526040601f19601f8301168401019150509291505056fea264697066735822122035f1bf16bcffbbfd93ec2fcf09bd5cb1f6263204e0566a3717364a6da8da6db964736f6c634300081b0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80632e0f262514610064578063313ce5671461007e57806350d25bcd1461008557806367781c0e146100995780637284e416146100a4578063feaf968c146100cd575b5f5ffd5b60085b60405160ff90911681526020015b60405180910390f35b6008610067565b6305f5e1005b604051908152602001610075565b61008b6305f5e10081565b604080518082018252600781526613d391481554d160ca1b6020820152905161007591906100fe565b604080515f8082526305f5e1006020830152429282018390526060820192909252608081019190915260a001610075565b602081525f82518060208401525f5b8181101561012a576020818601810151604086840101520161010d565b505f604082850101526040601f19601f8301168401019150509291505056fea264697066735822122035f1bf16bcffbbfd93ec2fcf09bd5cb1f6263204e0566a3717364a6da8da6db964736f6c634300081b0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.