Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 12870448 | 1308 days ago | IN | 0 ETH | 0.00311193 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
HidingVaultNFT
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-or-later pragma solidity 0.8.6; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "./HidingVault.sol"; /** * @title KeeperDAO's HidingVault Ownership Tracker Token * @author KeeperDAO * @dev This contract tokenises the ownership of the hiding vaults. */ contract HidingVaultNFT is Initializable, OwnableUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable, UUPSUpgradeable { using AddressUpgradeable for address; mapping (bytes4=>address) public implementations; /** * @dev Initializes the contract by setting up the `name` and `symbol` * of this NFT contract and setup the owner of this contract. */ function initialize() initializer public { __HidingVaultNFT_init(); } function __HidingVaultNFT_init() initializer internal { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained("HidingVault", "HV"); __ERC721Enumerable_init_unchained(); __UUPSUpgradeable_init_unchained(); __Ownable_init_unchained(); } /** * @notice Sets up a hiding vault. * * @param _salt allows a user to customise the hiding vault address */ function mintHidingVault(bytes32 _salt) external payable returns (address hidingVault) { if (_salt != 0x0000000000000000000000000000000000000000000000000000000000000000) { _salt = keccak256(abi.encodePacked(_salt, msg.sender)); hidingVault = address(new HidingVault{salt: _salt}()); } else { hidingVault = address(new HidingVault()); } _safeMint(msg.sender, uint256(uint160(hidingVault))); } /** * @notice Delegates the given function selectors to the implementation. * * @dev providing the same function selctor more than once would update the * implementation address. * * @param _implementation address of the implementation. * @param _fnSelectors list of function selectors that should be delegated to the * given implementation. */ function delegateSelectors(address _implementation, bytes4[] memory _fnSelectors) external onlyOwner { for (uint i; i < _fnSelectors.length; i++) { implementations[_fnSelectors[i]] = _implementation; } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { super._beforeTokenTransfer(from, to, tokenId); } function _authorizeUpgrade(address) internal override onlyOwner {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal initializer { __ERC1967Upgrade_init_unchained(); } function __ERC1967Upgrade_init_unchained() internal initializer { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure(address newImplementation, bytes memory data, bool forceCall) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; _functionDelegateCall( newImplementation, abi.encodeWithSignature( "upgradeTo(address)", oldImplementation ) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _setImplementation(newImplementation); emit Upgraded(newImplementation); } } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require( AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract" ); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /* * @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) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity ^0.8.0; /** * @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 a proxied contract can't have 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. * * 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. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev Base contract for building openzeppelin-upgrades compatible implementations for the {ERC1967Proxy}. It includes * publicly available upgrade functions that are called by the plugin and by the secure upgrade mechanism to verify * continuation of the upgradability. * * The {_authorizeUpgrade} function MUST be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal initializer { __ERC1967Upgrade_init_unchained(); __UUPSUpgradeable_init_unchained(); } function __UUPSUpgradeable_init_unchained() internal initializer { } function upgradeTo(address newImplementation) external virtual { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, bytes(""), false); } function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } function _authorizeUpgrade(address newImplementation) internal virtual; uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } uint256[44] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721Enumerable_init_unchained(); } function __ERC721Enumerable_init_unchained() internal initializer { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } uint256[46] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-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; import "../proxy/utils/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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 Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT 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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import "./LibHidingVault.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title KeeperDAO's HidingVault * @author KeeperDAO * @dev This contract encapsulates a DeFi position, this contract * and is deployed for each user. A user can deploy multiple Hiding Vaults * if he/she wants to isolate their compound positions from each other. */ contract HidingVault { using SafeERC20 for IERC20; constructor() { LibHidingVault.state().nft = NFTLike(msg.sender); } receive () external payable {} /** * @notice allows the owner of the contract to recover non-blacklisted tokens. */ function recoverTokens(address payable _to, address _token, uint256 _amount) external { require(_to != address(0), "HidingVault: _to cannot be 0x0"); require( !LibHidingVault.state().recoverableTokensBlacklist[_token], "HidingVault: token is not recoverable" ); require( LibHidingVault.state().nft.ownerOf(uint256(uint160(address(this)))) == msg.sender, "HidingVault: caller is not the owner" ); if (_token == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) { (bool success,) = _to.call{ value: _amount }(""); require(success, "Transfer Failed"); } else { IERC20(_token).safeTransfer(_to, _amount); } } /** * @notice find implementation for function that is called and execute the * function if an implementation is found and return any value. */ fallback() external payable { address implementation = LibHidingVault.state().nft.implementations(msg.sig); require(implementation != address(0), "HidingVault: Function does not exist"); assembly { calldatacopy(0, 0, calldatasize()) let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; /** * @title HidingVault's state management library * @author KeeperDAO * @dev Library that manages the state of the HidingVault */ library LibHidingVault { // HIDING_VAULT_STORAGE_POSITION = keccak256("hiding-vault.keeperdao.storage") bytes32 constant HIDING_VAULT_STORAGE_POSITION = 0x9b85f6ce841a6faee042a2e67df9613579f746ca80e5eb1163b287041381d23c; struct State { NFTLike nft; mapping(address => bool) recoverableTokensBlacklist; } function state() internal pure returns (State storage s) { bytes32 position = HIDING_VAULT_STORAGE_POSITION; assembly { s.slot := position } } } interface NFTLike { function ownerOf(uint256 _tokenID) view external returns (address); function implementations(bytes4 _sig) view external returns (address); }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"bytes4[]","name":"_fnSelectors","type":"bytes4[]"}],"name":"delegateSelectors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"implementations","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"mintHidingVault","outputs":[{"internalType":"address","name":"hidingVault","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061312c806100206000396000f3fe608060405260043610620001845760003560e01c806370a0823111620000e2578063afe668161162000095578063e91db8e5116200006c578063e91db8e51462000478578063e985e9c514620004b3578063f2fde38b1462000500578063f7b87c43146200052557600080fd5b8063afe668161462000417578063b88d4fde146200042e578063c87b56dd146200045357600080fd5b806370a082311462000365578063715018a6146200038a5780638129fc1c14620003a25780638da5cb5b14620003ba57806395d89b4114620003da578063a22cb46514620003f257600080fd5b80632f745c59116200013b5780632f745c5914620002955780633659cfe614620002ba57806342842e0e14620002df5780634f1ef28614620003045780634f6ccce7146200031b5780636352211e146200034057600080fd5b806301ffc9a7146200018957806306fdde0314620001c3578063081812fc14620001ea578063095ea7b3146200022857806318160ddd146200024f57806323b872dd1462000270575b600080fd5b3480156200019657600080fd5b50620001ae620001a836600462002485565b6200054a565b60405190151581526020015b60405180910390f35b348015620001d057600080fd5b50620001db6200055d565b604051620001ba919062002583565b348015620001f757600080fd5b506200020f620002093660046200246b565b620005f7565b6040516001600160a01b039091168152602001620001ba565b3480156200023557600080fd5b506200024d620002473660046200243e565b62000692565b005b3480156200025c57600080fd5b5060cb545b604051908152602001620001ba565b3480156200027d57600080fd5b506200024d6200028f3660046200221e565b620007b3565b348015620002a257600080fd5b5062000261620002b43660046200243e565b620007eb565b348015620002c757600080fd5b506200024d620002d9366004620021c8565b62000885565b348015620002ec57600080fd5b506200024d620002fe3660046200221e565b620008b0565b6200024d62000315366004620023ea565b620008cd565b3480156200032857600080fd5b50620002616200033a3660046200246b565b620008ea565b3480156200034d57600080fd5b506200020f6200035f3660046200246b565b62000983565b3480156200037257600080fd5b506200026162000384366004620021c8565b620009fc565b3480156200039757600080fd5b506200024d62000a85565b348015620003af57600080fd5b506200024d62000afc565b348015620003c757600080fd5b506033546001600160a01b03166200020f565b348015620003e757600080fd5b50620001db62000b77565b348015620003ff57600080fd5b506200024d62000411366004620023aa565b62000b88565b6200020f620004283660046200246b565b62000c4f565b3480156200043b57600080fd5b506200024d6200044d3660046200225f565b62000d21565b3480156200046057600080fd5b50620001db620004723660046200246b565b62000d60565b3480156200048557600080fd5b506200020f6200049736600462002485565b61015f602052600090815260409020546001600160a01b031681565b348015620004c057600080fd5b50620001ae620004d2366004620021e6565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b3480156200050d57600080fd5b506200024d6200051f366004620021c8565b62000e51565b3480156200053257600080fd5b506200024d62000544366004620022cf565b62000f41565b6000620005578262000fed565b92915050565b6060609780546200056e906200276d565b80601f01602080910402602001604051908101604052809291908181526020018280546200059c906200276d565b8015620005ed5780601f10620005c157610100808354040283529160200191620005ed565b820191906000526020600020905b815481529060010190602001808311620005cf57829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316620006765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b60006200069f8262000983565b9050806001600160a01b0316836001600160a01b031614156200070f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016200066d565b336001600160a01b03821614806200072e57506200072e8133620004d2565b620007a25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016200066d565b620007ae838362001015565b505050565b620007bf338262001085565b620007de5760405162461bcd60e51b81526004016200066d906200266d565b620007ae83838362001184565b6000620007f883620009fc565b82106200085c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016200066d565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b62000890816200133d565b620008ad816040518060200160405280600081525060006200136a565b50565b620007ae8383836040518060200160405280600081525062000d21565b620008d8826200133d565b620008e6828260016200136a565b5050565b6000620008f660cb5490565b82106200095b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016200066d565b60cb828154811062000971576200097162002821565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b031680620005575760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016200066d565b60006001600160a01b03821662000a695760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016200066d565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b0316331462000ab25760405162461bcd60e51b81526004016200066d9062002638565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff168062000b16575060005460ff16155b62000b355760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562000b58576000805461ffff19166101011790555b62000b6262001535565b8015620008ad576000805461ff001916905550565b6060609880546200056e906200276d565b6001600160a01b03821633141562000be35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016200066d565b336000818152609c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000811562000cd857813360405160200162000c8792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b6040516020818303038152906040528051906020012091508160405162000cae9062002085565b8190604051809103906000f590508015801562000ccf573d6000803e3d6000fd5b50905062000d07565b60405162000ce69062002085565b604051809103906000f08015801562000d03573d6000803e3d6000fd5b5090505b62000d1c33826001600160a01b03166200160c565b919050565b62000d2d338362001085565b62000d4c5760405162461bcd60e51b81526004016200066d906200266d565b62000d5a8484848462001628565b50505050565b6000818152609960205260409020546060906001600160a01b031662000de15760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016200066d565b600062000df960408051602081019091526000815290565b9050600081511162000e1b576040518060200160405280600081525062000e4a565b8062000e278462001662565b60405160200162000e3a92919062002511565b6040516020818303038152906040525b9392505050565b6033546001600160a01b0316331462000e7e5760405162461bcd60e51b81526004016200066d9062002638565b6001600160a01b03811662000ee55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200066d565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b0316331462000f6e5760405162461bcd60e51b81526004016200066d9062002638565b60005b8151811015620007ae578261015f600084848151811062000f965762000f9662002821565b6020908102919091018101516001600160e01b031916825281019190915260400160002080546001600160a01b0319166001600160a01b03929092169190911790558062000fe481620027aa565b91505062000f71565b60006001600160e01b0319821663780e9d6360e01b1480620005575750620005578262001778565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906200104c8262000983565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b0316620011005760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016200066d565b60006200110d8362000983565b9050806001600160a01b0316846001600160a01b031614806200114b5750836001600160a01b03166200114084620005f7565b6001600160a01b0316145b806200117c57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316620011998262000983565b6001600160a01b031614620012035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016200066d565b6001600160a01b038216620012675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016200066d565b62001274838383620017cb565b6200128160008262001015565b6001600160a01b0383166000908152609a60205260408120805460019290620012ac90849062002724565b90915550506001600160a01b0382166000908152609a60205260408120805460019290620012dc908490620026f2565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6033546001600160a01b03163314620008ad5760405162461bcd60e51b81526004016200066d9062002638565b60006200139e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050620013ab84620017d8565b600083511180620013b95750815b15620013cd57620013cb84846200187f565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166200152e57805460ff191660011781556040516001600160a01b03831660248201526200144f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b1790526200187f565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614620014ee5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016200066d565b620014f985620017d8565b6040516001600160a01b038616907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25b5050505050565b600054610100900460ff16806200154f575060005460ff16155b6200156e5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001591576000805461ffff19166101011790555b6200159b62001973565b620015a562001973565b620015ee6040518060400160405280600b81526020016a121a591a5b99d5985d5b1d60aa1b81525060405180604001604052806002815260200161242b60f11b815250620019e3565b620015f862001973565b6200160262001973565b62000b6262001a82565b620008e682826040518060200160405280600081525062001b36565b6200163584848462001184565b620016438484848462001b70565b62000d5a5760405162461bcd60e51b81526004016200066d9062002598565b606081620016875750506040805180820190915260018152600360fc1b602082015290565b8160005b8115620016b757806200169e81620027aa565b9150620016af9050600a836200270d565b91506200168b565b60008167ffffffffffffffff811115620016d557620016d562002837565b6040519080825280601f01601f19166020018201604052801562001700576020820181803683370190505b5090505b84156200117c576200171860018362002724565b915062001727600a86620027c8565b62001734906030620026f2565b60f81b8183815181106200174c576200174c62002821565b60200101906001600160f81b031916908160001a90535062001770600a866200270d565b945062001704565b60006001600160e01b031982166380ac58cd60e01b1480620017aa57506001600160e01b03198216635b5e139f60e01b145b806200055757506301ffc9a760e01b6001600160e01b031983161462000557565b620007ae83838362001c8b565b803b6200183e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b620018e05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200066d565b600080846001600160a01b031684604051620018fd9190620024f3565b600060405180830381855af49150503d80600081146200193a576040519150601f19603f3d011682016040523d82523d6000602084013e6200193f565b606091505b50915091506200196a8282604051806060016040528060278152602001620030d06027913962001d4f565b95945050505050565b600054610100900460ff16806200198d575060005460ff16155b620019ac5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562000b62576000805461ffff19166101011790558015620008ad576000805461ff001916905550565b600054610100900460ff1680620019fd575060005460ff16155b62001a1c5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001a3f576000805461ffff19166101011790555b825162001a5490609790602086019062002093565b50815162001a6a90609890602085019062002093565b508015620007ae576000805461ff0019169055505050565b600054610100900460ff168062001a9c575060005460ff16155b62001abb5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001ade576000805461ffff19166101011790555b603380546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015620008ad576000805461ff001916905550565b62001b42838362001d8d565b62001b51600084848462001b70565b620007ae5760405162461bcd60e51b81526004016200066d9062002598565b60006001600160a01b0384163b1562001c8057604051630a85bd0160e11b81526001600160a01b0385169063150b7a029062001bb790339089908890889060040162002544565b602060405180830381600087803b15801562001bd257600080fd5b505af192505050801562001c05575060408051601f3d908101601f1916820190925262001c0291810190620024a5565b60015b62001c65573d80801562001c36576040519150601f19603f3d011682016040523d82523d6000602084013e62001c3b565b606091505b50805162001c5d5760405162461bcd60e51b81526004016200066d9062002598565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506200117c565b506001949350505050565b6001600160a01b03831662001ce95762001ce38160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b62001d0f565b816001600160a01b0316836001600160a01b03161462001d0f5762001d0f838262001ee3565b6001600160a01b03821662001d2957620007ae8162001f85565b826001600160a01b0316826001600160a01b031614620007ae57620007ae82826200203f565b6060831562001d6057508162000e4a565b82511562001d715782518084602001fd5b8160405162461bcd60e51b81526004016200066d919062002583565b6001600160a01b03821662001de55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016200066d565b6000818152609960205260409020546001600160a01b03161562001e4c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200066d565b62001e5a60008383620017cb565b6001600160a01b0382166000908152609a6020526040812080546001929062001e85908490620026f2565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600162001ef284620009fc565b62001efe919062002724565b600083815260ca602052604090205490915080821462001f52576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb5460009062001f999060019062002724565b600083815260cc602052604081205460cb805493945090928490811062001fc45762001fc462002821565b906000526020600020015490508060cb838154811062001fe85762001fe862002821565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb8054806200202357620020236200280b565b6001900381819060005260206000200160009055905550505050565b60006200204c83620009fc565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b61086b806200286583390190565b828054620020a1906200276d565b90600052602060002090601f016020900481019282620020c5576000855562002110565b82601f10620020e057805160ff191683800117855562002110565b8280016001018555821562002110579182015b8281111562002110578251825591602001919060010190620020f3565b506200211e92915062002122565b5090565b5b808211156200211e576000815560010162002123565b80356001600160a01b038116811462000d1c57600080fd5b600082601f8301126200216357600080fd5b813567ffffffffffffffff81111562002180576200218062002837565b62002195601f8201601f1916602001620026be565b818152846020838601011115620021ab57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215620021db57600080fd5b62000e4a8262002139565b60008060408385031215620021fa57600080fd5b620022058362002139565b9150620022156020840162002139565b90509250929050565b6000806000606084860312156200223457600080fd5b6200223f8462002139565b92506200224f6020850162002139565b9150604084013590509250925092565b600080600080608085870312156200227657600080fd5b620022818562002139565b9350620022916020860162002139565b925060408501359150606085013567ffffffffffffffff811115620022b557600080fd5b620022c38782880162002151565b91505092959194509250565b60008060408385031215620022e357600080fd5b620022ee8362002139565b915060208084013567ffffffffffffffff808211156200230d57600080fd5b818601915086601f8301126200232257600080fd5b81358181111562002337576200233762002837565b8060051b91506200234a848301620026be565b8181528481019084860184860187018b10156200236657600080fd5b600095505b8386101562002399578035945062002383856200284d565b848352600195909501949186019186016200236b565b508096505050505050509250929050565b60008060408385031215620023be57600080fd5b620023c98362002139565b915060208301358015158114620023df57600080fd5b809150509250929050565b60008060408385031215620023fe57600080fd5b620024098362002139565b9150602083013567ffffffffffffffff8111156200242657600080fd5b620024348582860162002151565b9150509250929050565b600080604083850312156200245257600080fd5b6200245d8362002139565b946020939093013593505050565b6000602082840312156200247e57600080fd5b5035919050565b6000602082840312156200249857600080fd5b813562000e4a816200284d565b600060208284031215620024b857600080fd5b815162000e4a816200284d565b60008151808452620024df8160208601602086016200273e565b601f01601f19169290920160200192915050565b60008251620025078184602087016200273e565b9190910192915050565b60008351620025258184602088016200273e565b8351908301906200253b8183602088016200273e565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906200257990830184620024c5565b9695505050505050565b60208152600062000e4a6020830184620024c5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715620026ea57620026ea62002837565b604052919050565b60008219821115620027085762002708620027df565b500190565b6000826200271f576200271f620027f5565b500490565b600082821015620027395762002739620027df565b500390565b60005b838110156200275b57818101518382015260200162002741565b8381111562000d5a5750506000910152565b600181811c908216806200278257607f821691505b60208210811415620027a457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620027c157620027c1620027df565b5060010190565b600082620027da57620027da620027f5565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114620008ad57600080fdfe608060405234801561001057600080fd5b503361002461004760201b6101671760201c565b80546001600160a01b0319166001600160a01b039290921691909117905561006b565b7f9b85f6ce841a6faee042a2e67df9613579f746ca80e5eb1163b287041381d23c90565b6107f18061007a6000396000f3fe6080604052600436106100225760003560e01c80635f3e849f1461014557610029565b3661002957005b6000610033610167565b5460405163e91db8e560e01b81526000356001600160e01b03191660048201526001600160a01b039091169063e91db8e59060240160206040518083038186803b15801561008057600080fd5b505afa158015610094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100b891906106a8565b90506001600160a01b0381166101215760405162461bcd60e51b8152602060048201526024808201527f486964696e675661756c743a2046756e6374696f6e20646f6573206e6f7420656044820152631e1a5cdd60e21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610140573d6000f35b3d6000fd5b34801561015157600080fd5b506101656101603660046106c5565b61018b565b005b7f9b85f6ce841a6faee042a2e67df9613579f746ca80e5eb1163b287041381d23c90565b6001600160a01b0383166101e15760405162461bcd60e51b815260206004820152601e60248201527f486964696e675661756c743a205f746f2063616e6e6f742062652030783000006044820152606401610118565b6101e9610167565b6001600160a01b0383166000908152600191909101602052604090205460ff16156102645760405162461bcd60e51b815260206004820152602560248201527f486964696e675661756c743a20746f6b656e206973206e6f74207265636f76656044820152647261626c6560d81b6064820152608401610118565b3361026d610167565b546040516331a9108f60e11b81523060048201526001600160a01b0390911690636352211e9060240160206040518083038186803b1580156102ae57600080fd5b505afa1580156102c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e691906106a8565b6001600160a01b0316146103485760405162461bcd60e51b8152602060048201526024808201527f486964696e675661756c743a2063616c6c6572206973206e6f7420746865206f6044820152633bb732b960e11b6064820152608401610118565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161415610408576000836001600160a01b03168260405160006040518083038185875af1925050503d80600081146103ba576040519150601f19603f3d011682016040523d82523d6000602084013e6103bf565b606091505b50509050806104025760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b6044820152606401610118565b50505050565b61041c6001600160a01b0383168483610421565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261041c928692916000916104b191851690849061052e565b80519091501561041c57808060200190518101906104cf9190610706565b61041c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610118565b606061053d8484600085610547565b90505b9392505050565b6060824710156105a85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610118565b843b6105f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610118565b600080866001600160a01b031685876040516106129190610728565b60006040518083038185875af1925050503d806000811461064f576040519150601f19603f3d011682016040523d82523d6000602084013e610654565b606091505b509150915061066482828661066f565b979650505050505050565b6060831561067e575081610540565b82511561068e5782518084602001fd5b8160405162461bcd60e51b81526004016101189190610744565b6000602082840312156106ba57600080fd5b8151610540816107a3565b6000806000606084860312156106da57600080fd5b83356106e5816107a3565b925060208401356106f5816107a3565b929592945050506040919091013590565b60006020828403121561071857600080fd5b8151801515811461054057600080fd5b6000825161073a818460208701610777565b9190910192915050565b6020815260008251806020840152610763816040850160208701610777565b601f01601f19169190910160400192915050565b60005b8381101561079257818101518382015260200161077a565b838111156104025750506000910152565b6001600160a01b03811681146107b857600080fd5b5056fea26469706673582212200ac6230898112da6752a352f49e5f7d372906ec4b8d0dedeee6c92cf19f9a34c64736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220937c85b728ebace2e6b7be8505b289ed75e52e41e85ec487dbf0b0467da0a17164736f6c63430008060033
Deployed Bytecode
0x608060405260043610620001845760003560e01c806370a0823111620000e2578063afe668161162000095578063e91db8e5116200006c578063e91db8e51462000478578063e985e9c514620004b3578063f2fde38b1462000500578063f7b87c43146200052557600080fd5b8063afe668161462000417578063b88d4fde146200042e578063c87b56dd146200045357600080fd5b806370a082311462000365578063715018a6146200038a5780638129fc1c14620003a25780638da5cb5b14620003ba57806395d89b4114620003da578063a22cb46514620003f257600080fd5b80632f745c59116200013b5780632f745c5914620002955780633659cfe614620002ba57806342842e0e14620002df5780634f1ef28614620003045780634f6ccce7146200031b5780636352211e146200034057600080fd5b806301ffc9a7146200018957806306fdde0314620001c3578063081812fc14620001ea578063095ea7b3146200022857806318160ddd146200024f57806323b872dd1462000270575b600080fd5b3480156200019657600080fd5b50620001ae620001a836600462002485565b6200054a565b60405190151581526020015b60405180910390f35b348015620001d057600080fd5b50620001db6200055d565b604051620001ba919062002583565b348015620001f757600080fd5b506200020f620002093660046200246b565b620005f7565b6040516001600160a01b039091168152602001620001ba565b3480156200023557600080fd5b506200024d620002473660046200243e565b62000692565b005b3480156200025c57600080fd5b5060cb545b604051908152602001620001ba565b3480156200027d57600080fd5b506200024d6200028f3660046200221e565b620007b3565b348015620002a257600080fd5b5062000261620002b43660046200243e565b620007eb565b348015620002c757600080fd5b506200024d620002d9366004620021c8565b62000885565b348015620002ec57600080fd5b506200024d620002fe3660046200221e565b620008b0565b6200024d62000315366004620023ea565b620008cd565b3480156200032857600080fd5b50620002616200033a3660046200246b565b620008ea565b3480156200034d57600080fd5b506200020f6200035f3660046200246b565b62000983565b3480156200037257600080fd5b506200026162000384366004620021c8565b620009fc565b3480156200039757600080fd5b506200024d62000a85565b348015620003af57600080fd5b506200024d62000afc565b348015620003c757600080fd5b506033546001600160a01b03166200020f565b348015620003e757600080fd5b50620001db62000b77565b348015620003ff57600080fd5b506200024d62000411366004620023aa565b62000b88565b6200020f620004283660046200246b565b62000c4f565b3480156200043b57600080fd5b506200024d6200044d3660046200225f565b62000d21565b3480156200046057600080fd5b50620001db620004723660046200246b565b62000d60565b3480156200048557600080fd5b506200020f6200049736600462002485565b61015f602052600090815260409020546001600160a01b031681565b348015620004c057600080fd5b50620001ae620004d2366004620021e6565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b3480156200050d57600080fd5b506200024d6200051f366004620021c8565b62000e51565b3480156200053257600080fd5b506200024d62000544366004620022cf565b62000f41565b6000620005578262000fed565b92915050565b6060609780546200056e906200276d565b80601f01602080910402602001604051908101604052809291908181526020018280546200059c906200276d565b8015620005ed5780601f10620005c157610100808354040283529160200191620005ed565b820191906000526020600020905b815481529060010190602001808311620005cf57829003601f168201915b5050505050905090565b6000818152609960205260408120546001600160a01b0316620006765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b60006200069f8262000983565b9050806001600160a01b0316836001600160a01b031614156200070f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016200066d565b336001600160a01b03821614806200072e57506200072e8133620004d2565b620007a25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016200066d565b620007ae838362001015565b505050565b620007bf338262001085565b620007de5760405162461bcd60e51b81526004016200066d906200266d565b620007ae83838362001184565b6000620007f883620009fc565b82106200085c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016200066d565b506001600160a01b0391909116600090815260c960209081526040808320938352929052205490565b62000890816200133d565b620008ad816040518060200160405280600081525060006200136a565b50565b620007ae8383836040518060200160405280600081525062000d21565b620008d8826200133d565b620008e6828260016200136a565b5050565b6000620008f660cb5490565b82106200095b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016200066d565b60cb828154811062000971576200097162002821565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b031680620005575760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016200066d565b60006001600160a01b03821662000a695760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016200066d565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b0316331462000ab25760405162461bcd60e51b81526004016200066d9062002638565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff168062000b16575060005460ff16155b62000b355760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562000b58576000805461ffff19166101011790555b62000b6262001535565b8015620008ad576000805461ff001916905550565b6060609880546200056e906200276d565b6001600160a01b03821633141562000be35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016200066d565b336000818152609c602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000811562000cd857813360405160200162000c8792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b6040516020818303038152906040528051906020012091508160405162000cae9062002085565b8190604051809103906000f590508015801562000ccf573d6000803e3d6000fd5b50905062000d07565b60405162000ce69062002085565b604051809103906000f08015801562000d03573d6000803e3d6000fd5b5090505b62000d1c33826001600160a01b03166200160c565b919050565b62000d2d338362001085565b62000d4c5760405162461bcd60e51b81526004016200066d906200266d565b62000d5a8484848462001628565b50505050565b6000818152609960205260409020546060906001600160a01b031662000de15760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016200066d565b600062000df960408051602081019091526000815290565b9050600081511162000e1b576040518060200160405280600081525062000e4a565b8062000e278462001662565b60405160200162000e3a92919062002511565b6040516020818303038152906040525b9392505050565b6033546001600160a01b0316331462000e7e5760405162461bcd60e51b81526004016200066d9062002638565b6001600160a01b03811662000ee55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200066d565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b0316331462000f6e5760405162461bcd60e51b81526004016200066d9062002638565b60005b8151811015620007ae578261015f600084848151811062000f965762000f9662002821565b6020908102919091018101516001600160e01b031916825281019190915260400160002080546001600160a01b0319166001600160a01b03929092169190911790558062000fe481620027aa565b91505062000f71565b60006001600160e01b0319821663780e9d6360e01b1480620005575750620005578262001778565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906200104c8262000983565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609960205260408120546001600160a01b0316620011005760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016200066d565b60006200110d8362000983565b9050806001600160a01b0316846001600160a01b031614806200114b5750836001600160a01b03166200114084620005f7565b6001600160a01b0316145b806200117c57506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316620011998262000983565b6001600160a01b031614620012035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016200066d565b6001600160a01b038216620012675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016200066d565b62001274838383620017cb565b6200128160008262001015565b6001600160a01b0383166000908152609a60205260408120805460019290620012ac90849062002724565b90915550506001600160a01b0382166000908152609a60205260408120805460019290620012dc908490620026f2565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6033546001600160a01b03163314620008ad5760405162461bcd60e51b81526004016200066d9062002638565b60006200139e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b9050620013ab84620017d8565b600083511180620013b95750815b15620013cd57620013cb84846200187f565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff166200152e57805460ff191660011781556040516001600160a01b03831660248201526200144f90869060440160408051601f198184030181529190526020810180516001600160e01b0316631b2ce7f360e11b1790526200187f565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614620014ee5760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201526e75727468657220757067726164657360881b60648201526084016200066d565b620014f985620017d8565b6040516001600160a01b038616907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a25b5050505050565b600054610100900460ff16806200154f575060005460ff16155b6200156e5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001591576000805461ffff19166101011790555b6200159b62001973565b620015a562001973565b620015ee6040518060400160405280600b81526020016a121a591a5b99d5985d5b1d60aa1b81525060405180604001604052806002815260200161242b60f11b815250620019e3565b620015f862001973565b6200160262001973565b62000b6262001a82565b620008e682826040518060200160405280600081525062001b36565b6200163584848462001184565b620016438484848462001b70565b62000d5a5760405162461bcd60e51b81526004016200066d9062002598565b606081620016875750506040805180820190915260018152600360fc1b602082015290565b8160005b8115620016b757806200169e81620027aa565b9150620016af9050600a836200270d565b91506200168b565b60008167ffffffffffffffff811115620016d557620016d562002837565b6040519080825280601f01601f19166020018201604052801562001700576020820181803683370190505b5090505b84156200117c576200171860018362002724565b915062001727600a86620027c8565b62001734906030620026f2565b60f81b8183815181106200174c576200174c62002821565b60200101906001600160f81b031916908160001a90535062001770600a866200270d565b945062001704565b60006001600160e01b031982166380ac58cd60e01b1480620017aa57506001600160e01b03198216635b5e139f60e01b145b806200055757506301ffc9a760e01b6001600160e01b031983161462000557565b620007ae83838362001c8b565b803b6200183e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200066d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060823b620018e05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200066d565b600080846001600160a01b031684604051620018fd9190620024f3565b600060405180830381855af49150503d80600081146200193a576040519150601f19603f3d011682016040523d82523d6000602084013e6200193f565b606091505b50915091506200196a8282604051806060016040528060278152602001620030d06027913962001d4f565b95945050505050565b600054610100900460ff16806200198d575060005460ff16155b620019ac5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562000b62576000805461ffff19166101011790558015620008ad576000805461ff001916905550565b600054610100900460ff1680620019fd575060005460ff16155b62001a1c5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001a3f576000805461ffff19166101011790555b825162001a5490609790602086019062002093565b50815162001a6a90609890602085019062002093565b508015620007ae576000805461ff0019169055505050565b600054610100900460ff168062001a9c575060005460ff16155b62001abb5760405162461bcd60e51b81526004016200066d90620025ea565b600054610100900460ff1615801562001ade576000805461ffff19166101011790555b603380546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015620008ad576000805461ff001916905550565b62001b42838362001d8d565b62001b51600084848462001b70565b620007ae5760405162461bcd60e51b81526004016200066d9062002598565b60006001600160a01b0384163b1562001c8057604051630a85bd0160e11b81526001600160a01b0385169063150b7a029062001bb790339089908890889060040162002544565b602060405180830381600087803b15801562001bd257600080fd5b505af192505050801562001c05575060408051601f3d908101601f1916820190925262001c0291810190620024a5565b60015b62001c65573d80801562001c36576040519150601f19603f3d011682016040523d82523d6000602084013e62001c3b565b606091505b50805162001c5d5760405162461bcd60e51b81526004016200066d9062002598565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506200117c565b506001949350505050565b6001600160a01b03831662001ce95762001ce38160cb8054600083815260cc60205260408120829055600182018355919091527fa7ce836d032b2bf62b7e2097a8e0a6d8aeb35405ad15271e96d3b0188a1d06fb0155565b62001d0f565b816001600160a01b0316836001600160a01b03161462001d0f5762001d0f838262001ee3565b6001600160a01b03821662001d2957620007ae8162001f85565b826001600160a01b0316826001600160a01b031614620007ae57620007ae82826200203f565b6060831562001d6057508162000e4a565b82511562001d715782518084602001fd5b8160405162461bcd60e51b81526004016200066d919062002583565b6001600160a01b03821662001de55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016200066d565b6000818152609960205260409020546001600160a01b03161562001e4c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016200066d565b62001e5a60008383620017cb565b6001600160a01b0382166000908152609a6020526040812080546001929062001e85908490620026f2565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600162001ef284620009fc565b62001efe919062002724565b600083815260ca602052604090205490915080821462001f52576001600160a01b038416600090815260c960209081526040808320858452825280832054848452818420819055835260ca90915290208190555b50600091825260ca602090815260408084208490556001600160a01b03909416835260c981528383209183525290812055565b60cb5460009062001f999060019062002724565b600083815260cc602052604081205460cb805493945090928490811062001fc45762001fc462002821565b906000526020600020015490508060cb838154811062001fe85762001fe862002821565b600091825260208083209091019290925582815260cc909152604080822084905585825281205560cb8054806200202357620020236200280b565b6001900381819060005260206000200160009055905550505050565b60006200204c83620009fc565b6001600160a01b03909316600090815260c960209081526040808320868452825280832085905593825260ca9052919091209190915550565b61086b806200286583390190565b828054620020a1906200276d565b90600052602060002090601f016020900481019282620020c5576000855562002110565b82601f10620020e057805160ff191683800117855562002110565b8280016001018555821562002110579182015b8281111562002110578251825591602001919060010190620020f3565b506200211e92915062002122565b5090565b5b808211156200211e576000815560010162002123565b80356001600160a01b038116811462000d1c57600080fd5b600082601f8301126200216357600080fd5b813567ffffffffffffffff81111562002180576200218062002837565b62002195601f8201601f1916602001620026be565b818152846020838601011115620021ab57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215620021db57600080fd5b62000e4a8262002139565b60008060408385031215620021fa57600080fd5b620022058362002139565b9150620022156020840162002139565b90509250929050565b6000806000606084860312156200223457600080fd5b6200223f8462002139565b92506200224f6020850162002139565b9150604084013590509250925092565b600080600080608085870312156200227657600080fd5b620022818562002139565b9350620022916020860162002139565b925060408501359150606085013567ffffffffffffffff811115620022b557600080fd5b620022c38782880162002151565b91505092959194509250565b60008060408385031215620022e357600080fd5b620022ee8362002139565b915060208084013567ffffffffffffffff808211156200230d57600080fd5b818601915086601f8301126200232257600080fd5b81358181111562002337576200233762002837565b8060051b91506200234a848301620026be565b8181528481019084860184860187018b10156200236657600080fd5b600095505b8386101562002399578035945062002383856200284d565b848352600195909501949186019186016200236b565b508096505050505050509250929050565b60008060408385031215620023be57600080fd5b620023c98362002139565b915060208301358015158114620023df57600080fd5b809150509250929050565b60008060408385031215620023fe57600080fd5b620024098362002139565b9150602083013567ffffffffffffffff8111156200242657600080fd5b620024348582860162002151565b9150509250929050565b600080604083850312156200245257600080fd5b6200245d8362002139565b946020939093013593505050565b6000602082840312156200247e57600080fd5b5035919050565b6000602082840312156200249857600080fd5b813562000e4a816200284d565b600060208284031215620024b857600080fd5b815162000e4a816200284d565b60008151808452620024df8160208601602086016200273e565b601f01601f19169290920160200192915050565b60008251620025078184602087016200273e565b9190910192915050565b60008351620025258184602088016200273e565b8351908301906200253b8183602088016200273e565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906200257990830184620024c5565b9695505050505050565b60208152600062000e4a6020830184620024c5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715620026ea57620026ea62002837565b604052919050565b60008219821115620027085762002708620027df565b500190565b6000826200271f576200271f620027f5565b500490565b600082821015620027395762002739620027df565b500390565b60005b838110156200275b57818101518382015260200162002741565b8381111562000d5a5750506000910152565b600181811c908216806200278257607f821691505b60208210811415620027a457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620027c157620027c1620027df565b5060010190565b600082620027da57620027da620027f5565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114620008ad57600080fdfe608060405234801561001057600080fd5b503361002461004760201b6101671760201c565b80546001600160a01b0319166001600160a01b039290921691909117905561006b565b7f9b85f6ce841a6faee042a2e67df9613579f746ca80e5eb1163b287041381d23c90565b6107f18061007a6000396000f3fe6080604052600436106100225760003560e01c80635f3e849f1461014557610029565b3661002957005b6000610033610167565b5460405163e91db8e560e01b81526000356001600160e01b03191660048201526001600160a01b039091169063e91db8e59060240160206040518083038186803b15801561008057600080fd5b505afa158015610094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100b891906106a8565b90506001600160a01b0381166101215760405162461bcd60e51b8152602060048201526024808201527f486964696e675661756c743a2046756e6374696f6e20646f6573206e6f7420656044820152631e1a5cdd60e21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610140573d6000f35b3d6000fd5b34801561015157600080fd5b506101656101603660046106c5565b61018b565b005b7f9b85f6ce841a6faee042a2e67df9613579f746ca80e5eb1163b287041381d23c90565b6001600160a01b0383166101e15760405162461bcd60e51b815260206004820152601e60248201527f486964696e675661756c743a205f746f2063616e6e6f742062652030783000006044820152606401610118565b6101e9610167565b6001600160a01b0383166000908152600191909101602052604090205460ff16156102645760405162461bcd60e51b815260206004820152602560248201527f486964696e675661756c743a20746f6b656e206973206e6f74207265636f76656044820152647261626c6560d81b6064820152608401610118565b3361026d610167565b546040516331a9108f60e11b81523060048201526001600160a01b0390911690636352211e9060240160206040518083038186803b1580156102ae57600080fd5b505afa1580156102c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e691906106a8565b6001600160a01b0316146103485760405162461bcd60e51b8152602060048201526024808201527f486964696e675661756c743a2063616c6c6572206973206e6f7420746865206f6044820152633bb732b960e11b6064820152608401610118565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161415610408576000836001600160a01b03168260405160006040518083038185875af1925050503d80600081146103ba576040519150601f19603f3d011682016040523d82523d6000602084013e6103bf565b606091505b50509050806104025760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8811985a5b1959608a1b6044820152606401610118565b50505050565b61041c6001600160a01b0383168483610421565b505050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261041c928692916000916104b191851690849061052e565b80519091501561041c57808060200190518101906104cf9190610706565b61041c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610118565b606061053d8484600085610547565b90505b9392505050565b6060824710156105a85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610118565b843b6105f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610118565b600080866001600160a01b031685876040516106129190610728565b60006040518083038185875af1925050503d806000811461064f576040519150601f19603f3d011682016040523d82523d6000602084013e610654565b606091505b509150915061066482828661066f565b979650505050505050565b6060831561067e575081610540565b82511561068e5782518084602001fd5b8160405162461bcd60e51b81526004016101189190610744565b6000602082840312156106ba57600080fd5b8151610540816107a3565b6000806000606084860312156106da57600080fd5b83356106e5816107a3565b925060208401356106f5816107a3565b929592945050506040919091013590565b60006020828403121561071857600080fd5b8151801515811461054057600080fd5b6000825161073a818460208701610777565b9190910192915050565b6020815260008251806020840152610763816040850160208701610777565b601f01601f19169190910160400192915050565b60005b8381101561079257818101518382015260200161077a565b838111156104025750506000910152565b6001600160a01b03811681146107b857600080fd5b5056fea26469706673582212200ac6230898112da6752a352f49e5f7d372906ec4b8d0dedeee6c92cf19f9a34c64736f6c63430008060033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220937c85b728ebace2e6b7be8505b289ed75e52e41e85ec487dbf0b0467da0a17164736f6c63430008060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.