ETH Price: $2,015.74 (+4.71%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
TermYSWEthPriceFeed

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";

interface YSWEth {
    function convertToAssets(uint256 amount) external view returns (uint256);
}

contract TermYSWEthPriceFeed is AggregatorV3Interface {
    AggregatorV3Interface immutable wethPriceFeed;
    YSWEth immutable ySWEth;

    uint8 immutable feedDecimals;

    constructor(AggregatorV3Interface wethPriceFeed_, YSWEth ySWEth_) {
        wethPriceFeed = wethPriceFeed_;
        ySWEth = ySWEth_;
        feedDecimals = wethPriceFeed.decimals();
    }

    function decimals() external view returns (uint8) {
        return feedDecimals;
    }

    function description() external pure returns (string memory) {
        return "Term Finance price feed";
    }

    function version() external pure returns (uint256) {
        return 0;
    }

    function getRoundData(
        uint80 /* _roundId */
    )
        external
        pure
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        )
    {
        return (0, 0, 0, 0, 0);
    }

    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        )
    {
        // slither-disable-next-line unused-return
        (, int256 wethPrice, , uint256 wethUpdatedAt, ) = wethPriceFeed.latestRoundData();

        if (wethPrice <= 0) {
            return (0, 0, 0, 0, 0);
        }

        int256 ySWEthPrice = (wethPrice * int256(ySWEth.convertToAssets(10 ** 18))) /
            int256(1e18);

        return (0, ySWEthPrice, 0, wethUpdatedAt, 0);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// solhint-disable-next-line interface-starts-with-i
interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(
    uint80 _roundId
  ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

  function latestRoundData()
    external
    view
    returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract AggregatorV3Interface","name":"wethPriceFeed_","type":"address"},{"internalType":"contract YSWEth","name":"ySWEth_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint80","name":"","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

0x60e06040523480156200001157600080fd5b5060405162000b0438038062000b048339818101604052810190620000379190620001eb565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff168152505060805173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000113919062000270565b60ff1660c08160ff16815250505050620002a2565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200015a826200012d565b9050919050565b60006200016e826200014d565b9050919050565b620001808162000161565b81146200018c57600080fd5b50565b600081519050620001a08162000175565b92915050565b6000620001b3826200014d565b9050919050565b620001c581620001a6565b8114620001d157600080fd5b50565b600081519050620001e581620001ba565b92915050565b6000806040838503121562000205576200020462000128565b5b600062000215858286016200018f565b92505060206200022885828601620001d4565b9150509250929050565b600060ff82169050919050565b6200024a8162000232565b81146200025657600080fd5b50565b6000815190506200026a816200023f565b92915050565b60006020828403121562000289576200028862000128565b5b6000620002998482850162000259565b91505092915050565b60805160a05160c051610832620002d2600039600061011001526000610267015260006101a501526108326000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063313ce5671461005c57806354fd4d501461007a5780637284e416146100985780639a6fc8f5146100b6578063feaf968c146100ea575b600080fd5b61006461010c565b6040516100719190610357565b60405180910390f35b610082610134565b60405161008f919061038b565b60405180910390f35b6100a0610139565b6040516100ad9190610436565b60405180910390f35b6100d060048036038101906100cb919061049f565b610176565b6040516100e19594939291906104f4565b60405180910390f35b6100f2610198565b6040516101039594939291906104f4565b60405180910390f35b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600090565b60606040518060400160405280601781526020017f5465726d2046696e616e63652070726963652066656564000000000000000000815250905090565b6000806000806000806000806000809450945094509450945091939590929450565b60008060008060008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561020e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023291906105b4565b509350509250506000821361025a576000806000806000965096509650965096505050610334565b6000670de0b6b3a76400007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166307a2d13a670de0b6b3a76400006040518263ffffffff1660e01b81526004016102c69190610674565b602060405180830381865afa1580156102e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610307919061068f565b8461031291906106eb565b61031c9190610792565b90506000816000846000975097509750975097505050505b9091929394565b600060ff82169050919050565b6103518161033b565b82525050565b600060208201905061036c6000830184610348565b92915050565b6000819050919050565b61038581610372565b82525050565b60006020820190506103a0600083018461037c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103e05780820151818401526020810190506103c5565b60008484015250505050565b6000601f19601f8301169050919050565b6000610408826103a6565b61041281856103b1565b93506104228185602086016103c2565b61042b816103ec565b840191505092915050565b6000602082019050818103600083015261045081846103fd565b905092915050565b600080fd5b600069ffffffffffffffffffff82169050919050565b61047c8161045d565b811461048757600080fd5b50565b60008135905061049981610473565b92915050565b6000602082840312156104b5576104b4610458565b5b60006104c38482850161048a565b91505092915050565b6104d58161045d565b82525050565b6000819050919050565b6104ee816104db565b82525050565b600060a08201905061050960008301886104cc565b61051660208301876104e5565b610523604083018661037c565b610530606083018561037c565b61053d60808301846104cc565b9695505050505050565b60008151905061055681610473565b92915050565b610565816104db565b811461057057600080fd5b50565b6000815190506105828161055c565b92915050565b61059181610372565b811461059c57600080fd5b50565b6000815190506105ae81610588565b92915050565b600080600080600060a086880312156105d0576105cf610458565b5b60006105de88828901610547565b95505060206105ef88828901610573565b94505060406106008882890161059f565b93505060606106118882890161059f565b925050608061062288828901610547565b9150509295509295909350565b6000819050919050565b6000819050919050565b600061065e6106596106548461062f565b610639565b610372565b9050919050565b61066e81610643565b82525050565b60006020820190506106896000830184610665565b92915050565b6000602082840312156106a5576106a4610458565b5b60006106b38482850161059f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106f6826104db565b9150610701836104db565b925082820261070f816104db565b91507f80000000000000000000000000000000000000000000000000000000000000008414600084121615610747576107466106bc565b5b828205841483151761075c5761075b6106bc565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061079d826104db565b91506107a8836104db565b9250826107b8576107b7610763565b5b600160000383147f8000000000000000000000000000000000000000000000000000000000000000831416156107f1576107f06106bc565b5b82820590509291505056fea26469706673582212206847d7cb65e49a7dbb6f46ec69e071b900caa4f42edc6814a0d3493ed5b0a3b364736f6c6343000814003300000000000000000000000046ef0071b1e2ff6b42d36e5a177ea43ae5917f4e000000000000000000000000ef101508bf4dc6cf0f0a0c135f39a41fab4e4389

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063313ce5671461005c57806354fd4d501461007a5780637284e416146100985780639a6fc8f5146100b6578063feaf968c146100ea575b600080fd5b61006461010c565b6040516100719190610357565b60405180910390f35b610082610134565b60405161008f919061038b565b60405180910390f35b6100a0610139565b6040516100ad9190610436565b60405180910390f35b6100d060048036038101906100cb919061049f565b610176565b6040516100e19594939291906104f4565b60405180910390f35b6100f2610198565b6040516101039594939291906104f4565b60405180910390f35b60007f0000000000000000000000000000000000000000000000000000000000000012905090565b600090565b60606040518060400160405280601781526020017f5465726d2046696e616e63652070726963652066656564000000000000000000815250905090565b6000806000806000806000806000809450945094509450945091939590929450565b60008060008060008060007f00000000000000000000000046ef0071b1e2ff6b42d36e5a177ea43ae5917f4e73ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561020e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023291906105b4565b509350509250506000821361025a576000806000806000965096509650965096505050610334565b6000670de0b6b3a76400007f000000000000000000000000ef101508bf4dc6cf0f0a0c135f39a41fab4e438973ffffffffffffffffffffffffffffffffffffffff166307a2d13a670de0b6b3a76400006040518263ffffffff1660e01b81526004016102c69190610674565b602060405180830381865afa1580156102e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610307919061068f565b8461031291906106eb565b61031c9190610792565b90506000816000846000975097509750975097505050505b9091929394565b600060ff82169050919050565b6103518161033b565b82525050565b600060208201905061036c6000830184610348565b92915050565b6000819050919050565b61038581610372565b82525050565b60006020820190506103a0600083018461037c565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156103e05780820151818401526020810190506103c5565b60008484015250505050565b6000601f19601f8301169050919050565b6000610408826103a6565b61041281856103b1565b93506104228185602086016103c2565b61042b816103ec565b840191505092915050565b6000602082019050818103600083015261045081846103fd565b905092915050565b600080fd5b600069ffffffffffffffffffff82169050919050565b61047c8161045d565b811461048757600080fd5b50565b60008135905061049981610473565b92915050565b6000602082840312156104b5576104b4610458565b5b60006104c38482850161048a565b91505092915050565b6104d58161045d565b82525050565b6000819050919050565b6104ee816104db565b82525050565b600060a08201905061050960008301886104cc565b61051660208301876104e5565b610523604083018661037c565b610530606083018561037c565b61053d60808301846104cc565b9695505050505050565b60008151905061055681610473565b92915050565b610565816104db565b811461057057600080fd5b50565b6000815190506105828161055c565b92915050565b61059181610372565b811461059c57600080fd5b50565b6000815190506105ae81610588565b92915050565b600080600080600060a086880312156105d0576105cf610458565b5b60006105de88828901610547565b95505060206105ef88828901610573565b94505060406106008882890161059f565b93505060606106118882890161059f565b925050608061062288828901610547565b9150509295509295909350565b6000819050919050565b6000819050919050565b600061065e6106596106548461062f565b610639565b610372565b9050919050565b61066e81610643565b82525050565b60006020820190506106896000830184610665565b92915050565b6000602082840312156106a5576106a4610458565b5b60006106b38482850161059f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006106f6826104db565b9150610701836104db565b925082820261070f816104db565b91507f80000000000000000000000000000000000000000000000000000000000000008414600084121615610747576107466106bc565b5b828205841483151761075c5761075b6106bc565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061079d826104db565b91506107a8836104db565b9250826107b8576107b7610763565b5b600160000383147f8000000000000000000000000000000000000000000000000000000000000000831416156107f1576107f06106bc565b5b82820590509291505056fea26469706673582212206847d7cb65e49a7dbb6f46ec69e071b900caa4f42edc6814a0d3493ed5b0a3b364736f6c63430008140033

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