Overview
ETH Balance
0.5 ETH
Eth Value
$1,693.73 (@ $3,387.46/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 35 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Revealed | 14622124 | 978 days ago | IN | 0 ETH | 0.00190765 | ||||
Set Base URI For... | 14622121 | 978 days ago | IN | 0 ETH | 0.00705351 | ||||
Direct Mint | 14606426 | 981 days ago | IN | 0.05 ETH | 0.00327073 | ||||
Direct Mint | 14606415 | 981 days ago | IN | 0.05 ETH | 0.00327073 | ||||
Direct Mint | 14606412 | 981 days ago | IN | 0.05 ETH | 0.00381792 | ||||
Direct Mint | 14606411 | 981 days ago | IN | 0.05 ETH | 0.00381792 | ||||
Direct Mint | 14606408 | 981 days ago | IN | 0.05 ETH | 0.00344936 | ||||
Direct Mint | 14606408 | 981 days ago | IN | 0.05 ETH | 0.00329749 | ||||
Direct Mint | 14606362 | 981 days ago | IN | 0.05 ETH | 0.00347149 | ||||
Direct Mint | 14606343 | 981 days ago | IN | 0.05 ETH | 0.00369917 | ||||
Direct Mint | 14600768 | 981 days ago | IN | 0.45 ETH | 0.0228 | ||||
Direct Mint | 14600746 | 981 days ago | IN | 0.45 ETH | 0.00720008 | ||||
Direct Mint | 14600734 | 981 days ago | IN | 0.45 ETH | 0.00650909 | ||||
Direct Mint | 14600728 | 981 days ago | IN | 0.5 ETH | 0.00669072 | ||||
Grant Role | 14593795 | 982 days ago | IN | 0 ETH | 0.00142467 | ||||
Direct Mint | 14591733 | 983 days ago | IN | 0.05 ETH | 0.00836745 | ||||
Direct Mint | 14591432 | 983 days ago | IN | 0.05 ETH | 0.00932665 | ||||
Airdrop Mint | 14555101 | 989 days ago | IN | 0.05 ETH | 0.00525751 | ||||
Set Paused | 14555025 | 989 days ago | IN | 0 ETH | 0.0005879 | ||||
Set Airdrop Addr... | 14478135 | 1001 days ago | IN | 0 ETH | 0.00151919 | ||||
Transfer | 14477483 | 1001 days ago | IN | 0.05 ETH | 0.0013062 | ||||
Transfer | 14477386 | 1001 days ago | IN | 0.05 ETH | 0.00072193 | ||||
Transfer | 14477379 | 1001 days ago | IN | 0.05 ETH | 0.00086886 | ||||
Transfer From | 14457901 | 1004 days ago | IN | 0 ETH | 0.00395423 | ||||
Transfer From | 14457900 | 1004 days ago | IN | 0 ETH | 0.00352615 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14555101 | 989 days ago | 0.05 ETH |
Loading...
Loading
Contract Name:
Fuzzie
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './ERC721Tradable.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/access/AccessControl.sol'; /** * @title Fuzzie * Fuzzie - NFT contract for MetaFuzzies. */ contract Fuzzie is ERC721Tradable { using Counters for Counters.Counter; bool _revealed = false; bool _paused = true; bool _locked = false; // When all phases are complete we lock the contract. // An address we own, can be changed. address _airdropMintAddress = 0x56f4DC083Ab7455793A1c5FfaB3957279E1003df; string baseURI; string baseExtension = '.json'; string unreleasedPhaseUri = 'ipfs://QmXbAUKGfLitQwAi56gkkSH9oaGD7gAfwbBbD67xuj5MWT'; string contractUri = 'ipfs://QmRKKXwqFmTjtyK8bNq7skeXrqczZpEuKdZgHdynxgnAYo'; uint256 _maxPhase = 7; // The number of completion uint256 _maxSupply = 0; uint256 _mintPhase = 0; uint256 _mintFundTrxAmount = 0.022 ether; uint256 _cost = 0.05 ether; uint256 nftPerAddressLimit = 300; uint256 _createTokenModulus = 20; uint256 _lastFreeTokenId = 0; Counters.Counter private _projectPhase; mapping(address => uint256) private addressMintedBalance; mapping(uint256 => string) private phaseUri; mapping(uint256 => uint256) private maxTokenToPhase; event CreateFreeToken(uint256 indexed _tokenId); bytes32 public constant SERVICE_ROLE = keccak256('SERVICE_ROLE'); bytes32 public constant OPENSEA_FACTORY_ROLE = keccak256('OPENSEA_FACTORY_ROLE'); constructor(address _proxyRegistryAddress, address _adminRoleAddress) ERC721Tradable('MetaFuzzies', 'MFUZZ', _proxyRegistryAddress) { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); if (msg.sender != _adminRoleAddress) { _grantRole(DEFAULT_ADMIN_ROLE, _adminRoleAddress); } _grantRole(DEFAULT_ADMIN_ROLE, address(this)); // Starting at phase 1 since it sound better for humans maxTokenToPhase[_projectPhase.current()] = 0; _projectPhase.increment(); _mintPhase = 1; // Configure initial phase here. Number of Fuzzies and baseURI // First phase is hard coded maxTokenToPhase[_projectPhase.current()] = 2000; _maxSupply = 2000; // Give founders some Fuzzies for (uint256 i = 1; i <= 20; i++) { _mintTo(_adminRoleAddress); } } // ********************** // Minting functions // ********************** function directMint(uint256 _mintAmount) public payable { // Check that the sender can mint if (msg.sender != owner()) { require(_maxSupply >= totalSupply() + _mintAmount, string(abi.encodePacked('Minting would exceed total supply!'))); require(_projectPhase.current() == _mintPhase, string(abi.encodePacked('Minting is disabled for this phase, ', Strings.toString(_mintPhase)))); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, 'Max NFT per address exceeded'); require(msg.value >= _cost * _mintAmount, string(abi.encodePacked('This mint costs ', Strings.toString(_cost / 1e18), ' ether per token.'))); } for (uint256 i = 1; i <= _mintAmount; i++) { addressMintedBalance[msg.sender]++; mintTo(msg.sender); } } function randomMint() public payable { // Check that the sender can mint if (msg.sender != owner()) { require(_maxSupply > totalSupply(), string(abi.encodePacked('Minting would exceed total supply!'))); require(_projectPhase.current() == _mintPhase, string(abi.encodePacked('Minting is disabled for this phase, ', Strings.toString(_mintPhase)))); // Allow random mints to exceed limit on address require(msg.value >= (_cost * 1) / 2, string(abi.encodePacked('This mint costs ', Strings.toString((_cost * 1) / 2e18), ' ether per token.'))); } uint256 winningTokenId = random(totalSupply()); address addressToMintTo = ownerOf(winningTokenId); mintTo(addressToMintTo); addressMintedBalance[addressToMintTo]++; } function airdropMint() public payable onlyRole(SERVICE_ROLE) { uint256 winningTokenId = random(totalSupply()); address addressToMintTo = ownerOf(winningTokenId); _lastFreeTokenId = _nextTokenId.current(); // Ensure the airdrop wallet always has funds to mint. (bool os, ) = payable(_airdropMintAddress).call{value: _mintFundTrxAmount}(''); require(os); mintTo(addressToMintTo); addressMintedBalance[addressToMintTo]++; } function factoryMint(address _to) public onlyRole(OPENSEA_FACTORY_ROLE) { mintTo(_to); } function mintTo(address _to) internal { require(!_paused, 'Minting is paused!'); _mintTo(_to); if (shouldCreateFreeToken(totalSupply())) { emit CreateFreeToken(_lastFreeTokenId); } } // ********************** // URI functions // ********************** function contractURI() public view returns (string memory) { return contractUri; } // The Factory contract uses this function baseTokenURI() public view virtual override returns (string memory) { return phaseUri[_projectPhase.current()]; } // All base URI calls should use this function function getBaseURIForPhase(uint256 phaseId) public view returns (string memory) { return phaseUri[phaseId]; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token'); if (_revealed == false) { return unreleasedPhaseUri; } uint256 tokenPhase = getPhaseForTokenId(tokenId); string memory phaseBaseURI = getBaseURIForPhase(tokenPhase); return bytes(phaseBaseURI).length > 0 ? string(abi.encodePacked(phaseBaseURI, Strings.toString(tokenId), baseExtension)) : unreleasedPhaseUri; } // ********************** // General information functions // ********************** function getPhaseForTokenId(uint256 tokenId) public view returns (uint256) { uint256 counter = 0; while (tokenId > maxTokenToPhase[counter]) { counter += 1; } return counter; } function maxSupply() public view returns (uint256) { return _maxSupply; } function projectPhase() public view returns (uint256) { return _projectPhase.current(); } function paused() public view returns (bool) { return _paused; } function revealed() public view returns (bool) { return _revealed; } function locked() public view returns (bool) { return _locked; } function price() public view returns (uint256) { return _cost; } function lastFreeTokenId() public view returns (uint256) { return _lastFreeTokenId; } // ********************** // Configuration functions // ********************** function setCost(uint256 _newCost) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); _cost = _newCost; } function setNftPerAddressLimit(uint256 _limit) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); nftPerAddressLimit = _limit; } // We can only modify the current phase, all previous phases are set function setBaseURIForPhase(string memory _newBaseURI) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); phaseUri[_projectPhase.current()] = _newBaseURI; } function setBaseExtension(string memory _newBaseExtension) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); baseExtension = _newBaseExtension; } function setUnreleasedPhaseUri(string memory _unreleasedPhaseUri) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); unreleasedPhaseUri = _unreleasedPhaseUri; } function setRevealed(bool _newRevealed) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); _revealed = _newRevealed; } function setPaused(bool _newPaused) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); _paused = _newPaused; } function setContractUri(string memory _contractUri) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); contractUri = _contractUri; } function setMintPhaseRestriction(uint256 phase) public onlyRole(DEFAULT_ADMIN_ROLE) { require(!_locked, 'Contract is locked and can no longer be changed'); _mintPhase = phase; } function setAirdropAddress(address newAddress, uint256 gasPrice) public onlyRole(DEFAULT_ADMIN_ROLE) { _airdropMintAddress = newAddress; _mintFundTrxAmount = gasPrice; } function progressPhase(uint256 numberOfTokens) public onlyRole(DEFAULT_ADMIN_ROLE) { require(_projectPhase.current() < _maxPhase, 'No more phases to step to'); string memory phaseBaseURI = getBaseURIForPhase(_projectPhase.current()); require(bytes(phaseBaseURI).length > 0, 'Cannot progress a phase without a baseURI set for current phase.'); // Get the token id for the last token in this phase // Update the mapping of tokens to phases and then store the max supply in a local variable for easy access uint256 currentMaxToken = maxTokenToPhase[_projectPhase.current()]; _projectPhase.increment(); _maxSupply = currentMaxToken + numberOfTokens; maxTokenToPhase[_projectPhase.current()] = _maxSupply; } function lockFinalPhase() public onlyRole(DEFAULT_ADMIN_ROLE) { string memory phaseBaseURI = getBaseURIForPhase(_projectPhase.current()); require(bytes(phaseBaseURI).length > 0, 'Cannot lock without baseURI set for current phase.'); _locked = true; } // ********************** // Utility functions // ********************** // This is a pseudo random number function random(uint256 max) internal view returns (uint256) { uint256 randomHash = uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, max - 1))); return (randomHash % max) + 1; } function shouldCreateFreeToken(uint256 tokenId) public view returns (bool) { return tokenId % _createTokenModulus == 0 && _lastFreeTokenId < tokenId && tokenId < _maxSupply; // No airdrop if it is the last token in supply } function withdraw(address add1, address add2) public payable onlyRole(DEFAULT_ADMIN_ROLE) { require(add1 == address(add1),"Invalid address 1"); require(add2 == address(add2),"Invalid address 2"); (bool os1, ) = payable(add1).call{value: address(this).balance / 2}(''); require(os1); (bool os2, ) = payable(add2).call{value: address(this).balance}(''); require(os2); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings 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. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/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 IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.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 ERC721Enumerable is ERC721, IERC721Enumerable { // 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(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.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 < ERC721Enumerable.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 = ERC721.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 = ERC721.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(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly 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; /** * @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 // 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 Counters { 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/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // 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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ERC721, ERC721Enumerable, ContextMixin, NativeMetaTransaction, Ownable, AccessControl, ERC721Burnable { using SafeMath for uint256; using Counters for Counters.Counter; /** * We rely on the OZ Counter util to keep track of the next available ID. * We track the nextTokenId instead of the currentTokenId to save users on gas costs. * Read more about it here: https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E */ Counters.Counter internal _nextTokenId; address proxyRegistryAddress; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { proxyRegistryAddress = _proxyRegistryAddress; // nextTokenId is initialized to 1, since starting at 0 leads to higher gas cost for the first minter _nextTokenId.increment(); _initializeEIP712(_name); } function _mintTo(address _to) internal { uint256 currentTokenId = _nextTokenId.current(); _nextTokenId.increment(); _safeMint(_to, currentTokenId); } /** @dev Returns the total tokens minted so far. 1 is always subtracted from the Counter since it tracks the next available tokenId. */ function totalSupply() override public view returns (uint256) { return _nextTokenId.current() - 1; } function baseTokenURI() virtual public view returns (string memory); function tokenURI(uint256 _tokenId) override virtual public view returns (string memory) { return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId))); } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { return ContextMixin.msgSender(); } // Required for Roles function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } // Required for Roles function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"},{"internalType":"address","name":"_adminRoleAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"CreateFreeToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPENSEA_FACTORY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERVICE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdropMint","outputs":[],"stateMutability":"payable","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"directMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"factoryMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"getBaseURIForPhase","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPhaseForTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastFreeTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockFinalPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"progressPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"projectPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":"newAddress","type":"address"},{"internalType":"uint256","name":"gasPrice","type":"uint256"}],"name":"setAirdropAddress","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":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURIForPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractUri","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phase","type":"uint256"}],"name":"setMintPhaseRestriction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setNftPerAddressLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newPaused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newRevealed","type":"bool"}],"name":"setRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_unreleasedPhaseUri","type":"string"}],"name":"setUnreleasedPhaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"shouldCreateFreeToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"add1","type":"address"},{"internalType":"address","name":"add2","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
600a805460ff191690556010805462ffffff60a01b1916600160a81b179055601180546001600160a01b0319167356f4dc083ab7455793a1c5ffab3957279e1003df17905560c06040526005608081905264173539b7b760d91b60a09081526200006d916013919062000c5b565b5060405180606001604052806035815260200162004ea86035913980516200009e9160149160209091019062000c5b565b5060405180606001604052806035815260200162004e24603591398051620000cf9160159160209091019062000c5b565b50600760165560006017556000601855664e28e2290f000060195566b1a2bc2ec50000601a5561012c601b556014601c556000601d553480156200011257600080fd5b5060405162004edd38038062004edd833981016040819052620001359162000d1e565b6040518060400160405280600b81526020016a4d65746146757a7a69657360a81b8152506040518060400160405280600581526020016426a32aad2d60d91b81525083828281600090805190602001906200019292919062000c5b565b508051620001a890600190602084019062000c5b565b505050620001c5620001bf620002f860201b60201c565b62000314565b601080546001600160a01b0319166001600160a01b038316179055620001f8600f62000366602090811b6200231317901c565b62000203836200036f565b506200021591506000905033620003d4565b336001600160a01b03821614620002335762000233600082620003d4565b62000240600030620003d4565b6000602160006200025d601e6200047b60201b6200231c1760201c565b81526020019081526020016000208190555062000286601e6200036660201b620023131760201c565b60016018819055506107d060216000620002ac601e6200047b60201b6200231c1760201c565b81526020810191909152604001600020556107d060175560015b60148111620002ef57620002da826200047f565b80620002e68162000e76565b915050620002c6565b50505062000ed6565b60006200030f620004bd60201b620023201760201c565b905090565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b600a5460ff1615620003b95760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b60448201526064015b60405180910390fd5b620003c4816200051c565b50600a805460ff19166001179055565b6000828152600e602090815260408083206001600160a01b038516845290915290205460ff1662000477576000828152600e602090815260408083206001600160a01b03851684529091529020805460ff1916600117905562000436620002f8565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b5490565b600062000498600f6200047b60201b6200231c1760201c565b9050620004b1600f6200036660201b620023131760201c565b620004778282620005be565b6000333014156200051657600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620005199050565b50335b90565b6040518060800160405280604f815260200162004e59604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600b55565b62000477828260405180602001604052806000815250620005e060201b60201c565b620005ec838362000658565b620005fb6000848484620007ae565b620006535760405162461bcd60e51b8152602060048201526032602482015260008051602062004e0483398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401620003b0565b505050565b6001600160a01b038216620006b05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401620003b0565b6000818152600260205260409020546001600160a01b031615620007175760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401620003b0565b620007256000838362000920565b6001600160a01b03821660009081526003602052604081208054600192906200075090849062000e04565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620007cf846001600160a01b03166200093860201b6200237d1760201c565b1562000914576001600160a01b03841663150b7a02620007ee620002f8565b8786866040518563ffffffff1660e01b815260040162000812949392919062000d89565b602060405180830381600087803b1580156200082d57600080fd5b505af192505050801562000860575060408051601f3d908101601f191682019092526200085d9181019062000d56565b60015b620008f9573d80801562000891576040519150601f19603f3d011682016040523d82523d6000602084013e62000896565b606091505b508051620008f15760405162461bcd60e51b8152602060048201526032602482015260008051602062004e0483398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401620003b0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905062000918565b5060015b949350505050565b620006538383836200093e60201b620023831760201c565b3b151590565b620009568383836200065360201b62000deb1760201c565b6001600160a01b038316620009b457620009ae81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b620009da565b816001600160a01b0316836001600160a01b031614620009da57620009da838262000a1a565b6001600160a01b038216620009f457620006538162000ac7565b826001600160a01b0316826001600160a01b031614620006535762000653828262000b81565b6000600162000a348462000bd260201b620016f91760201c565b62000a40919062000e1f565b60008381526007602052604090205490915080821462000a94576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009062000adb9060019062000e1f565b6000838152600960205260408120546008805493945090928490811062000b065762000b0662000ec0565b90600052602060002001549050806008838154811062000b2a5762000b2a62000ec0565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062000b655762000b6562000eaa565b6001900381819060005260206000200160009055905550505050565b600062000b998362000bd260201b620016f91760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b03821662000c3f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401620003b0565b506001600160a01b031660009081526003602052604090205490565b82805462000c699062000e39565b90600052602060002090601f01602090048101928262000c8d576000855562000cd8565b82601f1062000ca857805160ff191683800117855562000cd8565b8280016001018555821562000cd8579182015b8281111562000cd857825182559160200191906001019062000cbb565b5062000ce692915062000cea565b5090565b5b8082111562000ce6576000815560010162000ceb565b80516001600160a01b038116811462000d1957600080fd5b919050565b6000806040838503121562000d3257600080fd5b62000d3d8362000d01565b915062000d4d6020840162000d01565b90509250929050565b60006020828403121562000d6957600080fd5b81516001600160e01b03198116811462000d8257600080fd5b9392505050565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b8281101562000dd85785810182015185820160a00152810162000dba565b8281111562000deb57600060a084870101525b5050601f01601f19169190910160a00195945050505050565b6000821982111562000e1a5762000e1a62000e94565b500190565b60008282101562000e345762000e3462000e94565b500390565b600181811c9082168062000e4e57607f821691505b6020821081141562000e7057634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000e8d5762000e8d62000e94565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b613f1e8062000ee66000396000f3fe6080604052600436106103ad5760003560e01c80637e1eaabf116101e7578063c87b56dd1161010d578063e02767e9116100a0578063e9fe30671161006f578063e9fe306714610a98578063f2fde38b14610ab8578063f940e38514610ad8578063fcdd44d314610aeb57600080fd5b8063e02767e914610a3b578063e0a8085314610a43578063e8a3d48514610a63578063e985e9c514610a7857600080fd5b8063d547741f116100dc578063d547741f146109d1578063d547cfb7146109f1578063d5abeb0114610a06578063da3ef23f14610a1b57600080fd5b8063c87b56dd14610952578063ccb4807b14610972578063cf30901214610992578063d0eb26b0146109b157600080fd5b8063a035b1fe11610185578063b005656c11610154578063b005656c146108d2578063b82dcd2b146108f2578063b88d4fde14610912578063c866d21b1461093257600080fd5b8063a035b1fe14610854578063a20e7d4714610869578063a217fddf1461089d578063a22cb465146108b257600080fd5b8063820eb03d116101c1578063820eb03d146107ec5780638da5cb5b1461080157806391d148541461081f57806395d89b411461083f57600080fd5b80637e1eaabf146107af5780637f54ae7e146107b75780637f9dd6a2146107cc57600080fd5b80632f2ff15d116102d7578063518302271161026a5780636352211e116102395780636352211e1461073a5780636412dd451461075a57806370a082311461077a578063715018a61461079a57600080fd5b806351830227146106d457806352a30c90146106f35780635c975abb146107085780635e61016b1461072757600080fd5b806342842e0e116102a657806342842e0e1461065457806342966c681461067457806344a0d68a146106945780634f6ccce7146106b457600080fd5b80632f2ff15d146105e15780632f745c59146106015780633408e4701461062157806336568abe1461063457600080fd5b80630f7e59701161034f578063208a789e1161031e578063208a789e1461053b57806323b872dd1461055b578063248a9ca31461057b5780632d0335ab146105ab57600080fd5b80630f7e5970146104b657806316c38b3c146104e357806318160ddd1461050357806320379ee51461052657600080fd5b806307cafe3b1161038b57806307cafe3b1461042b578063081812fc1461044b578063095ea7b3146104835780630c53c51c146104a357600080fd5b806301ffc9a7146103b257806306aba612146103e757806306fdde0314610409575b600080fd5b3480156103be57600080fd5b506103d26103cd366004613855565b610b1f565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b5061040761040236600461361a565b610b30565b005b34801561041557600080fd5b5061041e610b6f565b6040516103de9190613bf8565b34801561043757600080fd5b506103d2610446366004613817565b610c01565b34801561045757600080fd5b5061046b610466366004613817565b610c2e565b6040516001600160a01b0390911681526020016103de565b34801561048f57600080fd5b5061040761049e3660046137d0565b610cc8565b61041e6104b1366004613752565b610df0565b3480156104c257600080fd5b5061041e604051806040016040528060018152602001603160f81b81525081565b3480156104ef57600080fd5b506104076104fe3660046137fc565b610fda565b34801561050f57600080fd5b50610518611031565b6040519081526020016103de565b34801561053257600080fd5b50600b54610518565b34801561054757600080fd5b50610518610556366004613817565b61104d565b34801561056757600080fd5b50610407610576366004613670565b611079565b34801561058757600080fd5b50610518610596366004613817565b6000908152600e602052604090206001015490565b3480156105b757600080fd5b506105186105c636600461361a565b6001600160a01b03166000908152600c602052604090205490565b3480156105ed57600080fd5b506104076105fc366004613830565b6110b1565b34801561060d57600080fd5b5061051861061c3660046137d0565b6110d9565b34801561062d57600080fd5b5046610518565b34801561064057600080fd5b5061040761064f366004613830565b61116f565b34801561066057600080fd5b5061040761066f366004613670565b6111f9565b34801561068057600080fd5b5061040761068f366004613817565b611214565b3480156106a057600080fd5b506104076106af366004613817565b611290565b3480156106c057600080fd5b506105186106cf366004613817565b6112ce565b3480156106e057600080fd5b50601054600160a01b900460ff166103d2565b3480156106ff57600080fd5b50601d54610518565b34801561071457600080fd5b50601054600160a81b900460ff166103d2565b610407610735366004613817565b611361565b34801561074657600080fd5b5061046b610755366004613817565b611537565b34801561076657600080fd5b50610407610775366004613817565b6115ae565b34801561078657600080fd5b5061051861079536600461361a565b6116f9565b3480156107a657600080fd5b50610407611780565b610407611805565b3480156107c357600080fd5b50610407611989565b3480156107d857600080fd5b506104076107e73660046138ac565b611a2a565b3480156107f857600080fd5b50610518611a75565b34801561080d57600080fd5b50600d546001600160a01b031661046b565b34801561082b57600080fd5b506103d261083a366004613830565b611a80565b34801561084b57600080fd5b5061041e611aab565b34801561086057600080fd5b50601a54610518565b34801561087557600080fd5b506105187fd8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b81565b3480156108a957600080fd5b50610518600081565b3480156108be57600080fd5b506104076108cd36600461371d565b611aba565b3480156108de57600080fd5b506104076108ed366004613817565b611acc565b3480156108fe57600080fd5b5061041e61090d366004613817565b611b0a565b34801561091e57600080fd5b5061040761092d3660046136b1565b611bab565b34801561093e57600080fd5b5061040761094d3660046138ac565b611bea565b34801561095e57600080fd5b5061041e61096d366004613817565b611c51565b34801561097e57600080fd5b5061040761098d3660046138ac565b611dd7565b34801561099e57600080fd5b50601054600160b01b900460ff166103d2565b3480156109bd57600080fd5b506104076109cc366004613817565b611e22565b3480156109dd57600080fd5b506104076109ec366004613830565b611e60565b3480156109fd57600080fd5b5061041e611e88565b348015610a1257600080fd5b50601754610518565b348015610a2757600080fd5b50610407610a363660046138ac565b611eb0565b610407611efb565b348015610a4f57600080fd5b50610407610a5e3660046137fc565b611fea565b348015610a6f57600080fd5b5061041e612041565b348015610a8457600080fd5b506103d2610a93366004613637565b612050565b348015610aa457600080fd5b50610407610ab33660046137d0565b61211c565b348015610ac457600080fd5b50610407610ad336600461361a565b612151565b610407610ae6366004613637565b612238565b348015610af757600080fd5b506105187f05270feb7310ab271769c54510cfd69edd4efc9f847cc7d40e211e54005cedb581565b6000610b2a8261243b565b92915050565b7f05270feb7310ab271769c54510cfd69edd4efc9f847cc7d40e211e54005cedb5610b6281610b5d612460565b61246a565b610b6b826124ce565b5050565b606060008054610b7e90613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054610baa90613da2565b8015610bf75780601f10610bcc57610100808354040283529160200191610bf7565b820191906000526020600020905b815481529060010190602001808311610bda57829003601f168201915b5050505050905090565b6000601c5482610c119190613df8565b158015610c1f575081601d54105b8015610b2a5750506017541190565b6000818152600260205260408120546001600160a01b0316610cac5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610cd382611537565b9050806001600160a01b0316836001600160a01b03161415610d415760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ca3565b806001600160a01b0316610d53612460565b6001600160a01b03161480610d6f5750610d6f81610a93612460565b610de15760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ca3565b610deb8383612565565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610e2e87828787876125d3565b610e845760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610ca3565b6001600160a01b0387166000908152600c6020526040902054610ea89060016126c3565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610ef890899033908a90613b86565b60405180910390a1600080306001600160a01b0316888a604051602001610f2092919061393d565b60408051601f1981840301815290829052610f3a91613921565b6000604051808303816000865af19150503d8060008114610f77576040519150601f19603f3d011682016040523d82523d6000602084013e610f7c565b606091505b509150915081610fce5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610ca3565b98975050505050505050565b6000610fe881610b5d612460565b601054600160b01b900460ff16156110125760405162461bcd60e51b8152600401610ca390613c5d565b5060108054911515600160a81b0260ff60a81b19909216919091179055565b6000600161103e600f5490565b6110489190613d48565b905090565b6000805b600081815260216020526040902054831115610b2a57611072600182613cfd565b9050611051565b61108a611084612460565b826126d6565b6110a65760405162461bcd60e51b8152600401610ca390613cac565b610deb8383836127a5565b6000828152600e60205260409020600101546110cf81610b5d612460565b610deb8383612950565b60006110e4836116f9565b82106111465760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ca3565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611177612460565b6001600160a01b0316816001600160a01b0316146111ef5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ca3565b610b6b82826129d7565b610deb83838360405180602001604052806000815250611bab565b61121f611084612460565b6112845760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610ca3565b61128d81612a5c565b50565b600061129e81610b5d612460565b601054600160b01b900460ff16156112c85760405162461bcd60e51b8152600401610ca390613c5d565b50601a55565b60006112d960085490565b821061133c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ca3565b6008828154811061134f5761134f613e4e565b90600052602060002001549050919050565b600d546001600160a01b031633146114f2578061137c611031565b6113869190613cfd565b601754101560405160200161139a90613aad565b604051602081830303815290604052906113c75760405162461bcd60e51b8152600401610ca39190613bf8565b50601854601e54146113da601854612b03565b6040516020016113ea9190613b34565b604051602081830303815290604052906114175760405162461bcd60e51b8152600401610ca39190613bf8565b50336000908152601f6020526040902054601b546114358383613cfd565b11156114835760405162461bcd60e51b815260206004820152601c60248201527f4d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ca3565b81601a546114919190613d29565b3410156114b2670de0b6b3a7640000601a546114ad9190613d15565b612b03565b6040516020016114c29190613ae1565b604051602081830303815290604052906114ef5760405162461bcd60e51b8152600401610ca39190613bf8565b50505b60015b818111610b6b57336000908152601f6020526040812080549161151783613ddd565b9190505550611525336124ce565b8061152f81613ddd565b9150506114f5565b6000818152600260205260408120546001600160a01b031680610b2a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610ca3565b60006115bc81610b5d612460565b601654601e541061160f5760405162461bcd60e51b815260206004820152601960248201527f4e6f206d6f72652070686173657320746f207374657020746f000000000000006044820152606401610ca3565b600061161d61090d601e5490565b90506000815111611698576040805162461bcd60e51b81526020600482015260248101919091527f43616e6e6f742070726f6772657373206120706861736520776974686f75742060448201527f6120626173655552492073657420666f722063757272656e742070686173652e6064820152608401610ca3565b6000602160006116a7601e5490565b81526020019081526020016000205490506116c6601e80546001019055565b6116d08482613cfd565b6017819055602160006116e2601e5490565b815260208101919091526040016000205550505050565b60006001600160a01b0382166117645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610ca3565b506001600160a01b031660009081526003602052604090205490565b611788612460565b6001600160a01b03166117a3600d546001600160a01b031690565b6001600160a01b0316146117f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca3565b6118036000612c01565b565b600d546001600160a01b031633146119325761181f611031565b6017541160405160200161183290613aad565b6040516020818303038152906040529061185f5760405162461bcd60e51b8152600401610ca39190613bf8565b50601854601e5414611872601854612b03565b6040516020016118829190613b34565b604051602081830303815290604052906118af5760405162461bcd60e51b8152600401610ca39190613bf8565b506002601a5460016118c19190613d29565b6118cb9190613d15565b3410156118f3671bc16d674ec80000601a5460016118e99190613d29565b6114ad9190613d15565b6040516020016119039190613ae1565b604051602081830303815290604052906119305760405162461bcd60e51b8152600401610ca39190613bf8565b505b600061194461193f611031565b612c53565b9050600061195182611537565b905061195c816124ce565b6001600160a01b0381166000908152601f6020526040812080549161198083613ddd565b91905055505050565b600061199781610b5d612460565b60006119a561090d601e5490565b90506000815111611a135760405162461bcd60e51b815260206004820152603260248201527f43616e6e6f74206c6f636b20776974686f7574206261736555524920736574206044820152713337b91031bab93932b73a10383430b9b29760711b6064820152608401610ca3565b50506010805460ff60b01b1916600160b01b179055565b6000611a3881610b5d612460565b601054600160b01b900460ff1615611a625760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060149060208501906134d6565b6000611048601e5490565b6000918252600e602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610b7e90613da2565b610b6b611ac5612460565b8383612cac565b6000611ada81610b5d612460565b601054600160b01b900460ff1615611b045760405162461bcd60e51b8152600401610ca390613c5d565b50601855565b60008181526020805260409020805460609190611b2690613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054611b5290613da2565b8015611b9f5780601f10611b7457610100808354040283529160200191611b9f565b820191906000526020600020905b815481529060010190602001808311611b8257829003601f168201915b50505050509050919050565b611bbc611bb6612460565b836126d6565b611bd85760405162461bcd60e51b8152600401610ca390613cac565b611be484848484612d7b565b50505050565b6000611bf881610b5d612460565b601054600160b01b900460ff1615611c225760405162461bcd60e51b8152600401610ca390613c5d565b8160206000611c30601e5490565b81526020019081526020016000209080519060200190610deb9291906134d6565b6000818152600260205260409020546060906001600160a01b0316611cd05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ca3565b601054600160a01b900460ff16611cee5760148054611b2690613da2565b6000611cf98361104d565b90506000611d0682611b0a565b90506000815111611da15760148054611d1e90613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054611d4a90613da2565b8015611d975780601f10611d6c57610100808354040283529160200191611d97565b820191906000526020600020905b815481529060010190602001808311611d7a57829003601f168201915b5050505050611dcf565b80611dab85612b03565b6013604051602001611dbf93929190613974565b6040516020818303038152906040525b949350505050565b6000611de581610b5d612460565b601054600160b01b900460ff1615611e0f5760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060159060208501906134d6565b6000611e3081610b5d612460565b601054600160b01b900460ff1615611e5a5760405162461bcd60e51b8152600401610ca390613c5d565b50601b55565b6000828152600e6020526040902060010154611e7e81610b5d612460565b610deb83836129d7565b606060206000611e97601e5490565b81526020019081526020016000208054610b7e90613da2565b6000611ebe81610b5d612460565b601054600160b01b900460ff1615611ee85760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060139060208501906134d6565b7fd8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b611f2881610b5d612460565b6000611f3561193f611031565b90506000611f4282611537565b9050611f4d600f5490565b601d556011546019546040516000926001600160a01b031691908381818185875af1925050503d8060008114611f9f576040519150601f19603f3d011682016040523d82523d6000602084013e611fa4565b606091505b5050905080611fb257600080fd5b611fbb826124ce565b6001600160a01b0382166000908152601f60205260408120805491611fdf83613ddd565b919050555050505050565b6000611ff881610b5d612460565b601054600160b01b900460ff16156120225760405162461bcd60e51b8152600401610ca390613c5d565b5060108054911515600160a01b0260ff60a01b19909216919091179055565b606060158054610b7e90613da2565b60105460405163c455279160e01b81526001600160a01b03848116600483015260009281169190841690829063c45527919060240160206040518083038186803b15801561209d57600080fd5b505afa1580156120b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d5919061388f565b6001600160a01b031614156120ee576001915050610b2a565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff16611dcf565b600061212a81610b5d612460565b50601180546001600160a01b0319166001600160a01b039390931692909217909155601955565b612159612460565b6001600160a01b0316612174600d546001600160a01b031690565b6001600160a01b0316146121ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca3565b6001600160a01b03811661222f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ca3565b61128d81612c01565b600061224681610b5d612460565b60006001600160a01b03841661225d600247613d15565b604051600081818185875af1925050503d8060008114612299576040519150601f19603f3d011682016040523d82523d6000602084013e61229e565b606091505b50509050806122ac57600080fd5b6000836001600160a01b03164760405160006040518083038185875af1925050503d80600081146122f9576040519150601f19603f3d011682016040523d82523d6000602084013e6122fe565b606091505b505090508061230c57600080fd5b5050505050565b80546001019055565b5490565b60003330141561237757600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061237a9050565b50335b90565b3b151590565b6001600160a01b0383166123de576123d981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612401565b816001600160a01b0316836001600160a01b031614612401576124018382612dae565b6001600160a01b03821661241857610deb81612e4b565b826001600160a01b0316826001600160a01b031614610deb57610deb8282612efa565b60006001600160e01b03198216637965db0b60e01b1480610b2a5750610b2a82612f3e565b6000611048612320565b6124748282611a80565b610b6b5761248c816001600160a01b03166014612f63565b612497836020612f63565b6040516020016124a8929190613a38565b60408051601f198184030181529082905262461bcd60e51b8252610ca391600401613bf8565b601054600160a81b900460ff161561251d5760405162461bcd60e51b81526020600482015260126024820152714d696e74696e67206973207061757365642160701b6044820152606401610ca3565b612526816130ff565b612531610446611031565b1561128d57601d546040517f545d998d444e50dc2bd22e5c71a3c8acbd0df68ba074d9a72e9a65e0863d5b5390600090a250565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061259a82611537565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166126395760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610ca3565b600161264c61264787613124565b6131a1565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561269a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006126cf8284613cfd565b9392505050565b6000818152600260205260408120546001600160a01b031661274f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ca3565b600061275a83611537565b9050806001600160a01b0316846001600160a01b031614806127955750836001600160a01b031661278a84610c2e565b6001600160a01b0316145b80611dcf5750611dcf8185612050565b826001600160a01b03166127b882611537565b6001600160a01b0316146128205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610ca3565b6001600160a01b0382166128825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ca3565b61288d8383836131d1565b612898600082612565565b6001600160a01b03831660009081526003602052604081208054600192906128c1908490613d48565b90915550506001600160a01b03821660009081526003602052604081208054600192906128ef908490613cfd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61295a8282611a80565b610b6b576000828152600e602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612993612460565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6129e18282611a80565b15610b6b576000828152600e602090815260408083206001600160a01b03851684529091529020805460ff19169055612a18612460565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000612a6782611537565b9050612a75816000846131d1565b612a80600083612565565b6001600160a01b0381166000908152600360205260408120805460019290612aa9908490613d48565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606081612b275750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b515780612b3b81613ddd565b9150612b4a9050600a83613d15565b9150612b2b565b60008167ffffffffffffffff811115612b6c57612b6c613e64565b6040519080825280601f01601f191660200182016040528015612b96576020820181803683370190505b5090505b8415611dcf57612bab600183613d48565b9150612bb8600a86613df8565b612bc3906030613cfd565b60f81b818381518110612bd857612bd8613e4e565b60200101906001600160f81b031916908160001a905350612bfa600a86613d15565b9450612b9a565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000804442612c63600186613d48565b604080516020810194909452830191909152606082015260800160408051601f1981840301815291905280516020909101209050612ca18382613df8565b6126cf906001613cfd565b816001600160a01b0316836001600160a01b03161415612d0e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ca3565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612d868484846127a5565b612d92848484846131dc565b611be45760405162461bcd60e51b8152600401610ca390613c0b565b60006001612dbb846116f9565b612dc59190613d48565b600083815260076020526040902054909150808214612e18576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612e5d90600190613d48565b60008381526009602052604081205460088054939450909284908110612e8557612e85613e4e565b906000526020600020015490508060088381548110612ea657612ea6613e4e565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612ede57612ede613e38565b6001900381819060005260206000200160009055905550505050565b6000612f05836116f9565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b0319821663780e9d6360e01b1480610b2a5750610b2a826132f0565b60606000612f72836002613d29565b612f7d906002613cfd565b67ffffffffffffffff811115612f9557612f95613e64565b6040519080825280601f01601f191660200182016040528015612fbf576020820181803683370190505b509050600360fc1b81600081518110612fda57612fda613e4e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061300957613009613e4e565b60200101906001600160f81b031916908160001a905350600061302d846002613d29565b613038906001613cfd565b90505b60018111156130b0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061306c5761306c613e4e565b1a60f81b82828151811061308257613082613e4e565b60200101906001600160f81b031916908160001a90535060049490941c936130a981613d8b565b905061303b565b5083156126cf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ca3565b600061310a600f5490565b905061311a600f80546001019055565b610b6b8282613340565b6000604051806080016040528060438152602001613ea66043913980516020918201208351848301516040808701518051908601209051613184950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b60006131ac600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201613184565b610deb838383612383565b60006001600160a01b0384163b156132e557836001600160a01b031663150b7a02613205612460565b8786866040518563ffffffff1660e01b81526004016132279493929190613bbb565b602060405180830381600087803b15801561324157600080fd5b505af1925050508015613271575060408051601f3d908101601f1916820190925261326e91810190613872565b60015b6132cb573d80801561329f576040519150601f19603f3d011682016040523d82523d6000602084013e6132a4565b606091505b5080516132c35760405162461bcd60e51b8152600401610ca390613c0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dcf565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061332157506001600160e01b03198216635b5e139f60e01b145b80610b2a57506301ffc9a760e01b6001600160e01b0319831614610b2a565b610b6b82826040518060200160405280600081525061335f8383613388565b61336c60008484846131dc565b610deb5760405162461bcd60e51b8152600401610ca390613c0b565b6001600160a01b0382166133de5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ca3565b6000818152600260205260409020546001600160a01b0316156134435760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ca3565b61344f600083836131d1565b6001600160a01b0382166000908152600360205260408120805460019290613478908490613cfd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546134e290613da2565b90600052602060002090601f016020900481019282613504576000855561354a565b82601f1061351d57805160ff191683800117855561354a565b8280016001018555821561354a579182015b8281111561354a57825182559160200191906001019061352f565b5061355692915061355a565b5090565b5b80821115613556576000815560010161355b565b600067ffffffffffffffff8084111561358a5761358a613e64565b604051601f8501601f19908116603f011681019082821181831017156135b2576135b2613e64565b816040528093508581528686860111156135cb57600080fd5b858560208301376000602087830101525050509392505050565b803580151581146135f557600080fd5b919050565b600082601f83011261360b57600080fd5b6126cf8383356020850161356f565b60006020828403121561362c57600080fd5b81356126cf81613e7a565b6000806040838503121561364a57600080fd5b823561365581613e7a565b9150602083013561366581613e7a565b809150509250929050565b60008060006060848603121561368557600080fd5b833561369081613e7a565b925060208401356136a081613e7a565b929592945050506040919091013590565b600080600080608085870312156136c757600080fd5b84356136d281613e7a565b935060208501356136e281613e7a565b925060408501359150606085013567ffffffffffffffff81111561370557600080fd5b613711878288016135fa565b91505092959194509250565b6000806040838503121561373057600080fd5b823561373b81613e7a565b9150613749602084016135e5565b90509250929050565b600080600080600060a0868803121561376a57600080fd5b853561377581613e7a565b9450602086013567ffffffffffffffff81111561379157600080fd5b61379d888289016135fa565b9450506040860135925060608601359150608086013560ff811681146137c257600080fd5b809150509295509295909350565b600080604083850312156137e357600080fd5b82356137ee81613e7a565b946020939093013593505050565b60006020828403121561380e57600080fd5b6126cf826135e5565b60006020828403121561382957600080fd5b5035919050565b6000806040838503121561384357600080fd5b82359150602083013561366581613e7a565b60006020828403121561386757600080fd5b81356126cf81613e8f565b60006020828403121561388457600080fd5b81516126cf81613e8f565b6000602082840312156138a157600080fd5b81516126cf81613e7a565b6000602082840312156138be57600080fd5b813567ffffffffffffffff8111156138d557600080fd5b8201601f810184136138e657600080fd5b611dcf8482356020840161356f565b6000815180845261390d816020860160208601613d5f565b601f01601f19169290920160200192915050565b60008251613933818460208701613d5f565b9190910192915050565b6000835161394f818460208801613d5f565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6000845160206139878285838a01613d5f565b85519184019161399a8184848a01613d5f565b8554920191600090600181811c90808316806139b757607f831692505b8583108114156139d557634e487b7160e01b85526022600452602485fd5b8080156139e957600181146139fa57613a27565b60ff19851688528388019550613a27565b60008b81526020902060005b85811015613a1f5781548a820152908401908801613a06565b505083880195505b50939b9a5050505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613a70816017850160208801613d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613aa1816028840160208801613d5f565b01602801949350505050565b7f4d696e74696e6720776f756c642065786365656420746f74616c20737570706c815261792160f01b602082015260220190565b6f02a3434b99036b4b73a1031b7b9ba39960851b815260008251613b0c816010850160208701613d5f565b701032ba3432b9103832b9103a37b5b2b71760791b6010939091019283015250602101919050565b7f4d696e74696e672069732064697361626c656420666f72207468697320706861815263039b296160e51b602082015260008251613b79816024850160208701613d5f565b9190910160240192915050565b6001600160a01b03848116825283166020820152606060408201819052600090613bb2908301846138f5565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613bee908301846138f5565b9695505050505050565b6020815260006126cf60208301846138f5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602f908201527f436f6e7472616374206973206c6f636b656420616e642063616e206e6f206c6f60408201526e1b99d95c8818994818da185b99d959608a1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008219821115613d1057613d10613e0c565b500190565b600082613d2457613d24613e22565b500490565b6000816000190483118215151615613d4357613d43613e0c565b500290565b600082821015613d5a57613d5a613e0c565b500390565b60005b83811015613d7a578181015183820152602001613d62565b83811115611be45750506000910152565b600081613d9a57613d9a613e0c565b506000190190565b600181811c90821680613db657607f821691505b60208210811415613dd757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613df157613df1613e0c565b5060010190565b600082613e0757613e07613e22565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461128d57600080fd5b6001600160e01b03198116811461128d57600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212206fe74cdc549dbf50f1e3e3eb73997fcf882ee62a0b20213b5a792eed4b2e41d364736f6c634300080600334552433732313a207472616e7366657220746f206e6f6e204552433732315265697066733a2f2f516d524b4b587771466d546a74794b38624e7137736b65587271637a5a7045754b645a674864796e78676e41596f454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429697066733a2f2f516d586241554b47664c6974517741693536676b6b5348396f614744376741667762426244363778756a354d5754000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000039b71d332df94b22e9c33dca75fe71b0f781a381
Deployed Bytecode
0x6080604052600436106103ad5760003560e01c80637e1eaabf116101e7578063c87b56dd1161010d578063e02767e9116100a0578063e9fe30671161006f578063e9fe306714610a98578063f2fde38b14610ab8578063f940e38514610ad8578063fcdd44d314610aeb57600080fd5b8063e02767e914610a3b578063e0a8085314610a43578063e8a3d48514610a63578063e985e9c514610a7857600080fd5b8063d547741f116100dc578063d547741f146109d1578063d547cfb7146109f1578063d5abeb0114610a06578063da3ef23f14610a1b57600080fd5b8063c87b56dd14610952578063ccb4807b14610972578063cf30901214610992578063d0eb26b0146109b157600080fd5b8063a035b1fe11610185578063b005656c11610154578063b005656c146108d2578063b82dcd2b146108f2578063b88d4fde14610912578063c866d21b1461093257600080fd5b8063a035b1fe14610854578063a20e7d4714610869578063a217fddf1461089d578063a22cb465146108b257600080fd5b8063820eb03d116101c1578063820eb03d146107ec5780638da5cb5b1461080157806391d148541461081f57806395d89b411461083f57600080fd5b80637e1eaabf146107af5780637f54ae7e146107b75780637f9dd6a2146107cc57600080fd5b80632f2ff15d116102d7578063518302271161026a5780636352211e116102395780636352211e1461073a5780636412dd451461075a57806370a082311461077a578063715018a61461079a57600080fd5b806351830227146106d457806352a30c90146106f35780635c975abb146107085780635e61016b1461072757600080fd5b806342842e0e116102a657806342842e0e1461065457806342966c681461067457806344a0d68a146106945780634f6ccce7146106b457600080fd5b80632f2ff15d146105e15780632f745c59146106015780633408e4701461062157806336568abe1461063457600080fd5b80630f7e59701161034f578063208a789e1161031e578063208a789e1461053b57806323b872dd1461055b578063248a9ca31461057b5780632d0335ab146105ab57600080fd5b80630f7e5970146104b657806316c38b3c146104e357806318160ddd1461050357806320379ee51461052657600080fd5b806307cafe3b1161038b57806307cafe3b1461042b578063081812fc1461044b578063095ea7b3146104835780630c53c51c146104a357600080fd5b806301ffc9a7146103b257806306aba612146103e757806306fdde0314610409575b600080fd5b3480156103be57600080fd5b506103d26103cd366004613855565b610b1f565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b5061040761040236600461361a565b610b30565b005b34801561041557600080fd5b5061041e610b6f565b6040516103de9190613bf8565b34801561043757600080fd5b506103d2610446366004613817565b610c01565b34801561045757600080fd5b5061046b610466366004613817565b610c2e565b6040516001600160a01b0390911681526020016103de565b34801561048f57600080fd5b5061040761049e3660046137d0565b610cc8565b61041e6104b1366004613752565b610df0565b3480156104c257600080fd5b5061041e604051806040016040528060018152602001603160f81b81525081565b3480156104ef57600080fd5b506104076104fe3660046137fc565b610fda565b34801561050f57600080fd5b50610518611031565b6040519081526020016103de565b34801561053257600080fd5b50600b54610518565b34801561054757600080fd5b50610518610556366004613817565b61104d565b34801561056757600080fd5b50610407610576366004613670565b611079565b34801561058757600080fd5b50610518610596366004613817565b6000908152600e602052604090206001015490565b3480156105b757600080fd5b506105186105c636600461361a565b6001600160a01b03166000908152600c602052604090205490565b3480156105ed57600080fd5b506104076105fc366004613830565b6110b1565b34801561060d57600080fd5b5061051861061c3660046137d0565b6110d9565b34801561062d57600080fd5b5046610518565b34801561064057600080fd5b5061040761064f366004613830565b61116f565b34801561066057600080fd5b5061040761066f366004613670565b6111f9565b34801561068057600080fd5b5061040761068f366004613817565b611214565b3480156106a057600080fd5b506104076106af366004613817565b611290565b3480156106c057600080fd5b506105186106cf366004613817565b6112ce565b3480156106e057600080fd5b50601054600160a01b900460ff166103d2565b3480156106ff57600080fd5b50601d54610518565b34801561071457600080fd5b50601054600160a81b900460ff166103d2565b610407610735366004613817565b611361565b34801561074657600080fd5b5061046b610755366004613817565b611537565b34801561076657600080fd5b50610407610775366004613817565b6115ae565b34801561078657600080fd5b5061051861079536600461361a565b6116f9565b3480156107a657600080fd5b50610407611780565b610407611805565b3480156107c357600080fd5b50610407611989565b3480156107d857600080fd5b506104076107e73660046138ac565b611a2a565b3480156107f857600080fd5b50610518611a75565b34801561080d57600080fd5b50600d546001600160a01b031661046b565b34801561082b57600080fd5b506103d261083a366004613830565b611a80565b34801561084b57600080fd5b5061041e611aab565b34801561086057600080fd5b50601a54610518565b34801561087557600080fd5b506105187fd8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b81565b3480156108a957600080fd5b50610518600081565b3480156108be57600080fd5b506104076108cd36600461371d565b611aba565b3480156108de57600080fd5b506104076108ed366004613817565b611acc565b3480156108fe57600080fd5b5061041e61090d366004613817565b611b0a565b34801561091e57600080fd5b5061040761092d3660046136b1565b611bab565b34801561093e57600080fd5b5061040761094d3660046138ac565b611bea565b34801561095e57600080fd5b5061041e61096d366004613817565b611c51565b34801561097e57600080fd5b5061040761098d3660046138ac565b611dd7565b34801561099e57600080fd5b50601054600160b01b900460ff166103d2565b3480156109bd57600080fd5b506104076109cc366004613817565b611e22565b3480156109dd57600080fd5b506104076109ec366004613830565b611e60565b3480156109fd57600080fd5b5061041e611e88565b348015610a1257600080fd5b50601754610518565b348015610a2757600080fd5b50610407610a363660046138ac565b611eb0565b610407611efb565b348015610a4f57600080fd5b50610407610a5e3660046137fc565b611fea565b348015610a6f57600080fd5b5061041e612041565b348015610a8457600080fd5b506103d2610a93366004613637565b612050565b348015610aa457600080fd5b50610407610ab33660046137d0565b61211c565b348015610ac457600080fd5b50610407610ad336600461361a565b612151565b610407610ae6366004613637565b612238565b348015610af757600080fd5b506105187f05270feb7310ab271769c54510cfd69edd4efc9f847cc7d40e211e54005cedb581565b6000610b2a8261243b565b92915050565b7f05270feb7310ab271769c54510cfd69edd4efc9f847cc7d40e211e54005cedb5610b6281610b5d612460565b61246a565b610b6b826124ce565b5050565b606060008054610b7e90613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054610baa90613da2565b8015610bf75780601f10610bcc57610100808354040283529160200191610bf7565b820191906000526020600020905b815481529060010190602001808311610bda57829003601f168201915b5050505050905090565b6000601c5482610c119190613df8565b158015610c1f575081601d54105b8015610b2a5750506017541190565b6000818152600260205260408120546001600160a01b0316610cac5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610cd382611537565b9050806001600160a01b0316836001600160a01b03161415610d415760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ca3565b806001600160a01b0316610d53612460565b6001600160a01b03161480610d6f5750610d6f81610a93612460565b610de15760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ca3565b610deb8383612565565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610e2e87828787876125d3565b610e845760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610ca3565b6001600160a01b0387166000908152600c6020526040902054610ea89060016126c3565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610ef890899033908a90613b86565b60405180910390a1600080306001600160a01b0316888a604051602001610f2092919061393d565b60408051601f1981840301815290829052610f3a91613921565b6000604051808303816000865af19150503d8060008114610f77576040519150601f19603f3d011682016040523d82523d6000602084013e610f7c565b606091505b509150915081610fce5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610ca3565b98975050505050505050565b6000610fe881610b5d612460565b601054600160b01b900460ff16156110125760405162461bcd60e51b8152600401610ca390613c5d565b5060108054911515600160a81b0260ff60a81b19909216919091179055565b6000600161103e600f5490565b6110489190613d48565b905090565b6000805b600081815260216020526040902054831115610b2a57611072600182613cfd565b9050611051565b61108a611084612460565b826126d6565b6110a65760405162461bcd60e51b8152600401610ca390613cac565b610deb8383836127a5565b6000828152600e60205260409020600101546110cf81610b5d612460565b610deb8383612950565b60006110e4836116f9565b82106111465760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610ca3565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b611177612460565b6001600160a01b0316816001600160a01b0316146111ef5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ca3565b610b6b82826129d7565b610deb83838360405180602001604052806000815250611bab565b61121f611084612460565b6112845760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610ca3565b61128d81612a5c565b50565b600061129e81610b5d612460565b601054600160b01b900460ff16156112c85760405162461bcd60e51b8152600401610ca390613c5d565b50601a55565b60006112d960085490565b821061133c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610ca3565b6008828154811061134f5761134f613e4e565b90600052602060002001549050919050565b600d546001600160a01b031633146114f2578061137c611031565b6113869190613cfd565b601754101560405160200161139a90613aad565b604051602081830303815290604052906113c75760405162461bcd60e51b8152600401610ca39190613bf8565b50601854601e54146113da601854612b03565b6040516020016113ea9190613b34565b604051602081830303815290604052906114175760405162461bcd60e51b8152600401610ca39190613bf8565b50336000908152601f6020526040902054601b546114358383613cfd565b11156114835760405162461bcd60e51b815260206004820152601c60248201527f4d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ca3565b81601a546114919190613d29565b3410156114b2670de0b6b3a7640000601a546114ad9190613d15565b612b03565b6040516020016114c29190613ae1565b604051602081830303815290604052906114ef5760405162461bcd60e51b8152600401610ca39190613bf8565b50505b60015b818111610b6b57336000908152601f6020526040812080549161151783613ddd565b9190505550611525336124ce565b8061152f81613ddd565b9150506114f5565b6000818152600260205260408120546001600160a01b031680610b2a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610ca3565b60006115bc81610b5d612460565b601654601e541061160f5760405162461bcd60e51b815260206004820152601960248201527f4e6f206d6f72652070686173657320746f207374657020746f000000000000006044820152606401610ca3565b600061161d61090d601e5490565b90506000815111611698576040805162461bcd60e51b81526020600482015260248101919091527f43616e6e6f742070726f6772657373206120706861736520776974686f75742060448201527f6120626173655552492073657420666f722063757272656e742070686173652e6064820152608401610ca3565b6000602160006116a7601e5490565b81526020019081526020016000205490506116c6601e80546001019055565b6116d08482613cfd565b6017819055602160006116e2601e5490565b815260208101919091526040016000205550505050565b60006001600160a01b0382166117645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610ca3565b506001600160a01b031660009081526003602052604090205490565b611788612460565b6001600160a01b03166117a3600d546001600160a01b031690565b6001600160a01b0316146117f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca3565b6118036000612c01565b565b600d546001600160a01b031633146119325761181f611031565b6017541160405160200161183290613aad565b6040516020818303038152906040529061185f5760405162461bcd60e51b8152600401610ca39190613bf8565b50601854601e5414611872601854612b03565b6040516020016118829190613b34565b604051602081830303815290604052906118af5760405162461bcd60e51b8152600401610ca39190613bf8565b506002601a5460016118c19190613d29565b6118cb9190613d15565b3410156118f3671bc16d674ec80000601a5460016118e99190613d29565b6114ad9190613d15565b6040516020016119039190613ae1565b604051602081830303815290604052906119305760405162461bcd60e51b8152600401610ca39190613bf8565b505b600061194461193f611031565b612c53565b9050600061195182611537565b905061195c816124ce565b6001600160a01b0381166000908152601f6020526040812080549161198083613ddd565b91905055505050565b600061199781610b5d612460565b60006119a561090d601e5490565b90506000815111611a135760405162461bcd60e51b815260206004820152603260248201527f43616e6e6f74206c6f636b20776974686f7574206261736555524920736574206044820152713337b91031bab93932b73a10383430b9b29760711b6064820152608401610ca3565b50506010805460ff60b01b1916600160b01b179055565b6000611a3881610b5d612460565b601054600160b01b900460ff1615611a625760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060149060208501906134d6565b6000611048601e5490565b6000918252600e602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060018054610b7e90613da2565b610b6b611ac5612460565b8383612cac565b6000611ada81610b5d612460565b601054600160b01b900460ff1615611b045760405162461bcd60e51b8152600401610ca390613c5d565b50601855565b60008181526020805260409020805460609190611b2690613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054611b5290613da2565b8015611b9f5780601f10611b7457610100808354040283529160200191611b9f565b820191906000526020600020905b815481529060010190602001808311611b8257829003601f168201915b50505050509050919050565b611bbc611bb6612460565b836126d6565b611bd85760405162461bcd60e51b8152600401610ca390613cac565b611be484848484612d7b565b50505050565b6000611bf881610b5d612460565b601054600160b01b900460ff1615611c225760405162461bcd60e51b8152600401610ca390613c5d565b8160206000611c30601e5490565b81526020019081526020016000209080519060200190610deb9291906134d6565b6000818152600260205260409020546060906001600160a01b0316611cd05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ca3565b601054600160a01b900460ff16611cee5760148054611b2690613da2565b6000611cf98361104d565b90506000611d0682611b0a565b90506000815111611da15760148054611d1e90613da2565b80601f0160208091040260200160405190810160405280929190818152602001828054611d4a90613da2565b8015611d975780601f10611d6c57610100808354040283529160200191611d97565b820191906000526020600020905b815481529060010190602001808311611d7a57829003601f168201915b5050505050611dcf565b80611dab85612b03565b6013604051602001611dbf93929190613974565b6040516020818303038152906040525b949350505050565b6000611de581610b5d612460565b601054600160b01b900460ff1615611e0f5760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060159060208501906134d6565b6000611e3081610b5d612460565b601054600160b01b900460ff1615611e5a5760405162461bcd60e51b8152600401610ca390613c5d565b50601b55565b6000828152600e6020526040902060010154611e7e81610b5d612460565b610deb83836129d7565b606060206000611e97601e5490565b81526020019081526020016000208054610b7e90613da2565b6000611ebe81610b5d612460565b601054600160b01b900460ff1615611ee85760405162461bcd60e51b8152600401610ca390613c5d565b8151610deb9060139060208501906134d6565b7fd8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b611f2881610b5d612460565b6000611f3561193f611031565b90506000611f4282611537565b9050611f4d600f5490565b601d556011546019546040516000926001600160a01b031691908381818185875af1925050503d8060008114611f9f576040519150601f19603f3d011682016040523d82523d6000602084013e611fa4565b606091505b5050905080611fb257600080fd5b611fbb826124ce565b6001600160a01b0382166000908152601f60205260408120805491611fdf83613ddd565b919050555050505050565b6000611ff881610b5d612460565b601054600160b01b900460ff16156120225760405162461bcd60e51b8152600401610ca390613c5d565b5060108054911515600160a01b0260ff60a01b19909216919091179055565b606060158054610b7e90613da2565b60105460405163c455279160e01b81526001600160a01b03848116600483015260009281169190841690829063c45527919060240160206040518083038186803b15801561209d57600080fd5b505afa1580156120b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d5919061388f565b6001600160a01b031614156120ee576001915050610b2a565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff16611dcf565b600061212a81610b5d612460565b50601180546001600160a01b0319166001600160a01b039390931692909217909155601955565b612159612460565b6001600160a01b0316612174600d546001600160a01b031690565b6001600160a01b0316146121ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ca3565b6001600160a01b03811661222f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ca3565b61128d81612c01565b600061224681610b5d612460565b60006001600160a01b03841661225d600247613d15565b604051600081818185875af1925050503d8060008114612299576040519150601f19603f3d011682016040523d82523d6000602084013e61229e565b606091505b50509050806122ac57600080fd5b6000836001600160a01b03164760405160006040518083038185875af1925050503d80600081146122f9576040519150601f19603f3d011682016040523d82523d6000602084013e6122fe565b606091505b505090508061230c57600080fd5b5050505050565b80546001019055565b5490565b60003330141561237757600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061237a9050565b50335b90565b3b151590565b6001600160a01b0383166123de576123d981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612401565b816001600160a01b0316836001600160a01b031614612401576124018382612dae565b6001600160a01b03821661241857610deb81612e4b565b826001600160a01b0316826001600160a01b031614610deb57610deb8282612efa565b60006001600160e01b03198216637965db0b60e01b1480610b2a5750610b2a82612f3e565b6000611048612320565b6124748282611a80565b610b6b5761248c816001600160a01b03166014612f63565b612497836020612f63565b6040516020016124a8929190613a38565b60408051601f198184030181529082905262461bcd60e51b8252610ca391600401613bf8565b601054600160a81b900460ff161561251d5760405162461bcd60e51b81526020600482015260126024820152714d696e74696e67206973207061757365642160701b6044820152606401610ca3565b612526816130ff565b612531610446611031565b1561128d57601d546040517f545d998d444e50dc2bd22e5c71a3c8acbd0df68ba074d9a72e9a65e0863d5b5390600090a250565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061259a82611537565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166126395760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610ca3565b600161264c61264787613124565b6131a1565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561269a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006126cf8284613cfd565b9392505050565b6000818152600260205260408120546001600160a01b031661274f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ca3565b600061275a83611537565b9050806001600160a01b0316846001600160a01b031614806127955750836001600160a01b031661278a84610c2e565b6001600160a01b0316145b80611dcf5750611dcf8185612050565b826001600160a01b03166127b882611537565b6001600160a01b0316146128205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610ca3565b6001600160a01b0382166128825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ca3565b61288d8383836131d1565b612898600082612565565b6001600160a01b03831660009081526003602052604081208054600192906128c1908490613d48565b90915550506001600160a01b03821660009081526003602052604081208054600192906128ef908490613cfd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61295a8282611a80565b610b6b576000828152600e602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612993612460565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6129e18282611a80565b15610b6b576000828152600e602090815260408083206001600160a01b03851684529091529020805460ff19169055612a18612460565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000612a6782611537565b9050612a75816000846131d1565b612a80600083612565565b6001600160a01b0381166000908152600360205260408120805460019290612aa9908490613d48565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606081612b275750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b515780612b3b81613ddd565b9150612b4a9050600a83613d15565b9150612b2b565b60008167ffffffffffffffff811115612b6c57612b6c613e64565b6040519080825280601f01601f191660200182016040528015612b96576020820181803683370190505b5090505b8415611dcf57612bab600183613d48565b9150612bb8600a86613df8565b612bc3906030613cfd565b60f81b818381518110612bd857612bd8613e4e565b60200101906001600160f81b031916908160001a905350612bfa600a86613d15565b9450612b9a565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000804442612c63600186613d48565b604080516020810194909452830191909152606082015260800160408051601f1981840301815291905280516020909101209050612ca18382613df8565b6126cf906001613cfd565b816001600160a01b0316836001600160a01b03161415612d0e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ca3565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612d868484846127a5565b612d92848484846131dc565b611be45760405162461bcd60e51b8152600401610ca390613c0b565b60006001612dbb846116f9565b612dc59190613d48565b600083815260076020526040902054909150808214612e18576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612e5d90600190613d48565b60008381526009602052604081205460088054939450909284908110612e8557612e85613e4e565b906000526020600020015490508060088381548110612ea657612ea6613e4e565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612ede57612ede613e38565b6001900381819060005260206000200160009055905550505050565b6000612f05836116f9565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b0319821663780e9d6360e01b1480610b2a5750610b2a826132f0565b60606000612f72836002613d29565b612f7d906002613cfd565b67ffffffffffffffff811115612f9557612f95613e64565b6040519080825280601f01601f191660200182016040528015612fbf576020820181803683370190505b509050600360fc1b81600081518110612fda57612fda613e4e565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061300957613009613e4e565b60200101906001600160f81b031916908160001a905350600061302d846002613d29565b613038906001613cfd565b90505b60018111156130b0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061306c5761306c613e4e565b1a60f81b82828151811061308257613082613e4e565b60200101906001600160f81b031916908160001a90535060049490941c936130a981613d8b565b905061303b565b5083156126cf5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ca3565b600061310a600f5490565b905061311a600f80546001019055565b610b6b8282613340565b6000604051806080016040528060438152602001613ea66043913980516020918201208351848301516040808701518051908601209051613184950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b60006131ac600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201613184565b610deb838383612383565b60006001600160a01b0384163b156132e557836001600160a01b031663150b7a02613205612460565b8786866040518563ffffffff1660e01b81526004016132279493929190613bbb565b602060405180830381600087803b15801561324157600080fd5b505af1925050508015613271575060408051601f3d908101601f1916820190925261326e91810190613872565b60015b6132cb573d80801561329f576040519150601f19603f3d011682016040523d82523d6000602084013e6132a4565b606091505b5080516132c35760405162461bcd60e51b8152600401610ca390613c0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dcf565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061332157506001600160e01b03198216635b5e139f60e01b145b80610b2a57506301ffc9a760e01b6001600160e01b0319831614610b2a565b610b6b82826040518060200160405280600081525061335f8383613388565b61336c60008484846131dc565b610deb5760405162461bcd60e51b8152600401610ca390613c0b565b6001600160a01b0382166133de5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ca3565b6000818152600260205260409020546001600160a01b0316156134435760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ca3565b61344f600083836131d1565b6001600160a01b0382166000908152600360205260408120805460019290613478908490613cfd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546134e290613da2565b90600052602060002090601f016020900481019282613504576000855561354a565b82601f1061351d57805160ff191683800117855561354a565b8280016001018555821561354a579182015b8281111561354a57825182559160200191906001019061352f565b5061355692915061355a565b5090565b5b80821115613556576000815560010161355b565b600067ffffffffffffffff8084111561358a5761358a613e64565b604051601f8501601f19908116603f011681019082821181831017156135b2576135b2613e64565b816040528093508581528686860111156135cb57600080fd5b858560208301376000602087830101525050509392505050565b803580151581146135f557600080fd5b919050565b600082601f83011261360b57600080fd5b6126cf8383356020850161356f565b60006020828403121561362c57600080fd5b81356126cf81613e7a565b6000806040838503121561364a57600080fd5b823561365581613e7a565b9150602083013561366581613e7a565b809150509250929050565b60008060006060848603121561368557600080fd5b833561369081613e7a565b925060208401356136a081613e7a565b929592945050506040919091013590565b600080600080608085870312156136c757600080fd5b84356136d281613e7a565b935060208501356136e281613e7a565b925060408501359150606085013567ffffffffffffffff81111561370557600080fd5b613711878288016135fa565b91505092959194509250565b6000806040838503121561373057600080fd5b823561373b81613e7a565b9150613749602084016135e5565b90509250929050565b600080600080600060a0868803121561376a57600080fd5b853561377581613e7a565b9450602086013567ffffffffffffffff81111561379157600080fd5b61379d888289016135fa565b9450506040860135925060608601359150608086013560ff811681146137c257600080fd5b809150509295509295909350565b600080604083850312156137e357600080fd5b82356137ee81613e7a565b946020939093013593505050565b60006020828403121561380e57600080fd5b6126cf826135e5565b60006020828403121561382957600080fd5b5035919050565b6000806040838503121561384357600080fd5b82359150602083013561366581613e7a565b60006020828403121561386757600080fd5b81356126cf81613e8f565b60006020828403121561388457600080fd5b81516126cf81613e8f565b6000602082840312156138a157600080fd5b81516126cf81613e7a565b6000602082840312156138be57600080fd5b813567ffffffffffffffff8111156138d557600080fd5b8201601f810184136138e657600080fd5b611dcf8482356020840161356f565b6000815180845261390d816020860160208601613d5f565b601f01601f19169290920160200192915050565b60008251613933818460208701613d5f565b9190910192915050565b6000835161394f818460208801613d5f565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6000845160206139878285838a01613d5f565b85519184019161399a8184848a01613d5f565b8554920191600090600181811c90808316806139b757607f831692505b8583108114156139d557634e487b7160e01b85526022600452602485fd5b8080156139e957600181146139fa57613a27565b60ff19851688528388019550613a27565b60008b81526020902060005b85811015613a1f5781548a820152908401908801613a06565b505083880195505b50939b9a5050505050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613a70816017850160208801613d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613aa1816028840160208801613d5f565b01602801949350505050565b7f4d696e74696e6720776f756c642065786365656420746f74616c20737570706c815261792160f01b602082015260220190565b6f02a3434b99036b4b73a1031b7b9ba39960851b815260008251613b0c816010850160208701613d5f565b701032ba3432b9103832b9103a37b5b2b71760791b6010939091019283015250602101919050565b7f4d696e74696e672069732064697361626c656420666f72207468697320706861815263039b296160e51b602082015260008251613b79816024850160208701613d5f565b9190910160240192915050565b6001600160a01b03848116825283166020820152606060408201819052600090613bb2908301846138f5565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613bee908301846138f5565b9695505050505050565b6020815260006126cf60208301846138f5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602f908201527f436f6e7472616374206973206c6f636b656420616e642063616e206e6f206c6f60408201526e1b99d95c8818994818da185b99d959608a1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008219821115613d1057613d10613e0c565b500190565b600082613d2457613d24613e22565b500490565b6000816000190483118215151615613d4357613d43613e0c565b500290565b600082821015613d5a57613d5a613e0c565b500390565b60005b83811015613d7a578181015183820152602001613d62565b83811115611be45750506000910152565b600081613d9a57613d9a613e0c565b506000190190565b600181811c90821680613db657607f821691505b60208210811415613dd757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613df157613df1613e0c565b5060010190565b600082613e0757613e07613e22565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461128d57600080fd5b6001600160e01b03198116811461128d57600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212206fe74cdc549dbf50f1e3e3eb73997fcf882ee62a0b20213b5a792eed4b2e41d364736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000039b71d332df94b22e9c33dca75fe71b0f781a381
-----Decoded View---------------
Arg [0] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [1] : _adminRoleAddress (address): 0x39B71D332Df94B22E9C33dCA75fe71b0f781a381
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [1] : 00000000000000000000000039b71d332df94b22e9c33dca75fe71b0f781a381
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,387.37 | 0.5 | $1,693.68 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.