Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 19260339 | 265 days ago | IN | 0 ETH | 0.12351696 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BNFT
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; import {IBNFT} from "../interfaces/IBNFT.sol"; import {IBNFTRegistry} from "../interfaces/IBNFTRegistry.sol"; import {IFlashLoanReceiver} from "../interfaces/IFlashLoanReceiver.sol"; import {IENSReverseRegistrar} from "../interfaces/IENSReverseRegistrar.sol"; import {IDelegationRegistry} from "../interfaces/IDelegationRegistry.sol"; import {IDelegateRegistryV2} from "../interfaces/IDelegateRegistryV2.sol"; import {IMoonbirds} from "../interfaces/IMoonbirds.sol"; import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import {AddressUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import {IERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import {IERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import {IERC721MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol"; import {IERC721ReceiverUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import {IERC1155ReceiverUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol"; /** * @title BNFT contract * @dev Implements the methods for the bNFT protocol **/ contract BNFT is IBNFT, ERC721EnumerableUpgradeable, IERC721ReceiverUpgradeable, IERC1155ReceiverUpgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set; address private _underlyingAsset; // Mapping from token ID to minter address mapping(uint256 => address) private _minters; address private _owner; uint256 private constant _NOT_ENTERED = 0; uint256 private constant _ENTERED = 1; uint256 private _status; address private _claimAdmin; // Mapping from minter to flash loan operator approval address mapping(address => mapping(address => bool)) private _flashLoanOperatorApprovals; // Mapping from minter & token ID to flash loan operator locking address mapping(address => mapping(uint256 => EnumerableSetUpgradeable.AddressSet)) private _flashLoanOperatorLockings; address private _bnftRegistry; // Mapping from token to delegate cash mapping(uint256 => bool) private _hasDelegateCashes; // obsoleted mapping(uint256 => address) private _delegateAddresses; // obsoleted bool private _isIgnoreCheckSenderOnRecv; /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Initializes the bNFT * @param underlyingAsset_ The address of the underlying asset of this bNFT (E.g. PUNK for bPUNK) */ function initialize( address underlyingAsset_, string calldata bNftName, string calldata bNftSymbol, address owner_, address claimAdmin_, address bnftRegistry_ ) external override initializer { __ERC721_init(bNftName, bNftSymbol); _underlyingAsset = underlyingAsset_; _transferOwnership(owner_); _setClaimAdmin(claimAdmin_); _setBNFTRegistry(bnftRegistry_); emit Initialized(underlyingAsset_); } /** * @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(), "BNFT: 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 { _transferOwnership(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), "BNFT: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev Returns the address of the current claim admin. */ function claimAdmin() public view virtual returns (address) { return _claimAdmin; } /** * @dev Throws if called by any account other than the claim admin. */ modifier onlyClaimAdmin() { require(claimAdmin() == _msgSender(), "BNFT: caller is not the claim admin"); _; } /** * @dev Set claim admin of the contract to a new account (`newAdmin`). * Can only be called by the current owner. */ function setClaimAdmin(address newAdmin) public virtual onlyOwner { require(newAdmin != address(0), "BNFT: new admin is the zero address"); _setClaimAdmin(newAdmin); } function _setClaimAdmin(address newAdmin) internal virtual { address oldAdmin = _claimAdmin; _claimAdmin = newAdmin; emit ClaimAdminUpdated(oldAdmin, newAdmin); } /** * @dev Returns the address of the current bnft registry. */ function getBNFTRegistry() public view virtual returns (address) { return _bnftRegistry; } /** * @dev Set bnft registry contract address. * Can only be called by the current owner. */ function setBNFTRegistry(address newRegistry) public virtual onlyOwner { require(newRegistry != address(0), "BNFT: new registry is the zero address"); _setBNFTRegistry(newRegistry); } function _setBNFTRegistry(address newRegistry) internal virtual { _bnftRegistry = newRegistry; } /** * @dev Mints bNFT token to the user address * * Requirements: * - The caller can be contract address and EOA * * @param to The owner address receive the bNFT token * @param tokenId token id of the underlying asset of NFT **/ function mint(address to, uint256 tokenId) external override nonReentrant { bool isCA = AddressUpgradeable.isContract(_msgSender()); if (!isCA) { require(to == _msgSender(), "BNFT: caller is not to"); } require(!_exists(tokenId), "BNFT: exist token"); require(IERC721Upgradeable(_underlyingAsset).ownerOf(tokenId) == _msgSender(), "BNFT: caller is not owner"); // mint bNFT to user _mint(to, tokenId); _minters[tokenId] = _msgSender(); // Receive NFT Tokens IERC721Upgradeable(_underlyingAsset).safeTransferFrom(_msgSender(), address(this), tokenId); emit Mint(_msgSender(), _underlyingAsset, tokenId, to); } /** * @dev Burns user bNFT token * * Requirements: * - The caller can be contract address and EOA * * @param tokenId token id of the underlying asset of NFT **/ function burn(uint256 tokenId) external override nonReentrant { require(_exists(tokenId), "BNFT: nonexist token"); require(_minters[tokenId] == _msgSender(), "BNFT: caller is not minter"); address tokenOwner = ERC721Upgradeable.ownerOf(tokenId); _burn(tokenId); delete _minters[tokenId]; IERC721Upgradeable(_underlyingAsset).safeTransferFrom(address(this), _msgSender(), tokenId); emit Burn(_msgSender(), _underlyingAsset, tokenId, tokenOwner); } /** * @dev See {IBNFT-flashLoan}. */ function flashLoan( address receiverAddress, uint256[] calldata nftTokenIds, bytes calldata params ) external override nonReentrant { uint256 i; IFlashLoanReceiver receiver = IFlashLoanReceiver(receiverAddress); // !!!CAUTION: receiver contract may reentry mint, burn, flashloan again require(receiverAddress != address(0), "BNFT: zero address"); require(nftTokenIds.length > 0, "BNFT: empty token list"); // only token owner can do flashloan for (i = 0; i < nftTokenIds.length; i++) { address minter = minterOf(nftTokenIds[i]); if (_flashLoanOperatorLockings[minter][nftTokenIds[i]].length() > 0) { require(isFlashLoanLocked(nftTokenIds[i], minter, _msgSender()), "BNFT: caller without permission"); } else { require(_isFlashLoanApprovedOrOwner(nftTokenIds[i], _msgSender()), "BNFT: caller without permission"); } } // step 1: moving underlying asset forward to receiver contract for (i = 0; i < nftTokenIds.length; i++) { IERC721Upgradeable(_underlyingAsset).safeTransferFrom(address(this), receiverAddress, nftTokenIds[i]); } // setup 2: execute receiver contract, doing something like aidrop require( receiver.executeOperation(_underlyingAsset, nftTokenIds, _msgSender(), address(this), params), "BNFT: invalid flashloan executor return" ); // setup 3: moving underlying asset backword from receiver contract for (i = 0; i < nftTokenIds.length; i++) { IERC721Upgradeable(_underlyingAsset).safeTransferFrom(receiverAddress, address(this), nftTokenIds[i]); emit FlashLoan(receiverAddress, _msgSender(), _underlyingAsset, nftTokenIds[i]); } } /** * @dev See {IBNFT-setFlashLoanApproval}. */ function setFlashLoanApproval(address operator, bool approved) public override nonReentrant { address minter = _msgSender(); _flashLoanOperatorApprovals[minter][operator] = approved; emit FlashLoanApproval(minter, operator, approved); } /** * @dev See {IBNFT-isFlashLoanApproved}. */ function isFlashLoanApproved(address minter, address operator) public view override returns (bool) { return _flashLoanOperatorApprovals[minter][operator]; } function setFlashLoanLocking( uint256 tokenId, address operator, bool locked ) public override { if (locked) { _flashLoanOperatorLockings[_msgSender()][tokenId].add(operator); emit FlashLoanLocking(tokenId, _msgSender(), operator, true); } else { _flashLoanOperatorLockings[_msgSender()][tokenId].remove(operator); emit FlashLoanLocking(tokenId, _msgSender(), operator, false); } } function isFlashLoanLocked( uint256 tokenId, address minter, address operator ) public view override returns (bool) { return _flashLoanOperatorLockings[minter][tokenId].contains(operator); } function getFlashLoanLocked(uint256 tokenId, address minter) public view override returns (address[] memory) { return _flashLoanOperatorLockings[minter][tokenId].values(); } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { return IERC721MetadataUpgradeable(_underlyingAsset).tokenURI(tokenId); } /** * @dev See {IBNFT-contractURI}. */ function contractURI() external view override returns (string memory) { string memory hexAddress = StringsUpgradeable.toHexString(uint256(uint160(address(this))), 20); return string(abi.encodePacked("https://metadata.benddao.xyz/", hexAddress)); } function claimERC20Airdrop( address token, address to, uint256 amount ) external override nonReentrant onlyClaimAdmin { require(token != _underlyingAsset, "BNFT: token can not be underlying asset"); require(token != address(this), "BNFT: token can not be self address"); IERC20Upgradeable(token).transfer(to, amount); emit ClaimERC20Airdrop(token, to, amount); } function claimERC721Airdrop( address token, address to, uint256[] calldata ids ) external override nonReentrant onlyClaimAdmin { require(token != _underlyingAsset, "BNFT: token can not be underlying asset"); require(token != address(this), "BNFT: token can not be self address"); for (uint256 i = 0; i < ids.length; i++) { IERC721Upgradeable(token).safeTransferFrom(address(this), to, ids[i]); } emit ClaimERC721Airdrop(token, to, ids); } function claimERC1155Airdrop( address token, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external override nonReentrant onlyClaimAdmin { require(token != _underlyingAsset, "BNFT: token can not be underlying asset"); require(token != address(this), "BNFT: token can not be self address"); IERC1155Upgradeable(token).safeBatchTransferFrom(address(this), to, ids, amounts, data); emit ClaimERC1155Airdrop(token, to, ids, amounts, data); } function executeAirdrop(address airdropContract, bytes calldata airdropParams) external override nonReentrant onlyClaimAdmin { require(airdropContract != _underlyingAsset, "BNFT: airdrop can not be underlying asset"); require(airdropContract != address(this), "BNFT: airdrop can not be self address"); require(airdropContract != address(0), "BNFT: invalid airdrop contract address"); require(airdropParams.length >= 4, "BNFT: invalid airdrop parameters"); _isIgnoreCheckSenderOnRecv = true; // call project aidrop contract AddressUpgradeable.functionCall(airdropContract, airdropParams, "call airdrop method failed"); _isIgnoreCheckSenderOnRecv = false; emit ExecuteAirdrop(airdropContract); } function setENSName(address registrar, string memory name) external nonReentrant onlyOwner returns (bytes32) { return IENSReverseRegistrar(registrar).setName(name); } /** @dev Changes the nesting flag. Only for Moonbirds. * Some users can bypass the nesting and deposit birds to BNFT contract. */ function toggleMoonirdsNesting(uint256[] calldata tokenIds) public nonReentrant onlyOwner { IMoonbirds(_underlyingAsset).toggleNesting(tokenIds); } /** * ----------- V1 Delegate Cash ----------- */ function getDelegateCashForToken(uint256[] calldata tokenIds) public view override returns (address[][] memory) { IDelegationRegistry delegateContract = IDelegationRegistry(IBNFTRegistry(_bnftRegistry).getDelegateCashContract()); address[][] memory delegateAddrs = new address[][](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { delegateAddrs[i] = delegateContract.getDelegatesForToken(address(this), _underlyingAsset, tokenIds[i]); } return delegateAddrs; } function setDelegateCashForToken(uint256[] calldata tokenIds, bool value) public override nonReentrant { _setDelegateCashForToken(_msgSender(), tokenIds, value); } function setDelegateCashForToken( address delegate, uint256[] calldata tokenIds, bool value ) public override nonReentrant { _setDelegateCashForToken(delegate, tokenIds, value); } function _setDelegateCashForToken( address delegate, uint256[] calldata tokenIds, bool value ) internal { require(delegate != address(0), "BNFT: delegate is the zero address"); IDelegationRegistry delegateContract = IDelegationRegistry(IBNFTRegistry(_bnftRegistry).getDelegateCashContract()); for (uint256 i = 0; i < tokenIds.length; i++) { address tokenOwner = ERC721Upgradeable.ownerOf(tokenIds[i]); require(tokenOwner == _msgSender(), "BNFT: caller is not owner"); delegateContract.delegateForToken(delegate, _underlyingAsset, tokenIds[i], value); } } /** * ----------- V2 Delegate Cash ----------- */ function getDelegateCashForTokenV2(uint256[] calldata tokenIds) public view override returns (address[][] memory) { IDelegateRegistryV2 delegateContractV2 = IDelegateRegistryV2( IBNFTRegistry(_bnftRegistry).getDelegateCashContractV2() ); IDelegateRegistryV2.Delegation[] memory allOutDelegations = delegateContractV2.getOutgoingDelegations( address(this) ); address[][] memory delegateAddrs = new address[][](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { uint256 delegateNum = 0; for (uint256 j = 0; j < allOutDelegations.length; j++) { if (allOutDelegations[j].tokenId == tokenIds[i]) { delegateNum++; } } delegateAddrs[i] = new address[](delegateNum); uint256 addrIdx = 0; for (uint256 j = 0; j < allOutDelegations.length; j++) { if (allOutDelegations[j].tokenId == tokenIds[i]) { delegateAddrs[i][addrIdx] = allOutDelegations[j].to; addrIdx++; } } } return delegateAddrs; } function setDelegateCashForTokenV2(uint256[] calldata tokenIds, bool value) public override nonReentrant { _setDelegateCashForTokenV2(_msgSender(), tokenIds, value); } function setDelegateCashForTokenV2( address delegate, uint256[] calldata tokenIds, bool value ) public override nonReentrant { _setDelegateCashForTokenV2(delegate, tokenIds, value); } function _setDelegateCashForTokenV2( address delegate, uint256[] calldata tokenIds, bool value ) internal { require(delegate != address(0), "BNFT: delegate is the zero address"); IDelegateRegistryV2 delegateContractV2 = IDelegateRegistryV2( IBNFTRegistry(_bnftRegistry).getDelegateCashContractV2() ); for (uint256 i = 0; i < tokenIds.length; i++) { address tokenOwner = ERC721Upgradeable.ownerOf(tokenIds[i]); require(tokenOwner == _msgSender(), "BNFT: caller is not owner"); delegateContractV2.delegateERC721(delegate, _underlyingAsset, tokenIds[i], "", value); } } function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external view override returns (bytes4) { operator; from; tokenId; data; if (!_isIgnoreCheckSenderOnRecv) { require(_msgSender() == address(_underlyingAsset), "BNFT: not acceptable erc721"); } return IERC721ReceiverUpgradeable.onERC721Received.selector; } function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external view override returns (bytes4) { operator; from; id; value; data; if (!_isIgnoreCheckSenderOnRecv) { require(_msgSender() == address(_underlyingAsset), "BNFT: not acceptable erc1155"); } return IERC1155ReceiverUpgradeable.onERC1155Received.selector; } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external view override returns (bytes4) { operator; from; ids; values; data; if (!_isIgnoreCheckSenderOnRecv) { require(_msgSender() == address(_underlyingAsset), "BNFT: not acceptable erc1155"); } return IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector; } /** * @dev See {IBNFT-minterOf}. */ function minterOf(uint256 tokenId) public view override returns (address) { address minter = _minters[tokenId]; require(minter != address(0), "BNFT: minter query for nonexistent token"); return minter; } /** * @dev See {IBNFT-underlyingAsset}. */ function underlyingAsset() public view override returns (address) { return _underlyingAsset; } /** * @dev Being non transferrable, the bNFT token does not implement any of the * standard ERC721 functions for transfer and allowance. **/ function approve(address to, uint256 tokenId) public virtual override { to; tokenId; revert("APPROVAL_NOT_SUPPORTED"); } function setApprovalForAll(address operator, bool approved) public virtual override { operator; approved; revert("APPROVAL_NOT_SUPPORTED"); } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { from; to; tokenId; revert("TRANSFER_NOT_SUPPORTED"); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { from; to; tokenId; revert("TRANSFER_NOT_SUPPORTED"); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { from; to; tokenId; _data; revert("TRANSFER_NOT_SUPPORTED"); } function _transfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Upgradeable) { from; to; tokenId; revert("TRANSFER_NOT_SUPPORTED"); } /** * @dev Returns whether `operator` is allowed to flash loan `tokenId`. */ function _isFlashLoanApprovedOrOwner(uint256 tokenId, address operator) internal view returns (bool) { address tokenOwner = ownerOf(tokenId); address tokenMinter = minterOf(tokenId); return (operator == tokenOwner || isFlashLoanApproved(tokenMinter, operator)); } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; interface IBNFT { /** * @dev Emitted when an bNFT is initialized * @param underlyingAsset_ The address of the underlying asset **/ event Initialized(address indexed underlyingAsset_); /** * @dev Emitted when the ownership is transferred * @param oldOwner The address of the old owner * @param newOwner The address of the new owner **/ event OwnershipTransferred(address oldOwner, address newOwner); /** * @dev Emitted when the claim admin is updated * @param oldAdmin The address of the old admin * @param newAdmin The address of the new admin **/ event ClaimAdminUpdated(address oldAdmin, address newAdmin); /** * @dev Emitted on mint * @param user The address initiating the burn * @param nftAsset address of the underlying asset of NFT * @param nftTokenId token id of the underlying asset of NFT * @param owner The owner address receive the bNFT token **/ event Mint(address indexed user, address indexed nftAsset, uint256 nftTokenId, address indexed owner); /** * @dev Emitted on burn * @param user The address initiating the burn * @param nftAsset address of the underlying asset of NFT * @param nftTokenId token id of the underlying asset of NFT * @param owner The owner address of the burned bNFT token **/ event Burn(address indexed user, address indexed nftAsset, uint256 nftTokenId, address indexed owner); /** * @dev Emitted on flashLoan * @param target The address of the flash loan receiver contract * @param initiator The address initiating the flash loan * @param nftAsset address of the underlying asset of NFT * @param tokenId The token id of the asset being flash borrowed **/ event FlashLoan(address indexed target, address indexed initiator, address indexed nftAsset, uint256 tokenId); event ClaimERC20Airdrop(address indexed token, address indexed to, uint256 amount); event ClaimERC721Airdrop(address indexed token, address indexed to, uint256[] ids); event ClaimERC1155Airdrop(address indexed token, address indexed to, uint256[] ids, uint256[] amounts, bytes data); event ExecuteAirdrop(address indexed airdropContract); event FlashLoanApproval(address indexed minter, address indexed operator, bool approved); event FlashLoanLocking(uint256 tokenId, address indexed minter, address indexed operator, bool approved); /** * @dev Initializes the bNFT * @param underlyingAsset_ The address of the underlying asset of this bNFT (E.g. PUNK for bPUNK) */ function initialize( address underlyingAsset_, string calldata bNftName, string calldata bNftSymbol, address owner_, address claimAdmin_, address bnftRegistry_ ) external; /** * @dev Mints bNFT token to the user address * * Requirements: * - The caller can be contract address and EOA. * - `nftTokenId` must not exist. * * @param to The owner address receive the bNFT token * @param tokenId token id of the underlying asset of NFT **/ function mint(address to, uint256 tokenId) external; /** * @dev Burns user bNFT token * * Requirements: * - The caller can be contract address and EOA. * - `tokenId` must exist. * * @param tokenId token id of the underlying asset of NFT **/ function burn(uint256 tokenId) external; /** * @dev Allows smartcontracts to access the tokens within one transaction, as long as the tokens taken is returned. * * Requirements: * - `nftTokenIds` must exist. * * @param receiverAddress The address of the contract receiving the tokens, implementing the IFlashLoanReceiver interface * @param nftTokenIds token ids of the underlying asset * @param params Variadic packed params to pass to the receiver as extra information */ function flashLoan( address receiverAddress, uint256[] calldata nftTokenIds, bytes calldata params ) external; /** * @dev Approve or remove the flash loan `operator` as an operator for the minter. * Operators can call {flashLoan} for any token minted by the minter. * */ function setFlashLoanApproval(address operator, bool approved) external; /** * @dev Returns if the `operator` is allowed to call flash loan of the assets of `minter`. */ function isFlashLoanApproved(address minter, address operator) external view returns (bool); /** * @dev Lock or unlock the flash loan `operator` as an operator for the minter. * Operators can call {flashLoan} for any token minted by the minter. * */ function setFlashLoanLocking( uint256 tokenId, address operator, bool locked ) external; /** * @dev Returns if the `operator` is allowed to call flash loan of the assets of `minter`. */ function isFlashLoanLocked( uint256 tokenId, address minter, address operator ) external view returns (bool); function getFlashLoanLocked(uint256 tokenId, address minter) external view returns (address[] memory); // V1 Delegate Cash function getDelegateCashForToken(uint256[] calldata tokenIds) external view returns (address[][] memory); function setDelegateCashForToken(uint256[] calldata tokenIds, bool value) external; function setDelegateCashForToken( address delegate, uint256[] calldata tokenIds, bool value ) external; // V2 Delegate Cash function getDelegateCashForTokenV2(uint256[] calldata tokenIds) external view returns (address[][] memory); function setDelegateCashForTokenV2(uint256[] calldata tokenIds, bool value) external; function setDelegateCashForTokenV2( address delegate, uint256[] calldata tokenIds, bool value ) external; // Airdrop function claimERC20Airdrop( address token, address to, uint256 amount ) external; function claimERC721Airdrop( address token, address to, uint256[] calldata ids ) external; function claimERC1155Airdrop( address token, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function executeAirdrop(address airdropContract, bytes calldata airdropParams) external; /** * @dev Returns the owner of the `nftTokenId` token. * * Requirements: * - `tokenId` must exist. * * @param tokenId token id of the underlying asset of NFT */ function minterOf(uint256 tokenId) external view returns (address); /** * @dev Returns the address of the underlying asset. */ function underlyingAsset() external view returns (address); /** * @dev Returns the contract-level metadata. */ function contractURI() external view returns (string memory); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; interface IBNFTRegistry { event Initialized(address genericImpl, string namePrefix, string symbolPrefix); event GenericImplementationUpdated(address genericImpl); event BNFTCreated(address indexed nftAsset, address bNftImpl, address bNftProxy, uint256 totals); event BNFTUpgraded(address indexed nftAsset, address bNftImpl, address bNftProxy, uint256 totals); event CustomeSymbolsAdded(address[] nftAssets, string[] symbols); event ClaimAdminUpdated(address oldAdmin, address newAdmin); event DelegateCashUpdated(address oldDelegateCash, address newDelegateCash); event DelegateCashV2Updated(address oldDelegateCash, address newDelegateCash); function getBNFTAddresses(address nftAsset) external view returns (address bNftProxy, address bNftImpl); function getBNFTAddressesByIndex(uint16 index) external view returns (address bNftProxy, address bNftImpl); function getBNFTAssetList() external view returns (address[] memory); function allBNFTAssetLength() external view returns (uint256); function getDelegateCashContract() external view returns (address); function getDelegateCashContractV2() external view returns (address); function initialize( address genericImpl, string memory namePrefix_, string memory symbolPrefix_ ) external; function setBNFTGenericImpl(address genericImpl) external; /** * @dev Create bNFT proxy and implement, then initialize it * @param nftAsset The address of the underlying asset of the BNFT **/ function createBNFT(address nftAsset) external returns (address bNftProxy); /** * @dev Create bNFT proxy with already deployed implement, then initialize it * @param nftAsset The address of the underlying asset of the BNFT * @param bNftImpl The address of the deployed implement of the BNFT **/ function createBNFTWithImpl(address nftAsset, address bNftImpl) external returns (address bNftProxy); /** * @dev Update bNFT proxy to an new deployed implement, then initialize it * @param nftAsset The address of the underlying asset of the BNFT * @param bNftImpl The address of the deployed implement of the BNFT * @param encodedCallData The encoded function call. **/ function upgradeBNFTWithImpl( address nftAsset, address bNftImpl, bytes memory encodedCallData ) external; function batchUpgradeBNFT(address[] calldata nftAssets) external; function batchUpgradeAllBNFT() external; /** * @dev Adding custom symbol for some special NFTs like CryptoPunks * @param nftAssets_ The addresses of the NFTs * @param symbols_ The custom symbols of the NFTs **/ function addCustomeSymbols(address[] memory nftAssets_, string[] memory symbols_) external; }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; /** * @title IFlashLoanReceiver interface * @notice Interface for the IFlashLoanReceiver. * @author BEND * @dev implement this interface to develop a flashloan-compatible flashLoanReceiver contract **/ interface IFlashLoanReceiver { function executeOperation( address asset, uint256[] calldata tokenIds, address initiator, address operator, bytes calldata params ) external returns (bool); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; interface IENSReverseRegistrar { /** * @dev Sets the `name()` record for the reverse ENS record associated with * the calling account. First updates the resolver to the default reverse * resolver if necessary. * @param name The name to set for this address. * @return The ENS node hash of the reverse record. */ function setName(string memory name) external returns (bytes32); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.4; /** * @title An immutable registry contract to be deployed as a standalone primitive * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations * from here and integrate those permissions into their flow */ interface IDelegationRegistry { /** * @notice Allow the delegate to act on your behalf for a specific token * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForToken( address delegate, address contract_, uint256 tokenId, bool value ) external; /** * @notice Returns an array of contract-level delegates for a given vault's token * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract holding the token * @param tokenId The token id for the token you're delegating * @return addresses Array of contract-level delegates for a given vault's token */ function getDelegatesForToken( address vault, address contract_, uint256 tokenId ) external view returns (address[] memory); }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.4; /** * @title IDelegateRegistryV2 * @custom:version 2.0 * @custom:author foobar (0xfoobar) * @notice A standalone immutable registry storing delegated permissions from one address to another */ interface IDelegateRegistryV2 { /// @notice Delegation type, NONE is used when a delegation does not exist or is revoked enum DelegationType { NONE, ALL, CONTRACT, ERC721, ERC20, ERC1155 } /// @notice Struct for returning delegations struct Delegation { DelegationType type_; address to; address from; bytes32 rights; address contract_; uint256 tokenId; uint256 amount; } /** * ----------- WRITE ----------- */ /** * @notice Allow the delegate to act on behalf of `msg.sender` for a specific ERC721 token * @param to The address to act as delegate * @param contract_ The contract whose rights are being delegated * @param tokenId The token id to delegate * @param rights Specific subdelegation rights granted to the delegate, pass an empty bytestring to encompass all rights * @param enable Whether to enable or disable this delegation, true delegates and false revokes * @return delegationHash The unique identifier of the delegation */ function delegateERC721( address to, address contract_, uint256 tokenId, bytes32 rights, bool enable ) external payable returns (bytes32 delegationHash); /** * ----------- ENUMERATIONS ----------- */ /** * @notice Returns all enabled delegations an address has given out * @param from The address to retrieve delegations for * @return delegations Array of Delegation structs */ function getOutgoingDelegations(address from) external view returns (Delegation[] memory delegations); /** * @notice Returns the delegations for a given array of delegation hashes * @param delegationHashes is an array of hashes that correspond to delegations * @return delegations Array of Delegation structs, return empty structs for nonexistent or revoked delegations */ function getDelegationsFromHashes(bytes32[] calldata delegationHashes) external view returns (Delegation[] memory delegations); }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.4; interface IMoonbirds { /** @notice Changes the Moonbirds' nesting statuss (what's the plural of status? statii? statuses? status? The plural of sheep is sheep; maybe it's also the plural of status). @dev Changes the Moonbirds' nesting sheep (see @notice). */ function toggleNesting(uint256[] calldata tokenIds) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) 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 onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _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}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. 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 { _setApprovalForAll(_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); _afterTokenTransfer(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); _afterTokenTransfer(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 from incorrect owner"); 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); _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @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.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { 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` and `to` are never both zero. * * 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) 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 onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // 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(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) 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 // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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 onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ 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() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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 // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) 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); /** * @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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"user","type":"address"},{"indexed":true,"internalType":"address","name":"nftAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"ClaimAdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ClaimERC1155Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimERC20Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"ClaimERC721Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"airdropContract","type":"address"}],"name":"ExecuteAirdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"nftAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"FlashLoan","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"FlashLoanApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"FlashLoanLocking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"underlyingAsset_","type":"address"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"nftAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"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"},{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"claimERC1155Airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimERC20Airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"claimERC721Airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"airdropContract","type":"address"},{"internalType":"bytes","name":"airdropParams","type":"bytes"}],"name":"executeAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiverAddress","type":"address"},{"internalType":"uint256[]","name":"nftTokenIds","type":"uint256[]"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"flashLoan","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":[],"name":"getBNFTRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getDelegateCashForToken","outputs":[{"internalType":"address[][]","name":"","type":"address[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getDelegateCashForTokenV2","outputs":[{"internalType":"address[][]","name":"","type":"address[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"minter","type":"address"}],"name":"getFlashLoanLocked","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlyingAsset_","type":"address"},{"internalType":"string","name":"bNftName","type":"string"},{"internalType":"string","name":"bNftSymbol","type":"string"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"claimAdmin_","type":"address"},{"internalType":"address","name":"bnftRegistry_","type":"address"}],"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":"address","name":"minter","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isFlashLoanApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isFlashLoanLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"minterOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"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":"address","name":"newRegistry","type":"address"}],"name":"setBNFTRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setClaimAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setDelegateCashForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setDelegateCashForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setDelegateCashForTokenV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setDelegateCashForTokenV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registrar","type":"address"},{"internalType":"string","name":"name","type":"string"}],"name":"setENSName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setFlashLoanApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"locked","type":"bool"}],"name":"setFlashLoanLocking","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":"tokenIds","type":"uint256[]"}],"name":"toggleMoonirdsNesting","outputs":[],"stateMutability":"nonpayable","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":[],"name":"underlyingAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614e18806100206000396000f3fe608060405234801561001057600080fd5b50600436106102d65760003560e01c806377f50f9711610182578063b88d4fde116100e9578063db8d8fc6116100a2578063e985e9c51161007c578063e985e9c51461068b578063f1c8ddbc146106c7578063f23a6e61146106da578063f2fde38b146106ed57600080fd5b8063db8d8fc61461065d578063e3185e1214610670578063e8a3d4851461068357600080fd5b8063b88d4fde146105f0578063bc197c81146105fe578063c27bf5c814610611578063c87b56dd14610624578063cae5955314610637578063d2a14c901461064a57600080fd5b80639a52c5681161013b5780639a52c5681461055c5780639d25f80f1461056d5780639e942ace146105a9578063a22cb465146105bc578063a6b44210146105ca578063ae9caffb146105dd57600080fd5b806377f50f97146104f9578063844819531461050a5780638da5cb5b1461051d57806393bd552a1461052e57806395d51ce91461054157806395d89b411461055457600080fd5b80633e342ff2116102415780635edb331c116101fa578063715018a6116101d4578063715018a6146104ba5780637158da7c146104c2578063722b5374146104d3578063772cbf6b146104e657600080fd5b80635edb331c146104815780636352211e1461049457806370a08231146104a757600080fd5b80633e342ff21461041557806340c10f191461043557806342842e0e146103dc57806342966c68146104485780634f0709161461045b5780634f6ccce71461046e57600080fd5b806318160ddd1161029357806318160ddd146103975780631b885459146103a95780631c11522b146103bc57806323b872dd146103dc5780632f745c59146103ef578063340578e41461040257600080fd5b806301ffc9a7146102db57806306fdde0314610303578063081812fc14610318578063095ea7b3146103435780630c37929e14610358578063150b7a021461036b575b600080fd5b6102ee6102e93660046145fb565b610700565b60405190151581526020015b60405180910390f35b61030b61072b565b6040516102fa91906149d4565b61032b61032636600461468c565b6107bd565b6040516001600160a01b0390911681526020016102fa565b610356610351366004614366565b610857565b005b6103566103663660046146fe565b610898565b61037e610379366004613f98565b61097c565b6040516001600160e01b031990911681526020016102fa565b6099545b6040519081526020016102fa565b61039b6103b7366004614306565b6109fe565b6103cf6103ca366004614534565b610adc565b6040516102fa9190614916565b6103566103ea366004613f58565b610cc9565b61039b6103fd366004614366565b610d0a565b6103566104103660046140fd565b610da0565b6104286104233660046146a4565b610ddf565b6040516102fa9190614903565b610356610443366004614366565b610e15565b61035661045636600461468c565b611084565b610356610469366004613f58565b611260565b61039b61047c36600461468c565b6113e3565b61035661048f366004614162565b611484565b61032b6104a236600461468c565b6119b6565b61039b6104b5366004613dcc565b611a2d565b610356611ab4565b60c9546001600160a01b031661032b565b6103566104e1366004613dcc565b611aea565b6102ee6104f43660046146c8565b611b85565b60cd546001600160a01b031661032b565b610356610518366004614573565b611bba565b60cb546001600160a01b031661032b565b61035661053c366004613dcc565b611bf8565b61035661054f3660046141fd565b611c8d565b61030b611f37565b60d0546001600160a01b031661032b565b6102ee61057b366004613e04565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b61032b6105b736600461468c565b611f46565b6103566103513660046141d0565b6103cf6105d8366004614534565b611fbc565b6103566105eb3660046141d0565b612365565b6103566103ea366004614008565b61037e61060c366004613e9e565b6123f1565b61035661061f366004614573565b612476565b61030b61063236600461468c565b6124aa565b610356610645366004613e3c565b61252b565b6103566106583660046140fd565b6126d3565b61035661066b36600461424f565b612707565b61035661067e366004613e9e565b6128a5565b61030b612a1e565b6102ee610699366004613e04565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6103566106d5366004614534565b612a55565b61037e6106e8366004614084565b612b14565b6103566106fb366004613dcc565b612b97565b60006001600160e01b0319821663780e9d6360e01b1480610725575061072582612c2c565b92915050565b60606065805461073a90614d3d565b80601f016020809104026020016040519081016040528092919081815260200182805461076690614d3d565b80156107b35780601f10610788576101008083540402835291602001916107b3565b820191906000526020600020905b81548152906001019060200180831161079657829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b031661083b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60405162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152606401610832565b801561090f5733600090815260cf6020908152604080832086845290915290206108c29083612c7c565b5060408051848152600160208201526001600160a01b0384169133917f24e54b4b5d12d667319275fb50d50071162f76f8062063c801f3bd99f9e57c3991015b60405180910390a3505050565b33600090815260cf6020908152604080832086845290915290206109339083612c91565b5060408051848152600060208201526001600160a01b0384169133917f24e54b4b5d12d667319275fb50d50071162f76f8062063c801f3bd99f9e57c399101610902565b505050565b60d35460009060ff166109ec5760c9546001600160a01b0316336001600160a01b0316146109ec5760405162461bcd60e51b815260206004820152601b60248201527f424e46543a206e6f742061636365707461626c652065726337323100000000006044820152606401610832565b50630a85bd0160e11b95945050505050565b6000600160cc541415610a235760405162461bcd60e51b815260040161083290614b45565b600160cc5560cb546001600160a01b03163314610a525760405162461bcd60e51b815260040161083290614a8c565b60405163c47f002760e01b81526001600160a01b0384169063c47f002790610a7e9085906004016149d4565b602060405180830381600087803b158015610a9857600080fd5b505af1158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad091906145e3565b600060cc559392505050565b6060600060d060009054906101000a90046001600160a01b03166001600160a01b03166373e428516040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2e57600080fd5b505afa158015610b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b669190613de8565b90506000836001600160401b03811115610b9057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610bc357816020015b6060815260200190600190039081610bae5790505b50905060005b84811015610cc05760c9546001600160a01b0380851691631221156b91309116898986818110610c0957634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610c2e93929190614899565b60006040518083038186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c829190810190614391565b828281518110610ca257634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610cb890614d78565b915050610bc9565b50949350505050565b60405162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152606401610832565b6000610d1583611a2d565b8210610d775760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610832565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b600160cc541415610dc35760405162461bcd60e51b815260040161083290614b45565b600160cc55610dd484848484612ca6565b5050600060cc555050565b6001600160a01b038116600090815260cf602090815260408083208584529091529020606090610e0e90612e7c565b9392505050565b600160cc541415610e385760405162461bcd60e51b815260040161083290614b45565b600160cc55333b151580610e97576001600160a01b0383163314610e975760405162461bcd60e51b8152602060048201526016602482015275424e46543a2063616c6c6572206973206e6f7420746f60501b6044820152606401610832565b6000828152606760205260409020546001600160a01b031615610ef05760405162461bcd60e51b81526020600482015260116024820152702127232a1d1032bc34b9ba103a37b5b2b760791b6044820152606401610832565b3360c9546040516331a9108f60e11b8152600481018590526001600160a01b039283169290911690636352211e9060240160206040518083038186803b158015610f3957600080fd5b505afa158015610f4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f719190613de8565b6001600160a01b031614610f975760405162461bcd60e51b815260040161083290614ac3565b610fa18383612e89565b33600083815260ca6020526040902080546001600160a01b0319166001600160a01b0392831617905560c954166342842e0e3330856040518463ffffffff1660e01b8152600401610ff493929190614899565b600060405180830381600087803b15801561100e57600080fd5b505af1158015611022573d6000803e3d6000fd5b505060c9546001600160a01b038681169350169050336001600160a01b03167ff9403b28cc8805935e0ce6943ed646d5fde3d1e14f6b398e85bfa2851d1b85f78560405161107291815260200190565b60405180910390a45050600060cc5550565b600160cc5414156110a75760405162461bcd60e51b815260040161083290614b45565b600160cc556000818152606760205260409020546001600160a01b03166111075760405162461bcd60e51b81526020600482015260146024820152732127232a1d103737b732bc34b9ba103a37b5b2b760611b6044820152606401610832565b600081815260ca60205260409020546001600160a01b0316331461116d5760405162461bcd60e51b815260206004820152601a60248201527f424e46543a2063616c6c6572206973206e6f74206d696e7465720000000000006044820152606401610832565b6000611178826119b6565b905061118382612fd8565b600082815260ca6020526040902080546001600160a01b031916905560c9546001600160a01b03166342842e0e3033856040518463ffffffff1660e01b81526004016111d193929190614899565b600060405180830381600087803b1580156111eb57600080fd5b505af11580156111ff573d6000803e3d6000fd5b505060c9546001600160a01b038481169350169050336001600160a01b03167f3dd1df88dc92e2788892542d81f999d720a44b4c127065d45c128f4f59fdc3738560405161124f91815260200190565b60405180910390a45050600060cc55565b600160cc5414156112835760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b031633146112b25760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03848116911614156112e05760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b0383163014156113095760405162461bcd60e51b815260040161083290614a07565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb90604401602060405180830381600087803b15801561135357600080fd5b505af1158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906145c7565b50816001600160a01b0316836001600160a01b03167f81275949a17d84915b61eeb24587a501cc8863011afba1ed12f3f6c5bdfd6a21836040516113d191815260200190565b60405180910390a35050600060cc5550565b60006113ee60995490565b82106114515760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610832565b6099828154811061147257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600160cc5414156114a75760405162461bcd60e51b815260040161083290614b45565b600160cc556000856001600160a01b0381166114fa5760405162461bcd60e51b8152602060048201526012602482015271424e46543a207a65726f206164647265737360701b6044820152606401610832565b846115405760405162461bcd60e51b8152602060048201526016602482015275109391950e88195b5c1d1e481d1bdad95b881b1a5cdd60521b6044820152606401610832565b600091505b848210156116f757600061157e87878581811061157257634e487b7160e01b600052603260045260246000fd5b90506020020135611f46565b6001600160a01b038116600090815260cf60205260408120919250906115d990828a8a888181106115bf57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002061307f565b11156116625761161187878581811061160257634e487b7160e01b600052603260045260246000fd5b90506020020135826104f43390565b61165d5760405162461bcd60e51b815260206004820152601f60248201527f424e46543a2063616c6c657220776974686f7574207065726d697373696f6e006044820152606401610832565b6116e4565b61169887878581811061168557634e487b7160e01b600052603260045260246000fd5b905060200201356116933390565b613089565b6116e45760405162461bcd60e51b815260206004820152601f60248201527f424e46543a2063616c6c657220776974686f7574207065726d697373696f6e006044820152606401610832565b50816116ef81614d78565b925050611545565b600091505b848210156117a15760c9546001600160a01b03166342842e0e308989898781811061173757634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161175c93929190614899565b600060405180830381600087803b15801561177657600080fd5b505af115801561178a573d6000803e3d6000fd5b50505050818061179990614d78565b9250506116fc565b60c9546040516347048c9960e01b81526001600160a01b03838116926347048c99926117df92909116908a908a90339030908c908c906004016148bd565b602060405180830381600087803b1580156117f957600080fd5b505af115801561180d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183191906145c7565b61188d5760405162461bcd60e51b815260206004820152602760248201527f424e46543a20696e76616c696420666c6173686c6f616e206578656375746f72604482015266103932ba3ab93760c91b6064820152608401610832565b600091505b848210156119a85760c9546001600160a01b03166342842e0e88308989878181106118cd57634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b81526004016118f293929190614899565b600060405180830381600087803b15801561190c57600080fd5b505af1158015611920573d6000803e3d6000fd5b505060c9546001600160a01b03908116925033915089167f5a9eeaf8949838813289046091e8ea8a9196a2265ac24841464a2d27026a854989898781811061197857634e487b7160e01b600052603260045260246000fd5b9050602002013560405161198e91815260200190565b60405180910390a4816119a081614d78565b925050611892565b5050600060cc555050505050565b6000818152606760205260408120546001600160a01b0316806107255760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610832565b60006001600160a01b038216611a985760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610832565b506001600160a01b031660009081526068602052604090205490565b60cb546001600160a01b03163314611ade5760405162461bcd60e51b815260040161083290614a8c565b611ae860006130f2565b565b60cb546001600160a01b03163314611b145760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116611b795760405162461bcd60e51b815260206004820152602660248201527f424e46543a206e657720726567697374727920697320746865207a65726f206160448201526564647265737360d01b6064820152608401610832565b611b8281613154565b50565b6001600160a01b038216600090815260cf602090815260408083208684529091528120611bb29083613176565b949350505050565b600160cc541415611bdd5760405162461bcd60e51b815260040161083290614b45565b600160cc55611bee33848484612ca6565b5050600060cc5550565b60cb546001600160a01b03163314611c225760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116611c845760405162461bcd60e51b815260206004820152602360248201527f424e46543a206e65772061646d696e20697320746865207a65726f206164647260448201526265737360e81b6064820152608401610832565b611b8281613198565b600160cc541415611cb05760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b03163314611cdf5760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b0384811691161415611d4f5760405162461bcd60e51b815260206004820152602960248201527f424e46543a2061697264726f702063616e206e6f7420626520756e6465726c796044820152681a5b99c8185cdcd95d60ba1b6064820152608401610832565b6001600160a01b038316301415611db65760405162461bcd60e51b815260206004820152602560248201527f424e46543a2061697264726f702063616e206e6f742062652073656c66206164604482015264647265737360d81b6064820152608401610832565b6001600160a01b038316611e1b5760405162461bcd60e51b815260206004820152602660248201527f424e46543a20696e76616c69642061697264726f7020636f6e7472616374206160448201526564647265737360d01b6064820152608401610832565b6004811015611e6c5760405162461bcd60e51b815260206004820181905260248201527f424e46543a20696e76616c69642061697264726f7020706172616d65746572736044820152606401610832565b60d3805460ff19166001179055604080516020601f8401819004810282018101909252828152611eee9185919085908590819084018382808284376000920191909152505060408051808201909152601a81527f63616c6c2061697264726f70206d6574686f64206661696c6564000000000000602082015291506131f29050565b5060d3805460ff191690556040516001600160a01b038416907fd2c36dd5803814dde11f682939a7f3d4936f4297fea9a45646220e4241ce092d90600090a25050600060cc5550565b60606066805461073a90614d3d565b600081815260ca60205260408120546001600160a01b0316806107255760405162461bcd60e51b815260206004820152602860248201527f424e46543a206d696e74657220717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610832565b6060600060d060009054906101000a90046001600160a01b03166001600160a01b031663796372406040518163ffffffff1660e01b815260040160206040518083038186803b15801561200e57600080fd5b505afa158015612022573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120469190613de8565b6040516328a92f4d60e11b81523060048201529091506000906001600160a01b038316906351525e9a9060240160006040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120c7919081019061442c565b90506000846001600160401b038111156120f157634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561212457816020015b606081526020019060019003908161210f5790505b50905060005b8581101561235b576000805b84518110156121b85788888481811061215f57634e487b7160e01b600052603260045260246000fd5b9050602002013585828151811061218657634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015114156121a657816121a281614d78565b9250505b806121b081614d78565b915050612136565b50806001600160401b038111156121df57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612208578160200160208202803683370190505b5083838151811061222957634e487b7160e01b600052603260045260246000fd5b60200260200101819052506000805b85518110156123455789898581811061226157634e487b7160e01b600052603260045260246000fd5b9050602002013586828151811061228857634e487b7160e01b600052603260045260246000fd5b602002602001015160a001511415612333578581815181106122ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518585815181106122e657634e487b7160e01b600052603260045260246000fd5b6020026020010151838151811061230d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528161232f81614d78565b9250505b8061233d81614d78565b915050612238565b505050808061235390614d78565b91505061212a565b5095945050505050565b600160cc5414156123885760405162461bcd60e51b815260040161083290614b45565b600160cc5533600081815260ce602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155905190815283917f52e8fd59cc21eb31dd0df5637f0aa94f183391c23c69212859a7506410451fbd91016113d1565b60d35460009060ff166124615760c9546001600160a01b0316336001600160a01b0316146124615760405162461bcd60e51b815260206004820152601c60248201527f424e46543a206e6f742061636365707461626c652065726331313535000000006044820152606401610832565b5063bc197c8160e01b98975050505050505050565b600160cc5414156124995760405162461bcd60e51b815260040161083290614b45565b600160cc55611bee33848484613201565b60c95460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b1580156124ef57600080fd5b505afa158015612503573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107259190810190614623565b600160cc54141561254e5760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b0316331461257d5760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03858116911614156125ab5760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b0384163014156125d45760405162461bcd60e51b815260040161083290614a07565b60005b8181101561267a57846001600160a01b03166342842e0e308686868681811061261057634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161263593929190614899565b600060405180830381600087803b15801561264f57600080fd5b505af1158015612663573d6000803e3d6000fd5b50505050808061267290614d78565b9150506125d7565b50826001600160a01b0316846001600160a01b03167f6c6b18e67b757c02ba92ef0f54038fc2135767acf9bef174b8780835ff45582284846040516126c0929190614977565b60405180910390a35050600060cc555050565b600160cc5414156126f65760405162461bcd60e51b815260040161083290614b45565b600160cc55610dd484848484613201565b600054610100900460ff166127225760005460ff1615612726565b303b155b6127895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610832565b600054610100900460ff161580156127ab576000805461ffff19166101011790555b61281e88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506133eb92505050565b60c980546001600160a01b0319166001600160a01b038b16179055612842846130f2565b61284b83613198565b61285482613154565b6040516001600160a01b038a16907f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e690600090a2801561289a576000805461ff00191690555b505050505050505050565b600160cc5414156128c85760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b031633146128f75760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03898116911614156129255760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b03881630141561294e5760405162461bcd60e51b815260040161083290614a07565b604051631759616b60e11b81526001600160a01b03891690632eb2c2d6906129889030908b908b908b908b908b908b908b90600401614835565b600060405180830381600087803b1580156129a257600080fd5b505af11580156129b6573d6000803e3d6000fd5b50505050866001600160a01b0316886001600160a01b03167fc8144f7a11a69e58de79275b3e7420b4942b4e8318a0e0aa9ccb457c60387b02888888888888604051612a079695949392919061498b565b60405180910390a35050600060cc55505050505050565b60606000612a2d30601461341c565b905080604051602001612a4091906147f0565b60405160208183030381529060405291505090565b600160cc541415612a785760405162461bcd60e51b815260040161083290614b45565b600160cc5560cb546001600160a01b03163314612aa75760405162461bcd60e51b815260040161083290614a8c565b60c95460405163469b29cd60e01b81526001600160a01b039091169063469b29cd90612ad99085908590600401614977565b600060405180830381600087803b158015612af357600080fd5b505af1158015612b07573d6000803e3d6000fd5b5050600060cc5550505050565b60d35460009060ff16612b845760c9546001600160a01b0316336001600160a01b031614612b845760405162461bcd60e51b815260206004820152601c60248201527f424e46543a206e6f742061636365707461626c652065726331313535000000006044820152606401610832565b5063f23a6e6160e01b9695505050505050565b60cb546001600160a01b03163314612bc15760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116612c235760405162461bcd60e51b815260206004820152602360248201527f424e46543a206e6577206f776e657220697320746865207a65726f206164647260448201526265737360e81b6064820152608401610832565b611b82816130f2565b60006001600160e01b031982166380ac58cd60e01b1480612c5d57506001600160e01b03198216635b5e139f60e01b145b8061072557506301ffc9a760e01b6001600160e01b0319831614610725565b6000610e0e836001600160a01b0384166135fd565b6000610e0e836001600160a01b03841661364c565b6001600160a01b038416612ccc5760405162461bcd60e51b815260040161083290614a4a565b60d054604080516373e4285160e01b815290516000926001600160a01b0316916373e42851916004808301926020929190829003018186803b158015612d1157600080fd5b505afa158015612d25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d499190613de8565b905060005b83811015612e74576000612d87868684818110612d7b57634e487b7160e01b600052603260045260246000fd5b905060200201356119b6565b90506001600160a01b0381163314612db15760405162461bcd60e51b815260040161083290614ac3565b60c9546001600160a01b038085169163537a5c3d918a9116898987818110612de957634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152506020909102013560448201528615156064820152608401600060405180830381600087803b158015612e4857600080fd5b505af1158015612e5c573d6000803e3d6000fd5b50505050508080612e6c90614d78565b915050612d4e565b505050505050565b60606000610e0e83613769565b6001600160a01b038216612edf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610832565b6000818152606760205260409020546001600160a01b031615612f445760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610832565b612f50600083836137c5565b6001600160a01b0382166000908152606860205260408120805460019290612f79908490614ca8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45b5050565b6000612fe3826119b6565b9050612ff1816000846137c5565b612ffc60008361387d565b6001600160a01b0381166000908152606860205260408120805460019290613025908490614cdf565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610725825490565b600080613095846119b6565b905060006130a285611f46565b9050816001600160a01b0316846001600160a01b031614806130e957506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b95945050505050565b60cb80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091015b60405180910390a15050565b60d080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526001830160205260408120541515610e0e565b60cd80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f03a10997c98b0878c1fd2feebb4382f49c6d47668492dc17c8e85d8827d92dbf9101613148565b6060611bb284846000856138eb565b6001600160a01b0384166132275760405162461bcd60e51b815260040161083290614a4a565b60d054604080516301e58dc960e61b815290516000926001600160a01b0316916379637240916004808301926020929190829003018186803b15801561326c57600080fd5b505afa158015613280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a49190613de8565b905060005b83811015612e745760006132d6868684818110612d7b57634e487b7160e01b600052603260045260246000fd5b90506001600160a01b03811633146133005760405162461bcd60e51b815260040161083290614ac3565b60c9546001600160a01b038085169163b18e2bbb918a911689898781811061333857634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b0395861660048201529490931660248501525060209091020135604482015260006064820152861515608482015260a401602060405180830381600087803b15801561339e57600080fd5b505af11580156133b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133d691906145e3565b505080806133e390614d78565b9150506132a9565b600054610100900460ff166134125760405162461bcd60e51b815260040161083290614afa565b612fd48282613a1c565b6060600061342b836002614cc0565b613436906002614ca8565b6001600160401b0381111561345b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613485576020820181803683370190505b509050600360fc1b816000815181106134ae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134eb57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061350f846002614cc0565b61351a906001614ca8565b90505b60018111156135ae576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061355c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061358057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936135a781614d26565b905061351d565b508315610e0e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610832565b600081815260018301602052604081205461364457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610725565b506000610725565b6000818152600183016020526040812054801561375f576000613670600183614cdf565b855490915060009061368490600190614cdf565b90508181146137055760008660000182815481106136b257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106136e357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061372457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610725565b6000915050610725565b6060816000018054806020026020016040519081016040528092919081815260200182805480156137b957602002820191906000526020600020905b8154815260200190600101908083116137a5575b50505050509050919050565b6001600160a01b0383166138205761381b81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b613843565b816001600160a01b0316836001600160a01b031614613843576138438382613a6a565b6001600160a01b03821661385a5761097781613b07565b826001600160a01b0316826001600160a01b031614610977576109778282613be0565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906138b2826119b6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60608247101561394c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610832565b6001600160a01b0385163b6139a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610832565b600080866001600160a01b031685876040516139bf91906147d4565b60006040518083038185875af1925050503d80600081146139fc576040519150601f19603f3d011682016040523d82523d6000602084013e613a01565b606091505b5091509150613a11828286613c24565b979650505050505050565b600054610100900460ff16613a435760405162461bcd60e51b815260040161083290614afa565b8151613a56906065906020850190613c5d565b508051610977906066906020840190613c5d565b60006001613a7784611a2d565b613a819190614cdf565b600083815260986020526040902054909150808214613ad4576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090613b1990600190614cdf565b6000838152609a602052604081205460998054939450909284908110613b4f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060998381548110613b7e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480613bc457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613beb83611a2d565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b60608315613c33575081610e0e565b825115613c435782518084602001fd5b8160405162461bcd60e51b815260040161083291906149d4565b828054613c6990614d3d565b90600052602060002090601f016020900481019282613c8b5760008555613cd1565b82601f10613ca457805160ff1916838001178555613cd1565b82800160010185558215613cd1579182015b82811115613cd1578251825591602001919060010190613cb6565b50613cdd929150613ce1565b5090565b5b80821115613cdd5760008155600101613ce2565b6000613d09613d0484614c81565b614c2e565b9050828152838383011115613d1d57600080fd5b828260208301376000602084830101529392505050565b8051613d3f81614dbf565b919050565b60008083601f840112613d55578182fd5b5081356001600160401b03811115613d6b578182fd5b6020830191508360208260051b8501011115613d8657600080fd5b9250929050565b60008083601f840112613d9e578182fd5b5081356001600160401b03811115613db4578182fd5b602083019150836020828501011115613d8657600080fd5b600060208284031215613ddd578081fd5b8135610e0e81614dbf565b600060208284031215613df9578081fd5b8151610e0e81614dbf565b60008060408385031215613e16578081fd5b8235613e2181614dbf565b91506020830135613e3181614dbf565b809150509250929050565b60008060008060608587031215613e51578182fd5b8435613e5c81614dbf565b93506020850135613e6c81614dbf565b925060408501356001600160401b03811115613e86578283fd5b613e9287828801613d44565b95989497509550505050565b60008060008060008060008060a0898b031215613eb9578586fd5b8835613ec481614dbf565b97506020890135613ed481614dbf565b965060408901356001600160401b0380821115613eef578788fd5b613efb8c838d01613d44565b909850965060608b0135915080821115613f13578586fd5b613f1f8c838d01613d44565b909650945060808b0135915080821115613f37578384fd5b50613f448b828c01613d8d565b999c989b5096995094979396929594505050565b600080600060608486031215613f6c578081fd5b8335613f7781614dbf565b92506020840135613f8781614dbf565b929592945050506040919091013590565b600080600080600060808688031215613faf578283fd5b8535613fba81614dbf565b94506020860135613fca81614dbf565b93506040860135925060608601356001600160401b03811115613feb578182fd5b613ff788828901613d8d565b969995985093965092949392505050565b6000806000806080858703121561401d578182fd5b843561402881614dbf565b9350602085013561403881614dbf565b92506040850135915060608501356001600160401b03811115614059578182fd5b8501601f81018713614069578182fd5b61407887823560208401613cf6565b91505092959194509250565b60008060008060008060a0878903121561409c578384fd5b86356140a781614dbf565b955060208701356140b781614dbf565b9450604087013593506060870135925060808701356001600160401b038111156140df578283fd5b6140eb89828a01613d8d565b979a9699509497509295939492505050565b60008060008060608587031215614112578182fd5b843561411d81614dbf565b935060208501356001600160401b03811115614137578283fd5b61414387828801613d44565b909450925050604085013561415781614dd4565b939692955090935050565b600080600080600060608688031215614179578283fd5b853561418481614dbf565b945060208601356001600160401b038082111561419f578485fd5b6141ab89838a01613d44565b909650945060408801359150808211156141c3578283fd5b50613ff788828901613d8d565b600080604083850312156141e2578182fd5b82356141ed81614dbf565b91506020830135613e3181614dd4565b600080600060408486031215614211578081fd5b833561421c81614dbf565b925060208401356001600160401b03811115614236578182fd5b61424286828701613d8d565b9497909650939450505050565b60008060008060008060008060c0898b03121561426a578182fd5b883561427581614dbf565b975060208901356001600160401b0380821115614290578384fd5b61429c8c838d01613d8d565b909950975060408b01359150808211156142b4578384fd5b506142c18b828c01613d8d565b90965094505060608901356142d581614dbf565b925060808901356142e581614dbf565b915060a08901356142f581614dbf565b809150509295985092959890939650565b60008060408385031215614318578182fd5b823561432381614dbf565b915060208301356001600160401b0381111561433d578182fd5b8301601f8101851361434d578182fd5b61435c85823560208401613cf6565b9150509250929050565b60008060408385031215614378578182fd5b823561438381614dbf565b946020939093013593505050565b600060208083850312156143a3578182fd5b82516001600160401b038111156143b8578283fd5b8301601f810185136143c8578283fd5b80516143d6613d0482614c5e565b80828252848201915084840188868560051b87010111156143f5578687fd5b8694505b8385101561442057805161440c81614dbf565b8352600194909401939185019185016143f9565b50979650505050505050565b6000602080838503121561443e578182fd5b82516001600160401b03811115614453578283fd5b8301601f81018513614463578283fd5b8051614471613d0482614c5e565b8181528381019083850160e0808502860187018a101561448f578788fd5b8795505b848610156145265780828b0312156144a9578788fd5b6144b1614c06565b8251600681106144bf57898afd5b81526144cc838901613d34565b8882015260406144dd818501613d34565b908201526060838101519082015260806144f8818501613d34565b9082015260a0838101519082015260c080840151908201528452600195909501949286019290810190614493565b509098975050505050505050565b60008060208385031215614546578182fd5b82356001600160401b0381111561455b578283fd5b61456785828601613d44565b90969095509350505050565b600080600060408486031215614587578081fd5b83356001600160401b0381111561459c578182fd5b6145a886828701613d44565b90945092505060208401356145bc81614dd4565b809150509250925092565b6000602082840312156145d8578081fd5b8151610e0e81614dd4565b6000602082840312156145f4578081fd5b5051919050565b60006020828403121561460c578081fd5b81356001600160e01b031981168114610e0e578182fd5b600060208284031215614634578081fd5b81516001600160401b03811115614649578182fd5b8201601f81018413614659578182fd5b8051614667613d0482614c81565b81815285602083850101111561467b578384fd5b6130e9826020830160208601614cf6565b60006020828403121561469d578081fd5b5035919050565b600080604083850312156146b6578182fd5b823591506020830135613e3181614dbf565b6000806000606084860312156146dc578081fd5b8335925060208401356146ee81614dbf565b915060408401356145bc81614dbf565b600080600060608486031215614712578081fd5b83359250602084013561472481614dbf565b915060408401356145bc81614dd4565b6000815180845260208085019450808401835b8381101561476c5781516001600160a01b031687529582019590820190600101614747565b509495945050505050565b81835260006001600160fb1b0383111561478f578081fd5b8260051b80836020870137939093016020019283525090919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600082516147e6818460208701614cf6565b9190910192915050565b7f68747470733a2f2f6d657461646174612e62656e6464616f2e78797a2f00000081526000825161482881601d850160208701614cf6565b91909101601d0192915050565b6001600160a01b0389811682528816602082015260a060408201819052600090614862908301888a614777565b8281036060840152614875818789614777565b9050828103608084015261488a8185876147ab565b9b9a5050505050505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060018060a01b03808a16835260a060208401526148e060a08401898b614777565b81881660408501528187166060850152838103608085015261488a8186886147ab565b602081526000610e0e6020830184614734565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561496a57603f19888603018452614958858351614734565b9450928501929085019060010161493c565b5092979650505050505050565b602081526000611bb2602083018486614777565b60608152600061499f60608301888a614777565b82810360208401526149b2818789614777565b905082810360408401526149c78185876147ab565b9998505050505050505050565b60208152600082518060208401526149f3816040850160208701614cf6565b601f01601f19169190910160400192915050565b60208082526023908201527f424e46543a20746f6b656e2063616e206e6f742062652073656c66206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f424e46543a2064656c656761746520697320746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601d908201527f424e46543a2063616c6c6572206973206e6f7420746865206f776e6572000000604082015260600190565b60208082526019908201527f424e46543a2063616c6c6572206973206e6f74206f776e657200000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526023908201527f424e46543a2063616c6c6572206973206e6f742074686520636c61696d20616460408201526236b4b760e91b606082015260800190565b60208082526027908201527f424e46543a20746f6b656e2063616e206e6f7420626520756e6465726c79696e60408201526619c8185cdcd95d60ca1b606082015260800190565b60405160e081016001600160401b0381118282101715614c2857614c28614da9565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614c5657614c56614da9565b604052919050565b60006001600160401b03821115614c7757614c77614da9565b5060051b60200190565b60006001600160401b03821115614c9a57614c9a614da9565b50601f01601f191660200190565b60008219821115614cbb57614cbb614d93565b500190565b6000816000190483118215151615614cda57614cda614d93565b500290565b600082821015614cf157614cf1614d93565b500390565b60005b83811015614d11578181015183820152602001614cf9565b83811115614d20576000848401525b50505050565b600081614d3557614d35614d93565b506000190190565b600181811c90821680614d5157607f821691505b60208210811415614d7257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614d8c57614d8c614d93565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611b8257600080fd5b8015158114611b8257600080fdfea2646970667358221220699bd73a1bd56d23e4ddd7089d391598944ea9cc81c0496ce80ee94d159c6e5e64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102d65760003560e01c806377f50f9711610182578063b88d4fde116100e9578063db8d8fc6116100a2578063e985e9c51161007c578063e985e9c51461068b578063f1c8ddbc146106c7578063f23a6e61146106da578063f2fde38b146106ed57600080fd5b8063db8d8fc61461065d578063e3185e1214610670578063e8a3d4851461068357600080fd5b8063b88d4fde146105f0578063bc197c81146105fe578063c27bf5c814610611578063c87b56dd14610624578063cae5955314610637578063d2a14c901461064a57600080fd5b80639a52c5681161013b5780639a52c5681461055c5780639d25f80f1461056d5780639e942ace146105a9578063a22cb465146105bc578063a6b44210146105ca578063ae9caffb146105dd57600080fd5b806377f50f97146104f9578063844819531461050a5780638da5cb5b1461051d57806393bd552a1461052e57806395d51ce91461054157806395d89b411461055457600080fd5b80633e342ff2116102415780635edb331c116101fa578063715018a6116101d4578063715018a6146104ba5780637158da7c146104c2578063722b5374146104d3578063772cbf6b146104e657600080fd5b80635edb331c146104815780636352211e1461049457806370a08231146104a757600080fd5b80633e342ff21461041557806340c10f191461043557806342842e0e146103dc57806342966c68146104485780634f0709161461045b5780634f6ccce71461046e57600080fd5b806318160ddd1161029357806318160ddd146103975780631b885459146103a95780631c11522b146103bc57806323b872dd146103dc5780632f745c59146103ef578063340578e41461040257600080fd5b806301ffc9a7146102db57806306fdde0314610303578063081812fc14610318578063095ea7b3146103435780630c37929e14610358578063150b7a021461036b575b600080fd5b6102ee6102e93660046145fb565b610700565b60405190151581526020015b60405180910390f35b61030b61072b565b6040516102fa91906149d4565b61032b61032636600461468c565b6107bd565b6040516001600160a01b0390911681526020016102fa565b610356610351366004614366565b610857565b005b6103566103663660046146fe565b610898565b61037e610379366004613f98565b61097c565b6040516001600160e01b031990911681526020016102fa565b6099545b6040519081526020016102fa565b61039b6103b7366004614306565b6109fe565b6103cf6103ca366004614534565b610adc565b6040516102fa9190614916565b6103566103ea366004613f58565b610cc9565b61039b6103fd366004614366565b610d0a565b6103566104103660046140fd565b610da0565b6104286104233660046146a4565b610ddf565b6040516102fa9190614903565b610356610443366004614366565b610e15565b61035661045636600461468c565b611084565b610356610469366004613f58565b611260565b61039b61047c36600461468c565b6113e3565b61035661048f366004614162565b611484565b61032b6104a236600461468c565b6119b6565b61039b6104b5366004613dcc565b611a2d565b610356611ab4565b60c9546001600160a01b031661032b565b6103566104e1366004613dcc565b611aea565b6102ee6104f43660046146c8565b611b85565b60cd546001600160a01b031661032b565b610356610518366004614573565b611bba565b60cb546001600160a01b031661032b565b61035661053c366004613dcc565b611bf8565b61035661054f3660046141fd565b611c8d565b61030b611f37565b60d0546001600160a01b031661032b565b6102ee61057b366004613e04565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b61032b6105b736600461468c565b611f46565b6103566103513660046141d0565b6103cf6105d8366004614534565b611fbc565b6103566105eb3660046141d0565b612365565b6103566103ea366004614008565b61037e61060c366004613e9e565b6123f1565b61035661061f366004614573565b612476565b61030b61063236600461468c565b6124aa565b610356610645366004613e3c565b61252b565b6103566106583660046140fd565b6126d3565b61035661066b36600461424f565b612707565b61035661067e366004613e9e565b6128a5565b61030b612a1e565b6102ee610699366004613e04565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6103566106d5366004614534565b612a55565b61037e6106e8366004614084565b612b14565b6103566106fb366004613dcc565b612b97565b60006001600160e01b0319821663780e9d6360e01b1480610725575061072582612c2c565b92915050565b60606065805461073a90614d3d565b80601f016020809104026020016040519081016040528092919081815260200182805461076690614d3d565b80156107b35780601f10610788576101008083540402835291602001916107b3565b820191906000526020600020905b81548152906001019060200180831161079657829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b031661083b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60405162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152606401610832565b801561090f5733600090815260cf6020908152604080832086845290915290206108c29083612c7c565b5060408051848152600160208201526001600160a01b0384169133917f24e54b4b5d12d667319275fb50d50071162f76f8062063c801f3bd99f9e57c3991015b60405180910390a3505050565b33600090815260cf6020908152604080832086845290915290206109339083612c91565b5060408051848152600060208201526001600160a01b0384169133917f24e54b4b5d12d667319275fb50d50071162f76f8062063c801f3bd99f9e57c399101610902565b505050565b60d35460009060ff166109ec5760c9546001600160a01b0316336001600160a01b0316146109ec5760405162461bcd60e51b815260206004820152601b60248201527f424e46543a206e6f742061636365707461626c652065726337323100000000006044820152606401610832565b50630a85bd0160e11b95945050505050565b6000600160cc541415610a235760405162461bcd60e51b815260040161083290614b45565b600160cc5560cb546001600160a01b03163314610a525760405162461bcd60e51b815260040161083290614a8c565b60405163c47f002760e01b81526001600160a01b0384169063c47f002790610a7e9085906004016149d4565b602060405180830381600087803b158015610a9857600080fd5b505af1158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad091906145e3565b600060cc559392505050565b6060600060d060009054906101000a90046001600160a01b03166001600160a01b03166373e428516040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2e57600080fd5b505afa158015610b42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b669190613de8565b90506000836001600160401b03811115610b9057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610bc357816020015b6060815260200190600190039081610bae5790505b50905060005b84811015610cc05760c9546001600160a01b0380851691631221156b91309116898986818110610c0957634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610c2e93929190614899565b60006040518083038186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c829190810190614391565b828281518110610ca257634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610cb890614d78565b915050610bc9565b50949350505050565b60405162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152606401610832565b6000610d1583611a2d565b8210610d775760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610832565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b600160cc541415610dc35760405162461bcd60e51b815260040161083290614b45565b600160cc55610dd484848484612ca6565b5050600060cc555050565b6001600160a01b038116600090815260cf602090815260408083208584529091529020606090610e0e90612e7c565b9392505050565b600160cc541415610e385760405162461bcd60e51b815260040161083290614b45565b600160cc55333b151580610e97576001600160a01b0383163314610e975760405162461bcd60e51b8152602060048201526016602482015275424e46543a2063616c6c6572206973206e6f7420746f60501b6044820152606401610832565b6000828152606760205260409020546001600160a01b031615610ef05760405162461bcd60e51b81526020600482015260116024820152702127232a1d1032bc34b9ba103a37b5b2b760791b6044820152606401610832565b3360c9546040516331a9108f60e11b8152600481018590526001600160a01b039283169290911690636352211e9060240160206040518083038186803b158015610f3957600080fd5b505afa158015610f4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f719190613de8565b6001600160a01b031614610f975760405162461bcd60e51b815260040161083290614ac3565b610fa18383612e89565b33600083815260ca6020526040902080546001600160a01b0319166001600160a01b0392831617905560c954166342842e0e3330856040518463ffffffff1660e01b8152600401610ff493929190614899565b600060405180830381600087803b15801561100e57600080fd5b505af1158015611022573d6000803e3d6000fd5b505060c9546001600160a01b038681169350169050336001600160a01b03167ff9403b28cc8805935e0ce6943ed646d5fde3d1e14f6b398e85bfa2851d1b85f78560405161107291815260200190565b60405180910390a45050600060cc5550565b600160cc5414156110a75760405162461bcd60e51b815260040161083290614b45565b600160cc556000818152606760205260409020546001600160a01b03166111075760405162461bcd60e51b81526020600482015260146024820152732127232a1d103737b732bc34b9ba103a37b5b2b760611b6044820152606401610832565b600081815260ca60205260409020546001600160a01b0316331461116d5760405162461bcd60e51b815260206004820152601a60248201527f424e46543a2063616c6c6572206973206e6f74206d696e7465720000000000006044820152606401610832565b6000611178826119b6565b905061118382612fd8565b600082815260ca6020526040902080546001600160a01b031916905560c9546001600160a01b03166342842e0e3033856040518463ffffffff1660e01b81526004016111d193929190614899565b600060405180830381600087803b1580156111eb57600080fd5b505af11580156111ff573d6000803e3d6000fd5b505060c9546001600160a01b038481169350169050336001600160a01b03167f3dd1df88dc92e2788892542d81f999d720a44b4c127065d45c128f4f59fdc3738560405161124f91815260200190565b60405180910390a45050600060cc55565b600160cc5414156112835760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b031633146112b25760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03848116911614156112e05760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b0383163014156113095760405162461bcd60e51b815260040161083290614a07565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb90604401602060405180830381600087803b15801561135357600080fd5b505af1158015611367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138b91906145c7565b50816001600160a01b0316836001600160a01b03167f81275949a17d84915b61eeb24587a501cc8863011afba1ed12f3f6c5bdfd6a21836040516113d191815260200190565b60405180910390a35050600060cc5550565b60006113ee60995490565b82106114515760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610832565b6099828154811061147257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600160cc5414156114a75760405162461bcd60e51b815260040161083290614b45565b600160cc556000856001600160a01b0381166114fa5760405162461bcd60e51b8152602060048201526012602482015271424e46543a207a65726f206164647265737360701b6044820152606401610832565b846115405760405162461bcd60e51b8152602060048201526016602482015275109391950e88195b5c1d1e481d1bdad95b881b1a5cdd60521b6044820152606401610832565b600091505b848210156116f757600061157e87878581811061157257634e487b7160e01b600052603260045260246000fd5b90506020020135611f46565b6001600160a01b038116600090815260cf60205260408120919250906115d990828a8a888181106115bf57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002061307f565b11156116625761161187878581811061160257634e487b7160e01b600052603260045260246000fd5b90506020020135826104f43390565b61165d5760405162461bcd60e51b815260206004820152601f60248201527f424e46543a2063616c6c657220776974686f7574207065726d697373696f6e006044820152606401610832565b6116e4565b61169887878581811061168557634e487b7160e01b600052603260045260246000fd5b905060200201356116933390565b613089565b6116e45760405162461bcd60e51b815260206004820152601f60248201527f424e46543a2063616c6c657220776974686f7574207065726d697373696f6e006044820152606401610832565b50816116ef81614d78565b925050611545565b600091505b848210156117a15760c9546001600160a01b03166342842e0e308989898781811061173757634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161175c93929190614899565b600060405180830381600087803b15801561177657600080fd5b505af115801561178a573d6000803e3d6000fd5b50505050818061179990614d78565b9250506116fc565b60c9546040516347048c9960e01b81526001600160a01b03838116926347048c99926117df92909116908a908a90339030908c908c906004016148bd565b602060405180830381600087803b1580156117f957600080fd5b505af115801561180d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183191906145c7565b61188d5760405162461bcd60e51b815260206004820152602760248201527f424e46543a20696e76616c696420666c6173686c6f616e206578656375746f72604482015266103932ba3ab93760c91b6064820152608401610832565b600091505b848210156119a85760c9546001600160a01b03166342842e0e88308989878181106118cd57634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b81526004016118f293929190614899565b600060405180830381600087803b15801561190c57600080fd5b505af1158015611920573d6000803e3d6000fd5b505060c9546001600160a01b03908116925033915089167f5a9eeaf8949838813289046091e8ea8a9196a2265ac24841464a2d27026a854989898781811061197857634e487b7160e01b600052603260045260246000fd5b9050602002013560405161198e91815260200190565b60405180910390a4816119a081614d78565b925050611892565b5050600060cc555050505050565b6000818152606760205260408120546001600160a01b0316806107255760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610832565b60006001600160a01b038216611a985760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610832565b506001600160a01b031660009081526068602052604090205490565b60cb546001600160a01b03163314611ade5760405162461bcd60e51b815260040161083290614a8c565b611ae860006130f2565b565b60cb546001600160a01b03163314611b145760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116611b795760405162461bcd60e51b815260206004820152602660248201527f424e46543a206e657720726567697374727920697320746865207a65726f206160448201526564647265737360d01b6064820152608401610832565b611b8281613154565b50565b6001600160a01b038216600090815260cf602090815260408083208684529091528120611bb29083613176565b949350505050565b600160cc541415611bdd5760405162461bcd60e51b815260040161083290614b45565b600160cc55611bee33848484612ca6565b5050600060cc5550565b60cb546001600160a01b03163314611c225760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116611c845760405162461bcd60e51b815260206004820152602360248201527f424e46543a206e65772061646d696e20697320746865207a65726f206164647260448201526265737360e81b6064820152608401610832565b611b8281613198565b600160cc541415611cb05760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b03163314611cdf5760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b0384811691161415611d4f5760405162461bcd60e51b815260206004820152602960248201527f424e46543a2061697264726f702063616e206e6f7420626520756e6465726c796044820152681a5b99c8185cdcd95d60ba1b6064820152608401610832565b6001600160a01b038316301415611db65760405162461bcd60e51b815260206004820152602560248201527f424e46543a2061697264726f702063616e206e6f742062652073656c66206164604482015264647265737360d81b6064820152608401610832565b6001600160a01b038316611e1b5760405162461bcd60e51b815260206004820152602660248201527f424e46543a20696e76616c69642061697264726f7020636f6e7472616374206160448201526564647265737360d01b6064820152608401610832565b6004811015611e6c5760405162461bcd60e51b815260206004820181905260248201527f424e46543a20696e76616c69642061697264726f7020706172616d65746572736044820152606401610832565b60d3805460ff19166001179055604080516020601f8401819004810282018101909252828152611eee9185919085908590819084018382808284376000920191909152505060408051808201909152601a81527f63616c6c2061697264726f70206d6574686f64206661696c6564000000000000602082015291506131f29050565b5060d3805460ff191690556040516001600160a01b038416907fd2c36dd5803814dde11f682939a7f3d4936f4297fea9a45646220e4241ce092d90600090a25050600060cc5550565b60606066805461073a90614d3d565b600081815260ca60205260408120546001600160a01b0316806107255760405162461bcd60e51b815260206004820152602860248201527f424e46543a206d696e74657220717565727920666f72206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610832565b6060600060d060009054906101000a90046001600160a01b03166001600160a01b031663796372406040518163ffffffff1660e01b815260040160206040518083038186803b15801561200e57600080fd5b505afa158015612022573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120469190613de8565b6040516328a92f4d60e11b81523060048201529091506000906001600160a01b038316906351525e9a9060240160006040518083038186803b15801561208b57600080fd5b505afa15801561209f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120c7919081019061442c565b90506000846001600160401b038111156120f157634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561212457816020015b606081526020019060019003908161210f5790505b50905060005b8581101561235b576000805b84518110156121b85788888481811061215f57634e487b7160e01b600052603260045260246000fd5b9050602002013585828151811061218657634e487b7160e01b600052603260045260246000fd5b602002602001015160a0015114156121a657816121a281614d78565b9250505b806121b081614d78565b915050612136565b50806001600160401b038111156121df57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612208578160200160208202803683370190505b5083838151811061222957634e487b7160e01b600052603260045260246000fd5b60200260200101819052506000805b85518110156123455789898581811061226157634e487b7160e01b600052603260045260246000fd5b9050602002013586828151811061228857634e487b7160e01b600052603260045260246000fd5b602002602001015160a001511415612333578581815181106122ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518585815181106122e657634e487b7160e01b600052603260045260246000fd5b6020026020010151838151811061230d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528161232f81614d78565b9250505b8061233d81614d78565b915050612238565b505050808061235390614d78565b91505061212a565b5095945050505050565b600160cc5414156123885760405162461bcd60e51b815260040161083290614b45565b600160cc5533600081815260ce602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155905190815283917f52e8fd59cc21eb31dd0df5637f0aa94f183391c23c69212859a7506410451fbd91016113d1565b60d35460009060ff166124615760c9546001600160a01b0316336001600160a01b0316146124615760405162461bcd60e51b815260206004820152601c60248201527f424e46543a206e6f742061636365707461626c652065726331313535000000006044820152606401610832565b5063bc197c8160e01b98975050505050505050565b600160cc5414156124995760405162461bcd60e51b815260040161083290614b45565b600160cc55611bee33848484613201565b60c95460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b1580156124ef57600080fd5b505afa158015612503573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107259190810190614623565b600160cc54141561254e5760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b0316331461257d5760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03858116911614156125ab5760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b0384163014156125d45760405162461bcd60e51b815260040161083290614a07565b60005b8181101561267a57846001600160a01b03166342842e0e308686868681811061261057634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b815260040161263593929190614899565b600060405180830381600087803b15801561264f57600080fd5b505af1158015612663573d6000803e3d6000fd5b50505050808061267290614d78565b9150506125d7565b50826001600160a01b0316846001600160a01b03167f6c6b18e67b757c02ba92ef0f54038fc2135767acf9bef174b8780835ff45582284846040516126c0929190614977565b60405180910390a35050600060cc555050565b600160cc5414156126f65760405162461bcd60e51b815260040161083290614b45565b600160cc55610dd484848484613201565b600054610100900460ff166127225760005460ff1615612726565b303b155b6127895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610832565b600054610100900460ff161580156127ab576000805461ffff19166101011790555b61281e88888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506133eb92505050565b60c980546001600160a01b0319166001600160a01b038b16179055612842846130f2565b61284b83613198565b61285482613154565b6040516001600160a01b038a16907f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e690600090a2801561289a576000805461ff00191690555b505050505050505050565b600160cc5414156128c85760405162461bcd60e51b815260040161083290614b45565b600160cc5560cd546001600160a01b031633146128f75760405162461bcd60e51b815260040161083290614b7c565b60c9546001600160a01b03898116911614156129255760405162461bcd60e51b815260040161083290614bbf565b6001600160a01b03881630141561294e5760405162461bcd60e51b815260040161083290614a07565b604051631759616b60e11b81526001600160a01b03891690632eb2c2d6906129889030908b908b908b908b908b908b908b90600401614835565b600060405180830381600087803b1580156129a257600080fd5b505af11580156129b6573d6000803e3d6000fd5b50505050866001600160a01b0316886001600160a01b03167fc8144f7a11a69e58de79275b3e7420b4942b4e8318a0e0aa9ccb457c60387b02888888888888604051612a079695949392919061498b565b60405180910390a35050600060cc55505050505050565b60606000612a2d30601461341c565b905080604051602001612a4091906147f0565b60405160208183030381529060405291505090565b600160cc541415612a785760405162461bcd60e51b815260040161083290614b45565b600160cc5560cb546001600160a01b03163314612aa75760405162461bcd60e51b815260040161083290614a8c565b60c95460405163469b29cd60e01b81526001600160a01b039091169063469b29cd90612ad99085908590600401614977565b600060405180830381600087803b158015612af357600080fd5b505af1158015612b07573d6000803e3d6000fd5b5050600060cc5550505050565b60d35460009060ff16612b845760c9546001600160a01b0316336001600160a01b031614612b845760405162461bcd60e51b815260206004820152601c60248201527f424e46543a206e6f742061636365707461626c652065726331313535000000006044820152606401610832565b5063f23a6e6160e01b9695505050505050565b60cb546001600160a01b03163314612bc15760405162461bcd60e51b815260040161083290614a8c565b6001600160a01b038116612c235760405162461bcd60e51b815260206004820152602360248201527f424e46543a206e6577206f776e657220697320746865207a65726f206164647260448201526265737360e81b6064820152608401610832565b611b82816130f2565b60006001600160e01b031982166380ac58cd60e01b1480612c5d57506001600160e01b03198216635b5e139f60e01b145b8061072557506301ffc9a760e01b6001600160e01b0319831614610725565b6000610e0e836001600160a01b0384166135fd565b6000610e0e836001600160a01b03841661364c565b6001600160a01b038416612ccc5760405162461bcd60e51b815260040161083290614a4a565b60d054604080516373e4285160e01b815290516000926001600160a01b0316916373e42851916004808301926020929190829003018186803b158015612d1157600080fd5b505afa158015612d25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d499190613de8565b905060005b83811015612e74576000612d87868684818110612d7b57634e487b7160e01b600052603260045260246000fd5b905060200201356119b6565b90506001600160a01b0381163314612db15760405162461bcd60e51b815260040161083290614ac3565b60c9546001600160a01b038085169163537a5c3d918a9116898987818110612de957634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b039586166004820152949093166024850152506020909102013560448201528615156064820152608401600060405180830381600087803b158015612e4857600080fd5b505af1158015612e5c573d6000803e3d6000fd5b50505050508080612e6c90614d78565b915050612d4e565b505050505050565b60606000610e0e83613769565b6001600160a01b038216612edf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610832565b6000818152606760205260409020546001600160a01b031615612f445760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610832565b612f50600083836137c5565b6001600160a01b0382166000908152606860205260408120805460019290612f79908490614ca8565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45b5050565b6000612fe3826119b6565b9050612ff1816000846137c5565b612ffc60008361387d565b6001600160a01b0381166000908152606860205260408120805460019290613025908490614cdf565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610725825490565b600080613095846119b6565b905060006130a285611f46565b9050816001600160a01b0316846001600160a01b031614806130e957506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b95945050505050565b60cb80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091015b60405180910390a15050565b60d080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526001830160205260408120541515610e0e565b60cd80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f03a10997c98b0878c1fd2feebb4382f49c6d47668492dc17c8e85d8827d92dbf9101613148565b6060611bb284846000856138eb565b6001600160a01b0384166132275760405162461bcd60e51b815260040161083290614a4a565b60d054604080516301e58dc960e61b815290516000926001600160a01b0316916379637240916004808301926020929190829003018186803b15801561326c57600080fd5b505afa158015613280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a49190613de8565b905060005b83811015612e745760006132d6868684818110612d7b57634e487b7160e01b600052603260045260246000fd5b90506001600160a01b03811633146133005760405162461bcd60e51b815260040161083290614ac3565b60c9546001600160a01b038085169163b18e2bbb918a911689898781811061333857634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b0395861660048201529490931660248501525060209091020135604482015260006064820152861515608482015260a401602060405180830381600087803b15801561339e57600080fd5b505af11580156133b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133d691906145e3565b505080806133e390614d78565b9150506132a9565b600054610100900460ff166134125760405162461bcd60e51b815260040161083290614afa565b612fd48282613a1c565b6060600061342b836002614cc0565b613436906002614ca8565b6001600160401b0381111561345b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613485576020820181803683370190505b509050600360fc1b816000815181106134ae57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134eb57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061350f846002614cc0565b61351a906001614ca8565b90505b60018111156135ae576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061355c57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061358057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936135a781614d26565b905061351d565b508315610e0e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610832565b600081815260018301602052604081205461364457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610725565b506000610725565b6000818152600183016020526040812054801561375f576000613670600183614cdf565b855490915060009061368490600190614cdf565b90508181146137055760008660000182815481106136b257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106136e357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061372457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610725565b6000915050610725565b6060816000018054806020026020016040519081016040528092919081815260200182805480156137b957602002820191906000526020600020905b8154815260200190600101908083116137a5575b50505050509050919050565b6001600160a01b0383166138205761381b81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b613843565b816001600160a01b0316836001600160a01b031614613843576138438382613a6a565b6001600160a01b03821661385a5761097781613b07565b826001600160a01b0316826001600160a01b031614610977576109778282613be0565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906138b2826119b6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60608247101561394c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610832565b6001600160a01b0385163b6139a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610832565b600080866001600160a01b031685876040516139bf91906147d4565b60006040518083038185875af1925050503d80600081146139fc576040519150601f19603f3d011682016040523d82523d6000602084013e613a01565b606091505b5091509150613a11828286613c24565b979650505050505050565b600054610100900460ff16613a435760405162461bcd60e51b815260040161083290614afa565b8151613a56906065906020850190613c5d565b508051610977906066906020840190613c5d565b60006001613a7784611a2d565b613a819190614cdf565b600083815260986020526040902054909150808214613ad4576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090613b1990600190614cdf565b6000838152609a602052604081205460998054939450909284908110613b4f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060998381548110613b7e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480613bc457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613beb83611a2d565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b60608315613c33575081610e0e565b825115613c435782518084602001fd5b8160405162461bcd60e51b815260040161083291906149d4565b828054613c6990614d3d565b90600052602060002090601f016020900481019282613c8b5760008555613cd1565b82601f10613ca457805160ff1916838001178555613cd1565b82800160010185558215613cd1579182015b82811115613cd1578251825591602001919060010190613cb6565b50613cdd929150613ce1565b5090565b5b80821115613cdd5760008155600101613ce2565b6000613d09613d0484614c81565b614c2e565b9050828152838383011115613d1d57600080fd5b828260208301376000602084830101529392505050565b8051613d3f81614dbf565b919050565b60008083601f840112613d55578182fd5b5081356001600160401b03811115613d6b578182fd5b6020830191508360208260051b8501011115613d8657600080fd5b9250929050565b60008083601f840112613d9e578182fd5b5081356001600160401b03811115613db4578182fd5b602083019150836020828501011115613d8657600080fd5b600060208284031215613ddd578081fd5b8135610e0e81614dbf565b600060208284031215613df9578081fd5b8151610e0e81614dbf565b60008060408385031215613e16578081fd5b8235613e2181614dbf565b91506020830135613e3181614dbf565b809150509250929050565b60008060008060608587031215613e51578182fd5b8435613e5c81614dbf565b93506020850135613e6c81614dbf565b925060408501356001600160401b03811115613e86578283fd5b613e9287828801613d44565b95989497509550505050565b60008060008060008060008060a0898b031215613eb9578586fd5b8835613ec481614dbf565b97506020890135613ed481614dbf565b965060408901356001600160401b0380821115613eef578788fd5b613efb8c838d01613d44565b909850965060608b0135915080821115613f13578586fd5b613f1f8c838d01613d44565b909650945060808b0135915080821115613f37578384fd5b50613f448b828c01613d8d565b999c989b5096995094979396929594505050565b600080600060608486031215613f6c578081fd5b8335613f7781614dbf565b92506020840135613f8781614dbf565b929592945050506040919091013590565b600080600080600060808688031215613faf578283fd5b8535613fba81614dbf565b94506020860135613fca81614dbf565b93506040860135925060608601356001600160401b03811115613feb578182fd5b613ff788828901613d8d565b969995985093965092949392505050565b6000806000806080858703121561401d578182fd5b843561402881614dbf565b9350602085013561403881614dbf565b92506040850135915060608501356001600160401b03811115614059578182fd5b8501601f81018713614069578182fd5b61407887823560208401613cf6565b91505092959194509250565b60008060008060008060a0878903121561409c578384fd5b86356140a781614dbf565b955060208701356140b781614dbf565b9450604087013593506060870135925060808701356001600160401b038111156140df578283fd5b6140eb89828a01613d8d565b979a9699509497509295939492505050565b60008060008060608587031215614112578182fd5b843561411d81614dbf565b935060208501356001600160401b03811115614137578283fd5b61414387828801613d44565b909450925050604085013561415781614dd4565b939692955090935050565b600080600080600060608688031215614179578283fd5b853561418481614dbf565b945060208601356001600160401b038082111561419f578485fd5b6141ab89838a01613d44565b909650945060408801359150808211156141c3578283fd5b50613ff788828901613d8d565b600080604083850312156141e2578182fd5b82356141ed81614dbf565b91506020830135613e3181614dd4565b600080600060408486031215614211578081fd5b833561421c81614dbf565b925060208401356001600160401b03811115614236578182fd5b61424286828701613d8d565b9497909650939450505050565b60008060008060008060008060c0898b03121561426a578182fd5b883561427581614dbf565b975060208901356001600160401b0380821115614290578384fd5b61429c8c838d01613d8d565b909950975060408b01359150808211156142b4578384fd5b506142c18b828c01613d8d565b90965094505060608901356142d581614dbf565b925060808901356142e581614dbf565b915060a08901356142f581614dbf565b809150509295985092959890939650565b60008060408385031215614318578182fd5b823561432381614dbf565b915060208301356001600160401b0381111561433d578182fd5b8301601f8101851361434d578182fd5b61435c85823560208401613cf6565b9150509250929050565b60008060408385031215614378578182fd5b823561438381614dbf565b946020939093013593505050565b600060208083850312156143a3578182fd5b82516001600160401b038111156143b8578283fd5b8301601f810185136143c8578283fd5b80516143d6613d0482614c5e565b80828252848201915084840188868560051b87010111156143f5578687fd5b8694505b8385101561442057805161440c81614dbf565b8352600194909401939185019185016143f9565b50979650505050505050565b6000602080838503121561443e578182fd5b82516001600160401b03811115614453578283fd5b8301601f81018513614463578283fd5b8051614471613d0482614c5e565b8181528381019083850160e0808502860187018a101561448f578788fd5b8795505b848610156145265780828b0312156144a9578788fd5b6144b1614c06565b8251600681106144bf57898afd5b81526144cc838901613d34565b8882015260406144dd818501613d34565b908201526060838101519082015260806144f8818501613d34565b9082015260a0838101519082015260c080840151908201528452600195909501949286019290810190614493565b509098975050505050505050565b60008060208385031215614546578182fd5b82356001600160401b0381111561455b578283fd5b61456785828601613d44565b90969095509350505050565b600080600060408486031215614587578081fd5b83356001600160401b0381111561459c578182fd5b6145a886828701613d44565b90945092505060208401356145bc81614dd4565b809150509250925092565b6000602082840312156145d8578081fd5b8151610e0e81614dd4565b6000602082840312156145f4578081fd5b5051919050565b60006020828403121561460c578081fd5b81356001600160e01b031981168114610e0e578182fd5b600060208284031215614634578081fd5b81516001600160401b03811115614649578182fd5b8201601f81018413614659578182fd5b8051614667613d0482614c81565b81815285602083850101111561467b578384fd5b6130e9826020830160208601614cf6565b60006020828403121561469d578081fd5b5035919050565b600080604083850312156146b6578182fd5b823591506020830135613e3181614dbf565b6000806000606084860312156146dc578081fd5b8335925060208401356146ee81614dbf565b915060408401356145bc81614dbf565b600080600060608486031215614712578081fd5b83359250602084013561472481614dbf565b915060408401356145bc81614dd4565b6000815180845260208085019450808401835b8381101561476c5781516001600160a01b031687529582019590820190600101614747565b509495945050505050565b81835260006001600160fb1b0383111561478f578081fd5b8260051b80836020870137939093016020019283525090919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600082516147e6818460208701614cf6565b9190910192915050565b7f68747470733a2f2f6d657461646174612e62656e6464616f2e78797a2f00000081526000825161482881601d850160208701614cf6565b91909101601d0192915050565b6001600160a01b0389811682528816602082015260a060408201819052600090614862908301888a614777565b8281036060840152614875818789614777565b9050828103608084015261488a8185876147ab565b9b9a5050505050505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060018060a01b03808a16835260a060208401526148e060a08401898b614777565b81881660408501528187166060850152838103608085015261488a8186886147ab565b602081526000610e0e6020830184614734565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b8281101561496a57603f19888603018452614958858351614734565b9450928501929085019060010161493c565b5092979650505050505050565b602081526000611bb2602083018486614777565b60608152600061499f60608301888a614777565b82810360208401526149b2818789614777565b905082810360408401526149c78185876147ab565b9998505050505050505050565b60208152600082518060208401526149f3816040850160208701614cf6565b601f01601f19169190910160400192915050565b60208082526023908201527f424e46543a20746f6b656e2063616e206e6f742062652073656c66206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f424e46543a2064656c656761746520697320746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601d908201527f424e46543a2063616c6c6572206973206e6f7420746865206f776e6572000000604082015260600190565b60208082526019908201527f424e46543a2063616c6c6572206973206e6f74206f776e657200000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526023908201527f424e46543a2063616c6c6572206973206e6f742074686520636c61696d20616460408201526236b4b760e91b606082015260800190565b60208082526027908201527f424e46543a20746f6b656e2063616e206e6f7420626520756e6465726c79696e60408201526619c8185cdcd95d60ca1b606082015260800190565b60405160e081016001600160401b0381118282101715614c2857614c28614da9565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614c5657614c56614da9565b604052919050565b60006001600160401b03821115614c7757614c77614da9565b5060051b60200190565b60006001600160401b03821115614c9a57614c9a614da9565b50601f01601f191660200190565b60008219821115614cbb57614cbb614d93565b500190565b6000816000190483118215151615614cda57614cda614d93565b500290565b600082821015614cf157614cf1614d93565b500390565b60005b83811015614d11578181015183820152602001614cf9565b83811115614d20576000848401525b50505050565b600081614d3557614d35614d93565b506000190190565b600181811c90821680614d5157607f821691505b60208210811415614d7257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614d8c57614d8c614d93565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611b8257600080fd5b8015158114611b8257600080fdfea2646970667358221220699bd73a1bd56d23e4ddd7089d391598944ea9cc81c0496ce80ee94d159c6e5e64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.