Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Anomura
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {IAnomuraData} from "./AnomuraData.sol"; interface IAnomura { function ownerOf(uint256 tokenId) external view returns (address); } /// @notice Anomura contract /// Allow a bowl owner to hatch an anomura contract Anomura is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable { IAnomuraData public anomuraData; using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; string private baseURI; /// @dev Emit an event when the contract is deployed event ContractDeployed(address owner); /// @dev Emit an event so an offchain source can build the metadata URI event NewAnomura( uint256 indexed crabId, string claws, string legs, string body, string shell, string background, string headpieces ); /// @dev Emit an event when bowl address changed event UpdatedBowlContractAddress(address bowlAddress, address sender); /// @dev Emit an event when public sale is changed event UpdatedPauseContract(bool isPaused, address updatedBy); address public bowlAddress; bytes32 internal entropyMix; struct AnomuraEntity { string body; string claws; string legs; string shell; string headPieces; string background; } /** * @dev Keep track of Anomura from tokenId */ mapping(uint256 => AnomuraEntity) public anomuraMap; bool public isPaused; // ============ ACCESS CONTROL/SANITY MODIFIERS ============ /** * @dev Throws if called when contract is paused. */ modifier isNotPaused() { require(isPaused == false, "Contract is paused"); _; } /// @notice Only bowl contract can call the function /// if succeed, use the last address hash to add entropy to next address who calls the function modifier onlyBowlContract() { require(msg.sender == bowlAddress, "Can only be called by Bowl"); _; } modifier isTokenExists(uint256 _tokenId) { require(_exists(_tokenId), "Non existed token"); _; } function initialize( address _bowlAddress, address _anomuraDataAddress, string calldata _baseURI ) external initializer { require(_bowlAddress != address(0x0), "Bowl contract address is 0"); require( _anomuraDataAddress != address(0x0), "Anomura Data address is 0" ); __ERC721_init("Anomura", "ANOMURA"); __ERC721Enumerable_init(); __ReentrancyGuard_init(); __Ownable_init(); baseURI = _baseURI; bowlAddress = _bowlAddress; anomuraData = IAnomuraData(_anomuraDataAddress); isPaused = false; // to start tokenId at 1, instead of 0. _tokenIds.increment(); // emit event contract is deployed emit ContractDeployed(msg.sender); } /// @notice Generate random uint256 /// @return Random uint256 function random(string memory input) internal view returns (uint256) { return uint256( keccak256( abi.encodePacked( input, tx.gasprice, msg.sender, block.timestamp, block.basefee, blockhash(block.number - 1), entropyMix ) ) ); } /** @notice return anomura part as string a. We generate a random number, then modulo 94 to get a greatness value. b. If greatness > 92, ~1.07% chance then the output would have an unique part. If greatness > 83, ~10.64% chance then the output would have prefix, and suffix. If greatness > 74, ~20.22% chance then the output would have suffix only. If greatness > 65, ~29.79% chance then the output would have prefix only. Else the output would only contain the name of the part, a val within the sourceArray */ function pluck( uint256 tokenId, string memory keyPrefix, string[] memory sourceArray, string[] memory prefixes, string[] memory suffixes, string[] memory unique ) internal view returns (string memory) { uint256 rand = random( string( abi.encodePacked( keyPrefix, StringsUpgradeable.toString(tokenId) ) ) ); string memory output = sourceArray[rand % sourceArray.length]; uint256 greatness = rand % 94; if (greatness > 92) { output = string( abi.encodePacked(unique[rand % unique.length], " ", output) ); return output; } if (greatness > 83) { output = string( abi.encodePacked( prefixes[rand % prefixes.length], " ", output, " ", suffixes[rand % suffixes.length] ) ); return output; } if (greatness > 74) { output = string( abi.encodePacked(output, " ", suffixes[rand % suffixes.length]) ); return output; } if (greatness > 65) { output = string( abi.encodePacked(prefixes[rand % prefixes.length], " ", output) ); return output; } // does not have any special attributes return output; } /** @notice return background part as string output a. We generate a random number, then modulo 51 to get a greatness value. b. If greatness > 45, ~10% chance then the output would have background prefix. Else the output would only contain the name of the part, a val within the sourceArray */ function pluckBackground( uint256 tokenId, string memory keyPrefix, string[] memory sourceArray, string[] memory backgroundPrefixes ) internal view returns (string memory) { uint256 rand = random( string( abi.encodePacked( keyPrefix, StringsUpgradeable.toString(tokenId) ) ) ); string memory output = sourceArray[rand % sourceArray.length]; uint256 greatness = rand % 51; if (greatness > 45) { output = string( abi.encodePacked( backgroundPrefixes[rand % backgroundPrefixes.length], " ", output ) ); } return output; } /** @notice return true or false Initial hasHeadpiece is false by default. 4% of having headpiece */ function shouldHaveHeadpieces(uint256 tokenId, string memory keyPrefix) internal view returns (bool hasHeadpiece) { uint256 rand = random( string( abi.encodePacked( keyPrefix, StringsUpgradeable.toString(tokenId) ) ) ) % 101; if (rand > 95) { hasHeadpiece = true; } return hasHeadpiece; } /** @notice To set new baseURI for tokenId @param _baseURI new baseURI */ function setBaseURI(string calldata _baseURI) external onlyOwner { baseURI = _baseURI; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Nonexistent token"); return string( abi.encodePacked(baseURI, StringsUpgradeable.toString(tokenId)) ); } /** @notice mint an anomura, only owner can call this function @param _address Address of who's going to receive the token We generate each part of the anomura, and store in the mapping to be viewed later */ function ownerMintAnomura(address _address) external isNotPaused nonReentrant onlyOwner { require( address(anomuraData) != address(0x0), "Anomura data address is 0" ); entropyMix = keccak256(abi.encodePacked(_address, block.coinbase)); uint256 newTokenId = _tokenIds.current(); IAnomuraData.Data memory data; data = anomuraData.getAnomuraData(); string memory generatedClaws = pluck( newTokenId, "CLAW", data.claws, data.prefixes, data.suffixes, data.unique ); string memory generatedLegs = pluck( newTokenId, "LEG", data.legs, data.prefixes, data.suffixes, data.unique ); string memory generatedBody = pluck( newTokenId, "BODY", data.body, data.prefixes, data.suffixes, data.unique ); string memory generatedShell = pluck( newTokenId, "SHELL", data.shell, data.prefixes, data.suffixes, data.unique ); string memory generatedBackground = pluckBackground( newTokenId, "BACKGROUND", data.background, data.backgroundPrefixes ); bool hasHeadpiece = shouldHaveHeadpieces(newTokenId, "HAVE_HEADPIECE"); string memory generatedHeadPieces = hasHeadpiece == true ? pluck( newTokenId, "HEADPIECE", data.headPieces, data.prefixes, data.suffixes, data.unique ) : "None"; anomuraMap[newTokenId] = AnomuraEntity({ body: generatedBody, claws: generatedClaws, legs: generatedLegs, shell: generatedShell, headPieces: generatedHeadPieces, background: generatedBackground }); _tokenIds.increment(); _safeMint(_address, newTokenId); emit NewAnomura( newTokenId, generatedClaws, generatedLegs, generatedBody, generatedShell, generatedBackground, generatedHeadPieces ); } /** @notice mint an anomura, only Bowl Contract can call this function @param _address Address of who's going to receive the token We generate each part of the anomura, and store in the mapping to be viewed later */ function mintAnomura(address _address) external isNotPaused nonReentrant onlyBowlContract returns (uint256 anomuraId) { require( address(anomuraData) != address(0x0), "Anomura data address is 0" ); entropyMix = keccak256(abi.encodePacked(_address, block.coinbase)); anomuraId = _tokenIds.current(); IAnomuraData.Data memory data; data = anomuraData.getAnomuraData(); string memory generatedClaws = pluck( anomuraId, "CLAW", data.claws, data.prefixes, data.suffixes, data.unique ); string memory generatedLegs = pluck( anomuraId, "LEG", data.legs, data.prefixes, data.suffixes, data.unique ); string memory generatedBody = pluck( anomuraId, "BODY", data.body, data.prefixes, data.suffixes, data.unique ); string memory generatedShell = pluck( anomuraId, "SHELL", data.shell, data.prefixes, data.suffixes, data.unique ); string memory generatedBackground = pluckBackground( anomuraId, "BACKGROUND", data.background, data.backgroundPrefixes ); bool hasHeadpiece = shouldHaveHeadpieces(anomuraId, "HAVE_HEADPIECE"); string memory generatedHeadPieces = hasHeadpiece == true ? pluck( anomuraId, "HEADPIECE", data.headPieces, data.prefixes, data.suffixes, data.unique ) : "None"; anomuraMap[anomuraId] = AnomuraEntity({ body: generatedBody, claws: generatedClaws, legs: generatedLegs, shell: generatedShell, headPieces: generatedHeadPieces, background: generatedBackground }); _tokenIds.increment(); _safeMint(_address, anomuraId); emit NewAnomura( anomuraId, generatedClaws, generatedLegs, generatedBody, generatedShell, generatedBackground, generatedHeadPieces ); } function tokensOfOwner(address _ownerAddr) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_ownerAddr); // number of token owned by this address uint256[] memory tokenIds = new uint256[](tokenCount); // array should be same as number of token owned for (uint256 i = 0; i < tokenCount; i++) { tokenIds[i] = tokenOfOwnerByIndex(_ownerAddr, i); } return tokenIds; } /** @notice withdraw current balance to msg.sender address */ function withdrawAvailableBalance() external onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } /** @notice Manual set the address of the Bowl contract deployed @param _bowlAddress Bowl's address deployed */ function setBowlAddress(address _bowlAddress) external onlyOwner { // require(address(anomuraContract) == address(0x0), "The anomura address has been set before."); // accidentally we may put a wrong address and we cannot revert so comment out the require bowlAddress = _bowlAddress; emit UpdatedBowlContractAddress(_bowlAddress, msg.sender); } /** @notice Manual set the address of the Anomura Data contract deployed @param _anomuraDataAddress Bowl's address deployed */ function setAnomuraData(address _anomuraDataAddress) external onlyOwner { anomuraData = IAnomuraData(_anomuraDataAddress); } /** @notice Change status of isPaused, to pause all minting functions @param _isPaused boolean to pause */ function setContractPaused(bool _isPaused) external onlyOwner { isPaused = _isPaused; emit UpdatedPauseContract(_isPaused, msg.sender); } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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), "Ownable: 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 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[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @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 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[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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 an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` 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/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); }
// 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 (last updated v4.6.0) (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 `IERC721Receiver.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.7.0) (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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-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/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/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// 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 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.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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), "Ownable: 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; interface IAnomuraData { struct Data { string[] body; string[] claws; string[] legs; string[] shell; string[] headPieces; string[] background; string[] prefixes; string[] suffixes; string[] unique; string[] backgroundPrefixes; } function getAnomuraData() external view returns (Data memory); } contract AnomuraData is IAnomuraData, Ownable { string[] private clawData; string[] private legData; string[] private bodyData; string[] private shellData; string[] private backgroundData; string[] private headpiecesData; string[] private prefixesData; string[] private uniqueData; string[] private suffixesData; string[] private backgroundPrefixesData; constructor() { clawData.push("Natural Claw"); clawData.push("Coral Claw"); clawData.push("Titian Claw"); clawData.push("Pliers"); clawData.push("Scissorhands"); clawData.push("Laser Gun"); clawData.push("Snow Claw"); clawData.push("Sky Claw"); clawData.push("Icicle Claw"); clawData.push("Pincers"); clawData.push("Hammer Logs"); clawData.push("Carnivora Claw"); clawData.push("Adventure Claw"); clawData.push("Asteroids Lasergun"); clawData.push("Pong Claw"); legData.push("Argent Leg"); legData.push("Sunlit Leg"); legData.push("Auroral Leg"); legData.push("Steel Leg"); legData.push("Tungsten Leg"); legData.push("Titanium Leg"); legData.push("Crystal Leg"); legData.push("Empyrean Leg"); legData.push("Azure Leg"); legData.push("Bamboo Leg"); legData.push("Walmara Leg"); legData.push("Pintobortri Leg"); legData.push("Adventure Leg"); legData.push("Asteroids Leg"); legData.push("Pong Leg"); bodyData.push("Premier Body"); bodyData.push("Unhinged Body"); bodyData.push("Mesmerizing Body"); bodyData.push("Rave Body"); bodyData.push("Combustion Body"); bodyData.push("Radiating Eye"); bodyData.push("Charring Body"); bodyData.push("Inferno Body"); bodyData.push("Siberian Body"); bodyData.push("Antarctic Body"); bodyData.push("Glacial Body"); bodyData.push("Amethyst Body"); bodyData.push("Beast"); bodyData.push("Panga Panga"); bodyData.push("Ceylon Ebony"); bodyData.push("Katalox"); bodyData.push("Diamond"); bodyData.push("Golden"); bodyData.push("Adventure Body"); bodyData.push("Asteroids Body"); bodyData.push("Pong Body"); shellData.push("Auger Shell"); shellData.push("Seasnail Shell"); shellData.push("Miter Shell"); shellData.push("Alembic"); shellData.push("Chimney"); shellData.push("Starship"); shellData.push("Ice Cube"); shellData.push("Ice Shell"); shellData.push("Frosty"); shellData.push("Mora"); shellData.push("Carnivora"); shellData.push("Pure Runes"); shellData.push("Architect"); shellData.push("Bee Hive"); shellData.push("Coral"); shellData.push("Crystal"); shellData.push("Diamond"); shellData.push("Ethereum"); shellData.push("Golden Skull"); shellData.push("Japan Temple"); shellData.push("Planter"); shellData.push("Snail"); shellData.push("Tentacles"); shellData.push("Tesla Coil"); shellData.push("Cherry Blossom"); shellData.push("Maple Green"); shellData.push("Volcano"); shellData.push("Adventure Shell"); shellData.push("Asteroids Shell"); shellData.push("Pong Shell"); backgroundData.push("Crystal Cave"); backgroundData.push("Crystal Cave Rainbow"); backgroundData.push("Emerald Forest"); backgroundData.push("Garden of Eden"); backgroundData.push("Golden Glade"); backgroundData.push("Beach"); backgroundData.push("Magical Deep Sea"); backgroundData.push("Natural Sea"); backgroundData.push("Bioluminescent Abyss"); backgroundData.push("Blazing Furnace"); backgroundData.push("Steam Apparatus"); backgroundData.push("Science Lab"); backgroundData.push("Starship Throne"); backgroundData.push("Happy Snowfield"); backgroundData.push("Midnight Mountain"); backgroundData.push("Cosmic Star"); backgroundData.push("Sunset Cliffs"); backgroundData.push("Space Nebula"); backgroundData.push("Plains of Vietnam"); backgroundData.push("ZED Run"); backgroundData.push("African Savannah"); backgroundData.push("Adventure Space"); backgroundData.push("Asteroids Space"); backgroundData.push("Pong Space"); headpiecesData.push("Morning Sun Starfish"); headpiecesData.push("Granulated Starfish"); headpiecesData.push("Royal Starfish"); headpiecesData.push("Sapphire"); headpiecesData.push("Emerald"); headpiecesData.push("Kunzite"); headpiecesData.push("Rhodonite"); headpiecesData.push("Aventurine"); headpiecesData.push("Peridot"); headpiecesData.push("Moldavite"); headpiecesData.push("Jasper"); headpiecesData.push("Alexandrite"); headpiecesData.push("Copper Fire"); headpiecesData.push("Chemical Fire"); headpiecesData.push("Carmine Fire"); headpiecesData.push("Adventure Key"); prefixesData.push("Briny"); prefixesData.push("Tempestuous"); prefixesData.push("Limpid"); prefixesData.push("Pacific"); prefixesData.push("Atlantic"); prefixesData.push("Abysmal"); prefixesData.push("Profound"); prefixesData.push("Misty"); prefixesData.push("Solar"); prefixesData.push("Empyrean"); prefixesData.push("Sideral"); prefixesData.push("Astral"); prefixesData.push("Ethereal"); prefixesData.push("Crystal"); prefixesData.push("Quantum"); prefixesData.push("Empiric"); prefixesData.push("Alchemic"); prefixesData.push("Crash Test"); prefixesData.push("Nuclear"); prefixesData.push("Syntethic"); prefixesData.push("Tempered"); prefixesData.push("Fossil"); prefixesData.push("Craggy"); prefixesData.push("Gemmed"); prefixesData.push("Verdant"); prefixesData.push("Lymphatic"); prefixesData.push("Gnarled"); prefixesData.push("Lithic"); suffixesData.push("of the Coast"); suffixesData.push("of Maelstrom"); suffixesData.push("of Depths"); suffixesData.push("of Eternity"); suffixesData.push("of Peace"); suffixesData.push("of Equilibrium"); suffixesData.push("of the Universe"); suffixesData.push("of the Galaxy"); suffixesData.push("of Absolute Zero"); suffixesData.push("of Constellations"); suffixesData.push("of the Moon"); suffixesData.push("of Lightspeed"); suffixesData.push("of Evidence"); suffixesData.push("of Relativity"); suffixesData.push("of Evolution"); suffixesData.push("of Consumption"); suffixesData.push("of Progress"); suffixesData.push("of Damascus"); suffixesData.push("of Gaia"); suffixesData.push("of The Wild"); suffixesData.push("of Overgrowth"); suffixesData.push("of Rebirth"); suffixesData.push("of World Roots"); suffixesData.push("of Stability"); uniqueData.push("The Leviathan"); uniqueData.push("Will of Oceanus"); uniqueData.push("Suijin's Touch"); uniqueData.push("Tiamat Kiss"); uniqueData.push("Poseidon Vow"); uniqueData.push("Long bao"); uniqueData.push("Uranus Wish"); uniqueData.push("Aim of Indra"); uniqueData.push("Cry of Yuki Onna"); uniqueData.push("Sirius"); uniqueData.push("Vega"); uniqueData.push("Altair"); uniqueData.push("Ephestos Skill"); uniqueData.push("Gift of Prometheus"); uniqueData.push("Pandora's"); uniqueData.push("Wit of Lu Dongbin"); uniqueData.push("Thoth's Trick"); uniqueData.push("Cyclopes Plan"); uniqueData.push("Root of Dimu"); uniqueData.push("Bhumi's Throne"); uniqueData.push("Rive of Daphne"); uniqueData.push("The Minotaur"); uniqueData.push("Call of Cernunnos"); uniqueData.push("Graze of Terra"); backgroundPrefixesData.push("Bountiful"); backgroundPrefixesData.push("Isolated"); backgroundPrefixesData.push("Mechanical"); backgroundPrefixesData.push("Reborn"); } function getAnomuraData() external view returns (Data memory anomuraData) { anomuraData = Data({ body: bodyData, claws: clawData, legs: legData, shell: shellData, headPieces: headpiecesData, background: backgroundData, prefixes: prefixesData, suffixes: suffixesData, unique: uniqueData, backgroundPrefixes: backgroundPrefixesData }); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "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":false,"internalType":"address","name":"owner","type":"address"}],"name":"ContractDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"crabId","type":"uint256"},{"indexed":false,"internalType":"string","name":"claws","type":"string"},{"indexed":false,"internalType":"string","name":"legs","type":"string"},{"indexed":false,"internalType":"string","name":"body","type":"string"},{"indexed":false,"internalType":"string","name":"shell","type":"string"},{"indexed":false,"internalType":"string","name":"background","type":"string"},{"indexed":false,"internalType":"string","name":"headpieces","type":"string"}],"name":"NewAnomura","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bowlAddress","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"UpdatedBowlContractAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"},{"indexed":false,"internalType":"address","name":"updatedBy","type":"address"}],"name":"UpdatedPauseContract","type":"event"},{"inputs":[],"name":"anomuraData","outputs":[{"internalType":"contract IAnomuraData","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"anomuraMap","outputs":[{"internalType":"string","name":"body","type":"string"},{"internalType":"string","name":"claws","type":"string"},{"internalType":"string","name":"legs","type":"string"},{"internalType":"string","name":"shell","type":"string"},{"internalType":"string","name":"headPieces","type":"string"},{"internalType":"string","name":"background","type":"string"}],"stateMutability":"view","type":"function"},{"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":[],"name":"bowlAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bowlAddress","type":"address"},{"internalType":"address","name":"_anomuraDataAddress","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"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":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"mintAnomura","outputs":[{"internalType":"uint256","name":"anomuraId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"ownerMintAnomura","outputs":[],"stateMutability":"nonpayable","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":"_anomuraDataAddress","type":"address"}],"name":"setAnomuraData","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":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bowlAddress","type":"address"}],"name":"setBowlAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"setContractPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_ownerAddr","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"withdrawAvailableBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506138b7806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638697897e1161010f578063b1111359116100a2578063c87b56dd11610071578063c87b56dd14610432578063e985e9c514610445578063f2fde38b14610481578063fd01179d1461049457600080fd5b8063b1111359146103f5578063b187bd26146103fd578063b3b446e21461040b578063b88d4fde1461041f57600080fd5b806395d89b41116100de57806395d89b41146103a257806399708b4f146103aa578063a22cb465146103cf578063a84df8b5146103e257600080fd5b80638697897e14610357578063882796f11461036a5780638da5cb5b1461037d57806395854efb1461038e57600080fd5b80634571e3a6116101875780636352211e116101565780636352211e1461030957806370a082311461031c578063715018a61461032f5780638462151c1461033757600080fd5b80634571e3a6146102bd5780634f6ccce7146102d057806355f804b3146102e357806357dd845b146102f657600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd146102845780632f745c591461029757806342842e0e146102aa57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b610208610203366004612d15565b6104a7565b60405190151581526020015b60405180910390f35b6102256104b8565b6040516102149190612d91565b610245610240366004612da4565b61054a565b6040516001600160a01b039091168152602001610214565b61027061026b366004612dd9565b610571565b005b6099545b604051908152602001610214565b610270610292366004612e03565b61068c565b6102766102a5366004612dd9565b6106bd565b6102706102b8366004612e03565b610753565b6102706102cb366004612e88565b61076e565b6102766102de366004612da4565b610a14565b6102706102f1366004612ee9565b610aa7565b610276610304366004612f2b565b610abc565b610245610317366004612da4565b611009565b61027661032a366004612f2b565b611069565b6102706110ef565b61034a610345366004612f2b565b611103565b6040516102149190612f46565b610270610365366004612f2b565b6111a5565b610270610378366004612f9a565b611208565b60fb546001600160a01b0316610245565b61013054610245906001600160a01b031681565b610225611257565b6103bd6103b8366004612da4565b611266565b60405161021496959493929190612fb5565b6102706103dd366004613037565b6115cb565b6102706103f0366004612f2b565b6115da565b610270611ad7565b610133546102089060ff1681565b61012d54610245906001600160a01b031681565b61027061042d366004613103565b611b0e565b610225610440366004612da4565b611b46565b6102086104533660046131ae565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61027061048f366004612f2b565b611bd4565b6102706104a2366004612f2b565b611c4d565b60006104b282611c78565b92915050565b6060606580546104c7906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546104f3906131d8565b80156105405780601f1061051557610100808354040283529160200191610540565b820191906000526020600020905b81548152906001019060200180831161052357829003601f168201915b5050505050905090565b600061055582611c9d565b506000908152606960205260409020546001600160a01b031690565b600061057c82611009565b9050806001600160a01b0316836001600160a01b031614156105ef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060b575061060b8133610453565b61067d5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016105e6565b6106878383611cfc565b505050565b6106963382611d6a565b6106b25760405162461bcd60e51b81526004016105e690613213565b610687838383611de9565b60006106c883611069565b821061072a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105e6565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b61068783838360405180602001604052806000815250611b0e565b600054610100900460ff161580801561078e5750600054600160ff909116105b806107a85750303b1580156107a8575060005460ff166001145b61080b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e6565b6000805460ff19166001179055801561082e576000805461ff0019166101001790555b6001600160a01b0385166108845760405162461bcd60e51b815260206004820152601a60248201527f426f776c20636f6e74726163742061646472657373206973203000000000000060448201526064016105e6565b6001600160a01b0384166108da5760405162461bcd60e51b815260206004820152601960248201527f416e6f6d7572612044617461206164647265737320697320300000000000000060448201526064016105e6565b61092260405180604001604052806007815260200166416e6f6d75726160c81b81525060405180604001604052806007815260200166414e4f4d55524160c81b815250611f90565b61092a611fc1565b610932611fe8565b61093a612017565b61094761012f8484612b9f565b5061013080546001600160a01b038088166001600160a01b03199283161790925561012d805492871692909116919091179055610133805460ff1916905561099461012e80546001019055565b6040513381527f8ffcdc15a283d706d38281f500270d8b5a656918f555de0913d7455e3e6bc1bf9060200160405180910390a18015610a0d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000610a1f60995490565b8210610a825760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105e6565b60998281548110610a9557610a95613261565b90600052602060002001549050919050565b610aaf612046565b61068761012f8383612b9f565b6101335460009060ff1615610b085760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016105e6565b600260c9541415610b5b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e6565b600260c955610130546001600160a01b03163314610bbb5760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792062652063616c6c656420627920426f776c00000000000060448201526064016105e6565b61012d546001600160a01b0316610c105760405162461bcd60e51b81526020600482015260196024820152780416e6f6d75726120646174612061646472657373206973203603c1b60448201526064016105e6565b6040516001600160601b0319606084811b8216602084015241901b16603482015260480160408051808303601f1901815291905280516020909101206101315561012e549050610c5e612c23565b61012d60009054906101000a90046001600160a01b03166001600160a01b03166366030e486040518163ffffffff1660e01b8152600401600060405180830381865afa158015610cb2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cda9190810190613352565b90506000610d198360405180604001604052806004815260200163434c415760e01b81525084602001518560c001518660e001518761010001516120a0565b90506000610d5784604051806040016040528060038152602001624c454760e81b81525085604001518660c001518760e001518861010001516120a0565b90506000610d968560405180604001604052806004815260200163424f445960e01b81525086600001518760c001518860e001518961010001516120a0565b90506000610dd6866040518060400160405280600581526020016414d211531360da1b81525087606001518860c001518960e001518a61010001516120a0565b90506000610e11876040518060400160405280600a815260200169109050d2d1d493d5539160b21b8152508860a0015189610120015161223e565b90506000610e45886040518060400160405280600e81526020016d484156455f48454144504945434560901b8152506122ea565b90506000600182151514610e7557604051806040016040528060048152602001634e6f6e6560e01b815250610eb5565b610eb5896040518060400160405280600981526020016848454144504945434560b81b8152508a608001518b60c001518c60e001518d61010001516120a0565b90506040518060c001604052808681526020018881526020018781526020018581526020018281526020018481525061013260008b81526020019081526020016000206000820151816000019080519060200190610f14929190612c76565b506020828101518051610f2d9260018501920190612c76565b5060408201518051610f49916002840191602090910190612c76565b5060608201518051610f65916003840191602090910190612c76565b5060808201518051610f81916004840191602090910190612c76565b5060a08201518051610f9d916005840191602090910190612c76565b505061012e8054600101905550610fb48a8a61231d565b887f27201f19e2a284a0ddc5b13bb865386f850f040a07ebeb082286ffa24f2c1925888888888887604051610fee96959493929190612fb5565b60405180910390a25050600160c95550949695505050505050565b6000818152606760205260408120546001600160a01b0316806104b25760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105e6565b60006001600160a01b0382166110d35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105e6565b506001600160a01b031660009081526068602052604090205490565b6110f7612046565b6111016000612337565b565b6060600061111083611069565b905060008167ffffffffffffffff81111561112d5761112d61306a565b604051908082528060200260200182016040528015611156578160200160208202803683370190505b50905060005b8281101561119d5761116e85826106bd565b82828151811061118057611180613261565b60209081029190910101528061119581613520565b91505061115c565b509392505050565b6111ad612046565b61013080546001600160a01b0319166001600160a01b038316908117909155604080519182523360208301527f1fc93c6e1b3d3cbdf21cb6110d2bd30ce9c831461f83aab2c2cce8f2a30d4c6f91015b60405180910390a150565b611210612046565b610133805460ff1916821515908117909155604080519182523360208301527fa06b5a80dcb0a794bdf9b8683ec488cb83588c4e69e0945b2f87afa8a8448ce091016111fd565b6060606680546104c7906131d8565b61013260205260009081526040902080548190611282906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546112ae906131d8565b80156112fb5780601f106112d0576101008083540402835291602001916112fb565b820191906000526020600020905b8154815290600101906020018083116112de57829003601f168201915b505050505090806001018054611310906131d8565b80601f016020809104026020016040519081016040528092919081815260200182805461133c906131d8565b80156113895780601f1061135e57610100808354040283529160200191611389565b820191906000526020600020905b81548152906001019060200180831161136c57829003601f168201915b50505050509080600201805461139e906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546113ca906131d8565b80156114175780601f106113ec57610100808354040283529160200191611417565b820191906000526020600020905b8154815290600101906020018083116113fa57829003601f168201915b50505050509080600301805461142c906131d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611458906131d8565b80156114a55780601f1061147a576101008083540402835291602001916114a5565b820191906000526020600020905b81548152906001019060200180831161148857829003601f168201915b5050505050908060040180546114ba906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546114e6906131d8565b80156115335780601f1061150857610100808354040283529160200191611533565b820191906000526020600020905b81548152906001019060200180831161151657829003601f168201915b505050505090806005018054611548906131d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611574906131d8565b80156115c15780601f10611596576101008083540402835291602001916115c1565b820191906000526020600020905b8154815290600101906020018083116115a457829003601f168201915b5050505050905086565b6115d6338383612389565b5050565b6101335460ff16156116235760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016105e6565b600260c95414156116765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e6565b600260c955611683612046565b61012d546001600160a01b03166116d85760405162461bcd60e51b81526020600482015260196024820152780416e6f6d75726120646174612061646472657373206973203603c1b60448201526064016105e6565b6040516001600160601b0319606083811b8216602084015241901b16603482015260480160408051601f19818403018152919052805160209091012061013155600061172461012e5490565b905061172e612c23565b61012d60009054906101000a90046001600160a01b03166001600160a01b03166366030e486040518163ffffffff1660e01b8152600401600060405180830381865afa158015611782573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117aa9190810190613352565b905060006117e98360405180604001604052806004815260200163434c415760e01b81525084602001518560c001518660e001518761010001516120a0565b9050600061182784604051806040016040528060038152602001624c454760e81b81525085604001518660c001518760e001518861010001516120a0565b905060006118668560405180604001604052806004815260200163424f445960e01b81525086600001518760c001518860e001518961010001516120a0565b905060006118a6866040518060400160405280600581526020016414d211531360da1b81525087606001518860c001518960e001518a61010001516120a0565b905060006118e1876040518060400160405280600a815260200169109050d2d1d493d5539160b21b8152508860a0015189610120015161223e565b90506000611915886040518060400160405280600e81526020016d484156455f48454144504945434560901b8152506122ea565b9050600060018215151461194557604051806040016040528060048152602001634e6f6e6560e01b815250611985565b611985896040518060400160405280600981526020016848454144504945434560b81b8152508a608001518b60c001518c60e001518d61010001516120a0565b90506040518060c001604052808681526020018881526020018781526020018581526020018281526020018481525061013260008b815260200190815260200160002060008201518160000190805190602001906119e4929190612c76565b5060208281015180516119fd9260018501920190612c76565b5060408201518051611a19916002840191602090910190612c76565b5060608201518051611a35916003840191602090910190612c76565b5060808201518051611a51916004840191602090910190612c76565b5060a08201518051611a6d916005840191602090910190612c76565b505061012e8054600101905550611a848a8a61231d565b887f27201f19e2a284a0ddc5b13bb865386f850f040a07ebeb082286ffa24f2c1925888888888887604051611abe96959493929190612fb5565b60405180910390a25050600160c9555050505050505050565b611adf612046565b6040514790339082156108fc029083906000818181858888f193505050501580156115d6573d6000803e3d6000fd5b611b183383611d6a565b611b345760405162461bcd60e51b81526004016105e690613213565b611b4084848484612458565b50505050565b6000818152606760205260409020546060906001600160a01b0316611ba15760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016105e6565b61012f611bad8361248b565b604051602001611bbe929190613557565b6040516020818303038152906040529050919050565b611bdc612046565b6001600160a01b038116611c415760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e6565b611c4a81612337565b50565b611c55612046565b61012d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663780e9d6360e01b14806104b257506104b282612589565b6000818152606760205260409020546001600160a01b0316611c4a5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105e6565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d3182611009565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d7683611009565b9050806001600160a01b0316846001600160a01b03161480611dbd57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b80611de15750836001600160a01b0316611dd68461054a565b6001600160a01b0316145b949350505050565b826001600160a01b0316611dfc82611009565b6001600160a01b031614611e605760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e6565b6001600160a01b038216611ec25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e6565b611ecd8383836125d9565b611ed8600082611cfc565b6001600160a01b0383166000908152606860205260408120805460019290611f019084906135fe565b90915550506001600160a01b0382166000908152606860205260408120805460019290611f2f908490613615565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16611fb75760405162461bcd60e51b81526004016105e69061362d565b6115d682826125e4565b600054610100900460ff166111015760405162461bcd60e51b81526004016105e69061362d565b600054610100900460ff1661200f5760405162461bcd60e51b81526004016105e69061362d565b611101612632565b600054610100900460ff1661203e5760405162461bcd60e51b81526004016105e69061362d565b611101612660565b60fb546001600160a01b031633146111015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e6565b606060006120d6876120b18a61248b565b6040516020016120c2929190613678565b604051602081830303815290604052612690565b90506000868751836120e891906136bd565b815181106120f8576120f8613261565b602002602001015190506000605e8361211191906136bd565b9050605c81111561216f578485518461212a91906136bd565b8151811061213a5761213a613261565b6020026020010151826040516020016121549291906136d1565b60408051601f19818403018152919052935061223492505050565b60538111156121d7578687518461218691906136bd565b8151811061219657612196613261565b602002602001015182878851866121ad91906136bd565b815181106121bd576121bd613261565b60200260200101516040516020016121549392919061370d565b604a8111156122185781868751856121ef91906136bd565b815181106121ff576121ff613261565b60200260200101516040516020016121549291906136d1565b604181111561222f578687518461212a91906136bd565b509150505b9695505050505050565b6060600061224f856120b18861248b565b905060008485518361226191906136bd565b8151811061227157612271613261565b60200260200101519050600060338361228a91906136bd565b9050602d8111156122df57848551846122a391906136bd565b815181106122b3576122b3613261565b6020026020010151826040516020016122cd9291906136d1565b60405160208183030381529060405291505b509695505050505050565b60008060656122fc846120b18761248b565b61230691906136bd565b9050605f81111561231657600191505b5092915050565b6115d68282604051806020016040528060008152506126db565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156123eb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e6565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612463848484611de9565b61246f8484848461270e565b611b405760405162461bcd60e51b81526004016105e690613767565b6060816124af5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156124d957806124c381613520565b91506124d29050600a836137b9565b91506124b3565b60008167ffffffffffffffff8111156124f4576124f461306a565b6040519080825280601f01601f19166020018201604052801561251e576020820181803683370190505b5090505b8415611de1576125336001836135fe565b9150612540600a866136bd565b61254b906030613615565b60f81b81838151811061256057612560613261565b60200101906001600160f81b031916908160001a905350612582600a866137b9565b9450612522565b60006001600160e01b031982166380ac58cd60e01b14806125ba57506001600160e01b03198216635b5e139f60e01b145b806104b257506301ffc9a760e01b6001600160e01b03198316146104b2565b610687838383612809565b600054610100900460ff1661260b5760405162461bcd60e51b81526004016105e69061362d565b815161261e906065906020850190612c76565b508051610687906066906020840190612c76565b600054610100900460ff166126595760405162461bcd60e51b81526004016105e69061362d565b600160c955565b600054610100900460ff166126875760405162461bcd60e51b81526004016105e69061362d565b61110133612337565b6000813a3342486126a26001436135fe565b40610131546040516020016126bd97969594939291906137cd565b60408051601f19818403018152919052805160209091012092915050565b6126e583836128c1565b6126f2600084848461270e565b6106875760405162461bcd60e51b81526004016105e690613767565b60006001600160a01b0384163b1561280157604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061275290339089908890889060040161381b565b6020604051808303816000875af192505050801561278d575060408051601f3d908101601f1916820190925261278a9181019061384e565b60015b6127e7573d8080156127bb576040519150601f19603f3d011682016040523d82523d6000602084013e6127c0565b606091505b5080516127df5760405162461bcd60e51b81526004016105e690613767565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611de1565b506001611de1565b6001600160a01b0383166128645761285f81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612887565b816001600160a01b0316836001600160a01b031614612887576128878382612a0f565b6001600160a01b03821661289e5761068781612aac565b826001600160a01b0316826001600160a01b031614610687576106878282612b5b565b6001600160a01b0382166129175760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e6565b6000818152606760205260409020546001600160a01b03161561297c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e6565b612988600083836125d9565b6001600160a01b03821660009081526068602052604081208054600192906129b1908490613615565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612a1c84611069565b612a2691906135fe565b600083815260986020526040902054909150808214612a79576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090612abe906001906135fe565b6000838152609a602052604081205460998054939450909284908110612ae657612ae6613261565b906000526020600020015490508060998381548110612b0757612b07613261565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480612b3f57612b3f61386b565b6001900381819060005260206000200160009055905550505050565b6000612b6683611069565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b828054612bab906131d8565b90600052602060002090601f016020900481019282612bcd5760008555612c13565b82601f10612be65782800160ff19823516178555612c13565b82800160010185558215612c13579182015b82811115612c13578235825591602001919060010190612bf8565b50612c1f929150612cea565b5090565b604051806101400160405280606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b828054612c82906131d8565b90600052602060002090601f016020900481019282612ca45760008555612c13565b82601f10612cbd57805160ff1916838001178555612c13565b82800160010185558215612c13579182015b82811115612c13578251825591602001919060010190612ccf565b5b80821115612c1f5760008155600101612ceb565b6001600160e01b031981168114611c4a57600080fd5b600060208284031215612d2757600080fd5b8135612d3281612cff565b9392505050565b60005b83811015612d54578181015183820152602001612d3c565b83811115611b405750506000910152565b60008151808452612d7d816020860160208601612d39565b601f01601f19169290920160200192915050565b602081526000612d326020830184612d65565b600060208284031215612db657600080fd5b5035919050565b80356001600160a01b0381168114612dd457600080fd5b919050565b60008060408385031215612dec57600080fd5b612df583612dbd565b946020939093013593505050565b600080600060608486031215612e1857600080fd5b612e2184612dbd565b9250612e2f60208501612dbd565b9150604084013590509250925092565b60008083601f840112612e5157600080fd5b50813567ffffffffffffffff811115612e6957600080fd5b602083019150836020828501011115612e8157600080fd5b9250929050565b60008060008060608587031215612e9e57600080fd5b612ea785612dbd565b9350612eb560208601612dbd565b9250604085013567ffffffffffffffff811115612ed157600080fd5b612edd87828801612e3f565b95989497509550505050565b60008060208385031215612efc57600080fd5b823567ffffffffffffffff811115612f1357600080fd5b612f1f85828601612e3f565b90969095509350505050565b600060208284031215612f3d57600080fd5b612d3282612dbd565b6020808252825182820181905260009190848201906040850190845b81811015612f7e57835183529284019291840191600101612f62565b50909695505050505050565b80358015158114612dd457600080fd5b600060208284031215612fac57600080fd5b612d3282612f8a565b60c081526000612fc860c0830189612d65565b8281036020840152612fda8189612d65565b90508281036040840152612fee8188612d65565b905082810360608401526130028187612d65565b905082810360808401526130168186612d65565b905082810360a084015261302a8185612d65565b9998505050505050505050565b6000806040838503121561304a57600080fd5b61305383612dbd565b915061306160208401612f8a565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff811182821017156130a4576130a461306a565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156130d3576130d361306a565b604052919050565b600067ffffffffffffffff8211156130f5576130f561306a565b50601f01601f191660200190565b6000806000806080858703121561311957600080fd5b61312285612dbd565b935061313060208601612dbd565b925060408501359150606085013567ffffffffffffffff81111561315357600080fd5b8501601f8101871361316457600080fd5b8035613177613172826130db565b6130aa565b81815288602083850101111561318c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080604083850312156131c157600080fd5b6131ca83612dbd565b915061306160208401612dbd565b600181811c908216806131ec57607f821691505b6020821081141561320d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261328857600080fd5b8151602067ffffffffffffffff808311156132a5576132a561306a565b8260051b6132b48382016130aa565b93845285810183019383810190888611156132ce57600080fd5b84880192505b85831015613346578251848111156132ec5760008081fd5b8801603f81018a136132fe5760008081fd5b858101516040613310613172836130db565b8281528c828486010111156133255760008081fd5b613334838a8301848701612d39565b855250505091840191908401906132d4565b98975050505050505050565b60006020828403121561336457600080fd5b815167ffffffffffffffff8082111561337c57600080fd5b90830190610140828603121561339157600080fd5b613399613080565b8251828111156133a857600080fd5b6133b487828601613277565b8252506020830151828111156133c957600080fd5b6133d587828601613277565b6020830152506040830151828111156133ed57600080fd5b6133f987828601613277565b60408301525060608301518281111561341157600080fd5b61341d87828601613277565b60608301525060808301518281111561343557600080fd5b61344187828601613277565b60808301525060a08301518281111561345957600080fd5b61346587828601613277565b60a08301525060c08301518281111561347d57600080fd5b61348987828601613277565b60c08301525060e0830151828111156134a157600080fd5b6134ad87828601613277565b60e08301525061010080840151838111156134c757600080fd5b6134d388828701613277565b82840152505061012080840151838111156134ed57600080fd5b6134f988828701613277565b918301919091525095945050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156135345761353461350a565b5060010190565b6000815161354d818560208601612d39565b9290920192915050565b600080845481600182811c91508083168061357357607f831692505b602080841082141561359357634e487b7160e01b86526022600452602486fd5b8180156135a757600181146135b8576135e5565b60ff198616895284890196506135e5565b60008b81526020902060005b868110156135dd5781548b8201529085019083016135c4565b505084890196505b5050505050506135f5818561353b565b95945050505050565b6000828210156136105761361061350a565b500390565b600082198211156136285761362861350a565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000835161368a818460208801612d39565b83519083019061369e818360208801612d39565b01949350505050565b634e487b7160e01b600052601260045260246000fd5b6000826136cc576136cc6136a7565b500690565b600083516136e3818460208801612d39565b600160fd1b9083019081528351613701816001840160208801612d39565b01600101949350505050565b6000845161371f818460208901612d39565b8083019050600160fd1b808252855161373f816001850160208a01612d39565b6001920191820152835161375a816002840160208801612d39565b0160020195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826137c8576137c86136a7565b500490565b600088516137df818460208d01612d39565b919091019687525060609490941b6001600160601b0319166020860152603485019290925260548401526074830152609482015260b401919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061223490830184612d65565b60006020828403121561386057600080fd5b8151612d3281612cff565b634e487b7160e01b600052603160045260246000fdfea264697066735822122005bbf0d9ca4cfc844820291fd5d06293da422ca75b4876c67e96a78f90cb95fe64736f6c634300080b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638697897e1161010f578063b1111359116100a2578063c87b56dd11610071578063c87b56dd14610432578063e985e9c514610445578063f2fde38b14610481578063fd01179d1461049457600080fd5b8063b1111359146103f5578063b187bd26146103fd578063b3b446e21461040b578063b88d4fde1461041f57600080fd5b806395d89b41116100de57806395d89b41146103a257806399708b4f146103aa578063a22cb465146103cf578063a84df8b5146103e257600080fd5b80638697897e14610357578063882796f11461036a5780638da5cb5b1461037d57806395854efb1461038e57600080fd5b80634571e3a6116101875780636352211e116101565780636352211e1461030957806370a082311461031c578063715018a61461032f5780638462151c1461033757600080fd5b80634571e3a6146102bd5780634f6ccce7146102d057806355f804b3146102e357806357dd845b146102f657600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd146102845780632f745c591461029757806342842e0e146102aa57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b610208610203366004612d15565b6104a7565b60405190151581526020015b60405180910390f35b6102256104b8565b6040516102149190612d91565b610245610240366004612da4565b61054a565b6040516001600160a01b039091168152602001610214565b61027061026b366004612dd9565b610571565b005b6099545b604051908152602001610214565b610270610292366004612e03565b61068c565b6102766102a5366004612dd9565b6106bd565b6102706102b8366004612e03565b610753565b6102706102cb366004612e88565b61076e565b6102766102de366004612da4565b610a14565b6102706102f1366004612ee9565b610aa7565b610276610304366004612f2b565b610abc565b610245610317366004612da4565b611009565b61027661032a366004612f2b565b611069565b6102706110ef565b61034a610345366004612f2b565b611103565b6040516102149190612f46565b610270610365366004612f2b565b6111a5565b610270610378366004612f9a565b611208565b60fb546001600160a01b0316610245565b61013054610245906001600160a01b031681565b610225611257565b6103bd6103b8366004612da4565b611266565b60405161021496959493929190612fb5565b6102706103dd366004613037565b6115cb565b6102706103f0366004612f2b565b6115da565b610270611ad7565b610133546102089060ff1681565b61012d54610245906001600160a01b031681565b61027061042d366004613103565b611b0e565b610225610440366004612da4565b611b46565b6102086104533660046131ae565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61027061048f366004612f2b565b611bd4565b6102706104a2366004612f2b565b611c4d565b60006104b282611c78565b92915050565b6060606580546104c7906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546104f3906131d8565b80156105405780601f1061051557610100808354040283529160200191610540565b820191906000526020600020905b81548152906001019060200180831161052357829003601f168201915b5050505050905090565b600061055582611c9d565b506000908152606960205260409020546001600160a01b031690565b600061057c82611009565b9050806001600160a01b0316836001600160a01b031614156105ef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060b575061060b8133610453565b61067d5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016105e6565b6106878383611cfc565b505050565b6106963382611d6a565b6106b25760405162461bcd60e51b81526004016105e690613213565b610687838383611de9565b60006106c883611069565b821061072a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105e6565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b61068783838360405180602001604052806000815250611b0e565b600054610100900460ff161580801561078e5750600054600160ff909116105b806107a85750303b1580156107a8575060005460ff166001145b61080b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e6565b6000805460ff19166001179055801561082e576000805461ff0019166101001790555b6001600160a01b0385166108845760405162461bcd60e51b815260206004820152601a60248201527f426f776c20636f6e74726163742061646472657373206973203000000000000060448201526064016105e6565b6001600160a01b0384166108da5760405162461bcd60e51b815260206004820152601960248201527f416e6f6d7572612044617461206164647265737320697320300000000000000060448201526064016105e6565b61092260405180604001604052806007815260200166416e6f6d75726160c81b81525060405180604001604052806007815260200166414e4f4d55524160c81b815250611f90565b61092a611fc1565b610932611fe8565b61093a612017565b61094761012f8484612b9f565b5061013080546001600160a01b038088166001600160a01b03199283161790925561012d805492871692909116919091179055610133805460ff1916905561099461012e80546001019055565b6040513381527f8ffcdc15a283d706d38281f500270d8b5a656918f555de0913d7455e3e6bc1bf9060200160405180910390a18015610a0d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000610a1f60995490565b8210610a825760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105e6565b60998281548110610a9557610a95613261565b90600052602060002001549050919050565b610aaf612046565b61068761012f8383612b9f565b6101335460009060ff1615610b085760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016105e6565b600260c9541415610b5b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e6565b600260c955610130546001600160a01b03163314610bbb5760405162461bcd60e51b815260206004820152601a60248201527f43616e206f6e6c792062652063616c6c656420627920426f776c00000000000060448201526064016105e6565b61012d546001600160a01b0316610c105760405162461bcd60e51b81526020600482015260196024820152780416e6f6d75726120646174612061646472657373206973203603c1b60448201526064016105e6565b6040516001600160601b0319606084811b8216602084015241901b16603482015260480160408051808303601f1901815291905280516020909101206101315561012e549050610c5e612c23565b61012d60009054906101000a90046001600160a01b03166001600160a01b03166366030e486040518163ffffffff1660e01b8152600401600060405180830381865afa158015610cb2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cda9190810190613352565b90506000610d198360405180604001604052806004815260200163434c415760e01b81525084602001518560c001518660e001518761010001516120a0565b90506000610d5784604051806040016040528060038152602001624c454760e81b81525085604001518660c001518760e001518861010001516120a0565b90506000610d968560405180604001604052806004815260200163424f445960e01b81525086600001518760c001518860e001518961010001516120a0565b90506000610dd6866040518060400160405280600581526020016414d211531360da1b81525087606001518860c001518960e001518a61010001516120a0565b90506000610e11876040518060400160405280600a815260200169109050d2d1d493d5539160b21b8152508860a0015189610120015161223e565b90506000610e45886040518060400160405280600e81526020016d484156455f48454144504945434560901b8152506122ea565b90506000600182151514610e7557604051806040016040528060048152602001634e6f6e6560e01b815250610eb5565b610eb5896040518060400160405280600981526020016848454144504945434560b81b8152508a608001518b60c001518c60e001518d61010001516120a0565b90506040518060c001604052808681526020018881526020018781526020018581526020018281526020018481525061013260008b81526020019081526020016000206000820151816000019080519060200190610f14929190612c76565b506020828101518051610f2d9260018501920190612c76565b5060408201518051610f49916002840191602090910190612c76565b5060608201518051610f65916003840191602090910190612c76565b5060808201518051610f81916004840191602090910190612c76565b5060a08201518051610f9d916005840191602090910190612c76565b505061012e8054600101905550610fb48a8a61231d565b887f27201f19e2a284a0ddc5b13bb865386f850f040a07ebeb082286ffa24f2c1925888888888887604051610fee96959493929190612fb5565b60405180910390a25050600160c95550949695505050505050565b6000818152606760205260408120546001600160a01b0316806104b25760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105e6565b60006001600160a01b0382166110d35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105e6565b506001600160a01b031660009081526068602052604090205490565b6110f7612046565b6111016000612337565b565b6060600061111083611069565b905060008167ffffffffffffffff81111561112d5761112d61306a565b604051908082528060200260200182016040528015611156578160200160208202803683370190505b50905060005b8281101561119d5761116e85826106bd565b82828151811061118057611180613261565b60209081029190910101528061119581613520565b91505061115c565b509392505050565b6111ad612046565b61013080546001600160a01b0319166001600160a01b038316908117909155604080519182523360208301527f1fc93c6e1b3d3cbdf21cb6110d2bd30ce9c831461f83aab2c2cce8f2a30d4c6f91015b60405180910390a150565b611210612046565b610133805460ff1916821515908117909155604080519182523360208301527fa06b5a80dcb0a794bdf9b8683ec488cb83588c4e69e0945b2f87afa8a8448ce091016111fd565b6060606680546104c7906131d8565b61013260205260009081526040902080548190611282906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546112ae906131d8565b80156112fb5780601f106112d0576101008083540402835291602001916112fb565b820191906000526020600020905b8154815290600101906020018083116112de57829003601f168201915b505050505090806001018054611310906131d8565b80601f016020809104026020016040519081016040528092919081815260200182805461133c906131d8565b80156113895780601f1061135e57610100808354040283529160200191611389565b820191906000526020600020905b81548152906001019060200180831161136c57829003601f168201915b50505050509080600201805461139e906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546113ca906131d8565b80156114175780601f106113ec57610100808354040283529160200191611417565b820191906000526020600020905b8154815290600101906020018083116113fa57829003601f168201915b50505050509080600301805461142c906131d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611458906131d8565b80156114a55780601f1061147a576101008083540402835291602001916114a5565b820191906000526020600020905b81548152906001019060200180831161148857829003601f168201915b5050505050908060040180546114ba906131d8565b80601f01602080910402602001604051908101604052809291908181526020018280546114e6906131d8565b80156115335780601f1061150857610100808354040283529160200191611533565b820191906000526020600020905b81548152906001019060200180831161151657829003601f168201915b505050505090806005018054611548906131d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611574906131d8565b80156115c15780601f10611596576101008083540402835291602001916115c1565b820191906000526020600020905b8154815290600101906020018083116115a457829003601f168201915b5050505050905086565b6115d6338383612389565b5050565b6101335460ff16156116235760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016105e6565b600260c95414156116765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e6565b600260c955611683612046565b61012d546001600160a01b03166116d85760405162461bcd60e51b81526020600482015260196024820152780416e6f6d75726120646174612061646472657373206973203603c1b60448201526064016105e6565b6040516001600160601b0319606083811b8216602084015241901b16603482015260480160408051601f19818403018152919052805160209091012061013155600061172461012e5490565b905061172e612c23565b61012d60009054906101000a90046001600160a01b03166001600160a01b03166366030e486040518163ffffffff1660e01b8152600401600060405180830381865afa158015611782573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117aa9190810190613352565b905060006117e98360405180604001604052806004815260200163434c415760e01b81525084602001518560c001518660e001518761010001516120a0565b9050600061182784604051806040016040528060038152602001624c454760e81b81525085604001518660c001518760e001518861010001516120a0565b905060006118668560405180604001604052806004815260200163424f445960e01b81525086600001518760c001518860e001518961010001516120a0565b905060006118a6866040518060400160405280600581526020016414d211531360da1b81525087606001518860c001518960e001518a61010001516120a0565b905060006118e1876040518060400160405280600a815260200169109050d2d1d493d5539160b21b8152508860a0015189610120015161223e565b90506000611915886040518060400160405280600e81526020016d484156455f48454144504945434560901b8152506122ea565b9050600060018215151461194557604051806040016040528060048152602001634e6f6e6560e01b815250611985565b611985896040518060400160405280600981526020016848454144504945434560b81b8152508a608001518b60c001518c60e001518d61010001516120a0565b90506040518060c001604052808681526020018881526020018781526020018581526020018281526020018481525061013260008b815260200190815260200160002060008201518160000190805190602001906119e4929190612c76565b5060208281015180516119fd9260018501920190612c76565b5060408201518051611a19916002840191602090910190612c76565b5060608201518051611a35916003840191602090910190612c76565b5060808201518051611a51916004840191602090910190612c76565b5060a08201518051611a6d916005840191602090910190612c76565b505061012e8054600101905550611a848a8a61231d565b887f27201f19e2a284a0ddc5b13bb865386f850f040a07ebeb082286ffa24f2c1925888888888887604051611abe96959493929190612fb5565b60405180910390a25050600160c9555050505050505050565b611adf612046565b6040514790339082156108fc029083906000818181858888f193505050501580156115d6573d6000803e3d6000fd5b611b183383611d6a565b611b345760405162461bcd60e51b81526004016105e690613213565b611b4084848484612458565b50505050565b6000818152606760205260409020546060906001600160a01b0316611ba15760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016105e6565b61012f611bad8361248b565b604051602001611bbe929190613557565b6040516020818303038152906040529050919050565b611bdc612046565b6001600160a01b038116611c415760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e6565b611c4a81612337565b50565b611c55612046565b61012d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663780e9d6360e01b14806104b257506104b282612589565b6000818152606760205260409020546001600160a01b0316611c4a5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105e6565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d3182611009565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d7683611009565b9050806001600160a01b0316846001600160a01b03161480611dbd57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b80611de15750836001600160a01b0316611dd68461054a565b6001600160a01b0316145b949350505050565b826001600160a01b0316611dfc82611009565b6001600160a01b031614611e605760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105e6565b6001600160a01b038216611ec25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e6565b611ecd8383836125d9565b611ed8600082611cfc565b6001600160a01b0383166000908152606860205260408120805460019290611f019084906135fe565b90915550506001600160a01b0382166000908152606860205260408120805460019290611f2f908490613615565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16611fb75760405162461bcd60e51b81526004016105e69061362d565b6115d682826125e4565b600054610100900460ff166111015760405162461bcd60e51b81526004016105e69061362d565b600054610100900460ff1661200f5760405162461bcd60e51b81526004016105e69061362d565b611101612632565b600054610100900460ff1661203e5760405162461bcd60e51b81526004016105e69061362d565b611101612660565b60fb546001600160a01b031633146111015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e6565b606060006120d6876120b18a61248b565b6040516020016120c2929190613678565b604051602081830303815290604052612690565b90506000868751836120e891906136bd565b815181106120f8576120f8613261565b602002602001015190506000605e8361211191906136bd565b9050605c81111561216f578485518461212a91906136bd565b8151811061213a5761213a613261565b6020026020010151826040516020016121549291906136d1565b60408051601f19818403018152919052935061223492505050565b60538111156121d7578687518461218691906136bd565b8151811061219657612196613261565b602002602001015182878851866121ad91906136bd565b815181106121bd576121bd613261565b60200260200101516040516020016121549392919061370d565b604a8111156122185781868751856121ef91906136bd565b815181106121ff576121ff613261565b60200260200101516040516020016121549291906136d1565b604181111561222f578687518461212a91906136bd565b509150505b9695505050505050565b6060600061224f856120b18861248b565b905060008485518361226191906136bd565b8151811061227157612271613261565b60200260200101519050600060338361228a91906136bd565b9050602d8111156122df57848551846122a391906136bd565b815181106122b3576122b3613261565b6020026020010151826040516020016122cd9291906136d1565b60405160208183030381529060405291505b509695505050505050565b60008060656122fc846120b18761248b565b61230691906136bd565b9050605f81111561231657600191505b5092915050565b6115d68282604051806020016040528060008152506126db565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156123eb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e6565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612463848484611de9565b61246f8484848461270e565b611b405760405162461bcd60e51b81526004016105e690613767565b6060816124af5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156124d957806124c381613520565b91506124d29050600a836137b9565b91506124b3565b60008167ffffffffffffffff8111156124f4576124f461306a565b6040519080825280601f01601f19166020018201604052801561251e576020820181803683370190505b5090505b8415611de1576125336001836135fe565b9150612540600a866136bd565b61254b906030613615565b60f81b81838151811061256057612560613261565b60200101906001600160f81b031916908160001a905350612582600a866137b9565b9450612522565b60006001600160e01b031982166380ac58cd60e01b14806125ba57506001600160e01b03198216635b5e139f60e01b145b806104b257506301ffc9a760e01b6001600160e01b03198316146104b2565b610687838383612809565b600054610100900460ff1661260b5760405162461bcd60e51b81526004016105e69061362d565b815161261e906065906020850190612c76565b508051610687906066906020840190612c76565b600054610100900460ff166126595760405162461bcd60e51b81526004016105e69061362d565b600160c955565b600054610100900460ff166126875760405162461bcd60e51b81526004016105e69061362d565b61110133612337565b6000813a3342486126a26001436135fe565b40610131546040516020016126bd97969594939291906137cd565b60408051601f19818403018152919052805160209091012092915050565b6126e583836128c1565b6126f2600084848461270e565b6106875760405162461bcd60e51b81526004016105e690613767565b60006001600160a01b0384163b1561280157604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061275290339089908890889060040161381b565b6020604051808303816000875af192505050801561278d575060408051601f3d908101601f1916820190925261278a9181019061384e565b60015b6127e7573d8080156127bb576040519150601f19603f3d011682016040523d82523d6000602084013e6127c0565b606091505b5080516127df5760405162461bcd60e51b81526004016105e690613767565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611de1565b506001611de1565b6001600160a01b0383166128645761285f81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612887565b816001600160a01b0316836001600160a01b031614612887576128878382612a0f565b6001600160a01b03821661289e5761068781612aac565b826001600160a01b0316826001600160a01b031614610687576106878282612b5b565b6001600160a01b0382166129175760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e6565b6000818152606760205260409020546001600160a01b03161561297c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e6565b612988600083836125d9565b6001600160a01b03821660009081526068602052604081208054600192906129b1908490613615565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612a1c84611069565b612a2691906135fe565b600083815260986020526040902054909150808214612a79576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090612abe906001906135fe565b6000838152609a602052604081205460998054939450909284908110612ae657612ae6613261565b906000526020600020015490508060998381548110612b0757612b07613261565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480612b3f57612b3f61386b565b6001900381819060005260206000200160009055905550505050565b6000612b6683611069565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b828054612bab906131d8565b90600052602060002090601f016020900481019282612bcd5760008555612c13565b82601f10612be65782800160ff19823516178555612c13565b82800160010185558215612c13579182015b82811115612c13578235825591602001919060010190612bf8565b50612c1f929150612cea565b5090565b604051806101400160405280606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b828054612c82906131d8565b90600052602060002090601f016020900481019282612ca45760008555612c13565b82601f10612cbd57805160ff1916838001178555612c13565b82800160010185558215612c13579182015b82811115612c13578251825591602001919060010190612ccf565b5b80821115612c1f5760008155600101612ceb565b6001600160e01b031981168114611c4a57600080fd5b600060208284031215612d2757600080fd5b8135612d3281612cff565b9392505050565b60005b83811015612d54578181015183820152602001612d3c565b83811115611b405750506000910152565b60008151808452612d7d816020860160208601612d39565b601f01601f19169290920160200192915050565b602081526000612d326020830184612d65565b600060208284031215612db657600080fd5b5035919050565b80356001600160a01b0381168114612dd457600080fd5b919050565b60008060408385031215612dec57600080fd5b612df583612dbd565b946020939093013593505050565b600080600060608486031215612e1857600080fd5b612e2184612dbd565b9250612e2f60208501612dbd565b9150604084013590509250925092565b60008083601f840112612e5157600080fd5b50813567ffffffffffffffff811115612e6957600080fd5b602083019150836020828501011115612e8157600080fd5b9250929050565b60008060008060608587031215612e9e57600080fd5b612ea785612dbd565b9350612eb560208601612dbd565b9250604085013567ffffffffffffffff811115612ed157600080fd5b612edd87828801612e3f565b95989497509550505050565b60008060208385031215612efc57600080fd5b823567ffffffffffffffff811115612f1357600080fd5b612f1f85828601612e3f565b90969095509350505050565b600060208284031215612f3d57600080fd5b612d3282612dbd565b6020808252825182820181905260009190848201906040850190845b81811015612f7e57835183529284019291840191600101612f62565b50909695505050505050565b80358015158114612dd457600080fd5b600060208284031215612fac57600080fd5b612d3282612f8a565b60c081526000612fc860c0830189612d65565b8281036020840152612fda8189612d65565b90508281036040840152612fee8188612d65565b905082810360608401526130028187612d65565b905082810360808401526130168186612d65565b905082810360a084015261302a8185612d65565b9998505050505050505050565b6000806040838503121561304a57600080fd5b61305383612dbd565b915061306160208401612f8a565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff811182821017156130a4576130a461306a565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156130d3576130d361306a565b604052919050565b600067ffffffffffffffff8211156130f5576130f561306a565b50601f01601f191660200190565b6000806000806080858703121561311957600080fd5b61312285612dbd565b935061313060208601612dbd565b925060408501359150606085013567ffffffffffffffff81111561315357600080fd5b8501601f8101871361316457600080fd5b8035613177613172826130db565b6130aa565b81815288602083850101111561318c57600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080604083850312156131c157600080fd5b6131ca83612dbd565b915061306160208401612dbd565b600181811c908216806131ec57607f821691505b6020821081141561320d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600082601f83011261328857600080fd5b8151602067ffffffffffffffff808311156132a5576132a561306a565b8260051b6132b48382016130aa565b93845285810183019383810190888611156132ce57600080fd5b84880192505b85831015613346578251848111156132ec5760008081fd5b8801603f81018a136132fe5760008081fd5b858101516040613310613172836130db565b8281528c828486010111156133255760008081fd5b613334838a8301848701612d39565b855250505091840191908401906132d4565b98975050505050505050565b60006020828403121561336457600080fd5b815167ffffffffffffffff8082111561337c57600080fd5b90830190610140828603121561339157600080fd5b613399613080565b8251828111156133a857600080fd5b6133b487828601613277565b8252506020830151828111156133c957600080fd5b6133d587828601613277565b6020830152506040830151828111156133ed57600080fd5b6133f987828601613277565b60408301525060608301518281111561341157600080fd5b61341d87828601613277565b60608301525060808301518281111561343557600080fd5b61344187828601613277565b60808301525060a08301518281111561345957600080fd5b61346587828601613277565b60a08301525060c08301518281111561347d57600080fd5b61348987828601613277565b60c08301525060e0830151828111156134a157600080fd5b6134ad87828601613277565b60e08301525061010080840151838111156134c757600080fd5b6134d388828701613277565b82840152505061012080840151838111156134ed57600080fd5b6134f988828701613277565b918301919091525095945050505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156135345761353461350a565b5060010190565b6000815161354d818560208601612d39565b9290920192915050565b600080845481600182811c91508083168061357357607f831692505b602080841082141561359357634e487b7160e01b86526022600452602486fd5b8180156135a757600181146135b8576135e5565b60ff198616895284890196506135e5565b60008b81526020902060005b868110156135dd5781548b8201529085019083016135c4565b505084890196505b5050505050506135f5818561353b565b95945050505050565b6000828210156136105761361061350a565b500390565b600082198211156136285761362861350a565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000835161368a818460208801612d39565b83519083019061369e818360208801612d39565b01949350505050565b634e487b7160e01b600052601260045260246000fd5b6000826136cc576136cc6136a7565b500690565b600083516136e3818460208801612d39565b600160fd1b9083019081528351613701816001840160208801612d39565b01600101949350505050565b6000845161371f818460208901612d39565b8083019050600160fd1b808252855161373f816001850160208a01612d39565b6001920191820152835161375a816002840160208801612d39565b0160020195945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826137c8576137c86136a7565b500490565b600088516137df818460208d01612d39565b919091019687525060609490941b6001600160601b0319166020860152603485019290925260548401526074830152609482015260b401919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061223490830184612d65565b60006020828403121561386057600080fd5b8151612d3281612cff565b634e487b7160e01b600052603160045260246000fdfea264697066735822122005bbf0d9ca4cfc844820291fd5d06293da422ca75b4876c67e96a78f90cb95fe64736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.