APE Price: $1.13 (+0.57%)

Contract

0x77ea44D08Dd9c74cc8cBEEc470F72ab010A0F506

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a0604046080332024-11-18 20:26:0422 hrs ago1731961564IN
 Contract Creation
0 APE0.0047708725.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xc3214dd4...62713fF25
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Api3AggregatorAdaptor

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : Api3AggregatorAdaptor.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "./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) {
        (int256 rawValue, ) = readDataFeed();
        value = rawValue / 1e10;
    }

   function latestTimestamp() external view returns (uint256 timestamp) {
       ( , timestamp) = readDataFeed();
   }
   
   function decimals() external view returns (uint8) {
       return 8;
   }

   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;
   }    
}

File 2 of 2 : 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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"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"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063313ce5671461005c57806350d25bcd146100705780638205bf6a14610086578063ec5568891461008e578063fcab1819146100cd575b600080fd5b604051600881526020015b60405180910390f35b6100786100d4565b604051908152602001610067565b6100786100fa565b6100b57f0000000000000000000000005b0cf2b36a65a6bb085d501b971e4c102b9cd47381565b6040516001600160a01b039091168152602001610067565b6001610078565b6000806100df61010a565b50601b0b90506100f46402540be4008261019e565b91505090565b600061010461010a565b92915050565b6000807f0000000000000000000000005b0cf2b36a65a6bb085d501b971e4c102b9cd4736001600160a01b03166357de26a46040518163ffffffff1660e01b81526004016040805180830381865afa15801561016a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018e91906101e8565b909363ffffffff90911692509050565b6000826101bb57634e487b7160e01b600052601260045260246000fd5b600160ff1b8214600019841416156101e357634e487b7160e01b600052601160045260246000fd5b500590565b600080604083850312156101fb57600080fd5b825180601b0b811461020c57600080fd5b602084015190925063ffffffff8116811461022657600080fd5b80915050925092905056fea264697066735822122017babb601338cf872c702962704f088481a38c0d82b99ae03b2c99fa545bfb9c64736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.