ETH Price: $2,632.96 (-0.35%)

Contract

0xADE6CBA6c45aa8E9d0337cAc3D2619eabc39D901
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040174712052023-06-13 12:54:47492 days ago1686660887IN
 Create: StETHtoETHSynchronicityPriceAdapter
0 ETH0.0034805517.96998383

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StETHtoETHSynchronicityPriceAdapter

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 3 : StETHtoETHSynchronicityPriceAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IChainlinkAggregator} from '../interfaces/IChainlinkAggregator.sol';
import {ICLSynchronicityPriceAdapter} from '../interfaces/ICLSynchronicityPriceAdapter.sol';

/**
 * @title StETHtoETHSynchronicityPriceAdapter
 * @author BGD Labs
 * @notice Price adapter to return a constant 1:1 price of (stETH / ETH) pair.
 */
contract StETHtoETHSynchronicityPriceAdapter is ICLSynchronicityPriceAdapter {
  /**
   * @notice Number of decimals in the output of this price adapter
   */
  uint8 public constant DECIMALS = 18;

  string private _description;

  /**
   * @param pairName name identifier
   */
  constructor(string memory pairName) {
    _description = pairName;
  }

  /// @inheritdoc ICLSynchronicityPriceAdapter
  function description() external view returns (string memory) {
    return _description;
  }

  /// @inheritdoc ICLSynchronicityPriceAdapter
  function decimals() external pure returns (uint8) {
    return DECIMALS;
  }

  /// @inheritdoc ICLSynchronicityPriceAdapter
  function latestAnswer() public view virtual override returns (int256) {
    return 1 ether;
  }
}

File 2 of 3 : IChainlinkAggregator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IChainlinkAggregator {
  function decimals() external view returns (uint8);

  function latestAnswer() external view returns (int256);

  function latestTimestamp() external view returns (uint256);

  function latestRound() external view returns (uint256);

  function getAnswer(uint256 roundId) external view returns (int256);

  function getTimestamp(uint256 roundId) external view returns (uint256);

  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
  event NewRound(uint256 indexed roundId, address indexed startedBy);
}

File 3 of 3 : ICLSynchronicityPriceAdapter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ICLSynchronicityPriceAdapter {
  /**
   * @notice Calculates the current answer based on the aggregators.
   * @return int256 latestAnswer
   */
  function latestAnswer() external view returns (int256);

  /**
   * @notice Returns the description of the feed
   * @return string desciption
   */
  function description() external view returns (string memory);

  /**
   * @notice Returns the feed decimals
   * @return uint8 decimals
   */
  function decimals() external view returns (uint8);

  error DecimalsAboveLimit();
  error DecimalsNotEqual();
}

Settings
{
  "remappings": [
    "aave-address-book/=lib/aave-address-book/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"pairName","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DecimalsAboveLimit","type":"error"},{"inputs":[],"name":"DecimalsNotEqual","type":"error"},{"inputs":[],"name":"DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161046a38038061046a83398101604081905261002f91610058565b600061003b82826101aa565b5050610269565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561006b57600080fd5b82516001600160401b038082111561008257600080fd5b818501915085601f83011261009657600080fd5b8151818111156100a8576100a8610042565b604051601f8201601f19908116603f011681019083821181831017156100d0576100d0610042565b8160405282815288868487010111156100e857600080fd5b600093505b8284101561010a57848401860151818501870152928501926100ed565b600086848301015280965050505050505092915050565b600181811c9082168061013557607f821691505b60208210810361015557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101a557600081815260208120601f850160051c810160208610156101825750805b601f850160051c820191505b818110156101a15782815560010161018e565b5050505b505050565b81516001600160401b038111156101c3576101c3610042565b6101d7816101d18454610121565b8461015b565b602080601f83116001811461020c57600084156101f45750858301515b600019600386901b1c1916600185901b1785556101a1565b600085815260208120601f198616915b8281101561023b5788860151825594840194600190910190840161021c565b50858210156102595787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6101f2806102786000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e0f262514610051578063313ce5671461007057806350d25bcd146100775780637284e4161461008d575b600080fd5b610059601281565b60405160ff90911681526020015b60405180910390f35b6012610059565b604051670de0b6b3a76400008152602001610067565b6100956100a2565b6040516100679190610134565b6060600080546100b190610182565b80601f01602080910402602001604051908101604052809291908181526020018280546100dd90610182565b801561012a5780601f106100ff5761010080835404028352916020019161012a565b820191906000526020600020905b81548152906001019060200180831161010d57829003601f168201915b5050505050905090565b600060208083528351808285015260005b8181101561016157858101830151858201604001528201610145565b506000604082860101526040601f19601f8301168501019250505092915050565b600181811c9082168061019657607f821691505b6020821081036101b657634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220619fd0c3ddbbe6ce440bc2a82a4f8702b02623ce06d8cf9e16d0db2aca47866464736f6c634300081300330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000973744554482f4554480000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e0f262514610051578063313ce5671461007057806350d25bcd146100775780637284e4161461008d575b600080fd5b610059601281565b60405160ff90911681526020015b60405180910390f35b6012610059565b604051670de0b6b3a76400008152602001610067565b6100956100a2565b6040516100679190610134565b6060600080546100b190610182565b80601f01602080910402602001604051908101604052809291908181526020018280546100dd90610182565b801561012a5780601f106100ff5761010080835404028352916020019161012a565b820191906000526020600020905b81548152906001019060200180831161010d57829003601f168201915b5050505050905090565b600060208083528351808285015260005b8181101561016157858101830151858201604001528201610145565b506000604082860101526040601f19601f8301168501019250505092915050565b600181811c9082168061019657607f821691505b6020821081036101b657634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220619fd0c3ddbbe6ce440bc2a82a4f8702b02623ce06d8cf9e16d0db2aca47866464736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000973744554482f4554480000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : pairName (string): stETH/ETH

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [2] : 73744554482f4554480000000000000000000000000000000000000000000000


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
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.