Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 642 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Multiple Pri... | 18759188 | 797 days ago | IN | 0 ETH | 0.00665697 | ||||
| Set Multiple Pri... | 18759089 | 797 days ago | IN | 0 ETH | 0.00757835 | ||||
| Set Multiple Pri... | 18758288 | 798 days ago | IN | 0 ETH | 0.01189045 | ||||
| Set Multiple Pri... | 18758172 | 798 days ago | IN | 0 ETH | 0.01162538 | ||||
| Set Multiple Pri... | 18757371 | 798 days ago | IN | 0 ETH | 0.01910613 | ||||
| Set Multiple Pri... | 18757213 | 798 days ago | IN | 0 ETH | 0.01342273 | ||||
| Set Multiple Pri... | 18756359 | 798 days ago | IN | 0 ETH | 0.00736768 | ||||
| Set Multiple Pri... | 18756275 | 798 days ago | IN | 0 ETH | 0.00862175 | ||||
| Set Multiple Pri... | 18755403 | 798 days ago | IN | 0 ETH | 0.00791836 | ||||
| Set Multiple Pri... | 18755327 | 798 days ago | IN | 0 ETH | 0.00869689 | ||||
| Set Multiple Pri... | 18754438 | 798 days ago | IN | 0 ETH | 0.00908289 | ||||
| Set Multiple Pri... | 18754424 | 798 days ago | IN | 0 ETH | 0.01070177 | ||||
| Set Multiple Pri... | 18752424 | 798 days ago | IN | 0 ETH | 0.00982231 | ||||
| Set Multiple Pri... | 18752423 | 798 days ago | IN | 0 ETH | 0.00963736 | ||||
| Set Multiple Pri... | 18750412 | 799 days ago | IN | 0 ETH | 0.01297943 | ||||
| Set Multiple Pri... | 18750406 | 799 days ago | IN | 0 ETH | 0.01132228 | ||||
| Set Multiple Pri... | 18748418 | 799 days ago | IN | 0 ETH | 0.01404524 | ||||
| Set Multiple Pri... | 18748400 | 799 days ago | IN | 0 ETH | 0.01111828 | ||||
| Set Multiple Pri... | 18746410 | 799 days ago | IN | 0 ETH | 0.00958887 | ||||
| Set Multiple Pri... | 18744398 | 799 days ago | IN | 0 ETH | 0.02026396 | ||||
| Set Multiple Pri... | 18744388 | 799 days ago | IN | 0 ETH | 0.01837095 | ||||
| Set Multiple Pri... | 18744386 | 799 days ago | IN | 0 ETH | 0.01887608 | ||||
| Set Multiple Pri... | 18742393 | 800 days ago | IN | 0 ETH | 0.01964456 | ||||
| Set Multiple Pri... | 18740394 | 800 days ago | IN | 0 ETH | 0.01442091 | ||||
| Set Multiple Pri... | 18740380 | 800 days ago | IN | 0 ETH | 0.01156684 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
NFTFloorOracle
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../dependencies/openzeppelin/contracts/AccessControl.sol";
import "../dependencies/openzeppelin/upgradeability/Initializable.sol";
import "./interfaces/INFTFloorOracle.sol";
//we need to deploy 3 oracles at least
uint8 constant MIN_ORACLES_NUM = 3;
//expirationPeriod at least the interval of client to feed data(currently 6h=21600s/12=1800 in mainnet)
//we do not accept price lags behind to much
uint128 constant EXPIRATION_PERIOD = 1800;
//reject when price increase/decrease 3 times more than original value
uint128 constant MAX_DEVIATION_RATE = 300;
struct OracleConfig {
// Expiration Period for each feed price
uint128 expirationPeriod;
// Maximum deviation allowed between two consecutive oracle prices
uint128 maxPriceDeviation;
}
struct PriceInformation {
// last reported floor price(offchain twap)
uint256 twap;
// last updated blocknumber
uint256 updatedAt;
// last updated timestamp
uint256 updatedTimestamp;
}
struct FeederRegistrar {
// if asset registered or not
bool registered;
// index in asset list
uint8 index;
// if asset paused,reject the price
bool paused;
// feeder -> PriceInformation
mapping(address => PriceInformation) feederPrice;
}
struct FeederPosition {
// if feeder registered or not
bool registered;
// index in feeder list
uint8 index;
}
/// @title A simple on-chain price oracle mechanism
/// @author github.com/drbh,github.com/yrong
/// @notice Offchain clients can update the prices in this contract. The public can read prices
/// aggeregate prices which are not expired from different feeders, if number of valid/unexpired prices
/// not enough, we do not aggeregate and just use previous price
contract NFTFloorOracle is Initializable, AccessControl, INFTFloorOracle {
event AssetAdded(address indexed asset);
event AssetRemoved(address indexed asset);
event AssetPaused(address indexed asset, bool paused);
event FeederAdded(address indexed feeder);
event FeederRemoved(address indexed feeder);
event OracleConfigSet(uint128 expirationPeriod, uint128 maxPriceDeviation);
event AssetDataSet(
address indexed asset,
uint256 twap,
uint256 lastUpdatedBlock
);
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
/// @dev Aggregated price with address
// the NFT contract -> latest price information
mapping(address => PriceInformation) public assetPriceMap;
/// @dev All feeders
address[] public feeders;
/// @dev feeder map
// feeder address -> index in feeder list
mapping(address => FeederPosition) public feederPositionMap;
/// @dev All asset list
address[] public assets;
/// @dev Original raw value to aggregate with
// the NFT contract address -> FeederRegistrar which contains price from each feeder
mapping(address => FeederRegistrar) public assetFeederMap;
/// @dev storage for oracle configurations
OracleConfig public config;
/// @notice Allow contract creator to set admin and updaters
/// @param _admin The admin who can change roles
/// @param _feeders The initial updaters
/// @param _assets The initial nft assets
function initialize(
address _admin,
address[] memory _feeders,
address[] memory _assets
) public initializer {
require(_admin != address(0), "Address cannot be zero"); // Add this line
_addAssets(_assets);
_addFeeders(_feeders);
_setupRole(DEFAULT_ADMIN_ROLE, _admin);
//still need to grant update_role to admin for emergency call
_setupRole(UPDATER_ROLE, _admin);
_setConfig(EXPIRATION_PERIOD, MAX_DEVIATION_RATE);
}
/// @notice Allows owner to add assets.
/// @param _assets assets to add
function addAssets(address[] calldata _assets)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_addAssets(_assets);
}
/// @notice Allows owner to remove assets.
/// @param _assets asset to remove
function removeAssets(address[] calldata _assets)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
for (uint256 i = 0; i < _assets.length; i++) {
_removeAsset(_assets[i]);
}
}
/// @notice Allows owner to add feeders.
/// @param _feeders feeders to add
function addFeeders(address[] calldata _feeders)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_addFeeders(_feeders);
}
/// @notice Allows owner to remove feeders.
/// @param _feeders feeders to remove
function removeFeeders(address[] calldata _feeders)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
for (uint256 i = 0; i < _feeders.length; i++) {
_removeFeeder(_feeders[i]);
}
}
/// @notice Allows owner to update oracle configs
function setConfig(uint128 expirationPeriod, uint128 maxPriceDeviation)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_setConfig(expirationPeriod, maxPriceDeviation);
}
/// @notice Allows owner to pause asset
function setPause(address _asset, bool _flag)
external
onlyRole(DEFAULT_ADMIN_ROLE)
onlyWhenAssetExisted(_asset)
{
assetFeederMap[_asset].paused = _flag;
emit AssetPaused(_asset, _flag);
}
/// @notice Allows admin to set emergency price on PriceInformation and updates the
/// internal Median cumulativePrice.
/// @param _asset The nft contract to set a floor price for
/// @param _twap The last floor twap
function setEmergencyPrice(address _asset, uint256 _twap)
external
onlyRole(DEFAULT_ADMIN_ROLE)
onlyWhenAssetExisted(_asset)
{
_finalizePrice(_asset, _twap);
}
/// @notice Allows owner to set new price on PriceInformation and updates the
/// internal Median cumulativePrice.
/// @param _assets The nft contract to set a floor price for
/// @param _twaps The nft floor twaps
function setMultiplePrices(
address[] calldata _assets,
uint256[] calldata _twaps
) external onlyRole(UPDATER_ROLE) onlyWhenFeederExisted(msg.sender) {
require(
_assets.length == _twaps.length,
"NFTOracle: Tokens and price length differ"
);
OracleConfig memory _config = config;
for (uint256 i = 0; i < _assets.length; i++) {
_setPrice(_config, _assets[i], _twaps[i]);
}
}
/// @param _asset The nft contract
/// @return price The most recent price on chain
function getPrice(address _asset)
external
view
override
returns (uint256 price)
{
PriceInformation storage priceInfo = assetPriceMap[_asset];
require(priceInfo.updatedAt != 0, "NFTOracle: asset price not ready");
require(
(block.number - priceInfo.updatedAt) <= config.expirationPeriod,
"NFTOracle: asset price expired"
);
return priceInfo.twap;
}
/// @param _asset The nft contract
/// @return timestamp The timestamp of the last update for an asset
function getLastUpdateTime(address _asset)
external
view
override
returns (uint256 timestamp)
{
return assetPriceMap[_asset].updatedTimestamp;
}
function getFeederSize() public view returns (uint256) {
return feeders.length;
}
function _setPrice(
OracleConfig memory _config,
address _asset,
uint256 _twap
) internal {
PriceInformation memory _priceInfo = assetPriceMap[_asset];
FeederRegistrar storage _feederRegistrar = assetFeederMap[_asset];
require(_feederRegistrar.registered, "NFTOracle: asset not existed");
require(!_feederRegistrar.paused, "NFTOracle: nft price feed paused");
require(
_checkValidity(_priceInfo, _config, _twap),
"NFTOracle: invalid price data"
);
// set twap price only when median value is valid
(bool aggregate, uint256 medianPrice) = _addValue(
_config,
_feederRegistrar,
_priceInfo,
_twap
);
if (aggregate) _finalizePrice(_asset, medianPrice);
}
function _addAsset(address _asset)
internal
onlyWhenAssetNotExisted(_asset)
{
assetFeederMap[_asset].registered = true;
assets.push(_asset);
assetFeederMap[_asset].index = uint8(assets.length - 1);
emit AssetAdded(_asset);
}
function _removeAsset(address _asset)
internal
onlyWhenAssetExisted(_asset)
{
uint8 assetIndex = assetFeederMap[_asset].index;
delete assets[assetIndex];
delete assetPriceMap[_asset];
delete assetFeederMap[_asset];
emit AssetRemoved(_asset);
}
/// @notice add nft assets.
/// @param _assets assets to add
function _addAssets(address[] memory _assets) internal {
for (uint256 i = 0; i < _assets.length; i++) {
_addAsset(_assets[i]);
}
}
function _addFeeder(address _feeder)
internal
onlyWhenFeederNotExisted(_feeder)
{
feeders.push(_feeder);
feederPositionMap[_feeder].index = uint8(feeders.length - 1);
feederPositionMap[_feeder].registered = true;
_setupRole(UPDATER_ROLE, _feeder);
emit FeederAdded(_feeder);
}
function _removeFeeder(address _feeder)
internal
onlyWhenFeederExisted(_feeder)
{
uint8 feederIndex = feederPositionMap[_feeder].index;
require(
feeders[feederIndex] == _feeder,
"NFTOracle: feeder mismatched"
);
address lastFeeder = feeders[feeders.length - 1];
if (_feeder != lastFeeder) {
feeders[feederIndex] = lastFeeder;
feederPositionMap[lastFeeder].index = feederIndex;
}
feeders.pop();
delete feederPositionMap[_feeder];
revokeRole(UPDATER_ROLE, _feeder);
emit FeederRemoved(_feeder);
}
/// @notice set feeders.
/// @param _feeders feeders to set
function _addFeeders(address[] memory _feeders) internal {
for (uint256 i = 0; i < _feeders.length; i++) {
_addFeeder(_feeders[i]);
}
}
/// @notice set oracle configs
/// @param _expirationPeriod only prices not expired will be aggregated with
/// @param _maxPriceDeviation use to reject when price increase/decrease rate more than this value
function _setConfig(uint128 _expirationPeriod, uint128 _maxPriceDeviation)
internal
{
config.expirationPeriod = _expirationPeriod;
config.maxPriceDeviation = _maxPriceDeviation;
emit OracleConfigSet(_expirationPeriod, _maxPriceDeviation);
}
function _checkValidity(
PriceInformation memory _priceInfo,
OracleConfig memory _config,
uint256 _twap
) internal pure returns (bool) {
require(_twap > 0, "NFTOracle: price should be more than 0");
uint256 _priorTwap = _priceInfo.twap;
uint256 _updatedAt = _priceInfo.updatedAt;
uint256 priceDeviation;
//first price is always valid
if (_priorTwap == 0 || _updatedAt == 0) {
return true;
}
priceDeviation = _twap > _priorTwap
? (_twap * 100) / _priorTwap
: (_priorTwap * 100) / _twap;
// config maxPriceDeviation as multiple directly(not percent) for simplicity
if (priceDeviation >= _config.maxPriceDeviation) {
return false;
}
return true;
}
function _finalizePrice(address _asset, uint256 _twap) internal {
PriceInformation storage priceInfo = assetPriceMap[_asset];
priceInfo.twap = _twap;
priceInfo.updatedAt = block.number;
priceInfo.updatedTimestamp = block.timestamp;
emit AssetDataSet(_asset, priceInfo.twap, priceInfo.updatedAt);
}
function _addValue(
OracleConfig memory _config,
FeederRegistrar storage _feederRegistrar,
PriceInformation memory _priceInfo,
uint256 _twap
) internal returns (bool, uint256) {
uint256 currentBlock = block.number;
uint256 currentTwap = _priceInfo.twap;
_feederRegistrar.feederPrice[msg.sender].twap = _twap;
_feederRegistrar.feederPrice[msg.sender].updatedAt = currentBlock;
//first time just use the feeding value
if (currentTwap == 0) {
return (true, _twap);
}
//use memory here so allocate with maximum length
address[] memory _feeders = feeders;
uint256[] memory validPriceList = new uint256[](_feeders.length);
uint256 validNum = 0;
//aggeregate with price from all feeders
for (uint256 i = 0; i < _feeders.length; i++) {
PriceInformation memory priceInfo = _feederRegistrar.feederPrice[
_feeders[i]
];
uint256 diffBlock = currentBlock - priceInfo.updatedAt;
if (
priceInfo.updatedAt > 0 && diffBlock <= _config.expirationPeriod
) {
validPriceList[validNum] = priceInfo.twap;
validNum++;
}
}
if (validNum < MIN_ORACLES_NUM) {
return (false, currentTwap);
}
_quickSort(validPriceList, 0, int256(validNum - 1));
return (true, validPriceList[validNum / 2]);
}
function _quickSort(
uint256[] memory arr,
int256 left,
int256 right
) internal pure {
int256 i = left;
int256 j = right;
if (i == j) return;
uint256 pivot = arr[uint256(left + (right - left) / 2)];
while (i <= j) {
while (arr[uint256(i)] < pivot) i++;
while (pivot < arr[uint256(j)]) j--;
if (i <= j) {
(arr[uint256(i)], arr[uint256(j)]) = (
arr[uint256(j)],
arr[uint256(i)]
);
i++;
j--;
}
}
if (left < j) _quickSort(arr, left, j);
if (i < right) _quickSort(arr, i, right);
}
modifier whenNotPaused(address _asset) {
require(
!assetFeederMap[_asset].paused,
"NFTOracle: nft price feed paused"
);
_;
}
modifier onlyWhenAssetExisted(address _asset) {
require(
assetFeederMap[_asset].registered,
"NFTOracle: asset not existed"
);
_;
}
modifier onlyWhenAssetNotExisted(address _asset) {
require(!assetFeederMap[_asset].registered, "NFTOracle: asset existed");
_;
}
modifier onlyWhenFeederExisted(address _feeder) {
require(
feederPositionMap[_feeder].registered,
"NFTOracle: feeder not existed"
);
_;
}
modifier onlyWhenFeederNotExisted(address _feeder) {
require(
!feederPositionMap[_feeder].registered,
"NFTOracle: feeder existed"
);
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "./Context.sol";
import "./Strings.sol";
import "./ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return
interfaceId == type(IAccessControl).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account)
public
view
override
returns (bool)
{
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account)
public
virtual
override
onlyRole(getRoleAdmin(role))
{
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account)
public
virtual
override
onlyRole(getRoleAdmin(role))
{
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account)
public
virtual
override
{
require(
account == _msgSender(),
"AccessControl: can only renounce roles for self"
);
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function _grantRole(bytes32 role, address account) private {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
* @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 GSN 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 Context {
function _msgSender() internal view virtual returns (address payable) {
return payable(msg.sender);
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(
bytes32 indexed role,
bytes32 indexed previousAdminRole,
bytes32 indexed newAdminRole
);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(
bytes32 indexed role,
address indexed account,
address indexed sender
);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(
bytes32 indexed role,
address indexed account,
address indexed sender
);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account)
external
view
returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.0;
import "../contracts/Address.sol";
/**
* @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]
* ```
* 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 Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 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. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) ||
(!Address.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_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.
*
* `initializer` is equivalent to `reinitializer(1)`, so 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.
*
* 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.
*/
modifier reinitializer(uint8 version) {
require(
!_initializing && _initialized < version,
"Initializable: contract is already initialized"
);
_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() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @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.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
}// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;
interface INFTFloorOracle {
function getPrice(address token) external view returns (uint256 price);
function getLastUpdateTime(address token)
external
view
returns (uint256 timestamp);
}{
"remappings": [
"contracts/=contracts/",
"ds-test/=lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"pnm-contracts/=lib/pnm-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"AssetAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"twap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastUpdatedBlock","type":"uint256"}],"name":"AssetDataSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"AssetPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"AssetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeder","type":"address"}],"name":"FeederAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeder","type":"address"}],"name":"FeederRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"expirationPeriod","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"maxPriceDeviation","type":"uint128"}],"name":"OracleConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_assets","type":"address[]"}],"name":"addAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_feeders","type":"address[]"}],"name":"addFeeders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetFeederMap","outputs":[{"internalType":"bool","name":"registered","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"bool","name":"paused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetPriceMap","outputs":[{"internalType":"uint256","name":"twap","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint256","name":"updatedTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"uint128","name":"expirationPeriod","type":"uint128"},{"internalType":"uint128","name":"maxPriceDeviation","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feederPositionMap","outputs":[{"internalType":"bool","name":"registered","type":"bool"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"feeders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeederSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getLastUpdateTime","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address[]","name":"_feeders","type":"address[]"},{"internalType":"address[]","name":"_assets","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_assets","type":"address[]"}],"name":"removeAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_feeders","type":"address[]"}],"name":"removeFeeders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"expirationPeriod","type":"uint128"},{"internalType":"uint128","name":"maxPriceDeviation","type":"uint128"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_twap","type":"uint256"}],"name":"setEmergencyPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_assets","type":"address[]"},{"internalType":"uint256[]","name":"_twaps","type":"uint256[]"}],"name":"setMultiplePrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50612292806100206000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806391d14854116100de578063c22dc72211610097578063d2b30e1111610071578063d2b30e111461041c578063d547741f1461042f578063df30e97c14610442578063f078feb41461045557600080fd5b8063c22dc722146103e3578063cb82eb58146103f6578063cf35bdd01461040957600080fd5b806391d148541461036f5780639ceaa93a14610382578063a217fddf14610395578063a53a566d1461039d578063acd980cb146103a5578063aea321c6146103d057600080fd5b806336568abe1161014b5780634a200fa5116101255780634a200fa5146102de5780636e8c271b146102f157806379502c551461031e5780637ee185c11461035c57600080fd5b806336568abe146102a357806341976e09146102b657806347e63380146102c957600080fd5b806301ffc9a71461019357806304f4a374146101bb578063248a9ca3146101d057806324f5e165146102025780632e70936f1461024b5780632f2ff15d14610290575b600080fd5b6101a66101a1366004611c43565b6104ac565b60405190151581526020015b60405180910390f35b6101ce6101c9366004611cb9565b6104e3565b005b6101f46101de366004611d25565b6000908152600160208190526040909120015490565b6040519081526020016101b2565b610230610210366004611d5a565b600260208190526000918252604090912080546001820154919092015483565b604080519384526020840192909252908201526060016101b2565b610277610259366004611d5a565b60046020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff9091166020830152016101b2565b6101ce61029e366004611d75565b610659565b6101ce6102b1366004611d75565b610685565b6101f46102c4366004611d5a565b610703565b6101f460008051602061223d83398151915281565b6101ce6102ec366004611e59565b6107e1565b6101f46102ff366004611d5a565b6001600160a01b03166000908152600260208190526040909120015490565b60075461033c906001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152016101b2565b6101ce61036a366004611ecd565b61097f565b6101a661037d366004611d75565b6109cf565b6101ce610390366004611ef7565b6109fa565b6101f4600081565b6003546101f4565b6103b86103b3366004611d25565b610a52565b6040516001600160a01b0390911681526020016101b2565b6101ce6103de366004611ef7565b610a7c565b6101ce6103f1366004611f39565b610ac4565b6101ce610404366004611f8c565b610b79565b6103b8610417366004611d25565b610b8f565b6101ce61042a366004611ef7565b610b9f565b6101ce61043d366004611d75565b610be7565b6101ce610450366004611ef7565b610c0e565b61048b610463366004611d5a565b60066020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845260ff90921660208401521515908201526060016101b2565b60006001600160e01b03198216637965db0b60e01b14806104dd57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061223d8339815191526104fc8133610c66565b3360008181526004602052604090205460ff166105605760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f74206578697374656400000060448201526064015b60405180910390fd5b8483146105c15760405162461bcd60e51b815260206004820152602960248201527f4e46544f7261636c653a20546f6b656e7320616e64207072696365206c656e676044820152683a34103234b33332b960b91b6064820152608401610557565b604080518082019091526007546001600160801b038082168352600160801b90910416602082015260005b8681101561064f5761063d8289898481811061060a5761060a611fb6565b905060200201602081019061061f9190611d5a565b88888581811061063157610631611fb6565b90506020020135610cca565b8061064781611fe2565b9150506105ec565b5050505050505050565b600082815260016020819052604090912001546106768133610c66565b6106808383610e07565b505050565b6001600160a01b03811633146106f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610557565b6106ff8282610e72565b5050565b6001600160a01b03811660009081526002602052604081206001810154820361076e5760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206173736574207072696365206e6f742072656164796044820152606401610557565b60075460018201546001600160801b039091169061078c9043611ffb565b11156107da5760405162461bcd60e51b815260206004820152601e60248201527f4e46544f7261636c653a206173736574207072696365206578706972656400006044820152606401610557565b5492915050565b600054610100900460ff16158080156108015750600054600160ff909116105b8061081b5750303b15801561081b575060005460ff166001145b61087e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610557565b6000805460ff1916600117905580156108a1576000805461ff0019166101001790555b6001600160a01b0384166108f05760405162461bcd60e51b8152602060048201526016602482015275416464726573732063616e6e6f74206265207a65726f60501b6044820152606401610557565b6108f982610ed9565b61090283610f19565b61090d600085610f59565b61092560008051602061223d83398151915285610f59565b61093361070861012c610f63565b8015610979576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061098b8133610c66565b6001600160a01b038316600090815260066020526040902054839060ff166109c55760405162461bcd60e51b81526004016105579061200e565b6109798484610fbc565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a068133610c66565b60005b8281101561097957610a40848483818110610a2657610a26611fb6565b9050602002016020810190610a3b9190611d5a565b61102a565b80610a4a81611fe2565b915050610a09565b60038181548110610a6257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610a888133610c66565b610680838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610ed992505050565b6000610ad08133610c66565b6001600160a01b038316600090815260066020526040902054839060ff16610b0a5760405162461bcd60e51b81526004016105579061200e565b6001600160a01b038416600081815260066020526040908190208054861515620100000262ff000019909116179055517f4b317cf398a9dfd22ccdb72a0260c39416ea62bb8b2d408fdaf25b7699fc090e90610b6b90861515815260200190565b60405180910390a250505050565b6000610b858133610c66565b6106808383610f63565b60058181548110610a6257600080fd5b6000610bab8133610c66565b610680838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610f1992505050565b60008281526001602081905260409091200154610c048133610c66565b6106808383610e72565b6000610c1a8133610c66565b60005b8281101561097957610c54848483818110610c3a57610c3a611fb6565b9050602002016020810190610c4f9190611d5a565b611279565b80610c5e81611fe2565b915050610c1d565b610c7082826109cf565b6106ff57610c88816001600160a01b0316601461136a565b610c9383602061136a565b604051602001610ca4929190612069565b60408051601f198184030181529082905262461bcd60e51b8252610557916004016120de565b6001600160a01b03821660008181526002602081815260408084208151606081018352815481526001820154818501529301548382015293835260069052919020805460ff16610d2c5760405162461bcd60e51b81526004016105579061200e565b805462010000900460ff1615610d845760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206e66742070726963652066656564207061757365646044820152606401610557565b610d8f82868561150d565b610ddb5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20696e76616c696420707269636520646174610000006044820152606401610557565b600080610dea878486886115f9565b915091508115610dfe57610dfe8682610fbc565b50505050505050565b610e1182826109cf565b6106ff5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610e7c82826109cf565b156106ff5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b81518110156106ff57610f07828281518110610efa57610efa611fb6565b6020026020010151611837565b80610f1181611fe2565b915050610edc565b60005b81518110156106ff57610f47828281518110610f3a57610f3a611fb6565b6020026020010151611974565b80610f5181611fe2565b915050610f1c565b6106ff8282610e07565b6001600160801b03828116600160801b91831691820281176007556040805191825260208201929092527f7828697012f7b22837f218635b2cb288c74182475510db32a8ea3eb9b8a97ff9910160405180910390a15050565b6001600160a01b038216600081815260026020818152604092839020858155436001820181905542938201939093558351868152918201929092529092917fcd3c66863212a47104ec3bba3c6a10790d7e9d0af02f2c9ca55fe1646dc1c957910160405180910390a2505050565b6001600160a01b038116600090815260046020526040902054819060ff166110945760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f7420657869737465640000006044820152606401610557565b6001600160a01b0382166000818152600460205260409020546003805461010090920460ff169291839081106110cc576110cc611fb6565b6000918252602090912001546001600160a01b03161461112e5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a20666565646572206d69736d617463686564000000006044820152606401610557565b600380546000919061114290600190611ffb565b8154811061115257611152611fb6565b6000918252602090912001546001600160a01b039081169150841681146111d3578060038360ff168154811061118a5761118a611fb6565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600490915260409020805461ff00191661010060ff8516021790555b60038054806111e4576111e4612111565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526004905260409020805461ffff1916905561123f60008051602061223d83398151915285610be7565b6040516001600160a01b038516907fb0bc40f69e0e5f4bb32517529a6b4eb76c452372c18fe559934d27a4a8f88dce90600090a250505050565b6001600160a01b038116600090815260066020526040902054819060ff166112b35760405162461bcd60e51b81526004016105579061200e565b6001600160a01b0382166000908152600660205260409020546005805461010090920460ff1691829081106112ea576112ea611fb6565b6000918252602080832090910180546001600160a01b03191690556001600160a01b03851680835260028083526040808520858155600181018690559091018490556006909252818320805462ffffff19169055905190917f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc91a2505050565b60606000611379836002612127565b61138490600261213e565b67ffffffffffffffff81111561139c5761139c611da1565b6040519080825280601f01601f1916602001820160405280156113c6576020820181803683370190505b509050600360fc1b816000815181106113e1576113e1611fb6565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061141057611410611fb6565b60200101906001600160f81b031916908160001a9053506000611434846002612127565b61143f90600161213e565b90505b60018111156114b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061147357611473611fb6565b1a60f81b82828151811061148957611489611fb6565b60200101906001600160f81b031916908160001a90535060049490941c936114b081612151565b9050611442565b5083156115065760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610557565b9392505050565b600080821161156d5760405162461bcd60e51b815260206004820152602660248201527f4e46544f7261636c653a2070726963652073686f756c64206265206d6f72652060448201526507468616e20360d41b6064820152608401610557565b835160208501516000821580611581575081155b156115925760019350505050611506565b8285116115b457846115a5846064612127565b6115af919061217e565b6115ca565b826115c0866064612127565b6115ca919061217e565b905085602001516001600160801b031681106115ec5760009350505050611506565b5060019695505050505050565b815133600090815260018086016020526040822084815543910181905590918291908083036116305760018593509350505061182e565b6000600380548060200260200160405190810160405280929190818152602001828054801561168857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161166a575b505050505090506000815167ffffffffffffffff8111156116ab576116ab611da1565b6040519080825280602002602001820160405280156116d4578160200160208202803683370190505b5090506000805b83518110156117cd5760008b60010160008684815181106116fe576116fe611fb6565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905060008160200151886117639190611ffb565b90506000826020015111801561178357508d516001600160801b03168111155b156117b857816000015185858151811061179f5761179f611fb6565b6020908102919091010152836117b481611fe2565b9450505b505080806117c590611fe2565b9150506116db565b5060038110156117e85760008496509650505050505061182e565b6117fe8260006117f9600185611ffb565b611ac3565b60018261180c60028461217e565b8151811061181c5761181c611fb6565b60200260200101519650965050505050505b94509492505050565b6001600160a01b038116600090815260066020526040902054819060ff16156118a25760405162461bcd60e51b815260206004820152601860248201527f4e46544f7261636c653a206173736574206578697374656400000000000000006044820152606401610557565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117909155600580548083018255928190527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090920180546001600160a01b031916909317909255546119169190611ffb565b6001600160a01b038316600081815260066020526040808220805460ff959095166101000261ff001990951694909417909355915190917f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d791a25050565b6001600160a01b038116600090815260046020526040902054819060ff16156119df5760405162461bcd60e51b815260206004820152601960248201527f4e46544f7261636c653a206665656465722065786973746564000000000000006044820152606401610557565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b0386161790559054611a389190611ffb565b6001600160a01b0383166000908152600460205260409020805460ff1960ff93909316610100029290921661ffff19909216919091176001179055611a8b60008051602061223d83398151915283610f59565b6040516001600160a01b038316907f53813a21bbdd00f3df18b895e7321dea1615b185cccbe44f4a669c3f7a96dfa790600090a25050565b8181808203611ad3575050505050565b6000856002611ae28787612192565b611aec91906121b9565b611af690876121e7565b81518110611b0657611b06611fb6565b602002602001015190505b818313611c15575b80868481518110611b2c57611b2c611fb6565b60200260200101511015611b4c5782611b448161220f565b935050611b19565b858281518110611b5e57611b5e611fb6565b6020026020010151811015611b7f5781611b7781612227565b925050611b4c565b818313611c1057858281518110611b9857611b98611fb6565b6020026020010151868481518110611bb257611bb2611fb6565b6020026020010151878581518110611bcc57611bcc611fb6565b60200260200101888581518110611be557611be5611fb6565b60209081029190910101919091525282611bfe8161220f565b9350508180611c0c90612227565b9250505b611b11565b81851215611c2857611c28868684611ac3565b83831215611c3b57611c3b868486611ac3565b505050505050565b600060208284031215611c5557600080fd5b81356001600160e01b03198116811461150657600080fd5b60008083601f840112611c7f57600080fd5b50813567ffffffffffffffff811115611c9757600080fd5b6020830191508360208260051b8501011115611cb257600080fd5b9250929050565b60008060008060408587031215611ccf57600080fd5b843567ffffffffffffffff80821115611ce757600080fd5b611cf388838901611c6d565b90965094506020870135915080821115611d0c57600080fd5b50611d1987828801611c6d565b95989497509550505050565b600060208284031215611d3757600080fd5b5035919050565b80356001600160a01b0381168114611d5557600080fd5b919050565b600060208284031215611d6c57600080fd5b61150682611d3e565b60008060408385031215611d8857600080fd5b82359150611d9860208401611d3e565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611dc857600080fd5b8135602067ffffffffffffffff80831115611de557611de5611da1565b8260051b604051601f19603f83011681018181108482111715611e0a57611e0a611da1565b604052938452858101830193838101925087851115611e2857600080fd5b83870191505b84821015611e4e57611e3f82611d3e565b83529183019190830190611e2e565b979650505050505050565b600080600060608486031215611e6e57600080fd5b611e7784611d3e565b9250602084013567ffffffffffffffff80821115611e9457600080fd5b611ea087838801611db7565b93506040860135915080821115611eb657600080fd5b50611ec386828701611db7565b9150509250925092565b60008060408385031215611ee057600080fd5b611ee983611d3e565b946020939093013593505050565b60008060208385031215611f0a57600080fd5b823567ffffffffffffffff811115611f2157600080fd5b611f2d85828601611c6d565b90969095509350505050565b60008060408385031215611f4c57600080fd5b611f5583611d3e565b915060208301358015158114611f6a57600080fd5b809150509250929050565b80356001600160801b0381168114611d5557600080fd5b60008060408385031215611f9f57600080fd5b611fa883611f75565b9150611d9860208401611f75565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ff457611ff4611fcc565b5060010190565b818103818111156104dd576104dd611fcc565b6020808252601c908201527f4e46544f7261636c653a206173736574206e6f74206578697374656400000000604082015260600190565b60005b83811015612060578181015183820152602001612048565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120a1816017850160208801612045565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120d2816028840160208801612045565b01602801949350505050565b60208152600082518060208401526120fd816040850160208701612045565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b80820281158282048414176104dd576104dd611fcc565b808201808211156104dd576104dd611fcc565b60008161216057612160611fcc565b506000190190565b634e487b7160e01b600052601260045260246000fd5b60008261218d5761218d612168565b500490565b81810360008312801583831316838312821617156121b2576121b2611fcc565b5092915050565b6000826121c8576121c8612168565b600160ff1b8214600019841416156121e2576121e2611fcc565b500590565b808201828112600083128015821682158216171561220757612207611fcc565b505092915050565b60006001600160ff1b018201611ff457611ff4611fcc565b6000600160ff1b820161216057612160611fcc56fe73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285daba2646970667358221220f4018ac3098be6ac05123f3d1a953dbfcba4bb7138c4c1bdd21ac8f9e0ca440064736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806391d14854116100de578063c22dc72211610097578063d2b30e1111610071578063d2b30e111461041c578063d547741f1461042f578063df30e97c14610442578063f078feb41461045557600080fd5b8063c22dc722146103e3578063cb82eb58146103f6578063cf35bdd01461040957600080fd5b806391d148541461036f5780639ceaa93a14610382578063a217fddf14610395578063a53a566d1461039d578063acd980cb146103a5578063aea321c6146103d057600080fd5b806336568abe1161014b5780634a200fa5116101255780634a200fa5146102de5780636e8c271b146102f157806379502c551461031e5780637ee185c11461035c57600080fd5b806336568abe146102a357806341976e09146102b657806347e63380146102c957600080fd5b806301ffc9a71461019357806304f4a374146101bb578063248a9ca3146101d057806324f5e165146102025780632e70936f1461024b5780632f2ff15d14610290575b600080fd5b6101a66101a1366004611c43565b6104ac565b60405190151581526020015b60405180910390f35b6101ce6101c9366004611cb9565b6104e3565b005b6101f46101de366004611d25565b6000908152600160208190526040909120015490565b6040519081526020016101b2565b610230610210366004611d5a565b600260208190526000918252604090912080546001820154919092015483565b604080519384526020840192909252908201526060016101b2565b610277610259366004611d5a565b60046020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff9091166020830152016101b2565b6101ce61029e366004611d75565b610659565b6101ce6102b1366004611d75565b610685565b6101f46102c4366004611d5a565b610703565b6101f460008051602061223d83398151915281565b6101ce6102ec366004611e59565b6107e1565b6101f46102ff366004611d5a565b6001600160a01b03166000908152600260208190526040909120015490565b60075461033c906001600160801b0380821691600160801b90041682565b604080516001600160801b039384168152929091166020830152016101b2565b6101ce61036a366004611ecd565b61097f565b6101a661037d366004611d75565b6109cf565b6101ce610390366004611ef7565b6109fa565b6101f4600081565b6003546101f4565b6103b86103b3366004611d25565b610a52565b6040516001600160a01b0390911681526020016101b2565b6101ce6103de366004611ef7565b610a7c565b6101ce6103f1366004611f39565b610ac4565b6101ce610404366004611f8c565b610b79565b6103b8610417366004611d25565b610b8f565b6101ce61042a366004611ef7565b610b9f565b6101ce61043d366004611d75565b610be7565b6101ce610450366004611ef7565b610c0e565b61048b610463366004611d5a565b60066020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845260ff90921660208401521515908201526060016101b2565b60006001600160e01b03198216637965db0b60e01b14806104dd57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061223d8339815191526104fc8133610c66565b3360008181526004602052604090205460ff166105605760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f74206578697374656400000060448201526064015b60405180910390fd5b8483146105c15760405162461bcd60e51b815260206004820152602960248201527f4e46544f7261636c653a20546f6b656e7320616e64207072696365206c656e676044820152683a34103234b33332b960b91b6064820152608401610557565b604080518082019091526007546001600160801b038082168352600160801b90910416602082015260005b8681101561064f5761063d8289898481811061060a5761060a611fb6565b905060200201602081019061061f9190611d5a565b88888581811061063157610631611fb6565b90506020020135610cca565b8061064781611fe2565b9150506105ec565b5050505050505050565b600082815260016020819052604090912001546106768133610c66565b6106808383610e07565b505050565b6001600160a01b03811633146106f55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610557565b6106ff8282610e72565b5050565b6001600160a01b03811660009081526002602052604081206001810154820361076e5760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206173736574207072696365206e6f742072656164796044820152606401610557565b60075460018201546001600160801b039091169061078c9043611ffb565b11156107da5760405162461bcd60e51b815260206004820152601e60248201527f4e46544f7261636c653a206173736574207072696365206578706972656400006044820152606401610557565b5492915050565b600054610100900460ff16158080156108015750600054600160ff909116105b8061081b5750303b15801561081b575060005460ff166001145b61087e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610557565b6000805460ff1916600117905580156108a1576000805461ff0019166101001790555b6001600160a01b0384166108f05760405162461bcd60e51b8152602060048201526016602482015275416464726573732063616e6e6f74206265207a65726f60501b6044820152606401610557565b6108f982610ed9565b61090283610f19565b61090d600085610f59565b61092560008051602061223d83398151915285610f59565b61093361070861012c610f63565b8015610979576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b600061098b8133610c66565b6001600160a01b038316600090815260066020526040902054839060ff166109c55760405162461bcd60e51b81526004016105579061200e565b6109798484610fbc565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a068133610c66565b60005b8281101561097957610a40848483818110610a2657610a26611fb6565b9050602002016020810190610a3b9190611d5a565b61102a565b80610a4a81611fe2565b915050610a09565b60038181548110610a6257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610a888133610c66565b610680838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610ed992505050565b6000610ad08133610c66565b6001600160a01b038316600090815260066020526040902054839060ff16610b0a5760405162461bcd60e51b81526004016105579061200e565b6001600160a01b038416600081815260066020526040908190208054861515620100000262ff000019909116179055517f4b317cf398a9dfd22ccdb72a0260c39416ea62bb8b2d408fdaf25b7699fc090e90610b6b90861515815260200190565b60405180910390a250505050565b6000610b858133610c66565b6106808383610f63565b60058181548110610a6257600080fd5b6000610bab8133610c66565b610680838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610f1992505050565b60008281526001602081905260409091200154610c048133610c66565b6106808383610e72565b6000610c1a8133610c66565b60005b8281101561097957610c54848483818110610c3a57610c3a611fb6565b9050602002016020810190610c4f9190611d5a565b611279565b80610c5e81611fe2565b915050610c1d565b610c7082826109cf565b6106ff57610c88816001600160a01b0316601461136a565b610c9383602061136a565b604051602001610ca4929190612069565b60408051601f198184030181529082905262461bcd60e51b8252610557916004016120de565b6001600160a01b03821660008181526002602081815260408084208151606081018352815481526001820154818501529301548382015293835260069052919020805460ff16610d2c5760405162461bcd60e51b81526004016105579061200e565b805462010000900460ff1615610d845760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206e66742070726963652066656564207061757365646044820152606401610557565b610d8f82868561150d565b610ddb5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20696e76616c696420707269636520646174610000006044820152606401610557565b600080610dea878486886115f9565b915091508115610dfe57610dfe8682610fbc565b50505050505050565b610e1182826109cf565b6106ff5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610e7c82826109cf565b156106ff5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b81518110156106ff57610f07828281518110610efa57610efa611fb6565b6020026020010151611837565b80610f1181611fe2565b915050610edc565b60005b81518110156106ff57610f47828281518110610f3a57610f3a611fb6565b6020026020010151611974565b80610f5181611fe2565b915050610f1c565b6106ff8282610e07565b6001600160801b03828116600160801b91831691820281176007556040805191825260208201929092527f7828697012f7b22837f218635b2cb288c74182475510db32a8ea3eb9b8a97ff9910160405180910390a15050565b6001600160a01b038216600081815260026020818152604092839020858155436001820181905542938201939093558351868152918201929092529092917fcd3c66863212a47104ec3bba3c6a10790d7e9d0af02f2c9ca55fe1646dc1c957910160405180910390a2505050565b6001600160a01b038116600090815260046020526040902054819060ff166110945760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f7420657869737465640000006044820152606401610557565b6001600160a01b0382166000818152600460205260409020546003805461010090920460ff169291839081106110cc576110cc611fb6565b6000918252602090912001546001600160a01b03161461112e5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a20666565646572206d69736d617463686564000000006044820152606401610557565b600380546000919061114290600190611ffb565b8154811061115257611152611fb6565b6000918252602090912001546001600160a01b039081169150841681146111d3578060038360ff168154811061118a5761118a611fb6565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600490915260409020805461ff00191661010060ff8516021790555b60038054806111e4576111e4612111565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526004905260409020805461ffff1916905561123f60008051602061223d83398151915285610be7565b6040516001600160a01b038516907fb0bc40f69e0e5f4bb32517529a6b4eb76c452372c18fe559934d27a4a8f88dce90600090a250505050565b6001600160a01b038116600090815260066020526040902054819060ff166112b35760405162461bcd60e51b81526004016105579061200e565b6001600160a01b0382166000908152600660205260409020546005805461010090920460ff1691829081106112ea576112ea611fb6565b6000918252602080832090910180546001600160a01b03191690556001600160a01b03851680835260028083526040808520858155600181018690559091018490556006909252818320805462ffffff19169055905190917f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc91a2505050565b60606000611379836002612127565b61138490600261213e565b67ffffffffffffffff81111561139c5761139c611da1565b6040519080825280601f01601f1916602001820160405280156113c6576020820181803683370190505b509050600360fc1b816000815181106113e1576113e1611fb6565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061141057611410611fb6565b60200101906001600160f81b031916908160001a9053506000611434846002612127565b61143f90600161213e565b90505b60018111156114b7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061147357611473611fb6565b1a60f81b82828151811061148957611489611fb6565b60200101906001600160f81b031916908160001a90535060049490941c936114b081612151565b9050611442565b5083156115065760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610557565b9392505050565b600080821161156d5760405162461bcd60e51b815260206004820152602660248201527f4e46544f7261636c653a2070726963652073686f756c64206265206d6f72652060448201526507468616e20360d41b6064820152608401610557565b835160208501516000821580611581575081155b156115925760019350505050611506565b8285116115b457846115a5846064612127565b6115af919061217e565b6115ca565b826115c0866064612127565b6115ca919061217e565b905085602001516001600160801b031681106115ec5760009350505050611506565b5060019695505050505050565b815133600090815260018086016020526040822084815543910181905590918291908083036116305760018593509350505061182e565b6000600380548060200260200160405190810160405280929190818152602001828054801561168857602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161166a575b505050505090506000815167ffffffffffffffff8111156116ab576116ab611da1565b6040519080825280602002602001820160405280156116d4578160200160208202803683370190505b5090506000805b83518110156117cd5760008b60010160008684815181106116fe576116fe611fb6565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905060008160200151886117639190611ffb565b90506000826020015111801561178357508d516001600160801b03168111155b156117b857816000015185858151811061179f5761179f611fb6565b6020908102919091010152836117b481611fe2565b9450505b505080806117c590611fe2565b9150506116db565b5060038110156117e85760008496509650505050505061182e565b6117fe8260006117f9600185611ffb565b611ac3565b60018261180c60028461217e565b8151811061181c5761181c611fb6565b60200260200101519650965050505050505b94509492505050565b6001600160a01b038116600090815260066020526040902054819060ff16156118a25760405162461bcd60e51b815260206004820152601860248201527f4e46544f7261636c653a206173736574206578697374656400000000000000006044820152606401610557565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117909155600580548083018255928190527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090920180546001600160a01b031916909317909255546119169190611ffb565b6001600160a01b038316600081815260066020526040808220805460ff959095166101000261ff001990951694909417909355915190917f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d791a25050565b6001600160a01b038116600090815260046020526040902054819060ff16156119df5760405162461bcd60e51b815260206004820152601960248201527f4e46544f7261636c653a206665656465722065786973746564000000000000006044820152606401610557565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b0386161790559054611a389190611ffb565b6001600160a01b0383166000908152600460205260409020805460ff1960ff93909316610100029290921661ffff19909216919091176001179055611a8b60008051602061223d83398151915283610f59565b6040516001600160a01b038316907f53813a21bbdd00f3df18b895e7321dea1615b185cccbe44f4a669c3f7a96dfa790600090a25050565b8181808203611ad3575050505050565b6000856002611ae28787612192565b611aec91906121b9565b611af690876121e7565b81518110611b0657611b06611fb6565b602002602001015190505b818313611c15575b80868481518110611b2c57611b2c611fb6565b60200260200101511015611b4c5782611b448161220f565b935050611b19565b858281518110611b5e57611b5e611fb6565b6020026020010151811015611b7f5781611b7781612227565b925050611b4c565b818313611c1057858281518110611b9857611b98611fb6565b6020026020010151868481518110611bb257611bb2611fb6565b6020026020010151878581518110611bcc57611bcc611fb6565b60200260200101888581518110611be557611be5611fb6565b60209081029190910101919091525282611bfe8161220f565b9350508180611c0c90612227565b9250505b611b11565b81851215611c2857611c28868684611ac3565b83831215611c3b57611c3b868486611ac3565b505050505050565b600060208284031215611c5557600080fd5b81356001600160e01b03198116811461150657600080fd5b60008083601f840112611c7f57600080fd5b50813567ffffffffffffffff811115611c9757600080fd5b6020830191508360208260051b8501011115611cb257600080fd5b9250929050565b60008060008060408587031215611ccf57600080fd5b843567ffffffffffffffff80821115611ce757600080fd5b611cf388838901611c6d565b90965094506020870135915080821115611d0c57600080fd5b50611d1987828801611c6d565b95989497509550505050565b600060208284031215611d3757600080fd5b5035919050565b80356001600160a01b0381168114611d5557600080fd5b919050565b600060208284031215611d6c57600080fd5b61150682611d3e565b60008060408385031215611d8857600080fd5b82359150611d9860208401611d3e565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611dc857600080fd5b8135602067ffffffffffffffff80831115611de557611de5611da1565b8260051b604051601f19603f83011681018181108482111715611e0a57611e0a611da1565b604052938452858101830193838101925087851115611e2857600080fd5b83870191505b84821015611e4e57611e3f82611d3e565b83529183019190830190611e2e565b979650505050505050565b600080600060608486031215611e6e57600080fd5b611e7784611d3e565b9250602084013567ffffffffffffffff80821115611e9457600080fd5b611ea087838801611db7565b93506040860135915080821115611eb657600080fd5b50611ec386828701611db7565b9150509250925092565b60008060408385031215611ee057600080fd5b611ee983611d3e565b946020939093013593505050565b60008060208385031215611f0a57600080fd5b823567ffffffffffffffff811115611f2157600080fd5b611f2d85828601611c6d565b90969095509350505050565b60008060408385031215611f4c57600080fd5b611f5583611d3e565b915060208301358015158114611f6a57600080fd5b809150509250929050565b80356001600160801b0381168114611d5557600080fd5b60008060408385031215611f9f57600080fd5b611fa883611f75565b9150611d9860208401611f75565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ff457611ff4611fcc565b5060010190565b818103818111156104dd576104dd611fcc565b6020808252601c908201527f4e46544f7261636c653a206173736574206e6f74206578697374656400000000604082015260600190565b60005b83811015612060578181015183820152602001612048565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120a1816017850160208801612045565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120d2816028840160208801612045565b01602801949350505050565b60208152600082518060208401526120fd816040850160208701612045565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b80820281158282048414176104dd576104dd611fcc565b808201808211156104dd576104dd611fcc565b60008161216057612160611fcc565b506000190190565b634e487b7160e01b600052601260045260246000fd5b60008261218d5761218d612168565b500490565b81810360008312801583831316838312821617156121b2576121b2611fcc565b5092915050565b6000826121c8576121c8612168565b600160ff1b8214600019841416156121e2576121e2611fcc565b500590565b808201828112600083128015821682158216171561220757612207611fcc565b505092915050565b60006001600160ff1b018201611ff457611ff4611fcc565b6000600160ff1b820161216057612160611fcc56fe73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285daba2646970667358221220f4018ac3098be6ac05123f3d1a953dbfcba4bb7138c4c1bdd21ac8f9e0ca440064736f6c63430008110033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.