Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
CoingeckoOracle
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract CoingeckoOracle {
uint256 public price;
uint256 public lastUpdated;
event PriceUpdated(uint256 indexed timeStamp, uint256 price);
function updatePrice(uint256 _price) external {
price = _price;
lastUpdated = block.timestamp;
emit PriceUpdated(block.timestamp, _price);
}
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timeStamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"PriceUpdated","type":"event"},{"inputs":[],"name":"lastUpdated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50610103806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80638d6cc56d146041578063a035b1fe146052578063d0b06f5d14606c575b600080fd5b6050604c36600460b5565b6074565b005b605a60005481565b60405190815260200160405180910390f35b605a60015481565b60008190554260018190556040518281527f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968389060200160405180910390a250565b60006020828403121560c657600080fd5b503591905056fea2646970667358221220f686d3f563148b17c55f0a0cfc769bada2765f9b792fc396697568568c7a1d5c64736f6c63430008110033
Deployed Bytecode
0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80638d6cc56d146041578063a035b1fe146052578063d0b06f5d14606c575b600080fd5b6050604c36600460b5565b6074565b005b605a60005481565b60405190815260200160405180910390f35b605a60015481565b60008190554260018190556040518281527f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968389060200160405180910390a250565b60006020828403121560c657600080fd5b503591905056fea2646970667358221220f686d3f563148b17c55f0a0cfc769bada2765f9b792fc396697568568c7a1d5c64736f6c63430008110033
Loading...
Loading
Loading...
Loading
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.