Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
PassportDecaUpgraded
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 750 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./PassageUtils.sol"; import "./interfaces/IPassageRegistry.sol"; import "./interfaces/IPassport.sol"; import "./lib/ERC2771Recipient.sol"; import "./lib/Ownable.sol"; import "./lib/PassageAccess.sol"; /// ___ /// ( _`\ /// | |_) ) _ _ ___ ___ _ _ __ __ /// | ,__/'/'_` )/',__)/',__) /'_` ) /'_ `\ /'__`\ /// | | ( (_| |\__, \\__, \( (_| |( (_) |( ___/ /// (_) `\__,_)(____/(____/`\__,_)`\__ |`\____) /// ( )_) | /// \___/' /// @title Passage Passport /// @notice Passport ERC-721 Token contract PassportDecaUpgraded is ERC721BurnableUpgradeable, PassageAccess, UUPSUpgradeable, ERC2771Recipient, Ownable, IPassport { using CountersUpgradeable for CountersUpgradeable.Counter; using PassageUtils for address; IPassageRegistry public passageRegistry; CountersUpgradeable.Counter private _tokenIdCounter; string public uri; bool public transferEnabled; bool public claimEnabled; bool public claimlistClaimEnabled; bool public versionLocked; bool public maxSupplyLocked; bool public transferEnabledLocked; uint256 public maxSupply; // 0 is no max uint256 public claimFee; // 0 is no fee uint256 public claimAmount; uint256 public claimlistClaimFee; // 0 is no fee bytes32 public claimlistRoot; mapping(address => bool) public claimlistClaimed; // claimlist address -> claimed // new storage values (must be appended to end) IDecagonBeforeTransferContract public beforeTransferContract; // default value 0x0000000000000000000000000000000000000000 modifier onlyAuthorizedUpgrader() { if (isManaged()) { address registry = address(passageRegistry); require(registry == _msgSender(), "T1"); } else { _checkRole(UPGRADER_ROLE, _msgSender()); } _; } modifier versionLockRequired() { require(versionLocked == true, "T2"); _; } modifier versionLockProhibited() { require(versionLocked == false, "T3"); _; } modifier maxSupplyLockProhibited() { require(maxSupplyLocked == false, "T5"); _; } // ---- constructor/initializer ---- /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} /// @notice Initializer function for contract creation instead of constructor to support upgrades /// @dev Only intended to be called from the registry /// @param _creator The address of the original creator /// @param _tokenName The token name /// @param _tokenSymbol The token symbol /// @param _transferEnabled If transfer enabled /// @param _maxSupply Max supply of tokens function initialize( address _creator, string calldata _tokenName, string calldata _tokenSymbol, bool _transferEnabled, uint256 _maxSupply ) external initializer { __ERC721_init(_tokenName, _tokenSymbol); __ERC721Burnable_init(); __AccessControl_init(); __UUPSUpgradeable_init(); _setupRoles(_creator); passageRegistry = IPassageRegistry(_msgSender()); transferEnabled = _transferEnabled; maxSupply = _maxSupply; claimAmount = 1; emit PassportInitialized( _msgSender(), address(this), _tokenSymbol, _tokenName, _transferEnabled, _maxSupply ); } // ---- public ---- /// @notice Mint token(s) to caller /// @dev Must first enable claim & set fee/amount (if desired) /// @param _amount Number of tokens to mint function claim(uint256 _amount) external payable { require(claimEnabled, "T6"); require(_amount <= claimAmount, "T7"); if (claimFee > 0) require(msg.value == claimFee * _amount, "T8"); for (uint256 i = 0; i < _amount; i++) { _mint(_msgSender()); } } /// @notice Mint token(s) to caller if they are on the supplied claimlist /// @dev Must first set claimlist root, enable claim, & set fee (if desired). Merkle tree can be generated with the Javascript library "merkletreejs", the hashing algorithm should be keccak256 and pair sorting should be enabled. Leaf is abi encodePacked address & amount /// @param _proof Proof for merkle tree /// @param _maxAmount Maximum number of tokens a user can mint, must be the same as merkle tree leaf /// @param _claimAmount Number of tokens to mint, must be less than or equal to max amount function claimClaimlist( bytes32[] calldata _proof, uint256 _maxAmount, uint256 _claimAmount ) external payable { require(claimlistClaimEnabled, "T9"); if (claimlistClaimFee > 0) require(msg.value == claimlistClaimFee * _claimAmount, "T8"); require(_claimAmount <= _maxAmount, "T10"); bool validProof = MerkleProof.verify( _proof, claimlistRoot, keccak256(abi.encodePacked(_msgSender(), _maxAmount)) ); require(validProof, "T11"); require(!claimlistClaimed[_msgSender()], "T12"); claimlistClaimed[_msgSender()] = true; for (uint256 i = 0; i < _claimAmount; i++) { _mint(_msgSender()); } } /// @notice Returns if Passport is still managed in registry /// @return if Passport is still managed in registry function isManaged() public view returns (bool) { return address(passageRegistry) != address(0); } /// @notice Returns Passport implementation version /// @return version number function passportVersion() public pure virtual returns (uint256 version) { return 1; } // ---- permissioned ---- /// @notice Allows MINTER role to mint a new token to supplied address /// @param to Address to mint token to /// @return The minted token id function mintPassport(address to) external onlyRole(MINTER_ROLE) returns (uint256) { return _mint(to); } /// @notice Allows MINTER role to mint a new token to any number of supplied addresses /// @param _addresses List of addresses function mintPassports(address[] calldata _addresses) external onlyRole(MINTER_ROLE) { for (uint256 i = 0; i < _addresses.length; i++) { _mint(_addresses[i]); } } // ---- admin ---- /// @notice Allows admin to eject from Passage management & upgrade contract independently of the registry /// @dev This is a one-way operation, there is no way to become managed again function eject() public onlyRole(DEFAULT_ADMIN_ROLE) { require(isManaged(), "T14"); address registry = address(passageRegistry); revokeRole(DEFAULT_ADMIN_ROLE, registry); revokeRole(UPGRADER_ROLE, registry); if (bytes(uri).length == 0) { string memory addrStr = address(this).address2Str(); string memory defaultUri = string( abi.encodePacked( passageRegistry.globalPassportBaseURI(), StringsUpgradeable.toString(block.chainid), "/", addrStr, "/" ) ); uri = defaultUri; } IPassageRegistry passageRegistryCache = passageRegistry; passageRegistry = IPassageRegistry(address(0)); passageRegistryCache.ejectPassport(); } /// @notice Locks the maxSupply which prevents any future maxSupply updates /// @notice this is a one way operation and cannot be undone /// @notice the current version must be locked function lockMaxSupply() external maxSupplyLockProhibited versionLockRequired onlyRole(DEFAULT_ADMIN_ROLE) { maxSupplyLocked = true; emit MaxSupplyLocked(); } /// @notice Locks the transferEnabled for a token which prevents any future transferEnabled updates /// @notice this is a one way operation and cannot be undone /// @notice the current version must be locked function lockTransferEnabled() external versionLockRequired onlyRole(DEFAULT_ADMIN_ROLE) { transferEnabledLocked = true; emit TransferEnabledLocked(); } /// @notice Locks the version of the contract preventing any future upgrades /// @notice this is a one way operation and cannot be undone function lockVersion() external versionLockProhibited onlyRole(DEFAULT_ADMIN_ROLE) { versionLocked = true; emit VersionLocked(); } /// @notice Allows manager to set the minting claim fee & amount /// @param _claimFee The claim fee in wei /// @param _claimAmount Max number of tokens someone can claim per tx function setClaimOptions(uint256 _claimFee, uint256 _claimAmount) external onlyRole(MANAGER_ROLE) { claimFee = _claimFee; claimAmount = _claimAmount; } /// @notice Allows manager to set the ability for tokens to be transferred /// @param _transferEnabled If transfer is enabled function setTransferEnabled(bool _transferEnabled) external onlyRole(MANAGER_ROLE) { require(transferEnabledLocked == false, "T15"); transferEnabled = _transferEnabled; emit TransferEnableUpdated(_transferEnabled); } /// @notice Allows manager to set the ability to set a new base URI rather than use the Passport Global URI /// @param _uri Token base URI function setBaseURI(string memory _uri) external onlyRole(MANAGER_ROLE) { uri = _uri; emit BaseUriUpdated(_uri); } /// @notice Allows manager to set if claim is enabled /// @param _claimEnabled If claim is enabled function setClaimEnabled(bool _claimEnabled) external onlyRole(MANAGER_ROLE) { claimEnabled = _claimEnabled; } /// @notice Allows manager to set max supply of tokens /// @param _maxSupply New max supply of tokens function setMaxSupply(uint256 _maxSupply) external maxSupplyLockProhibited onlyRole(MANAGER_ROLE) { require(_maxSupply >= _tokenIdCounter.current(), "T16"); maxSupply = _maxSupply; emit MaxSupplyUpdated(maxSupply); } /// @notice Allows default admin to set the owner address /// @dev not used for access control, used by services that require a single owner account /// @param newOwner address of the new owner function setOwnership(address newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { _setOwnership(newOwner); } /// @notice Allows manager to set trusted forwarder for meta-transactions /// @param forwarder Address of trusted forwarder function setTrustedForwarder(address forwarder) external onlyRole(MANAGER_ROLE) { _setTrustedForwarder(forwarder); } /// @notice Allows manager to set the fee for the claimlist claim /// @param _claimFee Fee in wei function setClaimlistClaimFee(uint256 _claimFee) external onlyRole(MANAGER_ROLE) { claimlistClaimFee = _claimFee; } /// @notice Allows manager to set if the claimlist claim is enabled /// @param _claimEnabled If the claimlist claim is enabled function setClaimlistClaimEnabled(bool _claimEnabled) external onlyRole(MANAGER_ROLE) { claimlistClaimEnabled = _claimEnabled; } /// @notice Allows manager to set the merkle tree root for the claimlist /// @dev Merkle tree can be generated with the Javascript library "merkletreejs", the hashing algorithm should be keccak256 and pair sorting should be enabled. Leaf is abi encodePacked address & amount /// @param _claimlistRoot Merkle tree root function setClaimlistRoot(bytes32 _claimlistRoot) external onlyRole(MANAGER_ROLE) { claimlistRoot = _claimlistRoot; } /// @notice Allows manager to set the claimlist claim fee & merkle root /// @dev Merkle tree can be generated with the Javascript library "merkletreejs", the hashing algorithm should be keccak256 and pair sorting should be enabled. Leaf is abi encodePacked address & amount /// @param _claimFee The claim fee in wei for the claimlist /// @param _claimlistRoot Merkle tree root function setClaimlistOptions(uint256 _claimFee, bytes32 _claimlistRoot) external onlyRole(MANAGER_ROLE) { claimlistClaimFee = _claimFee; claimlistRoot = _claimlistRoot; } /// @notice Allows manager to transfer eth from contract function withdraw() external onlyRole(MANAGER_ROLE) { uint256 value = address(this).balance; address payable to = payable(_msgSender()); emit Withdraw(value, _msgSender()); to.transfer(value); } function setBeforeTransferContract(address _beforeTransferContract) external onlyRole(MANAGER_ROLE) { beforeTransferContract = IDecagonBeforeTransferContract( _beforeTransferContract ); } // ---- private ---- function _setupRoles(address _creator) internal { _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(DEFAULT_ADMIN_ROLE, _creator); _grantRole(UPGRADER_ROLE, _msgSender()); _grantRole(UPGRADER_ROLE, _creator); _grantRole(MANAGER_ROLE, _creator); _grantRole(MINTER_ROLE, _creator); _setOwnership(_creator); } function _baseURI() internal view override returns (string memory) { if (bytes(uri).length > 0) return uri; // custom URI has been set string memory addrStr = address(this).address2Str(); return string( abi.encodePacked( passageRegistry.globalPassportBaseURI(), StringsUpgradeable.toString(block.chainid), "/", addrStr, "/" ) ); } function _mint(address to) internal returns (uint256) { if (maxSupply > 0) require(_tokenIdCounter.current() < maxSupply, "T17"); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); return tokenId; } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override(ERC721Upgradeable) { // disable non-mint & non-burn transfers if requested require( (from == address(0) || ((to == address(0)) || transferEnabled)), "T18" ); // call beforeTransferContract if set if (address(beforeTransferContract) != address(0)) { beforeTransferContract.beforeTransferLogic(from, to, amount); } super._beforeTokenTransfer(from, to, amount); } // ---- meta txs ---- function _msgSender() internal view virtual override(BaseRelayRecipient, ContextUpgradeable) returns (address) { return BaseRelayRecipient._msgSender(); } function _msgData() internal view virtual override(BaseRelayRecipient, ContextUpgradeable) returns (bytes calldata) { return BaseRelayRecipient._msgData(); } // ---- overrides ---- function _authorizeUpgrade(address newImplementation) internal override onlyAuthorizedUpgrader versionLockProhibited {} function hasUpgraderRole(address _address) public view override(IPassport, PassageAccess) returns (bool) { return super.hasUpgraderRole(_address); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, AccessControlUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function upgradeTo(address newImplementation) external override(UUPSUpgradeable, IPassport) onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } function upgradeToAndCall(address newImplementation, bytes memory data) external payable override(UUPSUpgradeable, IPassport) onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } } interface IDecagonBeforeTransferContract { function beforeTransferLogic( address from, address to, uint256 tokenId ) external view; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; library PassageUtils { /// @notice Converts an address to a string /// @param _addr The address to convert /// @return address string function address2Str(address _addr) internal pure returns (string memory) { bytes32 value = bytes32(uint256(uint160(_addr))); bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(42); str[0] = "0"; str[1] = "x"; for (uint256 i = 0; i < 20; i++) { str[2 + i * 2] = alphabet[uint8(value[i + 12] >> 4)]; str[3 + i * 2] = alphabet[uint8(value[i + 12] & 0x0f)]; } return string(str); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol"; interface IPassport is IAccessControlUpgradeable { event BaseUriUpdated(string uri); event MaxSupplyLocked(); event MaxSupplyUpdated(uint256 maxSupply); event PassportInitialized( address registryAddress, address passportAddress, string symbol, string name, bool transferEnabled, uint256 maxSupply ); event TransferEnabledLocked(); event TransferEnableUpdated(bool transferable); event Withdraw(uint256 value, address indexed withdrawnBy); event VersionLocked(); function claim(uint256 _amount) external payable; function claimClaimlist( bytes32[] calldata proof, uint256 _maxAmount, uint256 _claimAmount ) external payable; function eject() external; function hasUpgraderRole(address _address) external view returns (bool); function initialize( address _creator, string memory _tokenName, string memory _tokenSymbol, bool _transferEnabled, uint256 _maxSupply ) external; function lockMaxSupply() external; function lockTransferEnabled() external; function lockVersion() external; function mintPassport(address to) external returns (uint256); function mintPassports(address[] memory _addresses) external; function passportVersion() external pure returns (uint256 version); function setBaseURI(string memory _uri) external; function setClaimEnabled(bool _claimStatus) external; function setClaimOptions(uint256 _claimFee, uint256 _claimAmount) external; function setMaxSupply(uint256 _maxSupply) external; function setOwnership(address newOwner) external; function setTransferEnabled(bool _transferEnabled) external; function setTrustedForwarder(address forwarder) external; function setClaimlistClaimEnabled(bool _claimStatus) external; function setClaimlistClaimFee(uint256 _claimFee) external; function setClaimlistOptions(uint256 _claimFee, bytes32 _claimlistRoot) external; function setClaimlistRoot(bytes32 _claimlistRoot) external; function upgradeTo(address newImplementation) external; function upgradeToAndCall(address newImplementation, bytes memory data) external payable; function claimlistClaimFee() external view returns (uint256); function claimlistRoot() external view returns (bytes32); function withdraw() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol"; interface IPassageRegistry is IAccessControlUpgradeable { // ---- events ---- event PassportBaseUriUpdated(string uri); event PassportCreated(address indexed passportAddress); event PassportEjected(address ejectedAddress); event PassportImplementationAdded(uint256 version, address implementation); event PassportVersionUpgraded(address indexed passportAddress, uint256 version); event LoyaltyBaseUriUpdated(string uri); event LoyaltyCreated(address indexed loyaltyAddress); event LoyaltyLedgerEjected(address ejectedAddress); event LoyaltyLedgerImplementationAdded(uint256 version, address implementation); event LoyaltyVersionUpgraded(address indexed loyaltyAddress, uint256 version); function loyaltyImplementations(uint256) external view returns (address); function passportImplementations(uint256) external view returns (address); function addLoyaltyImplementation(address implementation) external; function addPassportImplementation(address implementation) external; function createLoyalty() external returns (address loyaltyAddress); function createLoyalty(bytes memory data) external returns (address loyaltyAddress); function createPassport( string calldata _tokenName, string calldata _tokenSymbol, bool _transferEnabled, uint256 _maxSupply ) external returns (address passportAddress); function createPassport(bytes memory data) external returns (address passportAddress); function ejectLoyaltyLedger() external; function ejectPassport() external; function globalLoyaltyBaseURI() external view returns (string memory); function globalPassportBaseURI() external view returns (string memory); function initialize(string memory _globalPassportBaseURI, string memory _globalLoyaltyBaseURI) external; function loyaltyLatestVersion() external view returns (uint256); function managedLoyaltyLedgers(address) external view returns (bool); function managedPassports(address) external view returns (bool); function passportLatestVersion() external view returns (uint256); function setGlobalLoyaltyBaseURI(string memory _uri) external; function setGlobalPassportBaseURI(string memory _uri) external; function setTrustedForwarder(address forwarder) external; function upgradeLoyalty(uint256 version, address loyaltyAddress) external returns (uint256 newVersion); function upgradePassport(uint256 version, address passportAddress) external returns (uint256 newVersion); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@opengsn/contracts/src/BaseRelayRecipient.sol"; contract ERC2771Recipient is BaseRelayRecipient { function versionRecipient() external pure override returns (string memory) { return "0.1.0"; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; contract Ownable { address private _convenienceOwner; event OwnershipSet(address indexed previousOwner, address indexed newOwner); /// @notice returns the address of the current _convenienceOwner /// @dev not used for access control, used by services that require a single owner account /// @return _convenienceOwner address function owner() public view virtual returns (address) { return _convenienceOwner; } /// @notice Set the _convenienceOwner address /// @dev not used for access control, used by services that require a single owner account /// @param newOwner address of the new _convenienceOwner function _setOwnership(address newOwner) internal virtual { address oldOwner = _convenienceOwner; _convenienceOwner = newOwner; emit OwnershipSet(oldOwner, newOwner); } /// @notice This empty reserved space is put in place to allow future versions to add new /// variables without shifting down storage in the inheritance chain. /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[100] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; contract PassageAccess is AccessControlUpgradeable { bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @notice returns true if the given _address has UPGRADER_ROLE /// @param _address Address to check for UPGRADER_ROLE /// @return bool whether _address has UPGRADER_ROLE function hasUpgraderRole(address _address) public view virtual returns (bool) { return hasRole(UPGRADER_ROLE, _address); } /// @notice This empty reserved space is put in place to allow future versions to add new /// variables without shifting down storage in the inheritance chain. /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[100] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../utils/ContextUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { function __ERC721Burnable_init() internal onlyInitializing { } function __ERC721Burnable_init_unchained() internal onlyInitializing { } /** * @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), "ERC721: caller is not token owner nor approved"); _burn(tokenId); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @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 // solhint-disable no-inline-assembly pragma solidity >=0.6.9; import "./interfaces/IRelayRecipient.sol"; /** * A base contract to be inherited by any contract that want to receive relayed transactions * A subclass must use "_msgSender()" instead of "msg.sender" */ abstract contract BaseRelayRecipient is IRelayRecipient { /* * Forwarder singleton we accept calls from */ address private _trustedForwarder; function trustedForwarder() public virtual view returns (address){ return _trustedForwarder; } function _setTrustedForwarder(address _forwarder) internal { _trustedForwarder = _forwarder; } function isTrustedForwarder(address forwarder) public virtual override view returns(bool) { return forwarder == _trustedForwarder; } /** * return the sender of this call. * if the call came through our trusted forwarder, return the original sender. * otherwise, return `msg.sender`. * should be used in the contract anywhere instead of msg.sender */ function _msgSender() internal override virtual view returns (address ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { // At this point we know that the sender is a trusted forwarder, // so we trust that the last bytes of msg.data are the verified sender address. // extract sender address from the end of msg.data assembly { ret := shr(96,calldataload(sub(calldatasize(),20))) } } else { ret = msg.sender; } } /** * return the msg.data of this call. * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes * of the msg.data - so this method will strip those 20 bytes off. * otherwise (if the call was made directly and not through the forwarder), return `msg.data` * should be used in the contract instead of msg.data, where this difference matters. */ function _msgData() internal override virtual view returns (bytes calldata ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { return msg.data[0:msg.data.length-20]; } else { return msg.data; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /** * a contract must implement this interface in order to support relayed transaction. * It is better to inherit the BaseRelayRecipient as its implementation. */ abstract contract IRelayRecipient { /** * return if the forwarder is trusted to forward relayed transactions to us. * the forwarder is required to verify the sender's signature, and verify * the call is not a replay. */ function isTrustedForwarder(address forwarder) public virtual view returns(bool); /** * return the sender of this call. * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes * of the msg.data. * otherwise, return `msg.sender` * should be used in the contract anywhere instead of msg.sender */ function _msgSender() internal virtual view returns (address); /** * return the msg.data of this call. * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes * of the msg.data - so this method will strip those 20 bytes off. * otherwise (if the call was made directly and not through the forwarder), return `msg.data` * should be used in the contract instead of msg.data, where this difference matters. */ function _msgData() internal virtual view returns (bytes calldata); function versionRecipient() external virtual view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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 virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.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 virtual 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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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`. * * May emit a {RoleRevoked} event. */ 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. * * May emit a {RoleGranted} event. * * [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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
{ "optimizer": { "enabled": true, "runs": 750 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"BaseUriUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[],"name":"MaxSupplyLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"MaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registryAddress","type":"address"},{"indexed":false,"internalType":"address","name":"passportAddress","type":"address"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bool","name":"transferEnabled","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"PassportInitialized","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"transferable","type":"bool"}],"name":"TransferEnableUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"TransferEnabledLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[],"name":"VersionLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"address","name":"withdrawnBy","type":"address"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeTransferContract","outputs":[{"internalType":"contract IDecagonBeforeTransferContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_claimAmount","type":"uint256"}],"name":"claimClaimlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimlistClaimEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimlistClaimFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimlistClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimlistRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eject","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":"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":"_address","type":"address"}],"name":"hasUpgraderRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"bool","name":"_transferEnabled","type":"bool"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isManaged","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockTransferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintPassport","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"mintPassports","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passageRegistry","outputs":[{"internalType":"contract IPassageRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passportVersion","outputs":[{"internalType":"uint256","name":"version","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beforeTransferContract","type":"address"}],"name":"setBeforeTransferContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_claimEnabled","type":"bool"}],"name":"setClaimEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimFee","type":"uint256"},{"internalType":"uint256","name":"_claimAmount","type":"uint256"}],"name":"setClaimOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_claimEnabled","type":"bool"}],"name":"setClaimlistClaimEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimFee","type":"uint256"}],"name":"setClaimlistClaimFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimFee","type":"uint256"},{"internalType":"bytes32","name":"_claimlistRoot","type":"bytes32"}],"name":"setClaimlistOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_claimlistRoot","type":"bytes32"}],"name":"setClaimlistRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_transferEnabled","type":"bool"}],"name":"setTransferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferEnabledLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b50600054610100900460ff1615808015620000375750600054600160ff909116105b8062000067575062000054306200014160201b620025931760201c565b15801562000067575060005460ff166001145b620000cf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff191660011790558015620000f3576000805461ff0019166101001790555b80156200013a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5062000150565b6001600160a01b03163b151590565b6080516149b76200018860003960008181611331015281816113b6015281816119d701528181611a5c0152611b4201526149b76000f3fe6080604052600436106104655760003560e01c80637da0a87711610243578063bd54847011610143578063eac989f8116100bb578063f6e2d09f1161008a578063fc0a9aed1161006f578063fc0a9aed14610d0f578063fca76c2614610d2f578063fdc3ac1e14610d4457600080fd5b8063f6e2d09f14610cba578063f72c0d8b14610cdb57600080fd5b8063eac989f814610c4f578063ec87621c14610c64578063ef16a00e14610c86578063f15ab47f14610c9a57600080fd5b8063d547741f11610112578063da742228116100f7578063da74222814610bc6578063e6e0a20614610be6578063e985e9c514610c0657600080fd5b8063d547741f14610b8f578063d5abeb0114610baf57600080fd5b8063bd54847014610b04578063c87b56dd14610b24578063d3d0d78214610b44578063d539139314610b5b57600080fd5b80639fe9f623116101d6578063a7016023116101a5578063a8d0466c1161018a578063a8d0466c14610a9d578063b88d4fde14610ac0578063bacb4d4e14610ae057600080fd5b8063a701602314610a5d578063a8343ccf14610a7d57600080fd5b80639fe9f623146109d7578063a217fddf146109f7578063a22cb46514610a0c578063a2567cfe14610a2c57600080fd5b806391d148541161021257806391d148541461094557806392929a091461098b57806395d89b41146109ab57806399d32fc4146109c057600080fd5b80637da0a877146108db57806382e94ac5146108fa578063830953ab1461090f5780638da5cb5b1461092657600080fd5b80633ccfd60b116103695780635530fa15116102e1578063572b6c05116102b05780636352211e116102955780636352211e1461087b5780636f8b44b01461089b57806370a08231146108bb57600080fd5b8063572b6c051461082a5780635e6663cc1461085a57600080fd5b80635530fa15146107b457806355f804b3146107c957806356570bc9146107e957806356971c161461080957600080fd5b806345fc67a3116103385780634cd412d51161031d5780634cd412d5146107715780634f1ef2861461078c57806352d1902d1461079f57600080fd5b806345fc67a31461072e578063486ff0cd1461074357600080fd5b80633ccfd60b146106b95780633eb8cbde146106ce57806342842e0e146106ee57806342966c681461070e57600080fd5b8063248a9ca3116103fc57806336568abe116103cb578063368ce327116103b0578063368ce3271461066f578063379607f51461068f57806339a36660146106a257600080fd5b806336568abe1461062f5780633659cfe61461064f57600080fd5b8063248a9ca3146105915780632866ed21146105cf5780632e658070146105ef5780632f2ff15d1461060f57600080fd5b8063095ea7b311610438578063095ea7b31461051b57806310576ebf1461053d578063232072811461055057806323b872dd1461057157600080fd5b806301ffc9a71461046a578063021163931461049f57806306fdde03146104c1578063081812fc146104e3575b600080fd5b34801561047657600080fd5b5061048a610485366004614001565b610d64565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b5061022c5461048a906301000000900460ff1681565b3480156104cd57600080fd5b506104d6610d75565b6040516104969190614076565b3480156104ef57600080fd5b506105036104fe366004614089565b610e07565b6040516001600160a01b039091168152602001610496565b34801561052757600080fd5b5061053b6105363660046140be565b610e2e565b005b61053b61054b366004614134565b610f5b565b34801561055c57600080fd5b5061022954610503906001600160a01b031681565b34801561057d57600080fd5b5061053b61058c366004614185565b6111aa565b34801561059d57600080fd5b506105c16105ac366004614089565b600090815260c9602052604090206001015490565b604051908152602001610496565b3480156105db57600080fd5b5061022c5461048a90610100900460ff1681565b3480156105fb57600080fd5b5061053b61060a3660046141c1565b611229565b34801561061b57600080fd5b5061053b61062a3660046141dc565b611265565b34801561063b57600080fd5b5061053b61064a3660046141dc565b61128a565b34801561065b57600080fd5b5061053b61066a3660046141c1565b611326565b34801561067b57600080fd5b5061053b61068a366004614218565b6114a2565b61053b61069d366004614089565b6114d8565b3480156106ae57600080fd5b506105c16102315481565b3480156106c557600080fd5b5061053b6115c1565b3480156106da57600080fd5b5061053b6106e9366004614275565b61166c565b3480156106fa57600080fd5b5061053b610709366004614185565b6118af565b34801561071a57600080fd5b5061053b610729366004614089565b6118ca565b34801561073a57600080fd5b5061053b611941565b34801561074f57600080fd5b506040805180820190915260058152640302e312e360dc1b60208201526104d6565b34801561077d57600080fd5b5061022c5461048a9060ff1681565b61053b61079a3660046143dd565b6119cc565b3480156107ab57600080fd5b506105c1611b35565b3480156107c057600080fd5b5061053b611bfa565b3480156107d557600080fd5b5061053b6107e436600461442b565b611c8d565b3480156107f557600080fd5b5061053b610804366004614089565b611cf5565b34801561081557600080fd5b5061023354610503906001600160a01b031681565b34801561083657600080fd5b5061048a6108453660046141c1565b6101c3546001600160a01b0391821691161490565b34801561086657600080fd5b50610229546001600160a01b0316151561048a565b34801561088757600080fd5b50610503610896366004614089565b611d14565b3480156108a757600080fd5b5061053b6108b6366004614089565b611d79565b3480156108c757600080fd5b506105c16108d63660046141c1565b611e41565b3480156108e757600080fd5b506101c3546001600160a01b0316610503565b34801561090657600080fd5b5061053b611edb565b34801561091b57600080fd5b506105c161022f5481565b34801561093257600080fd5b506101c4546001600160a01b0316610503565b34801561095157600080fd5b5061048a6109603660046141dc565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561099757600080fd5b5061053b6109a6366004614218565b6120c3565b3480156109b757600080fd5b506104d66120f7565b3480156109cc57600080fd5b506105c161022e5481565b3480156109e357600080fd5b5061053b6109f2366004614218565b612106565b348015610a0357600080fd5b506105c1600081565b348015610a1857600080fd5b5061053b610a27366004614474565b6121a3565b348015610a3857600080fd5b5061048a610a473660046141c1565b6102326020526000908152604090205460ff1681565b348015610a6957600080fd5b5061053b610a783660046141c1565b6121b5565b348015610a8957600080fd5b5061053b610a9836600461449e565b6121c9565b348015610aa957600080fd5b5061022c5461048a90640100000000900460ff1681565b348015610acc57600080fd5b5061053b610adb3660046144c0565b6121ef565b348015610aec57600080fd5b5061022c5461048a9065010000000000900460ff1681565b348015610b1057600080fd5b506105c1610b1f3660046141c1565b61226f565b348015610b3057600080fd5b506104d6610b3f366004614089565b6122ad565b348015610b5057600080fd5b506105c16102305481565b348015610b6757600080fd5b506105c17f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610b9b57600080fd5b5061053b610baa3660046141dc565b612313565b348015610bbb57600080fd5b506105c161022d5481565b348015610bd257600080fd5b5061053b610be13660046141c1565b612338565b348015610bf257600080fd5b5061053b610c01366004614089565b612370565b348015610c1257600080fd5b5061048a610c21366004614528565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610c5b57600080fd5b506104d661238f565b348015610c7057600080fd5b506105c160008051602061493b83398151915281565b348015610c9257600080fd5b5060016105c1565b348015610ca657600080fd5b5061053b610cb536600461449e565b61241e565b348015610cc657600080fd5b5061022c5461048a9062010000900460ff1681565b348015610ce757600080fd5b506105c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610d1b57600080fd5b5061048a610d2a3660046141c1565b612444565b348015610d3b57600080fd5b5061053b61244f565b348015610d5057600080fd5b5061053b610d5f366004614552565b612521565b6000610d6f826125a2565b92915050565b606060658054610d8490614594565b80601f0160208091040260200160405190810160405280929190818152602001828054610db090614594565b8015610dfd5780601f10610dd257610100808354040283529160200191610dfd565b820191906000526020600020905b815481529060010190602001808311610de057829003601f168201915b5050505050905090565b6000610e12826125c7565b506000908152606960205260409020546001600160a01b031690565b6000610e3982611d14565b9050806001600160a01b0316836001600160a01b03161415610eac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b0316610ebe61262b565b6001600160a01b03161480610eda5750610eda81610c2161262b565b610f4c5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610ea3565b610f56838361263a565b505050565b61022c5462010000900460ff16610f995760405162461bcd60e51b8152602060048201526002602482015261543960f01b6044820152606401610ea3565b6102305415610fe4578061023054610fb191906145df565b3414610fe45760405162461bcd60e51b81526020600482015260026024820152610a8760f31b6044820152606401610ea3565b8181111561101a5760405162461bcd60e51b815260206004820152600360248201526205431360ec1b6044820152606401610ea3565b60006110aa85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610231549150611060905061262b565b8660405160200161108f92919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b604051602081830303815290604052805190602001206126a8565b9050806110df5760405162461bcd60e51b815260206004820152600360248201526254313160e81b6044820152606401610ea3565b61023260006110ec61262b565b6001600160a01b0316815260208101919091526040016000205460ff161561113c5760405162461bcd60e51b81526020600482015260036024820152622a189960e91b6044820152606401610ea3565b6001610232600061114b61262b565b6001600160a01b0316815260208101919091526040016000908120805460ff1916921515929092179091555b828110156111a25761118f61118a61262b565b6126c0565b508061119a816145fe565b915050611177565b505050505050565b6111bb6111b561262b565b8261272e565b61121e5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b610f568383836127ad565b60008051602061493b83398151915261124181612954565b5061023380546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260c9602052604090206001015461128081612954565b610f568383612965565b61129261262b565b6001600160a01b0316816001600160a01b0316146113185760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ea3565b6113228282612a08565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113b45760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610ea3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661140f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461147a5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610ea3565b61148381612aa9565b6040805160008082526020820190925261149f91839190612b87565b50565b60008051602061493b8339815191526114ba81612954565b5061022c8054911515620100000262ff000019909216919091179055565b61022c54610100900460ff166115155760405162461bcd60e51b81526020600482015260026024820152612a1b60f11b6044820152606401610ea3565b61022f5481111561154d5760405162461bcd60e51b8152602060048201526002602482015261543760f01b6044820152606401610ea3565b61022e5415611598578061022e5461156591906145df565b34146115985760405162461bcd60e51b81526020600482015260026024820152610a8760f31b6044820152606401610ea3565b60005b81811015611322576115ae61118a61262b565b50806115b9816145fe565b91505061159b565b60008051602061493b8339815191526115d981612954565b4760006115e461262b565b90506115ee61262b565b6001600160a01b03167f8353ffcac0876ad14e226d9783c04540bfebf13871e868157d2a391cad98e9188360405161162891815260200190565b60405180910390a26040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611666573d6000803e3d6000fd5b50505050565b600054610100900460ff161580801561168c5750600054600160ff909116105b806116a65750303b1580156116a6575060005460ff166001145b6117185760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610ea3565b6000805460ff19166001179055801561173b576000805461ff0019166101001790555b6117ae87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250612d2792505050565b6117b6612d9c565b6117be612d9c565b6117c6612d9c565b6117cf88612e09565b6117d761262b565b61022980546001600160a01b0319166001600160a01b039290921691909117905561022c805460ff191684151517905561022d829055600161022f557f1c959cc37315848568a875d801f3a14aafef860b96ea8802314b1d2baa7b9fcd61183c61262b565b3087878b8b8989604051611857989796959493929190614642565b60405180910390a180156118a5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b610f56838383604051806020016040528060008152506121ef565b6118d56111b561262b565b6119385760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b61149f81612ec7565b61022c546301000000900460ff16156119815760405162461bcd60e51b8152602060048201526002602482015261543360f01b6044820152606401610ea3565b600061198c81612954565b61022c805463ff000000191663010000001790556040517fdf2754e240f7c1581c6cc4c61366631760552d6d44e14d1639b16cc1be40537990600090a150565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415611a5a5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610ea3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611ab57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611b205760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610ea3565b611b2982612aa9565b61132282826001612b87565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611bd55760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610ea3565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b61022c546301000000900460ff161515600114611c3e5760405162461bcd60e51b81526020600482015260026024820152612a1960f11b6044820152606401610ea3565b6000611c4981612954565b61022c805465ff00000000001916650100000000001790556040517f5c3165a917fd6ac29b12d2dae3d232182e1318a53dabfefa9db561259eec50b690600090a150565b60008051602061493b833981519152611ca581612954565b8151611cb99061022b906020850190613f52565b507f24a9152dc695ecc801ad580886331ee12d7aac0fa2ae341a5ae3c2ccae36cb4f82604051611ce99190614076565b60405180910390a15050565b60008051602061493b833981519152611d0d81612954565b5061023055565b6000818152606760205260408120546001600160a01b031680610d6f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610ea3565b61022c54640100000000900460ff1615611dba5760405162461bcd60e51b8152602060048201526002602482015261543560f01b6044820152606401610ea3565b60008051602061493b833981519152611dd281612954565b61022a54821015611e0b5760405162461bcd60e51b81526020600482015260036024820152622a189b60e91b6044820152606401610ea3565b61022d8290556040518281527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c90602001611ce9565b60006001600160a01b038216611ebf5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610ea3565b506001600160a01b031660009081526068602052604090205490565b6000611ee681612954565b610229546001600160a01b0316611f255760405162461bcd60e51b8152602060048201526003602482015262150c4d60ea1b6044820152606401610ea3565b610229546001600160a01b0316611f3d600082612313565b611f677f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e382612313565b61022b8054611f7590614594565b1515905061204f576000611f8830612f6e565b9050600061022960009054906101000a90046001600160a01b03166001600160a01b03166311bb5d2a6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612008919081019061469a565b61201146613189565b8360405160200161202493929190614708565b60408051601f19818403018152919052805190915061204b9061022b906020840190613f52565b5050505b61022980546001600160a01b031981169091556040805163464e410d60e01b815290516001600160a01b0390921691829163464e410d91600480830192600092919082900301818387803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b50505050505050565b60008051602061493b8339815191526120db81612954565b5061022c80549115156101000261ff0019909216919091179055565b606060668054610d8490614594565b60008051602061493b83398151915261211e81612954565b61022c5465010000000000900460ff16156121615760405162461bcd60e51b815260206004820152600360248201526254313560e81b6044820152606401610ea3565b61022c805460ff19168315159081179091556040519081527f7b8a4a513ad8a6d1f44c1c7f1aa075fc35cb81df15dc2094c35b03da27ab960590602001611ce9565b6113226121ae61262b565b8383613287565b60006121c081612954565b61132282613356565b60008051602061493b8339815191526121e181612954565b506102309190915561023155565b6122006121fa61262b565b8361272e565b6122635760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b611666848484846133a9565b60007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661229b81612954565b6122a4836126c0565b91505b50919050565b60606122b8826125c7565b60006122c2613427565b905060008151116122e257604051806020016040528060008152506122a4565b806122ec84613189565b6040516020016122fd929190614762565b6040516020818303038152906040529392505050565b600082815260c9602052604090206001015461232e81612954565b610f568383612a08565b60008051602061493b83398151915261235081612954565b6101c380546001600160a01b0319166001600160a01b0384161790555050565b60008051602061493b83398151915261238881612954565b5061023155565b61022b805461239d90614594565b80601f01602080910402602001604051908101604052809291908181526020018280546123c990614594565b80156124165780601f106123eb57610100808354040283529160200191612416565b820191906000526020600020905b8154815290600101906020018083116123f957829003601f168201915b505050505081565b60008051602061493b83398151915261243681612954565b5061022e9190915561022f55565b6000610d6f82613509565b61022c54640100000000900460ff16156124905760405162461bcd60e51b8152602060048201526002602482015261543560f01b6044820152606401610ea3565b61022c546301000000900460ff1615156001146124d45760405162461bcd60e51b81526020600482015260026024820152612a1960f11b6044820152606401610ea3565b60006124df81612954565b61022c805464ff0000000019166401000000001790556040517fde7c7383697b743598867d72e1955dabf62f0bfc4494a64b1096f6579e8604f190600090a150565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661254b81612954565b60005b828110156116665761258084848381811061256b5761256b614791565b905060200201602081019061118a91906141c1565b508061258b816145fe565b91505061254e565b6001600160a01b03163b151590565b60006001600160e01b03198216637965db0b60e01b1480610d6f5750610d6f82613549565b6000818152606760205260409020546001600160a01b031661149f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610ea3565b6000612635613599565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061266f82611d14565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826126b585846135ce565b1490505b9392505050565b61022d54600090156127075761022d5461022a54106127075760405162461bcd60e51b815260206004820152600360248201526254313760e81b6044820152606401610ea3565b600061271361022a5490565b905061272461022a80546001019055565b610d6f838261361b565b60008061273a83611d14565b9050806001600160a01b0316846001600160a01b0316148061278157506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806127a55750836001600160a01b031661279a84610e07565b6001600160a01b0316145b949350505050565b826001600160a01b03166127c082611d14565b6001600160a01b0316146128245760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ea3565b6001600160a01b0382166128865760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ea3565b612891838383613635565b61289c60008261263a565b6001600160a01b03831660009081526068602052604081208054600192906128c59084906147a7565b90915550506001600160a01b03821660009081526068602052604081208054600192906128f39084906147be565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61149f8161296061262b565b61370c565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1661132257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556129c461262b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff161561132257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19169055612a6561262b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b610229546001600160a01b031615612b1b57610229546001600160a01b0316612ad061262b565b6001600160a01b0316816001600160a01b031614612b155760405162461bcd60e51b8152602060048201526002602482015261543160f01b6044820152606401610ea3565b50612b47565b612b477f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361296061262b565b61022c546301000000900460ff161561149f5760405162461bcd60e51b8152602060048201526002602482015261543360f01b6044820152606401610ea3565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612bba57610f568361378c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612c14575060408051601f3d908101601f19168201909252612c11918101906147d6565b60015b612c865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610ea3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612d1b5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610ea3565b50610f5683838361384a565b600054610100900460ff16612d925760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b611322828261386f565b600054610100900460ff16612e075760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b565b612e1b6000612e1661262b565b612965565b612e26600082612965565b612e527f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3612e1661262b565b612e7c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e382612965565b612e9460008051602061493b83398151915282612965565b612ebe7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612965565b61149f81613356565b6000612ed282611d14565b9050612ee081600084613635565b612eeb60008361263a565b6001600160a01b0381166000908152606860205260408120805460019290612f149084906147a7565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151602a80825260608281019094526001600160a01b0385169291600091602082018180368337019050509050600360fc1b81600081518110612fd957612fd9614791565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061300857613008614791565b60200101906001600160f81b031916908160001a90535060005b6014811015613180578260048561303a84600c6147be565b6020811061304a5761304a614791565b1a60f81b6001600160f81b031916901c60f81c60ff168151811061307057613070614791565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016826130a38360026145df565b6130ae9060026147be565b815181106130be576130be614791565b60200101906001600160f81b031916908160001a90535082846130e283600c6147be565b602081106130f2576130f2614791565b825191901a600f1690811061310957613109614791565b01602001517fff00000000000000000000000000000000000000000000000000000000000000168261313c8360026145df565b6131479060036147be565b8151811061315757613157614791565b60200101906001600160f81b031916908160001a90535080613178816145fe565b915050613022565b50949350505050565b6060816131ad5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156131d757806131c1816145fe565b91506131d09050600a83614805565b91506131b1565b60008167ffffffffffffffff8111156131f2576131f2614310565b6040519080825280601f01601f19166020018201604052801561321c576020820181803683370190505b5090505b84156127a5576132316001836147a7565b915061323e600a86614819565b6132499060306147be565b60f81b81838151811061325e5761325e614791565b60200101906001600160f81b031916908160001a905350613280600a86614805565b9450613220565b816001600160a01b0316836001600160a01b031614156132e95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ea3565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6101c480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907ff6a7092513e1f3f720c1d0ad65eb323494afe10d43e19dc4a40bac61ade7579190600090a35050565b6133b48484846127ad565b6133c084848484613901565b6116665760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b6060600061022b805461343990614594565b9050111561344f5761022b8054610d8490614594565b600061345a30612f6e565b905061022960009054906101000a90046001600160a01b03166001600160a01b03166311bb5d2a6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156134b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526134d8919081019061469a565b6134e146613189565b826040516020016134f493929190614708565b60405160208183030381529060405291505090565b6001600160a01b03811660009081527f5bd066a11de3c39d5a00651506dcc7d8e5d6a879bde036d3aa74ff1af7e95495602052604081205460ff16610d6f565b60006001600160e01b031982166380ac58cd60e01b148061357a57506001600160e01b03198216635b5e139f60e01b145b80610d6f57506301ffc9a760e01b6001600160e01b0319831614610d6f565b6000601436108015906135b757506101c3546001600160a01b031633145b156135c9575060131936013560601c90565b503390565b600081815b8451811015613613576135ff828683815181106135f2576135f2614791565b6020026020010151613a51565b91508061360b816145fe565b9150506135d3565b509392505050565b611322828260405180602001604052806000815250613a7d565b6001600160a01b038316158061365f57506001600160a01b038216158061365f575061022c5460ff165b6136915760405162461bcd60e51b81526020600482015260036024820152620a862760eb1b6044820152606401610ea3565b610233546001600160a01b031615610f56576102335460405163b10d293560e01b81526001600160a01b0385811660048301528481166024830152604482018490529091169063b10d29359060640160006040518083038186803b1580156136f857600080fd5b505afa1580156120ba573d6000803e3d6000fd5b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166113225761374a816001600160a01b03166014613afb565b613755836020613afb565b60405160200161376692919061482d565b60408051601f198184030181529082905262461bcd60e51b8252610ea391600401614076565b6001600160a01b0381163b6138095760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610ea3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b61385383613c97565b6000825111806138605750805b15610f56576116668383613cd7565b600054610100900460ff166138da5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b81516138ed906065906020850190613f52565b508051610f56906066906020840190613f52565b60006001600160a01b0384163b15613a4657836001600160a01b031663150b7a0261392a61262b565b8786866040518563ffffffff1660e01b815260040161394c94939291906148ae565b6020604051808303816000875af1925050508015613987575060408051601f3d908101601f19168201909252613984918101906148ea565b60015b613a2c573d8080156139b5576040519150601f19603f3d011682016040523d82523d6000602084013e6139ba565b606091505b508051613a245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127a5565b506001949350505050565b6000818310613a6d5760008281526020849052604090206126b9565b5060009182526020526040902090565b613a878383613dcb565b613a946000848484613901565b610f565760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b60606000613b0a8360026145df565b613b159060026147be565b67ffffffffffffffff811115613b2d57613b2d614310565b6040519080825280601f01601f191660200182016040528015613b57576020820181803683370190505b509050600360fc1b81600081518110613b7257613b72614791565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613ba157613ba1614791565b60200101906001600160f81b031916908160001a9053506000613bc58460026145df565b613bd09060016147be565b90505b6001811115613c48576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c0457613c04614791565b1a60f81b828281518110613c1a57613c1a614791565b60200101906001600160f81b031916908160001a90535060049490941c93613c4181614907565b9050613bd3565b5083156126b95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ea3565b613ca08161378c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b613d3f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ea3565b600080846001600160a01b031684604051613d5a919061491e565b600060405180830381855af49150503d8060008114613d95576040519150601f19603f3d011682016040523d82523d6000602084013e613d9a565b606091505b5091509150613dc2828260405180606001604052806027815260200161495b60279139613f19565b95945050505050565b6001600160a01b038216613e215760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ea3565b6000818152606760205260409020546001600160a01b031615613e865760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ea3565b613e9260008383613635565b6001600160a01b0382166000908152606860205260408120805460019290613ebb9084906147be565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613f285750816126b9565b825115613f385782518084602001fd5b8160405162461bcd60e51b8152600401610ea39190614076565b828054613f5e90614594565b90600052602060002090601f016020900481019282613f805760008555613fc6565b82601f10613f9957805160ff1916838001178555613fc6565b82800160010185558215613fc6579182015b82811115613fc6578251825591602001919060010190613fab565b50613fd2929150613fd6565b5090565b5b80821115613fd25760008155600101613fd7565b6001600160e01b03198116811461149f57600080fd5b60006020828403121561401357600080fd5b81356126b981613feb565b60005b83811015614039578181015183820152602001614021565b838111156116665750506000910152565b6000815180845261406281602086016020860161401e565b601f01601f19169290920160200192915050565b6020815260006126b9602083018461404a565b60006020828403121561409b57600080fd5b5035919050565b80356001600160a01b03811681146140b957600080fd5b919050565b600080604083850312156140d157600080fd5b6140da836140a2565b946020939093013593505050565b60008083601f8401126140fa57600080fd5b50813567ffffffffffffffff81111561411257600080fd5b6020830191508360208260051b850101111561412d57600080fd5b9250929050565b6000806000806060858703121561414a57600080fd5b843567ffffffffffffffff81111561416157600080fd5b61416d878288016140e8565b90989097506020870135966040013595509350505050565b60008060006060848603121561419a57600080fd5b6141a3846140a2565b92506141b1602085016140a2565b9150604084013590509250925092565b6000602082840312156141d357600080fd5b6126b9826140a2565b600080604083850312156141ef57600080fd5b823591506141ff602084016140a2565b90509250929050565b803580151581146140b957600080fd5b60006020828403121561422a57600080fd5b6126b982614208565b60008083601f84011261424557600080fd5b50813567ffffffffffffffff81111561425d57600080fd5b60208301915083602082850101111561412d57600080fd5b600080600080600080600060a0888a03121561429057600080fd5b614299886140a2565b9650602088013567ffffffffffffffff808211156142b657600080fd5b6142c28b838c01614233565b909850965060408a01359150808211156142db57600080fd5b506142e88a828b01614233565b90955093506142fb905060608901614208565b91506080880135905092959891949750929550565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561434f5761434f614310565b604052919050565b600067ffffffffffffffff82111561437157614371614310565b50601f01601f191660200190565b600061439261438d84614357565b614326565b90508281528383830111156143a657600080fd5b828260208301376000602084830101529392505050565b600082601f8301126143ce57600080fd5b6126b98383356020850161437f565b600080604083850312156143f057600080fd5b6143f9836140a2565b9150602083013567ffffffffffffffff81111561441557600080fd5b614421858286016143bd565b9150509250929050565b60006020828403121561443d57600080fd5b813567ffffffffffffffff81111561445457600080fd5b8201601f8101841361446557600080fd5b6127a58482356020840161437f565b6000806040838503121561448757600080fd5b614490836140a2565b91506141ff60208401614208565b600080604083850312156144b157600080fd5b50508035926020909101359150565b600080600080608085870312156144d657600080fd5b6144df856140a2565b93506144ed602086016140a2565b925060408501359150606085013567ffffffffffffffff81111561451057600080fd5b61451c878288016143bd565b91505092959194509250565b6000806040838503121561453b57600080fd5b614544836140a2565b91506141ff602084016140a2565b6000806020838503121561456557600080fd5b823567ffffffffffffffff81111561457c57600080fd5b614588858286016140e8565b90969095509350505050565b600181811c908216806145a857607f821691505b602082108114156122a757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156145f9576145f96145c9565b500290565b6000600019821415614612576146126145c9565b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160a01b03808b168352808a1660208401525060c0604083015261466f60c08301888a614619565b8281036060840152614682818789614619565b9415156080840152505060a001529695505050505050565b6000602082840312156146ac57600080fd5b815167ffffffffffffffff8111156146c357600080fd5b8201601f810184136146d457600080fd5b80516146e261438d82614357565b8181528560208385010111156146f757600080fd5b613dc282602083016020860161401e565b6000845161471a81846020890161401e565b84519083019061472e81836020890161401e565b602f60f81b9101818152845190919061474e81600185016020890161401e565b600192019182015260020195945050505050565b6000835161477481846020880161401e565b83519083019061478881836020880161401e565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b6000828210156147b9576147b96145c9565b500390565b600082198211156147d1576147d16145c9565b500190565b6000602082840312156147e857600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082614814576148146147ef565b500490565b600082614828576148286147ef565b500690565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161486581601785016020880161401e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148a281602884016020880161401e565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148e0608083018461404a565b9695505050505050565b6000602082840312156148fc57600080fd5b81516126b981613feb565b600081614916576149166145c9565b506000190190565b6000825161493081846020870161401e565b919091019291505056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220877885db88284809ee2c2dfe18cd800116161e9833a225e8e85341e01745826d64736f6c634300080b0033
Deployed Bytecode
0x6080604052600436106104655760003560e01c80637da0a87711610243578063bd54847011610143578063eac989f8116100bb578063f6e2d09f1161008a578063fc0a9aed1161006f578063fc0a9aed14610d0f578063fca76c2614610d2f578063fdc3ac1e14610d4457600080fd5b8063f6e2d09f14610cba578063f72c0d8b14610cdb57600080fd5b8063eac989f814610c4f578063ec87621c14610c64578063ef16a00e14610c86578063f15ab47f14610c9a57600080fd5b8063d547741f11610112578063da742228116100f7578063da74222814610bc6578063e6e0a20614610be6578063e985e9c514610c0657600080fd5b8063d547741f14610b8f578063d5abeb0114610baf57600080fd5b8063bd54847014610b04578063c87b56dd14610b24578063d3d0d78214610b44578063d539139314610b5b57600080fd5b80639fe9f623116101d6578063a7016023116101a5578063a8d0466c1161018a578063a8d0466c14610a9d578063b88d4fde14610ac0578063bacb4d4e14610ae057600080fd5b8063a701602314610a5d578063a8343ccf14610a7d57600080fd5b80639fe9f623146109d7578063a217fddf146109f7578063a22cb46514610a0c578063a2567cfe14610a2c57600080fd5b806391d148541161021257806391d148541461094557806392929a091461098b57806395d89b41146109ab57806399d32fc4146109c057600080fd5b80637da0a877146108db57806382e94ac5146108fa578063830953ab1461090f5780638da5cb5b1461092657600080fd5b80633ccfd60b116103695780635530fa15116102e1578063572b6c05116102b05780636352211e116102955780636352211e1461087b5780636f8b44b01461089b57806370a08231146108bb57600080fd5b8063572b6c051461082a5780635e6663cc1461085a57600080fd5b80635530fa15146107b457806355f804b3146107c957806356570bc9146107e957806356971c161461080957600080fd5b806345fc67a3116103385780634cd412d51161031d5780634cd412d5146107715780634f1ef2861461078c57806352d1902d1461079f57600080fd5b806345fc67a31461072e578063486ff0cd1461074357600080fd5b80633ccfd60b146106b95780633eb8cbde146106ce57806342842e0e146106ee57806342966c681461070e57600080fd5b8063248a9ca3116103fc57806336568abe116103cb578063368ce327116103b0578063368ce3271461066f578063379607f51461068f57806339a36660146106a257600080fd5b806336568abe1461062f5780633659cfe61461064f57600080fd5b8063248a9ca3146105915780632866ed21146105cf5780632e658070146105ef5780632f2ff15d1461060f57600080fd5b8063095ea7b311610438578063095ea7b31461051b57806310576ebf1461053d578063232072811461055057806323b872dd1461057157600080fd5b806301ffc9a71461046a578063021163931461049f57806306fdde03146104c1578063081812fc146104e3575b600080fd5b34801561047657600080fd5b5061048a610485366004614001565b610d64565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b5061022c5461048a906301000000900460ff1681565b3480156104cd57600080fd5b506104d6610d75565b6040516104969190614076565b3480156104ef57600080fd5b506105036104fe366004614089565b610e07565b6040516001600160a01b039091168152602001610496565b34801561052757600080fd5b5061053b6105363660046140be565b610e2e565b005b61053b61054b366004614134565b610f5b565b34801561055c57600080fd5b5061022954610503906001600160a01b031681565b34801561057d57600080fd5b5061053b61058c366004614185565b6111aa565b34801561059d57600080fd5b506105c16105ac366004614089565b600090815260c9602052604090206001015490565b604051908152602001610496565b3480156105db57600080fd5b5061022c5461048a90610100900460ff1681565b3480156105fb57600080fd5b5061053b61060a3660046141c1565b611229565b34801561061b57600080fd5b5061053b61062a3660046141dc565b611265565b34801561063b57600080fd5b5061053b61064a3660046141dc565b61128a565b34801561065b57600080fd5b5061053b61066a3660046141c1565b611326565b34801561067b57600080fd5b5061053b61068a366004614218565b6114a2565b61053b61069d366004614089565b6114d8565b3480156106ae57600080fd5b506105c16102315481565b3480156106c557600080fd5b5061053b6115c1565b3480156106da57600080fd5b5061053b6106e9366004614275565b61166c565b3480156106fa57600080fd5b5061053b610709366004614185565b6118af565b34801561071a57600080fd5b5061053b610729366004614089565b6118ca565b34801561073a57600080fd5b5061053b611941565b34801561074f57600080fd5b506040805180820190915260058152640302e312e360dc1b60208201526104d6565b34801561077d57600080fd5b5061022c5461048a9060ff1681565b61053b61079a3660046143dd565b6119cc565b3480156107ab57600080fd5b506105c1611b35565b3480156107c057600080fd5b5061053b611bfa565b3480156107d557600080fd5b5061053b6107e436600461442b565b611c8d565b3480156107f557600080fd5b5061053b610804366004614089565b611cf5565b34801561081557600080fd5b5061023354610503906001600160a01b031681565b34801561083657600080fd5b5061048a6108453660046141c1565b6101c3546001600160a01b0391821691161490565b34801561086657600080fd5b50610229546001600160a01b0316151561048a565b34801561088757600080fd5b50610503610896366004614089565b611d14565b3480156108a757600080fd5b5061053b6108b6366004614089565b611d79565b3480156108c757600080fd5b506105c16108d63660046141c1565b611e41565b3480156108e757600080fd5b506101c3546001600160a01b0316610503565b34801561090657600080fd5b5061053b611edb565b34801561091b57600080fd5b506105c161022f5481565b34801561093257600080fd5b506101c4546001600160a01b0316610503565b34801561095157600080fd5b5061048a6109603660046141dc565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561099757600080fd5b5061053b6109a6366004614218565b6120c3565b3480156109b757600080fd5b506104d66120f7565b3480156109cc57600080fd5b506105c161022e5481565b3480156109e357600080fd5b5061053b6109f2366004614218565b612106565b348015610a0357600080fd5b506105c1600081565b348015610a1857600080fd5b5061053b610a27366004614474565b6121a3565b348015610a3857600080fd5b5061048a610a473660046141c1565b6102326020526000908152604090205460ff1681565b348015610a6957600080fd5b5061053b610a783660046141c1565b6121b5565b348015610a8957600080fd5b5061053b610a9836600461449e565b6121c9565b348015610aa957600080fd5b5061022c5461048a90640100000000900460ff1681565b348015610acc57600080fd5b5061053b610adb3660046144c0565b6121ef565b348015610aec57600080fd5b5061022c5461048a9065010000000000900460ff1681565b348015610b1057600080fd5b506105c1610b1f3660046141c1565b61226f565b348015610b3057600080fd5b506104d6610b3f366004614089565b6122ad565b348015610b5057600080fd5b506105c16102305481565b348015610b6757600080fd5b506105c17f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610b9b57600080fd5b5061053b610baa3660046141dc565b612313565b348015610bbb57600080fd5b506105c161022d5481565b348015610bd257600080fd5b5061053b610be13660046141c1565b612338565b348015610bf257600080fd5b5061053b610c01366004614089565b612370565b348015610c1257600080fd5b5061048a610c21366004614528565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b348015610c5b57600080fd5b506104d661238f565b348015610c7057600080fd5b506105c160008051602061493b83398151915281565b348015610c9257600080fd5b5060016105c1565b348015610ca657600080fd5b5061053b610cb536600461449e565b61241e565b348015610cc657600080fd5b5061022c5461048a9062010000900460ff1681565b348015610ce757600080fd5b506105c17f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b348015610d1b57600080fd5b5061048a610d2a3660046141c1565b612444565b348015610d3b57600080fd5b5061053b61244f565b348015610d5057600080fd5b5061053b610d5f366004614552565b612521565b6000610d6f826125a2565b92915050565b606060658054610d8490614594565b80601f0160208091040260200160405190810160405280929190818152602001828054610db090614594565b8015610dfd5780601f10610dd257610100808354040283529160200191610dfd565b820191906000526020600020905b815481529060010190602001808311610de057829003601f168201915b5050505050905090565b6000610e12826125c7565b506000908152606960205260409020546001600160a01b031690565b6000610e3982611d14565b9050806001600160a01b0316836001600160a01b03161415610eac5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b0316610ebe61262b565b6001600160a01b03161480610eda5750610eda81610c2161262b565b610f4c5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610ea3565b610f56838361263a565b505050565b61022c5462010000900460ff16610f995760405162461bcd60e51b8152602060048201526002602482015261543960f01b6044820152606401610ea3565b6102305415610fe4578061023054610fb191906145df565b3414610fe45760405162461bcd60e51b81526020600482015260026024820152610a8760f31b6044820152606401610ea3565b8181111561101a5760405162461bcd60e51b815260206004820152600360248201526205431360ec1b6044820152606401610ea3565b60006110aa85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610231549150611060905061262b565b8660405160200161108f92919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b604051602081830303815290604052805190602001206126a8565b9050806110df5760405162461bcd60e51b815260206004820152600360248201526254313160e81b6044820152606401610ea3565b61023260006110ec61262b565b6001600160a01b0316815260208101919091526040016000205460ff161561113c5760405162461bcd60e51b81526020600482015260036024820152622a189960e91b6044820152606401610ea3565b6001610232600061114b61262b565b6001600160a01b0316815260208101919091526040016000908120805460ff1916921515929092179091555b828110156111a25761118f61118a61262b565b6126c0565b508061119a816145fe565b915050611177565b505050505050565b6111bb6111b561262b565b8261272e565b61121e5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b610f568383836127ad565b60008051602061493b83398151915261124181612954565b5061023380546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260c9602052604090206001015461128081612954565b610f568383612965565b61129261262b565b6001600160a01b0316816001600160a01b0316146113185760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610ea3565b6113228282612a08565b5050565b306001600160a01b037f000000000000000000000000a71a3d82e5016a9c8ee72eb93b42c52f0c3ff3801614156113b45760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610ea3565b7f000000000000000000000000a71a3d82e5016a9c8ee72eb93b42c52f0c3ff3806001600160a01b031661140f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461147a5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610ea3565b61148381612aa9565b6040805160008082526020820190925261149f91839190612b87565b50565b60008051602061493b8339815191526114ba81612954565b5061022c8054911515620100000262ff000019909216919091179055565b61022c54610100900460ff166115155760405162461bcd60e51b81526020600482015260026024820152612a1b60f11b6044820152606401610ea3565b61022f5481111561154d5760405162461bcd60e51b8152602060048201526002602482015261543760f01b6044820152606401610ea3565b61022e5415611598578061022e5461156591906145df565b34146115985760405162461bcd60e51b81526020600482015260026024820152610a8760f31b6044820152606401610ea3565b60005b81811015611322576115ae61118a61262b565b50806115b9816145fe565b91505061159b565b60008051602061493b8339815191526115d981612954565b4760006115e461262b565b90506115ee61262b565b6001600160a01b03167f8353ffcac0876ad14e226d9783c04540bfebf13871e868157d2a391cad98e9188360405161162891815260200190565b60405180910390a26040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611666573d6000803e3d6000fd5b50505050565b600054610100900460ff161580801561168c5750600054600160ff909116105b806116a65750303b1580156116a6575060005460ff166001145b6117185760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610ea3565b6000805460ff19166001179055801561173b576000805461ff0019166101001790555b6117ae87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250612d2792505050565b6117b6612d9c565b6117be612d9c565b6117c6612d9c565b6117cf88612e09565b6117d761262b565b61022980546001600160a01b0319166001600160a01b039290921691909117905561022c805460ff191684151517905561022d829055600161022f557f1c959cc37315848568a875d801f3a14aafef860b96ea8802314b1d2baa7b9fcd61183c61262b565b3087878b8b8989604051611857989796959493929190614642565b60405180910390a180156118a5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b610f56838383604051806020016040528060008152506121ef565b6118d56111b561262b565b6119385760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b61149f81612ec7565b61022c546301000000900460ff16156119815760405162461bcd60e51b8152602060048201526002602482015261543360f01b6044820152606401610ea3565b600061198c81612954565b61022c805463ff000000191663010000001790556040517fdf2754e240f7c1581c6cc4c61366631760552d6d44e14d1639b16cc1be40537990600090a150565b306001600160a01b037f000000000000000000000000a71a3d82e5016a9c8ee72eb93b42c52f0c3ff380161415611a5a5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610ea3565b7f000000000000000000000000a71a3d82e5016a9c8ee72eb93b42c52f0c3ff3806001600160a01b0316611ab57f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611b205760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610ea3565b611b2982612aa9565b61132282826001612b87565b6000306001600160a01b037f000000000000000000000000a71a3d82e5016a9c8ee72eb93b42c52f0c3ff3801614611bd55760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610ea3565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b61022c546301000000900460ff161515600114611c3e5760405162461bcd60e51b81526020600482015260026024820152612a1960f11b6044820152606401610ea3565b6000611c4981612954565b61022c805465ff00000000001916650100000000001790556040517f5c3165a917fd6ac29b12d2dae3d232182e1318a53dabfefa9db561259eec50b690600090a150565b60008051602061493b833981519152611ca581612954565b8151611cb99061022b906020850190613f52565b507f24a9152dc695ecc801ad580886331ee12d7aac0fa2ae341a5ae3c2ccae36cb4f82604051611ce99190614076565b60405180910390a15050565b60008051602061493b833981519152611d0d81612954565b5061023055565b6000818152606760205260408120546001600160a01b031680610d6f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610ea3565b61022c54640100000000900460ff1615611dba5760405162461bcd60e51b8152602060048201526002602482015261543560f01b6044820152606401610ea3565b60008051602061493b833981519152611dd281612954565b61022a54821015611e0b5760405162461bcd60e51b81526020600482015260036024820152622a189b60e91b6044820152606401610ea3565b61022d8290556040518281527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c90602001611ce9565b60006001600160a01b038216611ebf5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610ea3565b506001600160a01b031660009081526068602052604090205490565b6000611ee681612954565b610229546001600160a01b0316611f255760405162461bcd60e51b8152602060048201526003602482015262150c4d60ea1b6044820152606401610ea3565b610229546001600160a01b0316611f3d600082612313565b611f677f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e382612313565b61022b8054611f7590614594565b1515905061204f576000611f8830612f6e565b9050600061022960009054906101000a90046001600160a01b03166001600160a01b03166311bb5d2a6040518163ffffffff1660e01b8152600401600060405180830381865afa158015611fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612008919081019061469a565b61201146613189565b8360405160200161202493929190614708565b60408051601f19818403018152919052805190915061204b9061022b906020840190613f52565b5050505b61022980546001600160a01b031981169091556040805163464e410d60e01b815290516001600160a01b0390921691829163464e410d91600480830192600092919082900301818387803b1580156120a657600080fd5b505af11580156120ba573d6000803e3d6000fd5b50505050505050565b60008051602061493b8339815191526120db81612954565b5061022c80549115156101000261ff0019909216919091179055565b606060668054610d8490614594565b60008051602061493b83398151915261211e81612954565b61022c5465010000000000900460ff16156121615760405162461bcd60e51b815260206004820152600360248201526254313560e81b6044820152606401610ea3565b61022c805460ff19168315159081179091556040519081527f7b8a4a513ad8a6d1f44c1c7f1aa075fc35cb81df15dc2094c35b03da27ab960590602001611ce9565b6113226121ae61262b565b8383613287565b60006121c081612954565b61132282613356565b60008051602061493b8339815191526121e181612954565b506102309190915561023155565b6122006121fa61262b565b8361272e565b6122635760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ea3565b611666848484846133a9565b60007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661229b81612954565b6122a4836126c0565b91505b50919050565b60606122b8826125c7565b60006122c2613427565b905060008151116122e257604051806020016040528060008152506122a4565b806122ec84613189565b6040516020016122fd929190614762565b6040516020818303038152906040529392505050565b600082815260c9602052604090206001015461232e81612954565b610f568383612a08565b60008051602061493b83398151915261235081612954565b6101c380546001600160a01b0319166001600160a01b0384161790555050565b60008051602061493b83398151915261238881612954565b5061023155565b61022b805461239d90614594565b80601f01602080910402602001604051908101604052809291908181526020018280546123c990614594565b80156124165780601f106123eb57610100808354040283529160200191612416565b820191906000526020600020905b8154815290600101906020018083116123f957829003601f168201915b505050505081565b60008051602061493b83398151915261243681612954565b5061022e9190915561022f55565b6000610d6f82613509565b61022c54640100000000900460ff16156124905760405162461bcd60e51b8152602060048201526002602482015261543560f01b6044820152606401610ea3565b61022c546301000000900460ff1615156001146124d45760405162461bcd60e51b81526020600482015260026024820152612a1960f11b6044820152606401610ea3565b60006124df81612954565b61022c805464ff0000000019166401000000001790556040517fde7c7383697b743598867d72e1955dabf62f0bfc4494a64b1096f6579e8604f190600090a150565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661254b81612954565b60005b828110156116665761258084848381811061256b5761256b614791565b905060200201602081019061118a91906141c1565b508061258b816145fe565b91505061254e565b6001600160a01b03163b151590565b60006001600160e01b03198216637965db0b60e01b1480610d6f5750610d6f82613549565b6000818152606760205260409020546001600160a01b031661149f5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610ea3565b6000612635613599565b905090565b600081815260696020526040902080546001600160a01b0319166001600160a01b038416908117909155819061266f82611d14565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826126b585846135ce565b1490505b9392505050565b61022d54600090156127075761022d5461022a54106127075760405162461bcd60e51b815260206004820152600360248201526254313760e81b6044820152606401610ea3565b600061271361022a5490565b905061272461022a80546001019055565b610d6f838261361b565b60008061273a83611d14565b9050806001600160a01b0316846001600160a01b0316148061278157506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806127a55750836001600160a01b031661279a84610e07565b6001600160a01b0316145b949350505050565b826001600160a01b03166127c082611d14565b6001600160a01b0316146128245760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ea3565b6001600160a01b0382166128865760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ea3565b612891838383613635565b61289c60008261263a565b6001600160a01b03831660009081526068602052604081208054600192906128c59084906147a7565b90915550506001600160a01b03821660009081526068602052604081208054600192906128f39084906147be565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61149f8161296061262b565b61370c565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff1661132257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556129c461262b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff161561132257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19169055612a6561262b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b610229546001600160a01b031615612b1b57610229546001600160a01b0316612ad061262b565b6001600160a01b0316816001600160a01b031614612b155760405162461bcd60e51b8152602060048201526002602482015261543160f01b6044820152606401610ea3565b50612b47565b612b477f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361296061262b565b61022c546301000000900460ff161561149f5760405162461bcd60e51b8152602060048201526002602482015261543360f01b6044820152606401610ea3565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612bba57610f568361378c565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612c14575060408051601f3d908101601f19168201909252612c11918101906147d6565b60015b612c865760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610ea3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612d1b5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610ea3565b50610f5683838361384a565b600054610100900460ff16612d925760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b611322828261386f565b600054610100900460ff16612e075760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b565b612e1b6000612e1661262b565b612965565b612e26600082612965565b612e527f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3612e1661262b565b612e7c7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e382612965565b612e9460008051602061493b83398151915282612965565b612ebe7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612965565b61149f81613356565b6000612ed282611d14565b9050612ee081600084613635565b612eeb60008361263a565b6001600160a01b0381166000908152606860205260408120805460019290612f149084906147a7565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151602a80825260608281019094526001600160a01b0385169291600091602082018180368337019050509050600360fc1b81600081518110612fd957612fd9614791565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061300857613008614791565b60200101906001600160f81b031916908160001a90535060005b6014811015613180578260048561303a84600c6147be565b6020811061304a5761304a614791565b1a60f81b6001600160f81b031916901c60f81c60ff168151811061307057613070614791565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016826130a38360026145df565b6130ae9060026147be565b815181106130be576130be614791565b60200101906001600160f81b031916908160001a90535082846130e283600c6147be565b602081106130f2576130f2614791565b825191901a600f1690811061310957613109614791565b01602001517fff00000000000000000000000000000000000000000000000000000000000000168261313c8360026145df565b6131479060036147be565b8151811061315757613157614791565b60200101906001600160f81b031916908160001a90535080613178816145fe565b915050613022565b50949350505050565b6060816131ad5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156131d757806131c1816145fe565b91506131d09050600a83614805565b91506131b1565b60008167ffffffffffffffff8111156131f2576131f2614310565b6040519080825280601f01601f19166020018201604052801561321c576020820181803683370190505b5090505b84156127a5576132316001836147a7565b915061323e600a86614819565b6132499060306147be565b60f81b81838151811061325e5761325e614791565b60200101906001600160f81b031916908160001a905350613280600a86614805565b9450613220565b816001600160a01b0316836001600160a01b031614156132e95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ea3565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6101c480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907ff6a7092513e1f3f720c1d0ad65eb323494afe10d43e19dc4a40bac61ade7579190600090a35050565b6133b48484846127ad565b6133c084848484613901565b6116665760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b6060600061022b805461343990614594565b9050111561344f5761022b8054610d8490614594565b600061345a30612f6e565b905061022960009054906101000a90046001600160a01b03166001600160a01b03166311bb5d2a6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156134b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526134d8919081019061469a565b6134e146613189565b826040516020016134f493929190614708565b60405160208183030381529060405291505090565b6001600160a01b03811660009081527f5bd066a11de3c39d5a00651506dcc7d8e5d6a879bde036d3aa74ff1af7e95495602052604081205460ff16610d6f565b60006001600160e01b031982166380ac58cd60e01b148061357a57506001600160e01b03198216635b5e139f60e01b145b80610d6f57506301ffc9a760e01b6001600160e01b0319831614610d6f565b6000601436108015906135b757506101c3546001600160a01b031633145b156135c9575060131936013560601c90565b503390565b600081815b8451811015613613576135ff828683815181106135f2576135f2614791565b6020026020010151613a51565b91508061360b816145fe565b9150506135d3565b509392505050565b611322828260405180602001604052806000815250613a7d565b6001600160a01b038316158061365f57506001600160a01b038216158061365f575061022c5460ff165b6136915760405162461bcd60e51b81526020600482015260036024820152620a862760eb1b6044820152606401610ea3565b610233546001600160a01b031615610f56576102335460405163b10d293560e01b81526001600160a01b0385811660048301528481166024830152604482018490529091169063b10d29359060640160006040518083038186803b1580156136f857600080fd5b505afa1580156120ba573d6000803e3d6000fd5b600082815260c9602090815260408083206001600160a01b038516845290915290205460ff166113225761374a816001600160a01b03166014613afb565b613755836020613afb565b60405160200161376692919061482d565b60408051601f198184030181529082905262461bcd60e51b8252610ea391600401614076565b6001600160a01b0381163b6138095760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610ea3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b61385383613c97565b6000825111806138605750805b15610f56576116668383613cd7565b600054610100900460ff166138da5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610ea3565b81516138ed906065906020850190613f52565b508051610f56906066906020840190613f52565b60006001600160a01b0384163b15613a4657836001600160a01b031663150b7a0261392a61262b565b8786866040518563ffffffff1660e01b815260040161394c94939291906148ae565b6020604051808303816000875af1925050508015613987575060408051601f3d908101601f19168201909252613984918101906148ea565b60015b613a2c573d8080156139b5576040519150601f19603f3d011682016040523d82523d6000602084013e6139ba565b606091505b508051613a245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127a5565b506001949350505050565b6000818310613a6d5760008281526020849052604090206126b9565b5060009182526020526040902090565b613a878383613dcb565b613a946000848484613901565b610f565760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ea3565b60606000613b0a8360026145df565b613b159060026147be565b67ffffffffffffffff811115613b2d57613b2d614310565b6040519080825280601f01601f191660200182016040528015613b57576020820181803683370190505b509050600360fc1b81600081518110613b7257613b72614791565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613ba157613ba1614791565b60200101906001600160f81b031916908160001a9053506000613bc58460026145df565b613bd09060016147be565b90505b6001811115613c48576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c0457613c04614791565b1a60f81b828281518110613c1a57613c1a614791565b60200101906001600160f81b031916908160001a90535060049490941c93613c4181614907565b9050613bd3565b5083156126b95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ea3565b613ca08161378c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b613d3f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ea3565b600080846001600160a01b031684604051613d5a919061491e565b600060405180830381855af49150503d8060008114613d95576040519150601f19603f3d011682016040523d82523d6000602084013e613d9a565b606091505b5091509150613dc2828260405180606001604052806027815260200161495b60279139613f19565b95945050505050565b6001600160a01b038216613e215760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ea3565b6000818152606760205260409020546001600160a01b031615613e865760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ea3565b613e9260008383613635565b6001600160a01b0382166000908152606860205260408120805460019290613ebb9084906147be565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613f285750816126b9565b825115613f385782518084602001fd5b8160405162461bcd60e51b8152600401610ea39190614076565b828054613f5e90614594565b90600052602060002090601f016020900481019282613f805760008555613fc6565b82601f10613f9957805160ff1916838001178555613fc6565b82800160010185558215613fc6579182015b82811115613fc6578251825591602001919060010190613fab565b50613fd2929150613fd6565b5090565b5b80821115613fd25760008155600101613fd7565b6001600160e01b03198116811461149f57600080fd5b60006020828403121561401357600080fd5b81356126b981613feb565b60005b83811015614039578181015183820152602001614021565b838111156116665750506000910152565b6000815180845261406281602086016020860161401e565b601f01601f19169290920160200192915050565b6020815260006126b9602083018461404a565b60006020828403121561409b57600080fd5b5035919050565b80356001600160a01b03811681146140b957600080fd5b919050565b600080604083850312156140d157600080fd5b6140da836140a2565b946020939093013593505050565b60008083601f8401126140fa57600080fd5b50813567ffffffffffffffff81111561411257600080fd5b6020830191508360208260051b850101111561412d57600080fd5b9250929050565b6000806000806060858703121561414a57600080fd5b843567ffffffffffffffff81111561416157600080fd5b61416d878288016140e8565b90989097506020870135966040013595509350505050565b60008060006060848603121561419a57600080fd5b6141a3846140a2565b92506141b1602085016140a2565b9150604084013590509250925092565b6000602082840312156141d357600080fd5b6126b9826140a2565b600080604083850312156141ef57600080fd5b823591506141ff602084016140a2565b90509250929050565b803580151581146140b957600080fd5b60006020828403121561422a57600080fd5b6126b982614208565b60008083601f84011261424557600080fd5b50813567ffffffffffffffff81111561425d57600080fd5b60208301915083602082850101111561412d57600080fd5b600080600080600080600060a0888a03121561429057600080fd5b614299886140a2565b9650602088013567ffffffffffffffff808211156142b657600080fd5b6142c28b838c01614233565b909850965060408a01359150808211156142db57600080fd5b506142e88a828b01614233565b90955093506142fb905060608901614208565b91506080880135905092959891949750929550565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561434f5761434f614310565b604052919050565b600067ffffffffffffffff82111561437157614371614310565b50601f01601f191660200190565b600061439261438d84614357565b614326565b90508281528383830111156143a657600080fd5b828260208301376000602084830101529392505050565b600082601f8301126143ce57600080fd5b6126b98383356020850161437f565b600080604083850312156143f057600080fd5b6143f9836140a2565b9150602083013567ffffffffffffffff81111561441557600080fd5b614421858286016143bd565b9150509250929050565b60006020828403121561443d57600080fd5b813567ffffffffffffffff81111561445457600080fd5b8201601f8101841361446557600080fd5b6127a58482356020840161437f565b6000806040838503121561448757600080fd5b614490836140a2565b91506141ff60208401614208565b600080604083850312156144b157600080fd5b50508035926020909101359150565b600080600080608085870312156144d657600080fd5b6144df856140a2565b93506144ed602086016140a2565b925060408501359150606085013567ffffffffffffffff81111561451057600080fd5b61451c878288016143bd565b91505092959194509250565b6000806040838503121561453b57600080fd5b614544836140a2565b91506141ff602084016140a2565b6000806020838503121561456557600080fd5b823567ffffffffffffffff81111561457c57600080fd5b614588858286016140e8565b90969095509350505050565b600181811c908216806145a857607f821691505b602082108114156122a757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156145f9576145f96145c9565b500290565b6000600019821415614612576146126145c9565b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160a01b03808b168352808a1660208401525060c0604083015261466f60c08301888a614619565b8281036060840152614682818789614619565b9415156080840152505060a001529695505050505050565b6000602082840312156146ac57600080fd5b815167ffffffffffffffff8111156146c357600080fd5b8201601f810184136146d457600080fd5b80516146e261438d82614357565b8181528560208385010111156146f757600080fd5b613dc282602083016020860161401e565b6000845161471a81846020890161401e565b84519083019061472e81836020890161401e565b602f60f81b9101818152845190919061474e81600185016020890161401e565b600192019182015260020195945050505050565b6000835161477481846020880161401e565b83519083019061478881836020880161401e565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b6000828210156147b9576147b96145c9565b500390565b600082198211156147d1576147d16145c9565b500190565b6000602082840312156147e857600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b600082614814576148146147ef565b500490565b600082614828576148286147ef565b500690565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161486581601785016020880161401e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148a281602884016020880161401e565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148e0608083018461404a565b9695505050505050565b6000602082840312156148fc57600080fd5b81516126b981613feb565b600081614916576149166145c9565b506000190190565b6000825161493081846020870161401e565b919091019291505056fe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220877885db88284809ee2c2dfe18cd800116161e9833a225e8e85341e01745826d64736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.