Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 5,339 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Set Multiple Pri... | 19058634 | 165 days ago | IN | 0 ETH | 0.00475491 | ||||
Set Multiple Pri... | 19058630 | 165 days ago | IN | 0 ETH | 0.00504046 | ||||
Set Multiple Pri... | 19054009 | 166 days ago | IN | 0 ETH | 0.00464435 | ||||
Set Multiple Pri... | 19051565 | 166 days ago | IN | 0 ETH | 0.00555276 | ||||
Set Multiple Pri... | 19051537 | 166 days ago | IN | 0 ETH | 0.00538473 | ||||
Set Multiple Pri... | 19044378 | 167 days ago | IN | 0 ETH | 0.01006091 | ||||
Set Multiple Pri... | 19044374 | 167 days ago | IN | 0 ETH | 0.00781638 | ||||
Set Multiple Pri... | 19044064 | 167 days ago | IN | 0 ETH | 0.00698416 | ||||
Set Multiple Pri... | 19017979 | 171 days ago | IN | 0 ETH | 0.01206436 | ||||
Set Multiple Pri... | 19015972 | 171 days ago | IN | 0 ETH | 0.01296749 | ||||
Set Multiple Pri... | 19015951 | 171 days ago | IN | 0 ETH | 0.01081398 | ||||
Set Multiple Pri... | 19015942 | 171 days ago | IN | 0 ETH | 0.01115235 | ||||
Set Multiple Pri... | 18966007 | 178 days ago | IN | 0 ETH | 0.00699478 | ||||
Set Multiple Pri... | 18951579 | 180 days ago | IN | 0 ETH | 0.00608305 | ||||
Set Multiple Pri... | 18951564 | 180 days ago | IN | 0 ETH | 0.00556426 | ||||
Set Multiple Pri... | 18944734 | 181 days ago | IN | 0 ETH | 0.00630961 | ||||
Set Multiple Pri... | 18944529 | 181 days ago | IN | 0 ETH | 0.00655623 | ||||
Set Multiple Pri... | 18944520 | 181 days ago | IN | 0 ETH | 0.00723911 | ||||
Set Multiple Pri... | 18937395 | 182 days ago | IN | 0 ETH | 0.00752263 | ||||
Set Multiple Pri... | 18937393 | 182 days ago | IN | 0 ETH | 0.0074009 | ||||
Set Multiple Pri... | 18930289 | 183 days ago | IN | 0 ETH | 0.01236491 | ||||
Set Multiple Pri... | 18930257 | 183 days ago | IN | 0 ETH | 0.0130784 | ||||
Set Multiple Pri... | 18923177 | 184 days ago | IN | 0 ETH | 0.00943681 | ||||
Set Multiple Pri... | 18923167 | 184 days ago | IN | 0 ETH | 0.0082108 | ||||
Set Multiple Pri... | 18923152 | 184 days ago | IN | 0 ETH | 0.00729715 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NFTFloorOracle
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; 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: agpl-3.0 pragma solidity 0.8.10; interface INFTFloorOracle { function getPrice(address token) external view returns (uint256 price); function getLastUpdateTime(address token) external view returns (uint256 timestamp); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; 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.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; 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: MIT pragma solidity 0.8.10; /* * @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.10; /** * @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.10; 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.10; /** * @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 pragma solidity 0.8.10; /** * @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 // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.10; /** * @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); } } } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "evmVersion": "london", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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
608060405234801561001057600080fd5b506126a2806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806391d14854116100ee578063c22dc72211610097578063d2b30e1111610071578063d2b30e1114610493578063d547741f146104a6578063df30e97c146104b9578063f078feb4146104cc57600080fd5b8063c22dc7221461045a578063cb82eb581461046d578063cf35bdd01461048057600080fd5b8063a53a566d116100c8578063a53a566d14610414578063acd980cb1461041c578063aea321c61461044757600080fd5b806391d14854146103c05780639ceaa93a146103f9578063a217fddf1461040c57600080fd5b806336568abe1161015b5780634a200fa5116101355780634a200fa5146103105780636e8c271b1461032357806379502c55146103505780637ee185c1146103ad57600080fd5b806336568abe146102c357806341976e09146102d657806347e63380146102e957600080fd5b806324f5e1651161018c57806324f5e165146102225780632e70936f1461026b5780632f2ff15d146102b057600080fd5b806301ffc9a7146101b357806304f4a374146101db578063248a9ca3146101f0575b600080fd5b6101c66101c1366004611fe6565b610523565b60405190151581526020015b60405180910390f35b6101ee6101e9366004612074565b6105bc565b005b6102146101fe3660046120e0565b6000908152600160208190526040909120015490565b6040519081526020016101d2565b610250610230366004612115565b600260208190526000918252604090912080546001820154919092015483565b604080519384526020840192909252908201526060016101d2565b610297610279366004612115565b60046020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff9091166020830152016101d2565b6101ee6102be366004612130565b61076e565b6101ee6102d1366004612130565b61079a565b6102146102e4366004612115565b610826565b6102147f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab81565b6101ee61031e366004612214565b61090b565b610214610331366004612115565b6001600160a01b03166000908152600260208190526040909120015490565b600754610384906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152016101d2565b6101ee6103bb366004612288565b610ad1565b6101c66103ce366004612130565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ee6104073660046122b2565b610b51565b610214600081565b600354610214565b61042f61042a3660046120e0565b610ba9565b6040516001600160a01b0390911681526020016101d2565b6101ee6104553660046122b2565b610bd3565b6101ee6104683660046122f4565b610c1b565b6101ee61047b366004612350565b610d1c565b61042f61048e3660046120e0565b610d32565b6101ee6104a13660046122b2565b610d42565b6101ee6104b4366004612130565b610d8a565b6101ee6104c73660046122b2565b610db1565b6105026104da366004612115565b60066020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845260ff90921660208401521515908201526060016101d2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806105b657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab6105e78133610e09565b3360008181526004602052604090205460ff1661064b5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f74206578697374656400000060448201526064015b60405180910390fd5b8483146106c05760405162461bcd60e51b815260206004820152602960248201527f4e46544f7261636c653a20546f6b656e7320616e64207072696365206c656e6760448201527f74682064696666657200000000000000000000000000000000000000000000006064820152608401610642565b604080518082019091526007546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000090910416602082015260005b86811015610764576107528289898481811061071f5761071f61237a565b90506020020160208101906107349190612115565b8888858181106107465761074661237a565b90506020020135610e89565b8061075c816123a6565b915050610701565b5050505050505050565b6000828152600160208190526040909120015461078b8133610e09565b6107958383610ff6565b505050565b6001600160a01b03811633146108185760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610642565b610822828261107d565b5050565b6001600160a01b0381166000908152600260205260408120600181015461088f5760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206173736574207072696365206e6f742072656164796044820152606401610642565b60075460018201546fffffffffffffffffffffffffffffffff909116906108b690436123c1565b11156109045760405162461bcd60e51b815260206004820152601e60248201527f4e46544f7261636c653a206173736574207072696365206578706972656400006044820152606401610642565b5492915050565b600054610100900460ff161580801561092b5750600054600160ff909116105b806109455750303b158015610945575060005460ff166001145b6109b75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610642565b6000805460ff1916600117905580156109da576000805461ff0019166101001790555b6001600160a01b038416610a305760405162461bcd60e51b815260206004820152601660248201527f416464726573732063616e6e6f74206265207a65726f000000000000000000006044820152606401610642565b610a3982611100565b610a4283611140565b610a4d600085611180565b610a777f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab85611180565b610a8561070861012c61118a565b8015610acb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000610add8133610e09565b6001600160a01b038316600090815260066020526040902054839060ff16610b475760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b610acb84846111f9565b6000610b5d8133610e09565b60005b82811015610acb57610b97848483818110610b7d57610b7d61237a565b9050602002016020810190610b929190612115565b611267565b80610ba1816123a6565b915050610b60565b60038181548110610bb957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610bdf8133610e09565b61079583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061110092505050565b6000610c278133610e09565b6001600160a01b038316600090815260066020526040902054839060ff16610c915760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b6001600160a01b03841660008181526006602052604090819020805486151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909116179055517f4b317cf398a9dfd22ccdb72a0260c39416ea62bb8b2d408fdaf25b7699fc090e90610d0e90861515815260200190565b60405180910390a250505050565b6000610d288133610e09565b610795838361118a565b60058181548110610bb957600080fd5b6000610d4e8133610e09565b61079583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061114092505050565b60008281526001602081905260409091200154610da78133610e09565b610795838361107d565b6000610dbd8133610e09565b60005b82811015610acb57610df7848483818110610ddd57610ddd61237a565b9050602002016020810190610df29190612115565b6114e2565b80610e01816123a6565b915050610dc0565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff1661082257610e47816001600160a01b0316601461162c565b610e5283602061162c565b604051602001610e63929190612404565b60408051601f198184030181529082905262461bcd60e51b825261064291600401612485565b6001600160a01b03821660008181526002602081815260408084208151606081018352815481526001820154818501529301548382015293835260069052919020805460ff16610f1b5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b805462010000900460ff1615610f735760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206e66742070726963652066656564207061757365646044820152606401610642565b610f7e82868561185c565b610fca5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20696e76616c696420707269636520646174610000006044820152606401610642565b600080610fd987848688611968565b915091508115610fed57610fed86826111f9565b50505050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166108225760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156108225760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b81518110156108225761112e8282815181106111215761112161237a565b6020026020010151611bad565b80611138816123a6565b915050611103565b60005b81518110156108225761116e8282815181106111615761116161237a565b6020026020010151611cf7565b80611178816123a6565b915050611143565b6108228282610ff6565b6fffffffffffffffffffffffffffffffff82811670010000000000000000000000000000000091831691820281176007556040805191825260208201929092527f7828697012f7b22837f218635b2cb288c74182475510db32a8ea3eb9b8a97ff9910160405180910390a15050565b6001600160a01b038216600081815260026020818152604092839020858155436001820181905542938201939093558351868152918201929092529092917fcd3c66863212a47104ec3bba3c6a10790d7e9d0af02f2c9ca55fe1646dc1c957910160405180910390a2505050565b6001600160a01b038116600090815260046020526040902054819060ff166112d15760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f7420657869737465640000006044820152606401610642565b6001600160a01b0382166000818152600460205260409020546003805461010090920460ff169291839081106113095761130961237a565b6000918252602090912001546001600160a01b03161461136b5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a20666565646572206d69736d617463686564000000006044820152606401610642565b600380546000919061137f906001906123c1565b8154811061138f5761138f61237a565b6000918252602090912001546001600160a01b0390811691508416811461141d578060038360ff16815481106113c7576113c761237a565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039485161790559183168152600490915260409020805461ff00191661010060ff8516021790555b600380548061142e5761142e6124b8565b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b03861682526004905260409020805461ffff191690556114a87f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab85610d8a565b6040516001600160a01b038516907fb0bc40f69e0e5f4bb32517529a6b4eb76c452372c18fe559934d27a4a8f88dce90600090a250505050565b6001600160a01b038116600090815260066020526040902054819060ff1661154c5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b6001600160a01b0382166000908152600660205260409020546005805461010090920460ff1691829081106115835761158361237a565b60009182526020808320909101805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0385168083526002808352604080852085815560018101869055909101849055600690925281832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000169055905190917f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc91a2505050565b6060600061163b8360026124ce565b6116469060026124ed565b67ffffffffffffffff81111561165e5761165e61215c565b6040519080825280601f01601f191660200182016040528015611688576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116bf576116bf61237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117225761172261237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061175e8460026124ce565b6117699060016124ed565b90505b6001811115611806577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106117aa576117aa61237a565b1a60f81b8282815181106117c0576117c061237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936117ff81612505565b905061176c565b5083156118555760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610642565b9392505050565b60008082116118d35760405162461bcd60e51b815260206004820152602660248201527f4e46544f7261636c653a2070726963652073686f756c64206265206d6f72652060448201527f7468616e203000000000000000000000000000000000000000000000000000006064820152608401610642565b8351602085015160008215806118e7575081155b156118f85760019350505050611855565b82851161191a578461190b8460646124ce565b6119159190612532565b611930565b826119268660646124ce565b6119309190612532565b905085602001516fffffffffffffffffffffffffffffffff16811061195b5760009350505050611855565b5060019695505050505050565b815133600090815260018086016020526040822084815543910181905590918291908061199d57600185935093505050611ba4565b600060038054806020026020016040519081016040528092919081815260200182805480156119f557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119d7575b505050505090506000815167ffffffffffffffff811115611a1857611a1861215c565b604051908082528060200260200182016040528015611a41578160200160208202803683370190505b5090506000805b8351811015611b435760008b6001016000868481518110611a6b57611a6b61237a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000816020015188611ad091906123c1565b905060008260200151118015611af957508d516fffffffffffffffffffffffffffffffff168111155b15611b2e578160000151858581518110611b1557611b1561237a565b602090810291909101015283611b2a816123a6565b9450505b50508080611b3b906123a6565b915050611a48565b506003811015611b5e57600084965096505050505050611ba4565b611b74826000611b6f6001856123c1565b611e65565b600182611b82600284612532565b81518110611b9257611b9261237a565b60200260200101519650965050505050505b94509492505050565b6001600160a01b038116600090815260066020526040902054819060ff1615611c185760405162461bcd60e51b815260206004820152601860248201527f4e46544f7261636c653a206173736574206578697374656400000000000000006044820152606401610642565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117909155600580548083018255928190527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0909201805473ffffffffffffffffffffffffffffffffffffffff191690931790925554611c9991906123c1565b6001600160a01b038316600081815260066020526040808220805460ff959095166101000261ff001990951694909417909355915190917f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d791a25050565b6001600160a01b038116600090815260046020526040902054819060ff1615611d625760405162461bcd60e51b815260206004820152601960248201527f4e46544f7261636c653a206665656465722065786973746564000000000000006044820152606401610642565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386161790559054611dc891906123c1565b6001600160a01b0383166000908152600460205260409020805460ff1960ff93909316610100029290921661ffff19909216919091176001179055611e2d7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab83611180565b6040516001600160a01b038316907f53813a21bbdd00f3df18b895e7321dea1615b185cccbe44f4a669c3f7a96dfa790600090a25050565b818180821415611e76575050505050565b6000856002611e858787612546565b611e8f919061259e565b611e9990876125cc565b81518110611ea957611ea961237a565b602002602001015190505b818313611fb8575b80868481518110611ecf57611ecf61237a565b60200260200101511015611eef5782611ee781612624565b935050611ebc565b858281518110611f0157611f0161237a565b6020026020010151811015611f225781611f1a81612656565b925050611eef565b818313611fb357858281518110611f3b57611f3b61237a565b6020026020010151868481518110611f5557611f5561237a565b6020026020010151878581518110611f6f57611f6f61237a565b60200260200101888581518110611f8857611f8861237a565b60209081029190910101919091525282611fa181612624565b9350508180611faf90612656565b9250505b611eb4565b81851215611fcb57611fcb868684611e65565b83831215611fde57611fde868486611e65565b505050505050565b600060208284031215611ff857600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461185557600080fd5b60008083601f84011261203a57600080fd5b50813567ffffffffffffffff81111561205257600080fd5b6020830191508360208260051b850101111561206d57600080fd5b9250929050565b6000806000806040858703121561208a57600080fd5b843567ffffffffffffffff808211156120a257600080fd5b6120ae88838901612028565b909650945060208701359150808211156120c757600080fd5b506120d487828801612028565b95989497509550505050565b6000602082840312156120f257600080fd5b5035919050565b80356001600160a01b038116811461211057600080fd5b919050565b60006020828403121561212757600080fd5b611855826120f9565b6000806040838503121561214357600080fd5b82359150612153602084016120f9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261218357600080fd5b8135602067ffffffffffffffff808311156121a0576121a061215c565b8260051b604051601f19603f830116810181811084821117156121c5576121c561215c565b6040529384528581018301938381019250878511156121e357600080fd5b83870191505b84821015612209576121fa826120f9565b835291830191908301906121e9565b979650505050505050565b60008060006060848603121561222957600080fd5b612232846120f9565b9250602084013567ffffffffffffffff8082111561224f57600080fd5b61225b87838801612172565b9350604086013591508082111561227157600080fd5b5061227e86828701612172565b9150509250925092565b6000806040838503121561229b57600080fd5b6122a4836120f9565b946020939093013593505050565b600080602083850312156122c557600080fd5b823567ffffffffffffffff8111156122dc57600080fd5b6122e885828601612028565b90969095509350505050565b6000806040838503121561230757600080fd5b612310836120f9565b91506020830135801515811461232557600080fd5b809150509250929050565b80356fffffffffffffffffffffffffffffffff8116811461211057600080fd5b6000806040838503121561236357600080fd5b61236c83612330565b915061215360208401612330565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156123ba576123ba612390565b5060010190565b6000828210156123d3576123d3612390565b500390565b60005b838110156123f35781810151838201526020016123db565b83811115610acb5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161243c8160178501602088016123d8565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516124798160288401602088016123d8565b01602801949350505050565b60208152600082518060208401526124a48160408501602087016123d8565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156124e8576124e8612390565b500290565b6000821982111561250057612500612390565b500190565b60008161251457612514612390565b506000190190565b634e487b7160e01b600052601260045260246000fd5b6000826125415761254161251c565b500490565b600080831283600160ff1b0183128115161561256457612564612390565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831381161561259857612598612390565b50500390565b6000826125ad576125ad61251c565b6000198314600160ff1b831416156125c7576125c7612390565b500590565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561260657612606612390565b82600160ff1b03841281161561261e5761261e612390565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156123ba576123ba612390565b6000600160ff1b8214156125145761251461239056fea2646970667358221220fbe2303d1ea70d86022eeb74b0d948a032277e1a5270422b678bd824dbd4fb8b64736f6c634300080a0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c806391d14854116100ee578063c22dc72211610097578063d2b30e1111610071578063d2b30e1114610493578063d547741f146104a6578063df30e97c146104b9578063f078feb4146104cc57600080fd5b8063c22dc7221461045a578063cb82eb581461046d578063cf35bdd01461048057600080fd5b8063a53a566d116100c8578063a53a566d14610414578063acd980cb1461041c578063aea321c61461044757600080fd5b806391d14854146103c05780639ceaa93a146103f9578063a217fddf1461040c57600080fd5b806336568abe1161015b5780634a200fa5116101355780634a200fa5146103105780636e8c271b1461032357806379502c55146103505780637ee185c1146103ad57600080fd5b806336568abe146102c357806341976e09146102d657806347e63380146102e957600080fd5b806324f5e1651161018c57806324f5e165146102225780632e70936f1461026b5780632f2ff15d146102b057600080fd5b806301ffc9a7146101b357806304f4a374146101db578063248a9ca3146101f0575b600080fd5b6101c66101c1366004611fe6565b610523565b60405190151581526020015b60405180910390f35b6101ee6101e9366004612074565b6105bc565b005b6102146101fe3660046120e0565b6000908152600160208190526040909120015490565b6040519081526020016101d2565b610250610230366004612115565b600260208190526000918252604090912080546001820154919092015483565b604080519384526020840192909252908201526060016101d2565b610297610279366004612115565b60046020526000908152604090205460ff8082169161010090041682565b60408051921515835260ff9091166020830152016101d2565b6101ee6102be366004612130565b61076e565b6101ee6102d1366004612130565b61079a565b6102146102e4366004612115565b610826565b6102147f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab81565b6101ee61031e366004612214565b61090b565b610214610331366004612115565b6001600160a01b03166000908152600260208190526040909120015490565b600754610384906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041682565b604080516fffffffffffffffffffffffffffffffff9384168152929091166020830152016101d2565b6101ee6103bb366004612288565b610ad1565b6101c66103ce366004612130565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101ee6104073660046122b2565b610b51565b610214600081565b600354610214565b61042f61042a3660046120e0565b610ba9565b6040516001600160a01b0390911681526020016101d2565b6101ee6104553660046122b2565b610bd3565b6101ee6104683660046122f4565b610c1b565b6101ee61047b366004612350565b610d1c565b61042f61048e3660046120e0565b610d32565b6101ee6104a13660046122b2565b610d42565b6101ee6104b4366004612130565b610d8a565b6101ee6104c73660046122b2565b610db1565b6105026104da366004612115565b60066020526000908152604090205460ff808216916101008104821691620100009091041683565b60408051931515845260ff90921660208401521515908201526060016101d2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806105b657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab6105e78133610e09565b3360008181526004602052604090205460ff1661064b5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f74206578697374656400000060448201526064015b60405180910390fd5b8483146106c05760405162461bcd60e51b815260206004820152602960248201527f4e46544f7261636c653a20546f6b656e7320616e64207072696365206c656e6760448201527f74682064696666657200000000000000000000000000000000000000000000006064820152608401610642565b604080518082019091526007546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000090910416602082015260005b86811015610764576107528289898481811061071f5761071f61237a565b90506020020160208101906107349190612115565b8888858181106107465761074661237a565b90506020020135610e89565b8061075c816123a6565b915050610701565b5050505050505050565b6000828152600160208190526040909120015461078b8133610e09565b6107958383610ff6565b505050565b6001600160a01b03811633146108185760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610642565b610822828261107d565b5050565b6001600160a01b0381166000908152600260205260408120600181015461088f5760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206173736574207072696365206e6f742072656164796044820152606401610642565b60075460018201546fffffffffffffffffffffffffffffffff909116906108b690436123c1565b11156109045760405162461bcd60e51b815260206004820152601e60248201527f4e46544f7261636c653a206173736574207072696365206578706972656400006044820152606401610642565b5492915050565b600054610100900460ff161580801561092b5750600054600160ff909116105b806109455750303b158015610945575060005460ff166001145b6109b75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610642565b6000805460ff1916600117905580156109da576000805461ff0019166101001790555b6001600160a01b038416610a305760405162461bcd60e51b815260206004820152601660248201527f416464726573732063616e6e6f74206265207a65726f000000000000000000006044820152606401610642565b610a3982611100565b610a4283611140565b610a4d600085611180565b610a777f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab85611180565b610a8561070861012c61118a565b8015610acb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6000610add8133610e09565b6001600160a01b038316600090815260066020526040902054839060ff16610b475760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b610acb84846111f9565b6000610b5d8133610e09565b60005b82811015610acb57610b97848483818110610b7d57610b7d61237a565b9050602002016020810190610b929190612115565b611267565b80610ba1816123a6565b915050610b60565b60038181548110610bb957600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610bdf8133610e09565b61079583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061110092505050565b6000610c278133610e09565b6001600160a01b038316600090815260066020526040902054839060ff16610c915760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b6001600160a01b03841660008181526006602052604090819020805486151562010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff909116179055517f4b317cf398a9dfd22ccdb72a0260c39416ea62bb8b2d408fdaf25b7699fc090e90610d0e90861515815260200190565b60405180910390a250505050565b6000610d288133610e09565b610795838361118a565b60058181548110610bb957600080fd5b6000610d4e8133610e09565b61079583838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061114092505050565b60008281526001602081905260409091200154610da78133610e09565b610795838361107d565b6000610dbd8133610e09565b60005b82811015610acb57610df7848483818110610ddd57610ddd61237a565b9050602002016020810190610df29190612115565b6114e2565b80610e01816123a6565b915050610dc0565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff1661082257610e47816001600160a01b0316601461162c565b610e5283602061162c565b604051602001610e63929190612404565b60408051601f198184030181529082905262461bcd60e51b825261064291600401612485565b6001600160a01b03821660008181526002602081815260408084208151606081018352815481526001820154818501529301548382015293835260069052919020805460ff16610f1b5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b805462010000900460ff1615610f735760405162461bcd60e51b815260206004820181905260248201527f4e46544f7261636c653a206e66742070726963652066656564207061757365646044820152606401610642565b610f7e82868561185c565b610fca5760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20696e76616c696420707269636520646174610000006044820152606401610642565b600080610fd987848688611968565b915091508115610fed57610fed86826111f9565b50505050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166108225760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16156108225760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60005b81518110156108225761112e8282815181106111215761112161237a565b6020026020010151611bad565b80611138816123a6565b915050611103565b60005b81518110156108225761116e8282815181106111615761116161237a565b6020026020010151611cf7565b80611178816123a6565b915050611143565b6108228282610ff6565b6fffffffffffffffffffffffffffffffff82811670010000000000000000000000000000000091831691820281176007556040805191825260208201929092527f7828697012f7b22837f218635b2cb288c74182475510db32a8ea3eb9b8a97ff9910160405180910390a15050565b6001600160a01b038216600081815260026020818152604092839020858155436001820181905542938201939093558351868152918201929092529092917fcd3c66863212a47104ec3bba3c6a10790d7e9d0af02f2c9ca55fe1646dc1c957910160405180910390a2505050565b6001600160a01b038116600090815260046020526040902054819060ff166112d15760405162461bcd60e51b815260206004820152601d60248201527f4e46544f7261636c653a20666565646572206e6f7420657869737465640000006044820152606401610642565b6001600160a01b0382166000818152600460205260409020546003805461010090920460ff169291839081106113095761130961237a565b6000918252602090912001546001600160a01b03161461136b5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a20666565646572206d69736d617463686564000000006044820152606401610642565b600380546000919061137f906001906123c1565b8154811061138f5761138f61237a565b6000918252602090912001546001600160a01b0390811691508416811461141d578060038360ff16815481106113c7576113c761237a565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039485161790559183168152600490915260409020805461ff00191661010060ff8516021790555b600380548061142e5761142e6124b8565b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b03861682526004905260409020805461ffff191690556114a87f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab85610d8a565b6040516001600160a01b038516907fb0bc40f69e0e5f4bb32517529a6b4eb76c452372c18fe559934d27a4a8f88dce90600090a250505050565b6001600160a01b038116600090815260066020526040902054819060ff1661154c5760405162461bcd60e51b815260206004820152601c60248201527f4e46544f7261636c653a206173736574206e6f742065786973746564000000006044820152606401610642565b6001600160a01b0382166000908152600660205260409020546005805461010090920460ff1691829081106115835761158361237a565b60009182526020808320909101805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0385168083526002808352604080852085815560018101869055909101849055600690925281832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000169055905190917f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc91a2505050565b6060600061163b8360026124ce565b6116469060026124ed565b67ffffffffffffffff81111561165e5761165e61215c565b6040519080825280601f01601f191660200182016040528015611688576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106116bf576116bf61237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106117225761172261237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600061175e8460026124ce565b6117699060016124ed565b90505b6001811115611806577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106117aa576117aa61237a565b1a60f81b8282815181106117c0576117c061237a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936117ff81612505565b905061176c565b5083156118555760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610642565b9392505050565b60008082116118d35760405162461bcd60e51b815260206004820152602660248201527f4e46544f7261636c653a2070726963652073686f756c64206265206d6f72652060448201527f7468616e203000000000000000000000000000000000000000000000000000006064820152608401610642565b8351602085015160008215806118e7575081155b156118f85760019350505050611855565b82851161191a578461190b8460646124ce565b6119159190612532565b611930565b826119268660646124ce565b6119309190612532565b905085602001516fffffffffffffffffffffffffffffffff16811061195b5760009350505050611855565b5060019695505050505050565b815133600090815260018086016020526040822084815543910181905590918291908061199d57600185935093505050611ba4565b600060038054806020026020016040519081016040528092919081815260200182805480156119f557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119d7575b505050505090506000815167ffffffffffffffff811115611a1857611a1861215c565b604051908082528060200260200182016040528015611a41578160200160208202803683370190505b5090506000805b8351811015611b435760008b6001016000868481518110611a6b57611a6b61237a565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000816020015188611ad091906123c1565b905060008260200151118015611af957508d516fffffffffffffffffffffffffffffffff168111155b15611b2e578160000151858581518110611b1557611b1561237a565b602090810291909101015283611b2a816123a6565b9450505b50508080611b3b906123a6565b915050611a48565b506003811015611b5e57600084965096505050505050611ba4565b611b74826000611b6f6001856123c1565b611e65565b600182611b82600284612532565b81518110611b9257611b9261237a565b60200260200101519650965050505050505b94509492505050565b6001600160a01b038116600090815260066020526040902054819060ff1615611c185760405162461bcd60e51b815260206004820152601860248201527f4e46544f7261636c653a206173736574206578697374656400000000000000006044820152606401610642565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117909155600580548083018255928190527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0909201805473ffffffffffffffffffffffffffffffffffffffff191690931790925554611c9991906123c1565b6001600160a01b038316600081815260066020526040808220805460ff959095166101000261ff001990951694909417909355915190917f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d791a25050565b6001600160a01b038116600090815260046020526040902054819060ff1615611d625760405162461bcd60e51b815260206004820152601960248201527f4e46544f7261636c653a206665656465722065786973746564000000000000006044820152606401610642565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386161790559054611dc891906123c1565b6001600160a01b0383166000908152600460205260409020805460ff1960ff93909316610100029290921661ffff19909216919091176001179055611e2d7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab83611180565b6040516001600160a01b038316907f53813a21bbdd00f3df18b895e7321dea1615b185cccbe44f4a669c3f7a96dfa790600090a25050565b818180821415611e76575050505050565b6000856002611e858787612546565b611e8f919061259e565b611e9990876125cc565b81518110611ea957611ea961237a565b602002602001015190505b818313611fb8575b80868481518110611ecf57611ecf61237a565b60200260200101511015611eef5782611ee781612624565b935050611ebc565b858281518110611f0157611f0161237a565b6020026020010151811015611f225781611f1a81612656565b925050611eef565b818313611fb357858281518110611f3b57611f3b61237a565b6020026020010151868481518110611f5557611f5561237a565b6020026020010151878581518110611f6f57611f6f61237a565b60200260200101888581518110611f8857611f8861237a565b60209081029190910101919091525282611fa181612624565b9350508180611faf90612656565b9250505b611eb4565b81851215611fcb57611fcb868684611e65565b83831215611fde57611fde868486611e65565b505050505050565b600060208284031215611ff857600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461185557600080fd5b60008083601f84011261203a57600080fd5b50813567ffffffffffffffff81111561205257600080fd5b6020830191508360208260051b850101111561206d57600080fd5b9250929050565b6000806000806040858703121561208a57600080fd5b843567ffffffffffffffff808211156120a257600080fd5b6120ae88838901612028565b909650945060208701359150808211156120c757600080fd5b506120d487828801612028565b95989497509550505050565b6000602082840312156120f257600080fd5b5035919050565b80356001600160a01b038116811461211057600080fd5b919050565b60006020828403121561212757600080fd5b611855826120f9565b6000806040838503121561214357600080fd5b82359150612153602084016120f9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261218357600080fd5b8135602067ffffffffffffffff808311156121a0576121a061215c565b8260051b604051601f19603f830116810181811084821117156121c5576121c561215c565b6040529384528581018301938381019250878511156121e357600080fd5b83870191505b84821015612209576121fa826120f9565b835291830191908301906121e9565b979650505050505050565b60008060006060848603121561222957600080fd5b612232846120f9565b9250602084013567ffffffffffffffff8082111561224f57600080fd5b61225b87838801612172565b9350604086013591508082111561227157600080fd5b5061227e86828701612172565b9150509250925092565b6000806040838503121561229b57600080fd5b6122a4836120f9565b946020939093013593505050565b600080602083850312156122c557600080fd5b823567ffffffffffffffff8111156122dc57600080fd5b6122e885828601612028565b90969095509350505050565b6000806040838503121561230757600080fd5b612310836120f9565b91506020830135801515811461232557600080fd5b809150509250929050565b80356fffffffffffffffffffffffffffffffff8116811461211057600080fd5b6000806040838503121561236357600080fd5b61236c83612330565b915061215360208401612330565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156123ba576123ba612390565b5060010190565b6000828210156123d3576123d3612390565b500390565b60005b838110156123f35781810151838201526020016123db565b83811115610acb5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161243c8160178501602088016123d8565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516124798160288401602088016123d8565b01602801949350505050565b60208152600082518060208401526124a48160408501602087016123d8565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156124e8576124e8612390565b500290565b6000821982111561250057612500612390565b500190565b60008161251457612514612390565b506000190190565b634e487b7160e01b600052601260045260246000fd5b6000826125415761254161251c565b500490565b600080831283600160ff1b0183128115161561256457612564612390565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831381161561259857612598612390565b50500390565b6000826125ad576125ad61251c565b6000198314600160ff1b831416156125c7576125c7612390565b500590565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561260657612606612390565b82600160ff1b03841281161561261e5761261e612390565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156123ba576123ba612390565b6000600160ff1b8214156125145761251461239056fea2646970667358221220fbe2303d1ea70d86022eeb74b0d948a032277e1a5270422b678bd824dbd4fb8b64736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.