Source Code
Overview
S Balance
S Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
EOFeedAdapterOldCompatible
Compiler Version
v0.8.25+commit.b61c2a91
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import { IEOFeedManager } from "../interfaces/IEOFeedManager.sol";
import { IEOFeedAdapter } from "./interfaces/IEOFeedAdapter.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import { InvalidAddress } from "../interfaces/Errors.sol";
/**
* @title EOFeedAdapterOldCompatible
* @author eOracle
* @notice Price feed adapter contract storage-compatible with old EOFeedAdapter addresses
* but which uses the new EOFeedManager interface with feedId as uint256
*/
contract EOFeedAdapterOldCompatible is IEOFeedAdapter, Initializable {
/// @dev Feed manager contract
IEOFeedManager private _feedManager;
/// @dev Feed version
uint256 private _version;
/// @dev Feed description
string private _description;
// next 3 variables will be packed in 1 slot
/// @dev Feed id
uint16 private _feedId;
/// @dev The input decimals of the rate
uint8 private _inputDecimals;
/// @dev The output decimals of the rate
uint8 private _outputDecimals;
/// @dev The decimals difference between input and output decimals
int256 private _decimalsDiff;
/* ============ Constructor ============ */
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
/* ============ Initializer ============ */
/**
* @notice Initialize the contract
* @param feedManager The feed manager address
* @param feedId Feed id
* @param inputDecimals The input decimal precision of the rate
* @param outputDecimals The output decimal precision of the rate
* @param feedDescription The description of feed
* @param feedVersion The version of feed
*/
function initialize(
address feedManager,
uint256 feedId,
uint8 inputDecimals,
uint8 outputDecimals,
string memory feedDescription,
uint256 feedVersion
)
external
initializer
{
if (feedManager == address(0)) revert InvalidAddress();
_feedManager = IEOFeedManager(feedManager);
// safe to downcast because this implementation will be used to support already deployed feeds
// with feedId < 65535 (uint16 max value),
// moreover which are already initialized, and the method will not be used anymore
_feedId = uint16(feedId);
_outputDecimals = outputDecimals;
_inputDecimals = inputDecimals;
uint256 diff = inputDecimals > outputDecimals ? inputDecimals - outputDecimals : outputDecimals - inputDecimals;
_decimalsDiff = int256(10 ** diff); // casted to int256 to conform with the adapter interface return type
_description = feedDescription;
_version = feedVersion;
}
/* ============ External Functions ============ */
/**
* @notice Get the price for the round
* @param roundId The roundId - is ignored, only latest round is supported
* @return roundId The latest round id
* @return answer The price
* @return startedAt The timestamp of the start of the round
* @return updatedAt The timestamp of the end of the round
* @return answeredInRound The round id in which the answer was computed
*/
// solhint-disable-next-line no-unused-vars
function getRoundData(uint80 roundId) external view returns (uint80, int256, uint256, uint256, uint80) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return (
uint80(priceData.eoracleBlockNumber),
_normalizePrice(priceData.value),
priceData.timestamp,
priceData.timestamp,
uint80(priceData.eoracleBlockNumber)
);
}
/**
* @notice Get the latest price
* @return roundId The round id
* @return answer The price
* @return startedAt The timestamp of the start of the round
* @return updatedAt The timestamp of the end of the round
* @return answeredInRound The round id in which the answer was computed
*/
function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return (
uint80(priceData.eoracleBlockNumber),
_normalizePrice(priceData.value),
priceData.timestamp,
priceData.timestamp,
uint80(priceData.eoracleBlockNumber)
);
}
/**
* @notice Get the latest price
* @return int256 The price
*/
function latestAnswer() external view returns (int256) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return _normalizePrice(priceData.value);
}
/**
* @notice Get the latest timestamp
* @return uint256 The timestamp
*/
function latestTimestamp() external view returns (uint256) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return priceData.timestamp;
}
/**
* @notice Get the price for the round
* @param roundId The roundId - is ignored, only latest round is supported
* @return int256 The price
*/
// solhint-disable-next-line no-unused-vars
function getAnswer(uint256 roundId) external view returns (int256) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return _normalizePrice(priceData.value);
}
/**
* @notice Get the timestamp for the round
* @param roundId The roundId - is ignored, only latest round is supported
* @return uint256 The timestamp
*/
// solhint-disable-next-line no-unused-vars
function getTimestamp(uint256 roundId) external view returns (uint256) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return priceData.timestamp;
}
/**
* @notice Get the id of the feed
* @return uint256 The feed id
*/
function getFeedId() external view returns (uint256) {
return _feedId;
}
/**
* @notice Get the decimals of the rate
* @return uint8 The decimals
*/
function decimals() external view returns (uint8) {
return _outputDecimals;
}
/**
* @notice Get the description of the feed
* @return string The description
*/
function description() external view returns (string memory) {
return _description;
}
/**
* @notice Get the version of the feed
* @return uint256 The version
*/
function version() external view returns (uint256) {
return _version;
}
/**
* @notice Get the latest round
* @return uint256 The round id, eoracle block number
*/
function latestRound() external view returns (uint256) {
IEOFeedManager.PriceFeed memory priceData = _feedManager.getLatestPriceFeed(_feedId);
return priceData.eoracleBlockNumber;
}
/**
* @notice Get the paused status of the feed
* @return bool The paused status
*/
function isPaused() external view returns (bool) {
return PausableUpgradeable(address(_feedManager)).paused();
}
/* ============ Internal Functions ============ */
/**
* @notice Normalize the price to the output decimals
* @param price The price to normalize
* @return int256 The normalized price
*/
function _normalizePrice(uint256 price) internal view returns (int256) {
if (_inputDecimals > _outputDecimals) {
return int256(price) / _decimalsDiff;
} else {
return int256(price) * _decimalsDiff;
}
}
/**
* @dev Gap for future storage variables in upgradeable contract.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
// solhint-disable ordering
// slither-disable-next-line unused-state,naming-convention
uint256[48] private __gap;
// solhint-disable ordering
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import { IEOFeedVerifier } from "./IEOFeedVerifier.sol";
import { IPauserRegistry } from "eigenlayer-contracts/interfaces/IPauserRegistry.sol";
/**
* @title IEOFeedManager
* @author eOracle
*/
interface IEOFeedManager {
/* ============ Structs ============ */
/**
* @dev Price feed structure
* @param value Price feed value
* @param timestamp Price feed timestamp (block timestamp in eoracle chain when price feed rate is aggregated)
* @param eoracleBlockNumber eoracle block number
*/
struct PriceFeed {
uint256 value;
uint256 timestamp;
uint256 eoracleBlockNumber;
}
/* ============ Events ============ */
/**
* @dev Event emitted when a price feed is updated
* @param feedId Feed id
* @param rate Price feed value
* @param timestamp Price feed timestamp
*/
event RateUpdated(uint256 indexed feedId, uint256 rate, uint256 timestamp);
/**
* @dev Event emitted when a price feed is replayed
* @param feedId Feed id
* @param rate Price feed value
* @param timestamp Price feed timestamp
* @param latestTimestamp Latest price feed timestamp
*/
event SymbolReplay(uint256 indexed feedId, uint256 rate, uint256 timestamp, uint256 latestTimestamp);
/**
* @dev Event emitted when the feed deployer is set
* @param feedDeployer Address of the feed deployer
*/
event FeedDeployerSet(address indexed feedDeployer);
/**
* @dev Event emitted when the feed verifier is set
* @param feedVerifier Address of the feed verifier
*/
event FeedVerifierSet(address indexed feedVerifier);
/**
* @dev Event emitted when the pauser registry is set
* @param pauserRegistry Address of the pauser registry
*/
event PauserRegistrySet(address indexed pauserRegistry);
/**
* @dev Event emitted when the supported feeds are updated
* @param feedId Feed id
* @param isSupported Boolean indicating whether the feed is supported
*/
event SupportedFeedsUpdated(uint256 indexed feedId, bool isSupported);
/**
* @dev Event emitted when a publisher is whitelisted
* @param publisher Address of the publisher
* @param isWhitelisted Boolean indicating whether the publisher is whitelisted
*/
event PublisherWhitelisted(address indexed publisher, bool isWhitelisted);
/* ============ External Functions ============ */
/**
* @notice Update the price for a feed
* @param input A merkle leaf containing price data and its merkle proof
* @param vParams Verification parameters
*/
function updateFeed(
IEOFeedVerifier.LeafInput calldata input,
IEOFeedVerifier.VerificationParams calldata vParams
)
external;
/**
* @notice Update the price for multiple feeds
* @param inputs Array of leafs to prove the price feeds
* @param vParams Verification parameters
*/
function updateFeeds(
IEOFeedVerifier.LeafInput[] calldata inputs,
IEOFeedVerifier.VerificationParams calldata vParams
)
external;
/**
* @notice Whitelist or remove publishers
* @param publishers Array of publisher addresses
* @param isWhitelisted Array of booleans indicating whether each publisher should be whitelisted
*/
function whitelistPublishers(address[] calldata publishers, bool[] calldata isWhitelisted) external;
/**
* @notice Get the latest price for a feed
* @param feedId Feed id
* @return The latest price feed data containing:
* - value: The price feed value
* - timestamp: The timestamp when the price was aggregated
* - eoracleBlockNumber: The eoracle block number when the price was recorded
*/
function getLatestPriceFeed(uint256 feedId) external view returns (PriceFeed memory);
/**
* @notice Get the latest price feeds for multiple feeds
* @param feedIds Array of feed ids
* @return Array of PriceFeed structs corresponding to each requested feed ID
*/
function getLatestPriceFeeds(uint256[] calldata feedIds) external view returns (PriceFeed[] memory);
/**
* @notice Check if a publisher is whitelisted
* @param publisher Address of the publisher
* @return Boolean indicating whether the publisher is whitelisted
*/
function isWhitelistedPublisher(address publisher) external view returns (bool);
/**
* @notice Check if a feed is supported
* @param feedId feed Id to check
* @return Boolean indicating whether the feed is supported
*/
function isSupportedFeed(uint256 feedId) external view returns (bool);
/**
* @notice Get the feed deployer
* @return Address of the feed deployer
*/
function getFeedDeployer() external view returns (address);
/**
* @notice Get the feed verifier contract address
* @return Address of the feed verifier contract
*/
function getFeedVerifier() external view returns (IEOFeedVerifier);
/**
* @notice Get the pauser registry contract address
* @return Address of the pauser registry contract
*/
function getPauserRegistry() external view returns (IPauserRegistry);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
/**
* @title IEOFeedAdapter
* @author eOracle
* @notice Interface for the EOFeedAdapter contract.
* @dev compatible with AggregatorV3Interface.
*/
interface IEOFeedAdapter {
// slither-disable-next-line missing-inheritance
function initialize(
address feedManager,
uint256 feedId,
uint8 inputDecimals,
uint8 outputDecimals,
string memory feedDescription,
uint256 feedVersion
)
external;
function getFeedId() external view returns (uint256);
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
function getRoundData(uint80)
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);
// v2 interface - for backward compatibility
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);
function isPaused() external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Pausable
struct PausableStorage {
bool _paused;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;
function _getPausableStorage() private pure returns (PausableStorage storage $) {
assembly {
$.slot := PausableStorageLocation
}
}
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
PausableStorage storage $ = _getPausableStorage();
return $._paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
/*//////////////////////////////////////////////////////////////////////////
EOFeedManager
//////////////////////////////////////////////////////////////////////////*/
error CallerIsNotWhitelisted(address caller);
error MissingLeafInputs();
error FeedNotSupported(uint256 feedId);
error CallerIsNotPauser();
error CallerIsNotUnpauser();
error CallerIsNotFeedDeployer();
/*//////////////////////////////////////////////////////////////////////////
EOFeedVerifier
//////////////////////////////////////////////////////////////////////////*/
error CallerIsNotFeedManager();
error InvalidInput();
error InvalidProof();
error InvalidAddress();
error InvalidEventRoot();
error VotingPowerIsZero();
error InsufficientVotingPower();
error SignatureVerificationFailed();
error SignaturePairingFailed();
error ValidatorIndexOutOfBounds();
error ValidatorSetTooSmall();
error DuplicatedAddresses();
/*//////////////////////////////////////////////////////////////////////////
EOFeedRegistryAdapter
//////////////////////////////////////////////////////////////////////////*/
error FeedAlreadyExists();
error BaseQuotePairExists();
error FeedDoesNotExist();
error NotFeedDeployer();// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
/**
* @title IEOFeedVerifier
* @author eOracle
*/
interface IEOFeedVerifier {
/* ============ Structs ============ */
/**
* @dev Input data for leaf verification
* @param leafIndex Index of the leaf
* @param unhashedLeaf Unhashed leaf data
* abi encoded (uint256 feedId, uint256 rate, uint256 timestamp)
* @param proof Merkle proof of the leaf
*/
struct LeafInput {
uint256 leafIndex;
bytes unhashedLeaf;
bytes32[] proof;
}
/**
* @dev Signed Data structure
* @param eventRoot merkle tree root for events
* @param blockNumber the block number this merkle tree originated from (on EO chain)
* @param signature G1 hashed payload of abi.encode(eventRoot, blockNumber)
* @param apkG2 G2 apk provided from off-chain
* @param nonSignersBitmap used to construct G1 apk onchain
*/
struct VerificationParams {
uint64 blockNumber; // 8 bytes +
uint32 chainId; // 4 bytes +
address aggregator; // 20 bytes = 32 bytes
bytes32 eventRoot; // 32 bytes
bytes32 blockHash; // 32 bytes
uint256[2] signature; // 64 bytes
uint256[4] apkG2; // 128 bytes
bytes nonSignersBitmap; // dynamic
}
/**
* @notice Represents a validator in the system
* @param _address The validator's address
* @param g1pk validator G1 public key
* @param g2pk validator G2 public key (not used in current implementation)
* @param votingPower Validator voting power
*/
struct Validator {
address _address;
uint256[2] g1pk;
uint256[4] g2pk;
uint256 votingPower;
}
/* ============ Events ============ */
/**
* @dev Event emitted when the validator set is updated
* @param currentValidatorSetLength Length of the current validator set
* @param currentValidatorSetHash Hash of the current validator set
* @param totalVotingPower Total voting power of the current validator set
*/
event ValidatorSetUpdated(
uint256 currentValidatorSetLength, bytes32 currentValidatorSetHash, uint256 totalVotingPower
);
/**
* @dev Event emitted when the feed manager is set
* @param feedManager Address of the feed manager
*/
event FeedManagerSet(address feedManager);
/* ============ External Functions ============ */
/**
* @notice verify single leaf signature from a block merkle tree
* @param input leaf input data and proof (LeafInput)
* @param vParams verification params
* @return leafData Leaf data, abi encoded (uint256 feedId, uint256 rate, uint256 timestamp)
*/
function verify(
LeafInput memory input,
VerificationParams calldata vParams
)
external
returns (bytes memory leafData);
/**
* @notice batch verify signature of multiple leaves from the same block merkle tree
* @param inputs feed leaves
* @param vParams verification params
*/
function batchVerify(
LeafInput[] memory inputs,
VerificationParams calldata vParams
)
external
returns (bytes[] memory);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;
/**
* @title Interface for the `PauserRegistry` contract.
* @author Layr Labs, Inc.
* @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
*/
interface IPauserRegistry {
event PauserStatusChanged(address pauser, bool canPause);
event UnpauserChanged(address previousUnpauser, address newUnpauser);
/// @notice Mapping of addresses to whether they hold the pauser role.
function isPauser(address pauser) external view returns (bool);
/// @notice Unique address that holds the unpauser role. Capable of changing *both* the pauser and unpauser addresses.
function unpauser() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"ds-test/=lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"forge-safe/=lib/forge-safe/src/",
"eigenlayer-contracts/=lib/eigenlayer-contracts/src/contracts/",
"@openzeppelin-upgrades-v4.9.0/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/",
"@openzeppelin-v4.9.0/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"openzeppelin-contracts-upgradeable-v4.9.0/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts-v4.9.0/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
"openzeppelin/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/",
"solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/",
"solmate/=lib/forge-safe/lib/solmate/src/",
"surl/=lib/forge-safe/lib/surl/",
"zeus-templates/=lib/eigenlayer-contracts/lib/zeus-templates/src/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"feedManager","type":"address"},{"internalType":"uint256","name":"feedId","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"},{"internalType":"uint8","name":"outputDecimals","type":"uint8"},{"internalType":"string","name":"feedDescription","type":"string"},{"internalType":"uint256","name":"feedVersion","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6080604052348015600f57600080fd5b506016601a565b60ca565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560695760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6111f5806100d96000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80638205bf6a1161008c578063b187bd2611610066578063b187bd26146101b6578063b5ab58dc146101ce578063b633620c146101e1578063feaf968c146101f457600080fd5b80638205bf6a1461015857806393e5c6e9146101605780639a6fc8f51461016c57600080fd5b806354fd4d50116100bd57806354fd4d5014610133578063668a0f021461013b5780637284e4161461014357600080fd5b8063313ce567146100e45780633155f9501461010857806350d25bcd1461011d575b600080fd5b6003546301000000900460ff1660405160ff90911681526020015b60405180910390f35b61011b610116366004610b99565b6101fc565b005b6101256104a5565b6040519081526020016100ff565b600154610125565b610125610555565b61014b6105fa565b6040516100ff9190610cab565b61012561068c565b60035461ffff16610125565b61017f61017a366004610d18565b610731565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100ff565b6101be610805565b60405190151581526020016100ff565b6101256101dc366004610d44565b61089c565b6101256101ef366004610d44565b61094d565b61017f6109f3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156102475750825b905060008267ffffffffffffffff1660011480156102645750303b155b905081158015610272575080155b156102a9576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561030a5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b73ffffffffffffffffffffffffffffffffffffffff8b16610357576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089600360006101000a81548161ffff021916908361ffff160217905550876003806101000a81548160ff021916908360ff16021790555088600360026101000a81548160ff021916908360ff16021790555060008860ff168a60ff1611610407576104028a8a610d8c565b610411565b610411898b610d8c565b60ff16905061042181600a610ec5565b60045560026104308982610f75565b5050600186905583156104985784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa15801561051c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610540919061108f565b905061054f8160000151610ac6565b91505090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156105cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f0919061108f565b6040015192915050565b60606002805461060990610ed1565b80601f016020809104026020016040519081016040528092919081815260200182805461063590610ed1565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050905090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610703573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610727919061108f565b6020015192915050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff90911660048201528291829182918291829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d4919061108f565b905080604001516107e88260000151610ac6565b602083015160409093015191999098509196508695509350915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610873573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089791906110eb565b905090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061108f565b90506109468160000151610ac6565b9392505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e8919061108f565b602001519392505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff90911660048201528291829182918291829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a96919061108f565b90508060400151610aaa8260000151610ac6565b6020830151604090930151919890975091955085945092509050565b60035460009060ff63010000008204811662010000909204161115610af857600454610af2908361110d565b92915050565b600454610af2908361119c565b919050565b803560ff81168114610b0557600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b9157610b91610b1b565b604052919050565b60008060008060008060c08789031215610bb257600080fd5b863573ffffffffffffffffffffffffffffffffffffffff81168114610bd657600080fd5b95506020878101359550610bec60408901610b0a565b9450610bfa60608901610b0a565b9350608088013567ffffffffffffffff80821115610c1757600080fd5b818a0191508a601f830112610c2b57600080fd5b813581811115610c3d57610c3d610b1b565b610c6d847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610b4a565b91508082528b84828501011115610c8357600080fd5b808484018584013760008482840101525080945050505060a087013590509295509295509295565b60006020808352835180602085015260005b81811015610cd957858101830151858201604001528201610cbd565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b600060208284031215610d2a57600080fd5b813569ffffffffffffffffffff8116811461094657600080fd5b600060208284031215610d5657600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8281168282160390811115610af257610af2610d5d565b600181815b80851115610dfe57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610de457610de4610d5d565b80851615610df157918102915b93841c9390800290610daa565b509250929050565b600082610e1557506001610af2565b81610e2257506000610af2565b8160018114610e385760028114610e4257610e5e565b6001915050610af2565b60ff841115610e5357610e53610d5d565b50506001821b610af2565b5060208310610133831016604e8410600b8410161715610e81575081810a610af2565b610e8b8383610da5565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ebd57610ebd610d5d565b029392505050565b60006109468383610e06565b600181811c90821680610ee557607f821691505b602082108103610f1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f70576000816000526020600020601f850160051c81016020861015610f4d5750805b601f850160051c820191505b81811015610f6c57828155600101610f59565b5050505b505050565b815167ffffffffffffffff811115610f8f57610f8f610b1b565b610fa381610f9d8454610ed1565b84610f24565b602080601f831160018114610ff65760008415610fc05750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f6c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561104357888601518255948401946001909101908401611024565b508582101561107f57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000606082840312156110a157600080fd5b6040516060810181811067ffffffffffffffff821117156110c4576110c4610b1b565b80604052508251815260208301516020820152604083015160408201528091505092915050565b6000602082840312156110fd57600080fd5b8151801515811461094657600080fd5b600082611143577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561119757611197610d5d565b500590565b808202600082127f8000000000000000000000000000000000000000000000000000000000000000841416156111d4576111d4610d5d565b8181058314821517610af257610af2610d5d56fea164736f6c6343000819000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80638205bf6a1161008c578063b187bd2611610066578063b187bd26146101b6578063b5ab58dc146101ce578063b633620c146101e1578063feaf968c146101f457600080fd5b80638205bf6a1461015857806393e5c6e9146101605780639a6fc8f51461016c57600080fd5b806354fd4d50116100bd57806354fd4d5014610133578063668a0f021461013b5780637284e4161461014357600080fd5b8063313ce567146100e45780633155f9501461010857806350d25bcd1461011d575b600080fd5b6003546301000000900460ff1660405160ff90911681526020015b60405180910390f35b61011b610116366004610b99565b6101fc565b005b6101256104a5565b6040519081526020016100ff565b600154610125565b610125610555565b61014b6105fa565b6040516100ff9190610cab565b61012561068c565b60035461ffff16610125565b61017f61017a366004610d18565b610731565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100ff565b6101be610805565b60405190151581526020016100ff565b6101256101dc366004610d44565b61089c565b6101256101ef366004610d44565b61094d565b61017f6109f3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156102475750825b905060008267ffffffffffffffff1660011480156102645750303b155b905081158015610272575080155b156102a9576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561030a5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b73ffffffffffffffffffffffffffffffffffffffff8b16610357576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555089600360006101000a81548161ffff021916908361ffff160217905550876003806101000a81548160ff021916908360ff16021790555088600360026101000a81548160ff021916908360ff16021790555060008860ff168a60ff1611610407576104028a8a610d8c565b610411565b610411898b610d8c565b60ff16905061042181600a610ec5565b60045560026104308982610f75565b5050600186905583156104985784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa15801561051c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610540919061108f565b905061054f8160000151610ac6565b91505090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156105cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f0919061108f565b6040015192915050565b60606002805461060990610ed1565b80601f016020809104026020016040519081016040528092919081815260200182805461063590610ed1565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050905090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610703573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610727919061108f565b6020015192915050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff90911660048201528291829182918291829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156107b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d4919061108f565b905080604001516107e88260000151610ac6565b602083015160409093015191999098509196508695509350915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610873573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089791906110eb565b905090565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061108f565b90506109468160000151610ac6565b9392505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa1580156109c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e8919061108f565b602001519392505050565b600080546003546040517fd407273a00000000000000000000000000000000000000000000000000000000815261ffff90911660048201528291829182918291829173ffffffffffffffffffffffffffffffffffffffff169063d407273a90602401606060405180830381865afa158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a96919061108f565b90508060400151610aaa8260000151610ac6565b6020830151604090930151919890975091955085945092509050565b60035460009060ff63010000008204811662010000909204161115610af857600454610af2908361110d565b92915050565b600454610af2908361119c565b919050565b803560ff81168114610b0557600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b9157610b91610b1b565b604052919050565b60008060008060008060c08789031215610bb257600080fd5b863573ffffffffffffffffffffffffffffffffffffffff81168114610bd657600080fd5b95506020878101359550610bec60408901610b0a565b9450610bfa60608901610b0a565b9350608088013567ffffffffffffffff80821115610c1757600080fd5b818a0191508a601f830112610c2b57600080fd5b813581811115610c3d57610c3d610b1b565b610c6d847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601610b4a565b91508082528b84828501011115610c8357600080fd5b808484018584013760008482840101525080945050505060a087013590509295509295509295565b60006020808352835180602085015260005b81811015610cd957858101830151858201604001528201610cbd565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b600060208284031215610d2a57600080fd5b813569ffffffffffffffffffff8116811461094657600080fd5b600060208284031215610d5657600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8281168282160390811115610af257610af2610d5d565b600181815b80851115610dfe57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610de457610de4610d5d565b80851615610df157918102915b93841c9390800290610daa565b509250929050565b600082610e1557506001610af2565b81610e2257506000610af2565b8160018114610e385760028114610e4257610e5e565b6001915050610af2565b60ff841115610e5357610e53610d5d565b50506001821b610af2565b5060208310610133831016604e8410600b8410161715610e81575081810a610af2565b610e8b8383610da5565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ebd57610ebd610d5d565b029392505050565b60006109468383610e06565b600181811c90821680610ee557607f821691505b602082108103610f1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610f70576000816000526020600020601f850160051c81016020861015610f4d5750805b601f850160051c820191505b81811015610f6c57828155600101610f59565b5050505b505050565b815167ffffffffffffffff811115610f8f57610f8f610b1b565b610fa381610f9d8454610ed1565b84610f24565b602080601f831160018114610ff65760008415610fc05750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610f6c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561104357888601518255948401946001909101908401611024565b508582101561107f57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000606082840312156110a157600080fd5b6040516060810181811067ffffffffffffffff821117156110c4576110c4610b1b565b80604052508251815260208301516020820152604083015160408201528091505092915050565b6000602082840312156110fd57600080fd5b8151801515811461094657600080fd5b600082611143577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561119757611197610d5d565b500590565b808202600082127f8000000000000000000000000000000000000000000000000000000000000000841416156111d4576111d4610d5d565b8181058314821517610af257610af2610d5d56fea164736f6c6343000819000a
Deployed Bytecode Sourcemap
682:7574:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6427:89;6494:15;;;;;;;6427:89;;186:4:9;174:17;;;156:36;;144:2;129:18;6427:89:4;;;;;;;;1903:1039;;;;;;:::i;:::-;;:::i;:::-;;4766:205;;;:::i;:::-;;;2340:25:9;;;2328:2;2313:18;4766:205:4;2196:175:9;6820:83:4;6888:8;;6820:83;;7019:201;;;:::i;6623:97::-;;;:::i;:::-;;;;;;;:::i;5070:196::-;;;:::i;6243:84::-;6313:7;;;;6243:84;;3470:443;;;;;;:::i;:::-;;:::i;:::-;;;;3726:22:9;3775:15;;;3757:34;;3822:2;3807:18;;3800:34;;;;3850:18;;3843:34;;;;3908:2;3893:18;;3886:34;3957:15;;;3951:3;3936:19;;3929:44;3703:3;3688:19;3470:443:4;3463:516:9;7329:124:4;;;:::i;:::-;;;4149:14:9;;4142:22;4124:41;;4112:2;4097:18;7329:124:4;3984:187:9;5490:217:4;;;;;;:::i;:::-;;:::i;5940:208::-;;;;;;:::i;:::-;;:::i;4244:432::-;;;:::i;1903:1039::-;8870:21:1;4302:15;;;;;;;4301:16;;4348:14;;4158:30;4726:16;;:34;;;;;4746:14;4726:34;4706:54;;4770:17;4790:11;:16;;4805:1;4790:16;:50;;;;-1:-1:-1;4818:4:1;4810:25;:30;4790:50;4770:70;;4856:12;4855:13;:30;;;;;4873:12;4872:13;4855:30;4851:91;;;4908:23;;;;;;;;;;;;;;4851:91;4951:18;;;;4968:1;4951:18;;;4979:67;;;;5013:22;;;;;;;;4979:67;2164:25:4::1;::::0;::::1;2160:54;;2198:16;;;;;;;;;;;;;;2160:54;2254:11;2224:12;::::0;:42:::1;;;;;;;;;;;;;;;;;;2539:6;2522:7;;:24;;;;;;;;;;;;;;;;;;2574:14;2556:15;::::0;:32:::1;;;;;;;;;;;;;;;;;;2615:13;2598:14;;:30;;;;;;;;;;;;;;;;;;2638:12;2669:14;2653:30;;:13;:30;;;:96;;2719:30;2736:13:::0;2719:14;:30:::1;:::i;:::-;2653:96;;;2686:30;2702:14:::0;2686:13;:30:::1;:::i;:::-;2638:111;;::::0;-1:-1:-1;2782:10:4::1;2638:111:::0;2782:2:::1;:10;:::i;:::-;2759:13;:34:::0;2873:12:::1;:30;2888:15:::0;2873:12;:30:::1;:::i;:::-;-1:-1:-1::0;;2913:8:4::1;:22:::0;;;5066:101:1;;;;5100:23;;;;;;5142:14;;-1:-1:-1;9163:50:9;;5142:14:1;;9151:2:9;9136:18;5142:14:1;;;;;;;5066:101;4092:1081;;;;;1903:1039:4;;;;;;:::o;4766:205::-;4813:6;4875:12;;4907:7;;4875:40;;;;;4907:7;;;;4875:40;;;9369:38:9;4813:6:4;;4875:12;;;:31;;9342:18:9;;4875:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4831:84;;4932:32;4948:9;:15;;;4932;:32::i;:::-;4925:39;;;4766:205;:::o;7019:201::-;7065:7;7128:12;;7160:7;;7128:40;;;;;7160:7;;;;7128:40;;;9369:38:9;7065:7:4;;7128:12;;;:31;;9342:18:9;;7128:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7185:28;;;;7019:201;-1:-1:-1;;7019:201:4:o;6623:97::-;6669:13;6701:12;6694:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6623:97;:::o;5070:196::-;5120:7;5183:12;;5215:7;;5183:40;;;;;5215:7;;;;5183:40;;;9369:38:9;5120:7:4;;5183:12;;;:31;;9342:18:9;;5183:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5240:19;;;;5070:196;-1:-1:-1;;5070:196:4:o;3470:443::-;3531:6;3627:12;;3659:7;;3627:40;;;;;3659:7;;;;3627:40;;;9369:38:9;3531:6:4;;;;;;;;;;3627:12;;;:31;;9342:18:9;;3627:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3583:84;;3705:9;:28;;;3748:32;3764:9;:15;;;3748;:32::i;:::-;3794:19;;;;3867:28;;;;;3677:229;;;;-1:-1:-1;3794:19:4;;-1:-1:-1;3794:19:4;;-1:-1:-1;3867:28:4;-1:-1:-1;3470:443:4;-1:-1:-1;;3470:443:4:o;7329:124::-;7372:4;7423:12;;;;;;;;;;;7395:49;;;:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7388:58;;7329:124;:::o;5490:217::-;5549:6;5611:12;;5643:7;;5611:40;;;;;5643:7;;;;5611:40;;;9369:38:9;5549:6:4;;5611:12;;;:31;;9342:18:9;;5611:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5567:84;;5668:32;5684:9;:15;;;5668;:32::i;:::-;5661:39;5490:217;-1:-1:-1;;;5490:217:4:o;5940:208::-;6002:7;6065:12;;6097:7;;6065:40;;;;;6097:7;;;;6065:40;;;9369:38:9;6002:7:4;;6065:12;;;:31;;9342:18:9;;6065:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6122:19;;;;5940:208;-1:-1:-1;;;5940:208:4:o;4244:432::-;4294:6;4390:12;;4422:7;;4390:40;;;;;4422:7;;;;4390:40;;;9369:38:9;4294:6:4;;;;;;;;;;4390:12;;;:31;;9342:18:9;;4390:40:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4346:84;;4468:9;:28;;;4511:32;4527:9;:15;;;4511;:32::i;:::-;4557:19;;;;4630:28;;;;;4440:229;;;;-1:-1:-1;4557:19:4;;-1:-1:-1;4557:19:4;;-1:-1:-1;4630:28:4;-1:-1:-1;4244:432:4;-1:-1:-1;4244:432:4:o;7675:253::-;7777:15;;7738:6;;7777:15;;;;;;7760:14;;;;;:32;7756:166;;;7831:13;;7815:29;;7822:5;7815:29;:::i;:::-;7808:36;7675:253;-1:-1:-1;;7675:253:4:o;7756:166::-;7898:13;;7882:29;;7889:5;7882:29;:::i;7756:166::-;7675:253;;;:::o;203:156:9:-;269:20;;329:4;318:16;;308:27;;298:55;;349:1;346;339:12;364:184;416:77;413:1;406:88;513:4;510:1;503:15;537:4;534:1;527:15;553:334;624:2;618:9;680:2;670:13;;685:66;666:86;654:99;;783:18;768:34;;804:22;;;765:62;762:88;;;830:18;;:::i;:::-;866:2;859:22;553:334;;-1:-1:-1;553:334:9:o;892:1299::-;1002:6;1010;1018;1026;1034;1042;1095:3;1083:9;1074:7;1070:23;1066:33;1063:53;;;1112:1;1109;1102:12;1063:53;1151:9;1138:23;1201:42;1194:5;1190:54;1183:5;1180:65;1170:93;;1259:1;1256;1249:12;1170:93;1282:5;-1:-1:-1;1306:2:9;1340:18;;;1327:32;;-1:-1:-1;1378:36:9;1410:2;1395:18;;1378:36;:::i;:::-;1368:46;;1433:36;1465:2;1454:9;1450:18;1433:36;:::i;:::-;1423:46;;1520:3;1509:9;1505:19;1492:33;1544:18;1585:2;1577:6;1574:14;1571:34;;;1601:1;1598;1591:12;1571:34;1639:6;1628:9;1624:22;1614:32;;1684:7;1677:4;1673:2;1669:13;1665:27;1655:55;;1706:1;1703;1696:12;1655:55;1742:2;1729:16;1764:2;1760;1757:10;1754:36;;;1770:18;;:::i;:::-;1812:112;1920:2;1851:66;1844:4;1840:2;1836:13;1832:86;1828:95;1812:112;:::i;:::-;1799:125;;1947:2;1940:5;1933:17;1987:7;1982:2;1977;1973;1969:11;1965:20;1962:33;1959:53;;;2008:1;2005;1998:12;1959:53;2063:2;2058;2054;2050:11;2045:2;2038:5;2034:14;2021:45;2107:1;2102:2;2097;2090:5;2086:14;2082:23;2075:34;;2128:5;2118:15;;;;;2180:3;2169:9;2165:19;2152:33;2142:43;;892:1299;;;;;;;;:::o;2558:607::-;2670:4;2699:2;2728;2717:9;2710:21;2760:6;2754:13;2803:6;2798:2;2787:9;2783:18;2776:34;2828:1;2838:140;2852:6;2849:1;2846:13;2838:140;;;2947:14;;;2943:23;;2937:30;2913:17;;;2932:2;2909:26;2902:66;2867:10;;2838:140;;;2842:3;3027:1;3022:2;3013:6;3002:9;2998:22;2994:31;2987:42;3156:2;3086:66;3081:2;3073:6;3069:15;3065:88;3054:9;3050:104;3046:113;3038:121;;;;2558:607;;;;:::o;3170:288::-;3228:6;3281:2;3269:9;3260:7;3256:23;3252:32;3249:52;;;3297:1;3294;3287:12;3249:52;3336:9;3323:23;3386:22;3379:5;3375:34;3368:5;3365:45;3355:73;;3424:1;3421;3414:12;4176:180;4235:6;4288:2;4276:9;4267:7;4263:23;4259:32;4256:52;;;4304:1;4301;4294:12;4256:52;-1:-1:-1;4327:23:9;;4176:180;-1:-1:-1;4176:180:9:o;4361:184::-;4413:77;4410:1;4403:88;4510:4;4507:1;4500:15;4534:4;4531:1;4524:15;4550:151;4640:4;4633:12;;;4619;;;4615:31;;4658:14;;4655:40;;;4675:18;;:::i;4706:476::-;4795:1;4832:5;4795:1;4846:330;4867:7;4857:8;4854:21;4846:330;;;4986:4;4918:66;4914:77;4908:4;4905:87;4902:113;;;4995:18;;:::i;:::-;5045:7;5035:8;5031:22;5028:55;;;5065:16;;;;5028:55;5144:22;;;;5104:15;;;;4846:330;;;4850:3;4706:476;;;;;:::o;5187:866::-;5236:5;5266:8;5256:80;;-1:-1:-1;5307:1:9;5321:5;;5256:80;5355:4;5345:76;;-1:-1:-1;5392:1:9;5406:5;;5345:76;5437:4;5455:1;5450:59;;;;5523:1;5518:130;;;;5430:218;;5450:59;5480:1;5471:10;;5494:5;;;5518:130;5555:3;5545:8;5542:17;5539:43;;;5562:18;;:::i;:::-;-1:-1:-1;;5618:1:9;5604:16;;5633:5;;5430:218;;5732:2;5722:8;5719:16;5713:3;5707:4;5704:13;5700:36;5694:2;5684:8;5681:16;5676:2;5670:4;5667:12;5663:35;5660:77;5657:159;;;-1:-1:-1;5769:19:9;;;5801:5;;5657:159;5848:34;5873:8;5867:4;5848:34;:::i;:::-;5978:6;5910:66;5906:79;5897:7;5894:92;5891:118;;;5989:18;;:::i;:::-;6027:20;;5187:866;-1:-1:-1;;;5187:866:9:o;6058:131::-;6118:5;6147:36;6174:8;6168:4;6147:36;:::i;6194:437::-;6273:1;6269:12;;;;6316;;;6337:61;;6391:4;6383:6;6379:17;6369:27;;6337:61;6444:2;6436:6;6433:14;6413:18;6410:38;6407:218;;6481:77;6478:1;6471:88;6582:4;6579:1;6572:15;6610:4;6607:1;6600:15;6407:218;;6194:437;;;:::o;6762:543::-;6864:2;6859:3;6856:11;6853:446;;;6900:1;6924:5;6921:1;6914:16;6968:4;6965:1;6955:18;7038:2;7026:10;7022:19;7019:1;7015:27;7009:4;7005:38;7074:4;7062:10;7059:20;7056:47;;;-1:-1:-1;7097:4:9;7056:47;7152:2;7147:3;7143:12;7140:1;7136:20;7130:4;7126:31;7116:41;;7207:82;7225:2;7218:5;7215:13;7207:82;;;7270:17;;;7251:1;7240:13;7207:82;;;7211:3;;;6853:446;6762:543;;;:::o;7541:1464::-;7667:3;7661:10;7694:18;7686:6;7683:30;7680:56;;;7716:18;;:::i;:::-;7745:97;7835:6;7795:38;7827:4;7821:11;7795:38;:::i;:::-;7789:4;7745:97;:::i;:::-;7897:4;;7954:2;7943:14;;7971:1;7966:782;;;;8792:1;8809:6;8806:89;;;-1:-1:-1;8861:19:9;;;8855:26;8806:89;7447:66;7438:1;7434:11;;;7430:84;7426:89;7416:100;7522:1;7518:11;;;7413:117;8908:81;;7936:1063;;7966:782;6709:1;6702:14;;;6746:4;6733:18;;8014:66;8002:79;;;8179:236;8193:7;8190:1;8187:14;8179:236;;;8282:19;;;8276:26;8261:42;;8374:27;;;;8342:1;8330:14;;;;8209:19;;8179:236;;;8183:3;8443:6;8434:7;8431:19;8428:261;;;8504:19;;;8498:26;8605:66;8587:1;8583:14;;;8599:3;8579:24;8575:97;8571:102;8556:118;8541:134;;8428:261;-1:-1:-1;;;;;8735:1:9;8719:14;;;8715:22;8702:36;;-1:-1:-1;7541:1464:9:o;9418:562::-;9515:6;9568:2;9556:9;9547:7;9543:23;9539:32;9536:52;;;9584:1;9581;9574:12;9536:52;9617:2;9611:9;9659:2;9651:6;9647:15;9728:6;9716:10;9713:22;9692:18;9680:10;9677:34;9674:62;9671:88;;;9739:18;;:::i;:::-;9779:10;9775:2;9768:22;;9820:9;9814:16;9806:6;9799:32;9885:2;9874:9;9870:18;9864:25;9859:2;9851:6;9847:15;9840:50;9944:2;9933:9;9929:18;9923:25;9918:2;9910:6;9906:15;9899:50;9968:6;9958:16;;;9418:562;;;;:::o;9985:277::-;10052:6;10105:2;10093:9;10084:7;10080:23;10076:32;10073:52;;;10121:1;10118;10111:12;10073:52;10153:9;10147:16;10206:5;10199:13;10192:21;10185:5;10182:32;10172:60;;10228:1;10225;10218:12;10267:462;10306:1;10332;10322:189;;10367:77;10364:1;10357:88;10468:4;10465:1;10458:15;10496:4;10493:1;10486:15;10322:189;10608:66;10605:1;10602:73;10533:66;10530:1;10527:73;10523:153;10520:179;;;10679:18;;:::i;:::-;-1:-1:-1;10713:10:9;;10267:462::o;10734:292::-;10806:9;;;10773:7;10831:9;;10848:66;10842:73;;10827:89;10824:115;;;10919:18;;:::i;:::-;10992:1;10983:7;10978:16;10975:1;10972:23;10968:1;10961:9;10958:38;10948:72;;11000:18;;:::i
Swarm Source
none
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
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.