Source Code
Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305491 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305490 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28305472 | 11 hrs ago | 0 ETH | ||||
| 28304947 | 11 hrs ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Api3AggregatorAdaptor
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@api3/contracts/v0.8/interfaces/IProxy.sol";
contract Api3AggregatorAdaptor {
// Updating the proxy address is a security-critical action which is why
// we have made it immutable.
address public immutable proxy;
constructor(address _proxy) {
proxy = _proxy;
}
function latestAnswer() external view returns (int256 value) {
(value, ) = readDataFeed();
}
function latestTimestamp() external view returns (uint256 timestamp) {
(, timestamp) = readDataFeed();
}
function decimals() external view returns (uint8) {
return 18;
}
function readDataFeed()
internal
view
returns (int224 value, uint256 timestamp)
{
(value, timestamp) = IProxy(proxy).read();
// If you have any assumptions about `value` and `timestamp`, make sure
// to validate them right after reading from the proxy. For example,
// if the value you are reading is the spot price of an asset, you may
// want to reject non-positive values...
// require(value > 0, "Value not positive");
// ...and if the data feed is being updated with a one day-heartbeat
// interval, you may want to check for that.
// require(
// timestamp + 1 days > block.timestamp,
// "Timestamp older than one day"
// );
// Try to be strict about validations, but be wary of:
// (1) Overly strict validation that may invalidate valid values
// (2) Mutable validation parameters that are controlled by a trusted
// party (eliminates the trust-minimization guarantees of first-party
// oracles)
// (3) Validation parameters that need to be tuned according to
// external conditions (if these are forgotten to be handled, it will
// result in (1), look up the Venus Protocol exploit related to LUNA)
// After validation, you can implement your contract logic here.
}
function getTokenType() external pure returns (uint256) {
return 1;
}
}// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@api3/airnode-protocol-v1/contracts/api3-server-v1/proxies/interfaces/IProxy.sol";
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @dev See DapiProxy.sol for comments about usage
interface IProxy {
function read() external view returns (int224 value, uint32 timestamp);
function api3ServerV1() external view returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"remappings": []
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_proxy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"value","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b5060405161029a38038061029a83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161020a610090600039600081816093015260fc015261020a6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063313ce5671461005c57806350d25bcd146100705780638205bf6a14610086578063ec5568891461008e578063fcab1819146100cd575b600080fd5b604051601281526020015b60405180910390f35b6100786100d4565b604051908152602001610067565b6100786100e7565b6100b57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610067565b6001610078565b60006100de6100f7565b50601b0b919050565b60006100f16100f7565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166357de26a46040518163ffffffff1660e01b81526004016040805180830381865afa158015610157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017b919061018b565b909363ffffffff90911692509050565b6000806040838503121561019e57600080fd5b825180601b0b81146101af57600080fd5b602084015190925063ffffffff811681146101c957600080fd5b80915050925092905056fea264697066735822122003881f5924c7e153b1eb83b88fcd60b053e30cdc580faaef0a7fbd9fed4e9afd64736f6c63430008110033000000000000000000000000a47fd122b11cdd7aad7c3e8b740fb91d83ce43d1
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063313ce5671461005c57806350d25bcd146100705780638205bf6a14610086578063ec5568891461008e578063fcab1819146100cd575b600080fd5b604051601281526020015b60405180910390f35b6100786100d4565b604051908152602001610067565b6100786100e7565b6100b57f000000000000000000000000a47fd122b11cdd7aad7c3e8b740fb91d83ce43d181565b6040516001600160a01b039091168152602001610067565b6001610078565b60006100de6100f7565b50601b0b919050565b60006100f16100f7565b92915050565b6000807f000000000000000000000000a47fd122b11cdd7aad7c3e8b740fb91d83ce43d16001600160a01b03166357de26a46040518163ffffffff1660e01b81526004016040805180830381865afa158015610157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017b919061018b565b909363ffffffff90911692509050565b6000806040838503121561019e57600080fd5b825180601b0b81146101af57600080fd5b602084015190925063ffffffff811681146101c957600080fd5b80915050925092905056fea264697066735822122003881f5924c7e153b1eb83b88fcd60b053e30cdc580faaef0a7fbd9fed4e9afd64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a47fd122b11cdd7aad7c3e8b740fb91d83ce43d1
-----Decoded View---------------
Arg [0] : _proxy (address): 0xa47Fd122b11CdD7aad7c3e8B740FB91D83Ce43D1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a47fd122b11cdd7aad7c3e8b740fb91d83ce43d1
Deployed Bytecode Sourcemap
111:2037:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;596:76;;;663:2;156:36:3;;144:2;129:18;596:76:2;;;;;;;;361:104;;;:::i;:::-;;;347:25:3;;;335:2;320:18;361:104:2;203:175:3;474:116:2;;;:::i;259:30::-;;;;;;;;-1:-1:-1;;;;;729:32:3;;;711:51;;699:2;684:18;259:30:2;565:203:3;2065:81:2;2138:1;2065:81;;361:104;408:12;444:14;:12;:14::i;:::-;-1:-1:-1;432:26:2;;;361:104;-1:-1:-1;361:104:2:o;474:116::-;524:17;569:14;:12;:14::i;:::-;553:30;474:116;-1:-1:-1;;474:116:2:o;678:1381::-;749:12;763:17;824:5;-1:-1:-1;;;;;817:18:2;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;796:41;;;;;;;-1:-1:-1;678:1381:2;-1:-1:-1;678:1381:2:o;773:444:3:-;850:6;858;911:2;899:9;890:7;886:23;882:32;879:52;;;927:1;924;917:12;879:52;959:9;953:16;1013:5;1009:2;998:21;991:5;988:32;978:60;;1034:1;1031;1024:12;978:60;1107:2;1092:18;;1086:25;1057:5;;-1:-1:-1;1155:10:3;1142:24;;1130:37;;1120:65;;1181:1;1178;1171:12;1120:65;1204:7;1194:17;;;773:444;;;;;:::o
Swarm Source
ipfs://03881f5924c7e153b1eb83b88fcd60b053e30cdc580faaef0a7fbd9fed4e9afd
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 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.