Source Code
Overview
HYPE Balance
HYPE Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | ||||
|---|---|---|---|---|---|---|---|
| 25585234 | 11 hrs ago | 0 HYPE | |||||
| 25585234 | 11 hrs ago | 0 HYPE | |||||
| 25585234 | 11 hrs ago | 0 HYPE | |||||
| 25375907 | 2 days ago | 0 HYPE | |||||
| 25375907 | 2 days ago | 0 HYPE | |||||
| 25375907 | 2 days ago | 0 HYPE | |||||
| 25375175 | 2 days ago | 0 HYPE | |||||
| 25375175 | 2 days ago | 0 HYPE | |||||
| 25375175 | 2 days ago | 0 HYPE | |||||
| 25275989 | 3 days ago | 0 HYPE | |||||
| 25275989 | 3 days ago | 0 HYPE | |||||
| 25275989 | 3 days ago | 0 HYPE | |||||
| 25263972 | 4 days ago | 0 HYPE | |||||
| 25263972 | 4 days ago | 0 HYPE | |||||
| 25263972 | 4 days ago | 0 HYPE | |||||
| 25240290 | 4 days ago | 0 HYPE | |||||
| 25240290 | 4 days ago | 0 HYPE | |||||
| 25240290 | 4 days ago | 0 HYPE | |||||
| 25240090 | 4 days ago | 0 HYPE | |||||
| 25240090 | 4 days ago | 0 HYPE | |||||
| 25240090 | 4 days ago | 0 HYPE | |||||
| 25239881 | 4 days ago | 0 HYPE | |||||
| 25239881 | 4 days ago | 0 HYPE | |||||
| 25239881 | 4 days ago | 0 HYPE | |||||
| 25111084 | 5 days ago | 0 HYPE |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OracleChainlink
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
import {AggregatorV3Interface} from '@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol';
import {IStaticOracle} from '@mean-finance/uniswap-v3-oracle/solidity/interfaces/IStaticOracle.sol';
import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import {Timelock2Step} from '../Timelock2Step.sol';
/// @title OracleChainlink
/// @notice An oracle using a single Chainlink price feed
contract OracleChainlink is Timelock2Step {
uint128 public constant ORACLE_PRECISION = 1e18;
address public immutable BASE_TOKEN;
address public immutable QUOTE_TOKEN;
// Chainlink Config
address public immutable CHAINLINK_MULTIPLY_ADDRESS;
address public immutable CHAINLINK_DIVIDE_ADDRESS;
uint256 public immutable CHAINLINK_NORMALIZATION;
uint256 public maxOracleDelay;
// Config Data
uint8 internal constant DECIMALS = 18;
string public name;
uint256 immutable public oracleType = 1;
// events
/// @notice The ```SetMaxOracleDelay``` event is emitted when the max oracle delay is set
/// @param oldMaxOracleDelay The old max oracle delay
/// @param newMaxOracleDelay The new max oracle delay
event SetMaxOracleDelay(uint256 oldMaxOracleDelay, uint256 newMaxOracleDelay);
constructor(
address _baseToken,
address _quoteToken,
address _chainlinkMultiplyAddress,
address _chainlinkDivideAddress,
uint256 _maxOracleDelay,
address _timelockAddress,
string memory _name
) Timelock2Step() {
_setTimelock({_newTimelock: _timelockAddress});
BASE_TOKEN = _baseToken;
QUOTE_TOKEN = _quoteToken;
CHAINLINK_MULTIPLY_ADDRESS = _chainlinkMultiplyAddress;
CHAINLINK_DIVIDE_ADDRESS = _chainlinkDivideAddress;
uint8 _multiplyDecimals = _chainlinkMultiplyAddress != address(0)
? AggregatorV3Interface(_chainlinkMultiplyAddress).decimals()
: 0;
uint8 _divideDecimals = _chainlinkDivideAddress != address(0)
? AggregatorV3Interface(_chainlinkDivideAddress).decimals()
: 0;
require(_divideDecimals + IERC20Metadata(_quoteToken).decimals() <= _multiplyDecimals + IERC20Metadata(_baseToken).decimals() + 18, "negative exponent");
CHAINLINK_NORMALIZATION =
10 **
(18 +
_multiplyDecimals -
_divideDecimals +
IERC20Metadata(_baseToken).decimals() -
IERC20Metadata(_quoteToken).decimals());
maxOracleDelay = _maxOracleDelay;
name = _name;
}
/// @notice The ```setMaxOracleDelay``` function sets the max oracle delay to determine if Chainlink data is stale
/// @dev Requires msg.sender to be the timelock address
/// @param _newMaxOracleDelay The new max oracle delay
function setMaxOracleDelay(uint256 _newMaxOracleDelay) external {
_requireTimelock();
emit SetMaxOracleDelay(maxOracleDelay, _newMaxOracleDelay);
maxOracleDelay = _newMaxOracleDelay;
}
function _getChainlinkPrice() internal view returns (bool _isBadData, uint256 _price) {
_price = uint256(1e36);
if (CHAINLINK_MULTIPLY_ADDRESS != address(0)) {
(, int256 _answer, , uint256 _updatedAt, ) = AggregatorV3Interface(
CHAINLINK_MULTIPLY_ADDRESS
).latestRoundData();
// If data is stale or negative, set bad data to true and return
if (_answer <= 0 || (block.timestamp - _updatedAt > maxOracleDelay)) {
revert("invalid oracle price");
}
_price = _price * uint256(_answer);
}
if (CHAINLINK_DIVIDE_ADDRESS != address(0)) {
(, int256 _answer, , uint256 _updatedAt, ) = AggregatorV3Interface(
CHAINLINK_DIVIDE_ADDRESS
).latestRoundData();
// If data is stale or negative, set bad data to true and return
if (_answer <= 0 || (block.timestamp - _updatedAt > maxOracleDelay)) {
revert("invalid oracle price");
}
_price = _price / uint256(_answer);
}
// return price as ratio of Collateral/Asset including decimal differences
// CHAINLINK_NORMALIZATION = 10**(18 + asset.decimals() - collateral.decimals() + multiplyOracle.decimals() - divideOracle.decimals())
_price = _price / CHAINLINK_NORMALIZATION;
}
/// @notice The ```getPrices``` function is intended to return two prices from different oracles
/// @return _isBadData is true when chainlink data is stale or negative
/// @return _priceLow is the lower of the two prices
/// @return _priceHigh is the higher of the two prices
function getPrices()
external
view
returns (bool _isBadData, uint256 _priceLow, uint256 _priceHigh)
{
uint256 _price;
(_isBadData, _price) = _getChainlinkPrice();
_priceLow = _price;
_priceHigh = _price;
}
function decimals() external pure returns (uint8) {
return DECIMALS;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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
);
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.6 <0.9.0;
import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';
/// @title Uniswap V3 Static Oracle
/// @notice Oracle contract for calculating price quoting against Uniswap V3
interface IStaticOracle {
/// @notice Returns the address of the Uniswap V3 factory
/// @dev This value is assigned during deployment and cannot be changed
/// @return The address of the Uniswap V3 factory
function UNISWAP_V3_FACTORY() external view returns (IUniswapV3Factory);
/// @notice Returns how many observations are needed per minute in Uniswap V3 oracles, on the deployed chain
/// @dev This value is assigned during deployment and cannot be changed
/// @return Number of observation that are needed per minute
function CARDINALITY_PER_MINUTE() external view returns (uint8);
/// @notice Returns all supported fee tiers
/// @return The supported fee tiers
function supportedFeeTiers() external view returns (uint24[] memory);
/// @notice Returns whether a specific pair can be supported by the oracle
/// @dev The pair can be provided in tokenA/tokenB or tokenB/tokenA order
/// @return Whether the given pair can be supported by the oracle
function isPairSupported(address tokenA, address tokenB) external view returns (bool);
/// @notice Returns all existing pools for the given pair
/// @dev The pair can be provided in tokenA/tokenB or tokenB/tokenA order
/// @return All existing pools for the given pair
function getAllPoolsForPair(address tokenA, address tokenB) external view returns (address[] memory);
/// @notice Returns a quote, based on the given tokens and amount, by querying all of the pair's pools
/// @dev If some pools are not configured correctly for the given period, then they will be ignored
/// @dev Will revert if there are no pools available/configured for the pair and period combination
/// @param baseAmount Amount of token to be converted
/// @param baseToken Address of an ERC20 token contract used as the baseAmount denomination
/// @param quoteToken Address of an ERC20 token contract used as the quoteAmount denomination
/// @param period Number of seconds from which to calculate the TWAP
/// @return quoteAmount Amount of quoteToken received for baseAmount of baseToken
/// @return queriedPools The pools that were queried to calculate the quote
function quoteAllAvailablePoolsWithTimePeriod(
uint128 baseAmount,
address baseToken,
address quoteToken,
uint32 period
) external view returns (uint256 quoteAmount, address[] memory queriedPools);
/// @notice Returns a quote, based on the given tokens and amount, by querying only the specified fee tiers
/// @dev Will revert if the pair does not have a pool for one of the given fee tiers, or if one of the pools
/// is not prepared/configured correctly for the given period
/// @param baseAmount Amount of token to be converted
/// @param baseToken Address of an ERC20 token contract used as the baseAmount denomination
/// @param quoteToken Address of an ERC20 token contract used as the quoteAmount denomination
/// @param feeTiers The fee tiers to consider when calculating the quote
/// @param period Number of seconds from which to calculate the TWAP
/// @return quoteAmount Amount of quoteToken received for baseAmount of baseToken
/// @return queriedPools The pools that were queried to calculate the quote
function quoteSpecificFeeTiersWithTimePeriod(
uint128 baseAmount,
address baseToken,
address quoteToken,
uint24[] calldata feeTiers,
uint32 period
) external view returns (uint256 quoteAmount, address[] memory queriedPools);
/// @notice Returns a quote, based on the given tokens and amount, by querying only the specified pools
/// @dev Will revert if one of the pools is not prepared/configured correctly for the given period
/// @param baseAmount Amount of token to be converted
/// @param baseToken Address of an ERC20 token contract used as the baseAmount denomination
/// @param quoteToken Address of an ERC20 token contract used as the quoteAmount denomination
/// @param pools The pools to consider when calculating the quote
/// @param period Number of seconds from which to calculate the TWAP
/// @return quoteAmount Amount of quoteToken received for baseAmount of baseToken
function quoteSpecificPoolsWithTimePeriod(
uint128 baseAmount,
address baseToken,
address quoteToken,
address[] calldata pools,
uint32 period
) external view returns (uint256 quoteAmount);
/// @notice Will initialize all existing pools for the given pair, so that they can be queried with the given period in the future
/// @dev Will revert if there are no pools available for the pair and period combination
/// @param tokenA One of the pair's tokens
/// @param tokenB The other of the pair's tokens
/// @param period The period that will be guaranteed when quoting
/// @return preparedPools The pools that were prepared
function prepareAllAvailablePoolsWithTimePeriod(
address tokenA,
address tokenB,
uint32 period
) external returns (address[] memory preparedPools);
/// @notice Will initialize the pair's pools with the specified fee tiers, so that they can be queried with the given period in the future
/// @dev Will revert if the pair does not have a pool for a given fee tier
/// @param tokenA One of the pair's tokens
/// @param tokenB The other of the pair's tokens
/// @param feeTiers The fee tiers to consider when searching for the pair's pools
/// @param period The period that will be guaranteed when quoting
/// @return preparedPools The pools that were prepared
function prepareSpecificFeeTiersWithTimePeriod(
address tokenA,
address tokenB,
uint24[] calldata feeTiers,
uint32 period
) external returns (address[] memory preparedPools);
/// @notice Will initialize all given pools, so that they can be queried with the given period in the future
/// @param pools The pools to initialize
/// @param period The period that will be guaranteed when quoting
function prepareSpecificPoolsWithTimePeriod(address[] calldata pools, uint32 period) external;
/// @notice Will increase observations for all existing pools for the given pair, so they start accruing information for twap calculations
/// @dev Will revert if there are no pools available for the pair and period combination
/// @param tokenA One of the pair's tokens
/// @param tokenB The other of the pair's tokens
/// @param cardinality The cardinality that will be guaranteed when quoting
/// @return preparedPools The pools that were prepared
function prepareAllAvailablePoolsWithCardinality(
address tokenA,
address tokenB,
uint16 cardinality
) external returns (address[] memory preparedPools);
/// @notice Will increase the pair's pools with the specified fee tiers observations, so they start accruing information for twap calculations
/// @dev Will revert if the pair does not have a pool for a given fee tier
/// @param tokenA One of the pair's tokens
/// @param tokenB The other of the pair's tokens
/// @param feeTiers The fee tiers to consider when searching for the pair's pools
/// @param cardinality The cardinality that will be guaranteed when quoting
/// @return preparedPools The pools that were prepared
function prepareSpecificFeeTiersWithCardinality(
address tokenA,
address tokenB,
uint24[] calldata feeTiers,
uint16 cardinality
) external returns (address[] memory preparedPools);
/// @notice Will increase all given pools observations, so they start accruing information for twap calculations
/// @param pools The pools to initialize
/// @param cardinality The cardinality that will be guaranteed when quoting
function prepareSpecificPoolsWithCardinality(address[] calldata pools, uint16 cardinality) external;
/// @notice Adds support for a new fee tier
/// @dev Will revert if the given tier is invalid, or already supported
/// @param feeTier The new fee tier to add
function addNewFeeTier(uint24 feeTier) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
/// @notice Emitted when the owner of the factory is changed
/// @param oldOwner The owner before the owner was changed
/// @param newOwner The owner after the owner was changed
event OwnerChanged(address indexed oldOwner, address indexed newOwner);
/// @notice Emitted when a pool is created
/// @param token0 The first token of the pool by address sort order
/// @param token1 The second token of the pool by address sort order
/// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
/// @param tickSpacing The minimum number of ticks between initialized ticks
/// @param pool The address of the created pool
event PoolCreated(
address indexed token0,
address indexed token1,
uint24 indexed fee,
int24 tickSpacing,
address pool
);
/// @notice Emitted when a new fee amount is enabled for pool creation via the factory
/// @param fee The enabled fee, denominated in hundredths of a bip
/// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);
/// @notice Returns the current owner of the factory
/// @dev Can be changed by the current owner via setOwner
/// @return The address of the factory owner
function owner() external view returns (address);
/// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
/// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
/// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
/// @return The tick spacing
function feeAmountTickSpacing(uint24 fee) external view returns (int24);
/// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
/// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
/// @param tokenA The contract address of either token0 or token1
/// @param tokenB The contract address of the other token
/// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
/// @return pool The pool address
function getPool(
address tokenA,
address tokenB,
uint24 fee
) external view returns (address pool);
/// @notice Creates a pool for the given two tokens and fee
/// @param tokenA One of the two tokens in the desired pool
/// @param tokenB The other of the two tokens in the desired pool
/// @param fee The desired fee for the pool
/// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
/// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
/// are invalid.
/// @return pool The address of the newly created pool
function createPool(
address tokenA,
address tokenB,
uint24 fee
) external returns (address pool);
/// @notice Updates the owner of the factory
/// @dev Must be called by the current owner
/// @param _owner The new owner of the factory
function setOwner(address _owner) external;
/// @notice Enables a fee amount with the given tickSpacing
/// @dev Fee amounts may never be removed once enabled
/// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
/// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}// SPDX-License-Identifier: ISC
pragma solidity ^0.8.19;
// ========================== Timelock2Step ===========================
/// @title Timelock2Step
/// @dev Inspired by the OpenZeppelin's Ownable2Step contract
/// @notice An abstract contract which contains 2-step transfer and renounce logic for a timelock address
abstract contract Timelock2Step {
/// @notice The pending timelock address
address public pendingTimelockAddress;
/// @notice The current timelock address
address public timelockAddress;
constructor() {
timelockAddress = msg.sender;
}
/// @notice Emitted when timelock is transferred
error OnlyTimelock();
/// @notice Emitted when pending timelock is transferred
error OnlyPendingTimelock();
/// @notice The ```TimelockTransferStarted``` event is emitted when the timelock transfer is initiated
/// @param previousTimelock The address of the previous timelock
/// @param newTimelock The address of the new timelock
event TimelockTransferStarted(address indexed previousTimelock, address indexed newTimelock);
/// @notice The ```TimelockTransferred``` event is emitted when the timelock transfer is completed
/// @param previousTimelock The address of the previous timelock
/// @param newTimelock The address of the new timelock
event TimelockTransferred(address indexed previousTimelock, address indexed newTimelock);
/// @notice The ```_isSenderTimelock``` function checks if msg.sender is current timelock address
/// @return Whether or not msg.sender is current timelock address
function _isSenderTimelock() internal view returns (bool) {
return msg.sender == timelockAddress;
}
/// @notice The ```_requireTimelock``` function reverts if msg.sender is not current timelock address
function _requireTimelock() internal view {
if (msg.sender != timelockAddress) revert OnlyTimelock();
}
/// @notice The ```_isSenderPendingTimelock``` function checks if msg.sender is pending timelock address
/// @return Whether or not msg.sender is pending timelock address
function _isSenderPendingTimelock() internal view returns (bool) {
return msg.sender == pendingTimelockAddress;
}
/// @notice The ```_requirePendingTimelock``` function reverts if msg.sender is not pending timelock address
function _requirePendingTimelock() internal view {
if (msg.sender != pendingTimelockAddress) revert OnlyPendingTimelock();
}
/// @notice The ```_transferTimelock``` function initiates the timelock transfer
/// @dev This function is to be implemented by a public function
/// @param _newTimelock The address of the nominated (pending) timelock
function _transferTimelock(address _newTimelock) internal {
pendingTimelockAddress = _newTimelock;
emit TimelockTransferStarted(timelockAddress, _newTimelock);
}
/// @notice The ```_acceptTransferTimelock``` function completes the timelock transfer
/// @dev This function is to be implemented by a public function
function _acceptTransferTimelock() internal {
pendingTimelockAddress = address(0);
_setTimelock(msg.sender);
}
/// @notice The ```_setTimelock``` function sets the timelock address
/// @dev This function is to be implemented by a public function
/// @param _newTimelock The address of the new timelock
function _setTimelock(address _newTimelock) internal {
emit TimelockTransferred(timelockAddress, _newTimelock);
timelockAddress = _newTimelock;
}
/// @notice The ```transferTimelock``` function initiates the timelock transfer
/// @dev Must be called by the current timelock
/// @param _newTimelock The address of the nominated (pending) timelock
function transferTimelock(address _newTimelock) external virtual {
_requireTimelock();
_transferTimelock(_newTimelock);
}
/// @notice The ```acceptTransferTimelock``` function completes the timelock transfer
/// @dev Must be called by the pending timelock
function acceptTransferTimelock() external virtual {
_requirePendingTimelock();
_acceptTransferTimelock();
}
/// @notice The ```renounceTimelock``` function renounces the timelock after setting pending timelock to current timelock
/// @dev Pending timelock must be set to current timelock before renouncing, creating a 2-step renounce process
function renounceTimelock() external virtual {
_requireTimelock();
_requirePendingTimelock();
_transferTimelock(address(0));
_setTimelock(address(0));
}
}{
"viaIR": true,
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_baseToken","type":"address"},{"internalType":"address","name":"_quoteToken","type":"address"},{"internalType":"address","name":"_chainlinkMultiplyAddress","type":"address"},{"internalType":"address","name":"_chainlinkDivideAddress","type":"address"},{"internalType":"uint256","name":"_maxOracleDelay","type":"uint256"},{"internalType":"address","name":"_timelockAddress","type":"address"},{"internalType":"string","name":"_name","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OnlyPendingTimelock","type":"error"},{"inputs":[],"name":"OnlyTimelock","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxOracleDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxOracleDelay","type":"uint256"}],"name":"SetMaxOracleDelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferred","type":"event"},{"inputs":[],"name":"BASE_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHAINLINK_DIVIDE_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHAINLINK_MULTIPLY_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHAINLINK_NORMALIZATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE_PRECISION","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QUOTE_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptTransferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPrices","outputs":[{"internalType":"bool","name":"_isBadData","type":"bool"},{"internalType":"uint256","name":"_priceLow","type":"uint256"},{"internalType":"uint256","name":"_priceHigh","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxOracleDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxOracleDelay","type":"uint256"}],"name":"setMaxOracleDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newTimelock","type":"address"}],"name":"transferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
61014080604052346200063157620010a980380380916200002182856200064c565b833981019060e08183031262000631576200003c8162000670565b906200004b6020820162000670565b906200005a6040820162000670565b92620000696060830162000670565b6080830151946200007d60a0850162000670565b60c085015190946001600160401b03821162000631570193601f9488868201121562000631578051906001600160401b038211620006365760405199620000ce838901601f19166020018c6200064c565b828b5260208383010111620006315760005b8281106200061c57505060206000918a01015260018060a01b0319600154169060016101205260018060a01b0392838092166040519381337f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6600080a3336001600160a01b0319161717600155608086905260a088905260c081905260e0859052168260008215620006115750508160048160209363313ce56760e01b82525afa8015620004e5578291600091620005ed575b50925b168160008215620005e357505060206004916040519283809263313ce56760e01b82525afa8015620004e5578291600091620005bf575b50955b16916040519563313ce56760e01b928388526004976020818a81895afa8015620004e5576200020a916000916200059b575b5083620006a0565b951691604051958487526020878a81875afa968715620004e557620002429760129160009162000577575b5060ff98899185620006a0565b160187811162000562578716908716116200052a5785166012018581116200051557620002738892602092620006cb565b92604051928380928782525afa8015620004e5576020926200029f92600092620004f1575b50620006a0565b91866040518095819382525afa908115620004e557620002c992600092620004ad575b50620006cb565b1692604d8411620004985761010093600a0a845260025583519060018060401b0382116200048357600392835490600182811c9216801562000478575b602083101462000463575081811162000419575b506020908211600114620003af5781929394600092620003a3575b50508160011b9160001990841b1c19161790555b6040516109c89182620006e18339608051826106cf015260a0518261052d015260c0518281816101cf01526104ae015260e0518281816101fb015261044701525181818161022a01526104f5015261012051816107160152f35b01519050388062000335565b601f198216908360005260206000209160005b8181106200040057509583600195969710620003e7575b505050811b01905562000349565b015160001983861b60f8161c19169055388080620003d9565b9192602060018192868b015181550194019201620003c2565b8360005260206000208280850160051c8201926020861062000459575b0160051c01905b8181106200044c57506200031a565b600081556001016200043d565b9250819262000436565b602290634e487b7160e01b6000525260246000fd5b91607f169162000306565b604183634e487b7160e01b6000525260246000fd5b601183634e487b7160e01b6000525260246000fd5b620004d591925060203d602011620004dd575b620004cc81836200064c565b81019062000685565b9038620002c2565b503d620004c0565b6040513d6000823e3d90fd5b6200050d919250843d8611620004dd57620004cc81836200064c565b903862000298565b601188634e487b7160e01b6000525260246000fd5b60405162461bcd60e51b81526020818a015260116024820152701b9959d85d1a5d9948195e1c1bdb995b9d607a1b6044820152606490fd5b60118a634e487b7160e01b6000525260246000fd5b62000594915060203d602011620004dd57620004cc81836200064c565b3862000235565b620005b8915060203d602011620004dd57620004cc81836200064c565b3862000202565b620005dc915060203d602011620004dd57620004cc81836200064c565b38620001cd565b90915095620001d0565b6200060a915060203d602011620004dd57620004cc81836200064c565b3862000193565b915091509262000196565b60208183018101518c830182015201620000e0565b600080fd5b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176200063657604052565b51906001600160a01b03821682036200063157565b9081602091031262000631575160ff81168103620006315790565b9060ff8091169116019060ff8211620006b557565b634e487b7160e01b600052601160045260246000fd5b9060ff8091169116039060ff8211620006b55756fe60806040908082526004918236101561001757600080fd5b600092833560e01c92836306fdde031461076157508263090f3f50146107395782630d623e10146106fe578263210663e4146106ba578263313ce5671461069e57826345014095146106345782634bc66f321461060b5782634f8b4ae71461057b57826352f1edcc1461055c57826378892cea1461051857826379f94298146104dd5782639000b126146104995782639c0d313f14610476578263b6ee19f914610432578263bd9a548b146101a2578263cd3b691c1461014957505063f6ccaad4146100e257600080fd5b346101465780600319360112610146576100fa610901565b80546001600160a01b0319908116825560015490336001600160a01b0383167f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68580a316331760015580f35b80fd5b9091503461019e57602036600319011261019e577f489892ab7e2f839a8630c507bc283ea1a98549bf7a6d8a315ebdf78e45794dae9035916101896108db565b6002548151908152836020820152a160025580f35b8280fd5b83823461042e578160031936011261042e576001600160a01b036ec097ce7bc90715b34b9f1000000000847f000000000000000000000000000000000000000000000000000000000000000083168061034d575b5050907f00000000000000000000000000000000000000000000000000000000000000001680610260575b6060848461024f7f00000000000000000000000000000000000000000000000000000000000000008661099b565b908051928352816020840152820152f35b60a08591845196878092633fabe5a360e21b82525afa80156103405784958591610309575b50848613908115916102f4575b506102ad57506102a760609461024f9261099b565b90610221565b6102f090835191829162461bcd60e51b83528201606090602081526014602082015273696e76616c6964206f7261636c6520707269636560601b60408201520190565b0390fd5b6102ff915042610978565b6002541086610292565b905061032d91955060a03d8111610339575b61032581836108a3565b810190610943565b50969250509486610285565b503d61031b565b50505051903d90823e3d90fd5b60a090855192838092633fabe5a360e21b82525afa801561042457859186916103ff575b50858213908115916103ea575b506103a857808202918204036103955784866101f6565b634e487b7160e01b845260118552602484fd5b835162461bcd60e51b8152602081880181815260149181019190915273696e76616c6964206f7261636c6520707269636560601b604082015281906060010390fd5b6103f5915042610978565b600254108761037e565b9050610419915060a03d81116103395761032581836108a3565b509250509087610371565b84513d87823e3d90fd5b5080fd5b83823461042e578160031936011261042e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b83823461042e578160031936011261042e5760209051670de0b6b3a76400008152f35b83823461042e578160031936011261042e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b83823461042e578160031936011261042e57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b83823461042e578160031936011261042e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b83823461042e578160031936011261042e576020906002549051908152f35b83346101465780600319360112610146576105946108db565b61059c610901565b80546001600160a01b03199081168255600154826001600160a01b03821681817f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8280a37f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68280a31660015580f35b83823461042e578160031936011261042e5760015490516001600160a01b039091168152602090f35b83903461042e57602036600319011261042e57356001600160a01b038181169182900361019e576106636108db565b82546001600160a01b03191682178355600154167f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8380a380f35b83823461042e578160031936011261042e576020905160128152f35b83823461042e578160031936011261042e57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b83823461042e578160031936011261042e57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b83823461042e578160031936011261042e57905490516001600160a01b039091168152602090f35b8290853461014657806003193601126101465780600354600181811c918181168015610899575b602098898510821461088657509183918995938895865290816000146108655750600114610809575b50506107c392509593929503826108a3565b82519382859384528251928382860152825b8481106107f357505050828201840152601f01601f19168101030190f35b81810183015188820188015287955082016107d5565b600386527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9492508591905b81831061084d5750889450508201016107c3886107b1565b85548884018501529485019487945091830191610835565b9150506107c394925060ff191682840152151560051b8201018692886107b1565b634e487b7160e01b875260229052602486fd5b92607f1692610788565b90601f8019910116810190811067ffffffffffffffff8211176108c557604052565b634e487b7160e01b600052604160045260246000fd5b6001546001600160a01b031633036108ef57565b604051630e05f48560e11b8152600490fd5b6000546001600160a01b0316330361091557565b604051633d71279960e21b8152600490fd5b519069ffffffffffffffffffff8216820361093e57565b600080fd5b908160a091031261093e5761095781610927565b91602082015191604081015191610975608060608401519301610927565b90565b9190820391821161098557565b634e487b7160e01b600052601160045260246000fd5b81156109a5570490565b634e487b7160e01b600052601260045260246000fdfea164736f6c6343000813000a000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de80000000000000000000000005d5ee47c6bcf6b05b2a3f65c4e37312dc978d30d000000000000000000000000ab7a63378da1a55271262e6ce057f61e916f40140000000000000000000000000000000000000000000000000000000000015180000000000000000000000000ccccccccc4b6cd09594e7c5bf108695f7931311500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001b436861696e6c696e6b2f4e61746976652d55534454302d77484c500000000000
Deployed Bytecode
0x60806040908082526004918236101561001757600080fd5b600092833560e01c92836306fdde031461076157508263090f3f50146107395782630d623e10146106fe578263210663e4146106ba578263313ce5671461069e57826345014095146106345782634bc66f321461060b5782634f8b4ae71461057b57826352f1edcc1461055c57826378892cea1461051857826379f94298146104dd5782639000b126146104995782639c0d313f14610476578263b6ee19f914610432578263bd9a548b146101a2578263cd3b691c1461014957505063f6ccaad4146100e257600080fd5b346101465780600319360112610146576100fa610901565b80546001600160a01b0319908116825560015490336001600160a01b0383167f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68580a316331760015580f35b80fd5b9091503461019e57602036600319011261019e577f489892ab7e2f839a8630c507bc283ea1a98549bf7a6d8a315ebdf78e45794dae9035916101896108db565b6002548151908152836020820152a160025580f35b8280fd5b83823461042e578160031936011261042e576001600160a01b036ec097ce7bc90715b34b9f1000000000847f0000000000000000000000005d5ee47c6bcf6b05b2a3f65c4e37312dc978d30d83168061034d575b5050907f000000000000000000000000ab7a63378da1a55271262e6ce057f61e916f40141680610260575b6060848461024f7f0000000000000000000000000000000000000000000000000de0b6b3a76400008661099b565b908051928352816020840152820152f35b60a08591845196878092633fabe5a360e21b82525afa80156103405784958591610309575b50848613908115916102f4575b506102ad57506102a760609461024f9261099b565b90610221565b6102f090835191829162461bcd60e51b83528201606090602081526014602082015273696e76616c6964206f7261636c6520707269636560601b60408201520190565b0390fd5b6102ff915042610978565b6002541086610292565b905061032d91955060a03d8111610339575b61032581836108a3565b810190610943565b50969250509486610285565b503d61031b565b50505051903d90823e3d90fd5b60a090855192838092633fabe5a360e21b82525afa801561042457859186916103ff575b50858213908115916103ea575b506103a857808202918204036103955784866101f6565b634e487b7160e01b845260118552602484fd5b835162461bcd60e51b8152602081880181815260149181019190915273696e76616c6964206f7261636c6520707269636560601b604082015281906060010390fd5b6103f5915042610978565b600254108761037e565b9050610419915060a03d81116103395761032581836108a3565b509250509087610371565b84513d87823e3d90fd5b5080fd5b83823461042e578160031936011261042e57517f000000000000000000000000ab7a63378da1a55271262e6ce057f61e916f40146001600160a01b03168152602090f35b83823461042e578160031936011261042e5760209051670de0b6b3a76400008152f35b83823461042e578160031936011261042e57517f0000000000000000000000005d5ee47c6bcf6b05b2a3f65c4e37312dc978d30d6001600160a01b03168152602090f35b83823461042e578160031936011261042e57602090517f0000000000000000000000000000000000000000000000000de0b6b3a76400008152f35b83823461042e578160031936011261042e57517f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de86001600160a01b03168152602090f35b83823461042e578160031936011261042e576020906002549051908152f35b83346101465780600319360112610146576105946108db565b61059c610901565b80546001600160a01b03199081168255600154826001600160a01b03821681817f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8280a37f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68280a31660015580f35b83823461042e578160031936011261042e5760015490516001600160a01b039091168152602090f35b83903461042e57602036600319011261042e57356001600160a01b038181169182900361019e576106636108db565b82546001600160a01b03191682178355600154167f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8380a380f35b83823461042e578160031936011261042e576020905160128152f35b83823461042e578160031936011261042e57517f000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb6001600160a01b03168152602090f35b83823461042e578160031936011261042e57602090517f00000000000000000000000000000000000000000000000000000000000000018152f35b83823461042e578160031936011261042e57905490516001600160a01b039091168152602090f35b8290853461014657806003193601126101465780600354600181811c918181168015610899575b602098898510821461088657509183918995938895865290816000146108655750600114610809575b50506107c392509593929503826108a3565b82519382859384528251928382860152825b8481106107f357505050828201840152601f01601f19168101030190f35b81810183015188820188015287955082016107d5565b600386527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9492508591905b81831061084d5750889450508201016107c3886107b1565b85548884018501529485019487945091830191610835565b9150506107c394925060ff191682840152151560051b8201018692886107b1565b634e487b7160e01b875260229052602486fd5b92607f1692610788565b90601f8019910116810190811067ffffffffffffffff8211176108c557604052565b634e487b7160e01b600052604160045260246000fd5b6001546001600160a01b031633036108ef57565b604051630e05f48560e11b8152600490fd5b6000546001600160a01b0316330361091557565b604051633d71279960e21b8152600490fd5b519069ffffffffffffffffffff8216820361093e57565b600080fd5b908160a091031261093e5761095781610927565b91602082015191604081015191610975608060608401519301610927565b90565b9190820391821161098557565b634e487b7160e01b600052601160045260246000fd5b81156109a5570490565b634e487b7160e01b600052601260045260246000fdfea164736f6c6343000813000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de80000000000000000000000005d5ee47c6bcf6b05b2a3f65c4e37312dc978d30d000000000000000000000000ab7a63378da1a55271262e6ce057f61e916f40140000000000000000000000000000000000000000000000000000000000015180000000000000000000000000ccccccccc4b6cd09594e7c5bf108695f7931311500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001b436861696e6c696e6b2f4e61746976652d55534454302d77484c500000000000
-----Decoded View---------------
Arg [0] : _baseToken (address): 0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb
Arg [1] : _quoteToken (address): 0x1359b05241cA5076c9F59605214f4F84114c0dE8
Arg [2] : _chainlinkMultiplyAddress (address): 0x5d5EE47c6bCf6B05B2a3F65c4e37312Dc978d30D
Arg [3] : _chainlinkDivideAddress (address): 0xab7A63378Da1a55271262E6ce057F61E916F4014
Arg [4] : _maxOracleDelay (uint256): 86400
Arg [5] : _timelockAddress (address): 0xCCcCCcCCC4B6CD09594E7c5bF108695F79313115
Arg [6] : _name (string): Chainlink/Native-USDT0-wHLP
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb
Arg [1] : 0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de8
Arg [2] : 0000000000000000000000005d5ee47c6bcf6b05b2a3f65c4e37312dc978d30d
Arg [3] : 000000000000000000000000ab7a63378da1a55271262e6ce057f61e916f4014
Arg [4] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [5] : 000000000000000000000000ccccccccc4b6cd09594e7c5bf108695f79313115
Arg [6] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [7] : 000000000000000000000000000000000000000000000000000000000000001b
Arg [8] : 436861696e6c696e6b2f4e61746976652d55534454302d77484c500000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in HYPE
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.