CELO Price: $0.568891 (-2.02%)
Gas: 5 GWei

Contract

0x042b7d495650FF2C99e095e1E3DEb7f8Bce5B08D

Overview

CELO Balance

Celo Chain LogoCelo Chain LogoCelo Chain Logo0 CELO

CELO Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040176533672023-02-09 9:28:18501 days ago1675934898IN
 Create: FixedPriceOracle
0 CELO0.000846465.1

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FixedPriceOracle

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU AGPLv3 license
/**
 *Submitted for verification at celoscan.io on 2023-02-09
*/

// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;

/************
@title IPriceOracle interface
@notice Interface for the Aave price oracle.*/
interface IPriceOracle {
  /***********
    @dev returns the asset price in ETH
     */
  function getAssetPrice(address asset) external view returns (uint256);

  /***********
    @dev sets the asset price, in wei
     */
  function setAssetPrice(address asset, uint256 price) external;
}

contract FixedPriceOracle is IPriceOracle {
  address constant public ASSET = 0x17700282592D6917F6A73D0bF8AcCf4D578c131e;
  uint constant public PRICE = 0.001e18;

  function getAssetPrice(address _asset) external view override returns (uint256) {
    require(_asset == ASSET, 'FixedPriceOracle: wrong asset');
    return PRICE;
  }

  function setAssetPrice(address, uint256) external override {
    revert('FixedPriceOracle: not allowed');
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ASSET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"setAssetPrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Contract Creation Code

608060405234801561001057600080fd5b5061020a806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80634800d97f1461005157806351323f72146100755780638d859f3e146100a3578063b3596f07146100bd575b600080fd5b6100596100e3565b604080516001600160a01b039092168252519081900360200190f35b6100a16004803603604081101561008b57600080fd5b506001600160a01b0381351690602001356100fb565b005b6100ab610148565b60408051918252519081900360200190f35b6100ab600480360360208110156100d357600080fd5b50356001600160a01b0316610153565b7317700282592d6917f6a73d0bf8accf4d578c131e81565b6040805162461bcd60e51b815260206004820152601d60248201527f466978656450726963654f7261636c653a206e6f7420616c6c6f776564000000604482015290519081900360640190fd5b66038d7ea4c6800081565b60006001600160a01b0382167317700282592d6917f6a73d0bf8accf4d578c131e146101c6576040805162461bcd60e51b815260206004820152601d60248201527f466978656450726963654f7261636c653a2077726f6e67206173736574000000604482015290519081900360640190fd5b5066038d7ea4c6800091905056fea2646970667358221220fa1cfb9f471b4f526e40b492cf02fe6a85cb1f0e5b46f0f41427d05e7ebc430d64736f6c634300060c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80634800d97f1461005157806351323f72146100755780638d859f3e146100a3578063b3596f07146100bd575b600080fd5b6100596100e3565b604080516001600160a01b039092168252519081900360200190f35b6100a16004803603604081101561008b57600080fd5b506001600160a01b0381351690602001356100fb565b005b6100ab610148565b60408051918252519081900360200190f35b6100ab600480360360208110156100d357600080fd5b50356001600160a01b0316610153565b7317700282592d6917f6a73d0bf8accf4d578c131e81565b6040805162461bcd60e51b815260206004820152601d60248201527f466978656450726963654f7261636c653a206e6f7420616c6c6f776564000000604482015290519081900360640190fd5b66038d7ea4c6800081565b60006001600160a01b0382167317700282592d6917f6a73d0bf8accf4d578c131e146101c6576040805162461bcd60e51b815260206004820152601d60248201527f466978656450726963654f7261636c653a2077726f6e67206173736574000000604482015290519081900360640190fd5b5066038d7ea4c6800091905056fea2646970667358221220fa1cfb9f471b4f526e40b492cf02fe6a85cb1f0e5b46f0f41427d05e7ebc430d64736f6c634300060c0033

Deployed Bytecode Sourcemap

462:459:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;509:74;;;:::i;:::-;;;;-1:-1:-1;;;;;509:74:0;;;;;;;;;;;;;;807:111;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;807:111:0;;;;;;;;:::i;:::-;;588:37;;;:::i;:::-;;;;;;;;;;;;;;;;632:169;;;;;;;;;;;;;;;;-1:-1:-1;632:169:0;-1:-1:-1;;;;;632:169:0;;:::i;509:74::-;541:42;509:74;:::o;807:111::-;873:39;;;-1:-1:-1;;;873:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;588:37;617:8;588:37;:::o;632:169::-;703:7;-1:-1:-1;;;;;727:15:0;;541:42;727:15;719:57;;;;;-1:-1:-1;;;719:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;617:8:0;632:169;;;:::o

Swarm Source

ipfs://fa1cfb9f471b4f526e40b492cf02fe6a85cb1f0e5b46f0f41427d05e7ebc430d

Block Transaction Gas Used Reward
view all blocks validated

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.