Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 686 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 14559308 | 992 days ago | IN | 0.22 ETH | 0.00104701 | ||||
Withdraw Payment... | 14558676 | 992 days ago | IN | 0 ETH | 0.00438463 | ||||
Withdraw | 14558659 | 992 days ago | IN | 0 ETH | 0.0019725 | ||||
Mint | 14554282 | 993 days ago | IN | 0.12 ETH | 0.00085601 | ||||
Set Sale Active | 14553938 | 993 days ago | IN | 0 ETH | 0.00117569 | ||||
Mint | 14553229 | 993 days ago | IN | 0.36 ETH | 0.00331738 | ||||
Mint | 14552855 | 993 days ago | IN | 0.36 ETH | 0.00177887 | ||||
Mint | 14552388 | 993 days ago | IN | 0.12 ETH | 0.00242075 | ||||
Mint | 14552375 | 993 days ago | IN | 0.12 ETH | 0.00390431 | ||||
Mint | 14551591 | 993 days ago | IN | 1.8 ETH | 0.00417555 | ||||
Mint | 14550732 | 993 days ago | IN | 0.24 ETH | 0.00327305 | ||||
Mint | 14549040 | 993 days ago | IN | 0.72 ETH | 0.00302908 | ||||
Mint | 14548917 | 993 days ago | IN | 0.72 ETH | 0.00429042 | ||||
Mint | 14547697 | 994 days ago | IN | 0 ETH | 0.00489184 | ||||
Mint | 14547634 | 994 days ago | IN | 0.48 ETH | 0.00429656 | ||||
Mint | 14547228 | 994 days ago | IN | 0 ETH | 0.00773821 | ||||
Mint | 14546807 | 994 days ago | IN | 0.12 ETH | 0.00612789 | ||||
Mint | 14545967 | 994 days ago | IN | 0.24 ETH | 0.00538164 | ||||
Mint | 14545829 | 994 days ago | IN | 0.12 ETH | 0.00506372 | ||||
Mint | 14545502 | 994 days ago | IN | 0.24 ETH | 0.0040658 | ||||
Mint | 14545497 | 994 days ago | IN | 0.12 ETH | 0.00608219 | ||||
Mint | 14544582 | 994 days ago | IN | 0.12 ETH | 0.00699489 | ||||
Mint | 14542884 | 994 days ago | IN | 0.12 ETH | 0.00541306 | ||||
Mint | 14542007 | 995 days ago | IN | 0 ETH | 0.01135164 | ||||
Mint | 14539332 | 995 days ago | IN | 0.12 ETH | 0.00742905 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14558659 | 992 days ago | 148.01 ETH |
Loading...
Loading
Contract Name:
GenesisOathMinter
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./../interfaces/IMintable.sol"; import "./../utilities/SignedMinting.sol"; contract GenesisOathMinter is SignedMinting, AccessControlEnumerable, ReentrancyGuard { using Address for address; IERC20 public paymentTokenContract; uint256 public constant MAX_TIER_1 = 6000; uint256 public constant TOKEN_ID_TIER_1 = 1; uint256 public constant MAX_TIER_2 = 1000; uint256 public constant TOKEN_ID_TIER_2 = 2; uint256 public constant MAX_TOTAL = MAX_TIER_1 + MAX_TIER_2; uint256 public constant VAULT_TIER1_PREMINT = 70; uint256 public constant VAULT_TIER2_PREMINT = 30; uint256 public constant NUM_PREMINT = VAULT_TIER1_PREMINT + VAULT_TIER2_PREMINT; uint256 public walletLimit = 10; uint256 public nativeSalePrice = 0.11 ether; uint256 public tokenSalePrice = 20 * 10**18; bool public saleActive; bool public signatureRequired; mapping(address => uint256) public mintsPerAddress; IMintable public tokenContract; address public vaultAddress; address public premintAddress; bool public preminted; constructor( address _mintable, address _paymentTokenAddress, address _signer, address _adminAddress, address _devAddress, address _vaultAddress, address _premintAddress ) SignedMinting(_signer) { require( ERC165Checker.supportsInterface( _mintable, type(IMintable).interfaceId ), "Invalid token contract" ); require(_signer != address(0), "Invalid signer address"); require(_adminAddress != address(0), "Invalid admin address"); require(_devAddress != address(0), "Invalid dev address"); require(_vaultAddress != address(0), "Invalid vault address"); vaultAddress = _vaultAddress; premintAddress = _premintAddress; paymentTokenContract = IERC20(_paymentTokenAddress); tokenContract = IMintable(_mintable); _grantRole(DEFAULT_ADMIN_ROLE, _adminAddress); _grantRole(DEFAULT_ADMIN_ROLE, _devAddress); signatureRequired = true; } function premint() public onlyAuthorized { require(!preminted, "Already preminted"); tokenContract.mint( premintAddress, TOKEN_ID_TIER_1, VAULT_TIER1_PREMINT ); tokenContract.mint( premintAddress, TOKEN_ID_TIER_2, VAULT_TIER2_PREMINT ); preminted = true; } function mint( address _to, uint256 _amount, bool tokenPayment, bytes memory _signature ) public payable { require(saleActive, "Sale not active"); require( !signatureRequired || (signatureRequired && validateSignature(_signature, _to)), "Requires valid signature" ); require(_to != address(0), "Cannot mint to 0 address"); require(_amount > 0, "Invalid amount"); uint256 userMinted = mintsPerAddress[_to]; require((userMinted + _amount) <= walletLimit, "Wallet limit"); uint256 tier1Minted = tokenContract.totalSupply(TOKEN_ID_TIER_1); uint256 tier2Minted = tokenContract.totalSupply(TOKEN_ID_TIER_2); uint256 tier1Available = (MAX_TIER_1 - tier1Minted); uint256 tier2Available = (MAX_TIER_2 - tier2Minted); require(_amount <= (tier1Available + tier2Available), "Supply limit"); if (tokenPayment) { require( paymentTokenContract.allowance(_msgSender(), address(this)) >= (_amount * tokenSalePrice), "Unauthorized spend" ); require( paymentTokenContract.balanceOf(_msgSender()) >= (_amount * tokenSalePrice), "Not enough tokens" ); paymentTokenContract.transferFrom( _msgSender(), address(this), _amount * tokenSalePrice ); } else { require( msg.value == (nativeSalePrice * _amount), "Invalid payment" ); } mintsPerAddress[_to] = userMinted + _amount; if (tier1Available == 0) { tokenContract.mint(_to, TOKEN_ID_TIER_2, _amount); return; } if (tier2Available == 0) { tokenContract.mint(_to, TOKEN_ID_TIER_1, _amount); return; } // Pseudorandomization uint256 remainingTier1 = tier1Available; uint256 remainingTier2 = tier2Available; uint256 tier1ToMint = 0; uint256 tier2ToMint = 0; for (uint256 i = 0; i < _amount; i++) { if (remainingTier1 == 0) { uint256 remainder = (_amount - i); tier2ToMint += remainder; break; } if (remainingTier2 == 0) { uint256 remainder = (_amount - i); tier1ToMint += remainder; break; } uint256 random = generatePseudoRandomNumber( remainingTier1 + remainingTier2 ) % (remainingTier1 + remainingTier2); if (random <= remainingTier1) { tier1ToMint++; remainingTier1--; } else { tier2ToMint++; remainingTier2--; } } if (tier1ToMint > 0) { tokenContract.mint(_to, TOKEN_ID_TIER_1, tier1ToMint); } if (tier2ToMint > 0) { tokenContract.mint(_to, TOKEN_ID_TIER_2, tier2ToMint); } } function generatePseudoRandomNumber(uint256 nonce) private view returns (uint256) { return uint( keccak256( abi.encodePacked( block.difficulty, block.number, block.basefee, _msgSender(), nonce ) ) ); } function setSignatureRequired(bool _signatureRequired) public onlyAuthorized { signatureRequired = _signatureRequired; } function setNativeSalePrice(uint256 _nativeSalePrice) public onlyAuthorized { nativeSalePrice = _nativeSalePrice; } function setTokenSalePrice(uint256 _tokenSalePrice) public onlyAuthorized { tokenSalePrice = _tokenSalePrice; } function setSaleActive(bool _saleActive) public onlyAuthorized { require(preminted, "Must premint before sale"); saleActive = _saleActive; } function getMintsPerAddress(address _to) public view returns (uint256) { return mintsPerAddress[_to]; } function setMintingSigner(address _signer) public onlyAuthorized { _setMintingSigner(_signer); } function setWalletLimit(uint256 _walletLimit) public onlyAuthorized { walletLimit = _walletLimit; } function setVaultAddress(address _vaultAddress) public onlyAuthorized { require(_vaultAddress != address(0), "Invalid vault address"); vaultAddress = _vaultAddress; } function setPremintAddress(address _premintAddress) public onlyAuthorized { require(_premintAddress != address(0), "Invalid premint address"); premintAddress = _premintAddress; } function setTokenURI(uint256 tokenId, string calldata uri) public onlyAuthorized { tokenContract.setURI(tokenId, uri); } function withdraw() public onlyAuthorized { Address.sendValue(payable(vaultAddress), address(this).balance); } function withdrawPaymentToken() public onlyAuthorized { uint256 balance = paymentTokenContract.balanceOf(address(this)); require(balance > 0, "No tokens to withdraw"); paymentTokenContract.transfer(vaultAddress, balance); } modifier onlyAuthorized() { validateAuthorized(); _; } function validateAuthorized() private view { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Not authorized"); } modifier saleNotActive() { validateSaleNotActive(); _; } function validateSaleNotActive() private view { require(!saleActive, "Sale is active"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; pragma solidity ^0.8.0; interface IMintable is IERC1155, IERC1155MetadataURI { function mint( address to, uint256 tokenId, uint256 amount ) external; function setURI(uint256 tokenId, string calldata uri) external; function totalSupply(uint256 id) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract SignedMinting { using ECDSA for bytes32; using Address for address; address public mintingSigner; constructor(address _signer) { mintingSigner = _signer; } function _setMintingSigner(address _signer) internal { mintingSigner = _signer; } function validateSignature(bytes memory signature) internal view returns (bool) { return validateSignature(signature, msg.sender); } function validateSignature(bytes memory signature, address _to) internal view returns (bool) { bytes32 messageHash = toEthSignedMessageHash(toAsciiString(_to)); address _signer = messageHash.recover(signature); return mintingSigner == _signer; } modifier isValidSignature(bytes memory signature, address _of) { require( validateSignature(signature, _of), "Invalid whitelist signature" ); _; } function recoveredAddress(bytes memory signature, address _of) public pure returns (bytes memory) { address recoveredSigner = recover(signature, _of); return abi.encodePacked(recoveredSigner); } function recover(bytes memory signature, address _of) public pure returns (address) { bytes32 messageHash = toEthSignedMessageHash(asciiSender(_of)); address recoveredSigner = messageHash.recover(signature); return recoveredSigner; } function generateSenderHash(address _of) public pure returns (bytes32) { return toEthSignedMessageHash(asciiSender(_of)); } // Because at time of writing, 5b28259dacf47fc208e03611eb3ba8eeaed63cc0 hasn't made it into // OpenZepplin ECDSA release yet. // https://github.com/OpenZeppelin/openzeppelin-contracts/commit/5b28259dacf47fc208e03611eb3ba8eeaed63cc0#diff-ff09871806bcccfd38e43de481f3e7e2fb92134c58e1a1f97b054e2d0d727458R209 function toEthSignedMessageHash(string memory s) public pure returns (bytes32) { bytes memory b = bytes(s); return keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n", Strings.toString(b.length), b ) ); } function asciiSender(address _of) public pure returns (string memory) { return toAsciiString(_of); } function toAsciiString(address x) internal pure returns (string memory) { bytes memory s = new bytes(40); for (uint256 i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2 * i] = char(hi); s[2 * i + 1] = char(lo); } return string(s); } function char(bytes1 b) internal pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_mintable","type":"address"},{"internalType":"address","name":"_paymentTokenAddress","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_devAddress","type":"address"},{"internalType":"address","name":"_vaultAddress","type":"address"},{"internalType":"address","name":"_premintAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TIER_1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TIER_2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOTAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NUM_PREMINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID_TIER_1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID_TIER_2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_TIER1_PREMINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_TIER2_PREMINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"asciiSender","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"generateSenderHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"getMintsPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"tokenPayment","type":"bool"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintingSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintsPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentTokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"premintAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preminted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"_of","type":"address"}],"name":"recover","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"_of","type":"address"}],"name":"recoveredAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","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":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setMintingSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nativeSalePrice","type":"uint256"}],"name":"setNativeSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_premintAddress","type":"address"}],"name":"setPremintAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_saleActive","type":"bool"}],"name":"setSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_signatureRequired","type":"bool"}],"name":"setSignatureRequired","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenSalePrice","type":"uint256"}],"name":"setTokenSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vaultAddress","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_walletLimit","type":"uint256"}],"name":"setWalletLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signatureRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"s","type":"string"}],"name":"toEthSignedMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IMintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawPaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a600555670186cc6acd4b00006006556801158e460913d000006007553480156200002f57600080fd5b506040516200344838038062003448833981016040819052620000529162000564565b600080546001600160a01b0319166001600160a01b03871617905560016003556200009187632ecfd92d60e01b620002c4602090811b6200186b17901c565b620000e35760405162461bcd60e51b815260206004820152601660248201527f496e76616c696420746f6b656e20636f6e74726163740000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0385166200013b5760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964207369676e65722061646472657373000000000000000000006044820152606401620000da565b6001600160a01b038416620001935760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061646d696e206164647265737300000000000000000000006044820152606401620000da565b6001600160a01b038316620001eb5760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206465762061646472657373000000000000000000000000006044820152606401620000da565b6001600160a01b038216620002435760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964207661756c74206164647265737300000000000000000000006044820152606401620000da565b600b80546001600160a01b038085166001600160a01b031992831617909255600c805484841690831617905560048054898416908316179055600a8054928a16929091169190911790556200029a600085620002ee565b620002a7600084620002ee565b50506008805461ff00191661010017905550620006629350505050565b6000620002d18362000331565b8015620002e55750620002e5838362000369565b90505b92915050565b6200030582826200045b60201b620018871760201c565b60008281526002602090815260409091206200032c918390620018f2620004e4821b17901c565b505050565b600062000346826301ffc9a760e01b62000369565b8015620002e8575062000362826001600160e01b031962000369565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090620003d2908690620005f9565b6000604051808303818686fa925050503d806000811462000410576040519150601f19603f3d011682016040523d82523d6000602084013e62000415565b606091505b5091509150602081511015620004325760009350505050620002e8565b8180156200045157508080602001905181019062000451919062000637565b9695505050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620004e05760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b6000620002e5836001600160a01b03841660008181526001830160205260408120546200053e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002e8565b506000620002e8565b80516001600160a01b03811681146200055f57600080fd5b919050565b600080600080600080600060e0888a0312156200058057600080fd5b6200058b8862000547565b96506200059b6020890162000547565b9550620005ab6040890162000547565b9450620005bb6060890162000547565b9350620005cb6080890162000547565b9250620005db60a0890162000547565b9150620005eb60c0890162000547565b905092959891949750929550565b6000825160005b818110156200061c576020818601810151858301520162000600565b818111156200062c576000828501525b509190910192915050565b6000602082840312156200064a57600080fd5b815180151581146200065b57600080fd5b9392505050565b612dd680620006726000396000f3fe6080604052600436106102935760003560e01c8063821ca3021161015a578063a5f60290116100c1578063d547741f1161007a578063d547741f14610797578063d720f9da146107b7578063e86790eb146107d7578063ea820966146107ed578063f1d5f51714610802578063fae965711461082257600080fd5b8063a5f60290146106ec578063ad1c11611461070c578063b948ff2d14610722578063bb52187914610742578063ca15c87314610762578063cd60fe351461078257600080fd5b806399ffbe5f1161011357806399ffbe5f1461064d5780639d198dd31461066d578063a07a2ee71461068d578063a217fddf146106a2578063a30b8ed4146106b7578063a4a3543a146106d657600080fd5b8063821ca30214610597578063841718a6146105ad57806385535cc5146105cd5780639010d07c146105ed57806391bc853d1461060d57806391d148541461062d57600080fd5b806339b1dd4e116101fe57806348a1e66b116101b757806348a1e66b146104f55780634cfda6611461050a5780634dcffde01461052a57806355a373d61461054a57806368428a1b1461056a5780637580d9201461058457600080fd5b806339b1dd4e146104535780633c8463a1146104685780633ccfd60b1461047e5780633f48b04e14610493578063422b1014146104c0578063430bf08a146104d557600080fd5b806326d927591161025057806326d927591461039057806326f9b4e7146103a55780632f2ff15d146103c55780633023eba6146103e5578063357b794e1461041257806336568abe1461043357600080fd5b8063012e32b11461029857806301ffc9a7146102c057806302e3abd2146102f0578063162094c41461031d578063248a9ca31461033f578063251a10b614610370575b600080fd5b3480156102a457600080fd5b506102ad601e81565b6040519081526020015b60405180910390f35b3480156102cc57600080fd5b506102e06102db366004612614565b610858565b60405190151581526020016102b7565b3480156102fc57600080fd5b5061031061030b366004612655565b610883565b6040516102b791906126c8565b34801561032957600080fd5b5061033d6103383660046126db565b61088e565b005b34801561034b57600080fd5b506102ad61035a366004612756565b6000908152600160208190526040909120015490565b34801561037c57600080fd5b5061031061038b36600461281a565b610901565b34801561039c57600080fd5b506102ad610941565b3480156103b157600080fd5b5061033d6103c0366004612756565b610950565b3480156103d157600080fd5b5061033d6103e0366004612867565b61095d565b3480156103f157600080fd5b506102ad610400366004612655565b60096020526000908152604090205481565b34801561041e57600080fd5b50600c546102e090600160a01b900460ff1681565b34801561043f57600080fd5b5061033d61044e366004612867565b610989565b34801561045f57600080fd5b506102ad600181565b34801561047457600080fd5b506102ad60055481565b34801561048a57600080fd5b5061033d610a0c565b34801561049f57600080fd5b506104b36104ae36600461281a565b610a2c565b6040516102b7919061288a565b3480156104cc57600080fd5b506102ad604681565b3480156104e157600080fd5b50600b546104b3906001600160a01b031681565b34801561050157600080fd5b5061033d610a52565b34801561051657600080fd5b5061033d610525366004612655565b610b96565b34801561053657600080fd5b506004546104b3906001600160a01b031681565b34801561055657600080fd5b50600a546104b3906001600160a01b031681565b34801561057657600080fd5b506008546102e09060ff1681565b61033d6105923660046128ac565b610c10565b3480156105a357600080fd5b506102ad60065481565b3480156105b957600080fd5b5061033d6105c8366004612915565b6114dd565b3480156105d957600080fd5b5061033d6105e8366004612655565b61154c565b3480156105f957600080fd5b506104b3610608366004612932565b6115c4565b34801561061957600080fd5b506000546104b3906001600160a01b031681565b34801561063957600080fd5b506102e0610648366004612867565b6115e3565b34801561065957600080fd5b5061033d610668366004612915565b61160e565b34801561067957600080fd5b506102ad610688366004612655565b611630565b34801561069957600080fd5b5061033d61163e565b3480156106ae57600080fd5b506102ad600081565b3480156106c357600080fd5b506008546102e090610100900460ff1681565b3480156106e257600080fd5b506102ad6103e881565b3480156106f857600080fd5b5061033d610707366004612655565b61179c565b34801561071857600080fd5b506102ad61177081565b34801561072e57600080fd5b50600c546104b3906001600160a01b031681565b34801561074e57600080fd5b5061033d61075d366004612756565b6117c5565b34801561076e57600080fd5b506102ad61077d366004612756565b6117d2565b34801561078e57600080fd5b506102ad6117e9565b3480156107a357600080fd5b5061033d6107b2366004612867565b6117f7565b3480156107c357600080fd5b506102ad6107d2366004612954565b61181e565b3480156107e357600080fd5b506102ad60075481565b3480156107f957600080fd5b506102ad600281565b34801561080e57600080fd5b5061033d61081d366004612756565b61185e565b34801561082e57600080fd5b506102ad61083d366004612655565b6001600160a01b031660009081526009602052604090205490565b60006001600160e01b03198216635a05180f60e01b148061087d575061087d82611907565b92915050565b606061087d8261193c565b610896611a83565b600a54604051634312207160e11b81526001600160a01b039091169063862440e2906108ca9086908690869060040161299c565b600060405180830381600087803b1580156108e457600080fd5b505af11580156108f8573d6000803e3d6000fd5b50505050505050565b6060600061090f8484610a2c565b6040805160609290921b6001600160601b03191660208301528051601481840301815260349092019052949350505050565b61094d601e60466129e8565b81565b610958611a83565b600655565b6000828152600160208190526040909120015461097a8133611acb565b6109848383611b2f565b505050565b6001600160a01b03811633146109fe5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610a088282611b51565b5050565b610a14611a83565b600b54610a2a906001600160a01b031647611b73565b565b600080610a3b6107d284610883565b90506000610a498286611c8c565b95945050505050565b610a5a611a83565b600c54600160a01b900460ff1615610aa85760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e481c1c995b5a5b9d1959607a1b60448201526064016109f5565b600a54600c54604051630ab714fb60e11b81526001600160a01b039283169263156e29f692610ae292911690600190604690600401612a00565b600060405180830381600087803b158015610afc57600080fd5b505af1158015610b10573d6000803e3d6000fd5b5050600a54600c54604051630ab714fb60e11b81526001600160a01b03928316945063156e29f69350610b4f9290911690600290601e90600401612a00565b600060405180830381600087803b158015610b6957600080fd5b505af1158015610b7d573d6000803e3d6000fd5b5050600c805460ff60a01b1916600160a01b1790555050565b610b9e611a83565b6001600160a01b038116610bee5760405162461bcd60e51b8152602060048201526017602482015276496e76616c6964207072656d696e74206164647265737360481b60448201526064016109f5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60085460ff16610c545760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f5565b600854610100900460ff161580610c825750600854610100900460ff168015610c825750610c828185611cb0565b610cc95760405162461bcd60e51b815260206004820152601860248201527752657175697265732076616c6964207369676e617475726560401b60448201526064016109f5565b6001600160a01b038416610d1a5760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d696e7420746f2030206164647265737360401b60448201526064016109f5565b60008311610d5b5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109f5565b6001600160a01b038416600090815260096020526040902054600554610d8185836129e8565b1115610dbe5760405162461bcd60e51b815260206004820152600c60248201526b15d85b1b195d081b1a5b5a5d60a21b60448201526064016109f5565b600a5460405163bd85b03960e01b8152600160048201526000916001600160a01b03169063bd85b0399060240160206040518083038186803b158015610e0357600080fd5b505afa158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b9190612a21565b600a5460405163bd85b03960e01b8152600260048201529192506000916001600160a01b039091169063bd85b0399060240160206040518083038186803b158015610e8557600080fd5b505afa158015610e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebd9190612a21565b90506000610ecd83611770612a3a565b90506000610edd836103e8612a3a565b9050610ee981836129e8565b881115610f275760405162461bcd60e51b815260206004820152600c60248201526b14dd5c1c1b1e481b1a5b5a5d60a21b60448201526064016109f5565b861561118757600754610f3a9089612a51565b6004546001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190612a21565b101561100c5760405162461bcd60e51b8152602060048201526012602482015271155b985d5d1a1bdc9a5e9959081cdc195b9960721b60448201526064016109f5565b6007546110199089612a51565b6004546001600160a01b03166370a08231336040518263ffffffff1660e01b8152600401611047919061288a565b60206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612a21565b10156110d95760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820746f6b656e7360781b60448201526064016109f5565b6004546001600160a01b03166323b872dd33306007548c6110fa9190612a51565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561114957600080fd5b505af115801561115d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111819190612a70565b506111d5565b876006546111959190612a51565b34146111d55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c185e5b595b9d608a1b60448201526064016109f5565b6111df88866129e8565b6001600160a01b038a166000908152600960205260409020558161126e57600a54604051630ab714fb60e11b81526001600160a01b039091169063156e29f690611232908c906002908d90600401612a00565b600060405180830381600087803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505050505050506114d7565b806112a857600a54604051630ab714fb60e11b81526001600160a01b039091169063156e29f690611232908c906001908d90600401612a00565b8181600080805b8c8110156113ce57846112dc5760006112c8828f612a3a565b90506112d481846129e8565b9250506113ce565b836113015760006112ed828f612a3a565b90506112f981856129e8565b9350506113ce565b600061130d85876129e8565b61136c61131a87896129e8565b604080514460208083019190915243828401524860608084019190915233901b6001600160601b03191660808301526094808301949094528251808303909401845260b4909101909152815191012090565b6113769190612aa3565b905085811161139f578361138981612ab7565b945050858061139790612ad2565b9650506113bb565b826113a981612ab7565b93505084806113b790612ad2565b9550505b50806113c681612ab7565b9150506112af565b50811561144e57600a60009054906101000a90046001600160a01b03166001600160a01b031663156e29f68e6001856040518463ffffffff1660e01b815260040161141b93929190612a00565b600060405180830381600087803b15801561143557600080fd5b505af1158015611449573d6000803e3d6000fd5b505050505b80156114cd57600a60009054906101000a90046001600160a01b03166001600160a01b031663156e29f68e6002846040518463ffffffff1660e01b815260040161149a93929190612a00565b600060405180830381600087803b1580156114b457600080fd5b505af11580156114c8573d6000803e3d6000fd5b505050505b5050505050505050505b50505050565b6114e5611a83565b600c54600160a01b900460ff166115395760405162461bcd60e51b81526020600482015260186024820152774d757374207072656d696e74206265666f72652073616c6560401b60448201526064016109f5565b6008805460ff1916911515919091179055565b611554611a83565b6001600160a01b0381166115a25760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207661756c74206164647265737360581b60448201526064016109f5565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526002602052604081206115dc9083611ce7565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611616611a83565b600880549115156101000261ff0019909216919091179055565b600061087d6107d283610883565b611646611a83565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a08231916116789130910161288a565b60206040518083038186803b15801561169057600080fd5b505afa1580156116a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c89190612a21565b9050600081116117125760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b60448201526064016109f5565b60048054600b5460405163a9059cbb60e01b81526001600160a01b039182169381019390935260248301849052169063a9059cbb90604401602060405180830381600087803b15801561176457600080fd5b505af1158015611778573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a089190612a70565b6117a4611a83565b600080546001600160a01b0319166001600160a01b03831617905550565b50565b6117cd611a83565b600755565b600081815260026020526040812061087d90611cf3565b61094d6103e86117706129e8565b600082815260016020819052604090912001546118148133611acb565b6109848383611b51565b60008082905061182e8151611cfd565b81604051602001611840929190612ae9565b60405160208183030381529060405280519060200120915050919050565b611866611a83565b600555565b600061187683611e02565b80156115dc57506115dc8383611e35565b61189182826115e3565b610a085760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006115dc836001600160a01b038416611f1e565b60006001600160e01b03198216637965db0b60e01b148061087d57506301ffc9a760e01b6001600160e01b031983161461087d565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015611a7c576000611979826013612a3a565b611984906008612a51565b61198f906002612c28565b6119a2906001600160a01b038716612c34565b60f81b9050600060108260f81c6119b99190612c48565b60f81b905060008160f81c60106119d09190612c6a565b8360f81c6119de9190612c8b565b60f81b90506119ec82611f6d565b856119f8866002612a51565b81518110611a0857611a08612cae565b60200101906001600160f81b031916908160001a905350611a2881611f6d565b85611a34866002612a51565b611a3f9060016129e8565b81518110611a4f57611a4f612cae565b60200101906001600160f81b031916908160001a9053505050508080611a7490612ab7565b915050611963565b5092915050565b611a8e6000336115e3565b610a2a5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016109f5565b611ad582826115e3565b610a0857611aed816001600160a01b03166014611fa8565b611af8836020611fa8565b604051602001611b09929190612cc4565b60408051601f198184030181529082905262461bcd60e51b82526109f5916004016126c8565b611b398282611887565b600082815260026020526040902061098490826118f2565b611b5b8282612143565b600082815260026020526040902061098490826121aa565b80471015611bc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109f5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611c10576040519150601f19603f3d011682016040523d82523d6000602084013e611c15565b606091505b50509050806109845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109f5565b6000806000611c9b85856121bf565b91509150611ca88161222f565b509392505050565b600080611cbf6107d28461193c565b90506000611ccd8286611c8c565b6000546001600160a01b0391821691161495945050505050565b60006115dc83836123e5565b600061087d825490565b606081611d215750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d4b5780611d3581612ab7565b9150611d449050600a83612c34565b9150611d25565b6000816001600160401b03811115611d6557611d6561276f565b6040519080825280601f01601f191660200182016040528015611d8f576020820181803683370190505b5090505b8415611dfa57611da4600183612a3a565b9150611db1600a86612aa3565b611dbc9060306129e8565b60f81b818381518110611dd157611dd1612cae565b60200101906001600160f81b031916908160001a905350611df3600a86612c34565b9450611d93565b949350505050565b6000611e15826301ffc9a760e01b611e35565b801561087d5750611e2e826001600160e01b0319611e35565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090611e9c908690612d33565b6000604051808303818686fa925050503d8060008114611ed8576040519150601f19603f3d011682016040523d82523d6000602084013e611edd565b606091505b5091509150602081511015611ef8576000935050505061087d565b818015611f14575080806020019051810190611f149190612a70565b9695505050505050565b6000818152600183016020526040812054611f655750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561087d565b50600061087d565b6000600a60f883901c1015611f9457611f8b60f883901c6030612d4f565b60f81b92915050565b611f8b60f883901c6057612d4f565b919050565b60606000611fb7836002612a51565b611fc29060026129e8565b6001600160401b03811115611fd957611fd961276f565b6040519080825280601f01601f191660200182016040528015612003576020820181803683370190505b509050600360fc1b8160008151811061201e5761201e612cae565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061204d5761204d612cae565b60200101906001600160f81b031916908160001a9053506000612071846002612a51565b61207c9060016129e8565b90505b60018111156120f4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120b0576120b0612cae565b1a60f81b8282815181106120c6576120c6612cae565b60200101906001600160f81b031916908160001a90535060049490941c936120ed81612ad2565b905061207f565b5083156115dc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109f5565b61214d82826115e3565b15610a085760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115dc836001600160a01b03841661240f565b6000808251604114156121f65760208301516040840151606085015160001a6121ea87828585612502565b94509450505050612228565b82516040141561222057602083015160408401516122158683836125e5565b935093505050612228565b506000905060025b9250929050565b600081600481111561224357612243612d74565b141561224c5750565b600181600481111561226057612260612d74565b14156122a95760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b60448201526064016109f5565b60028160048111156122bd576122bd612d74565b141561230b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109f5565b600381600481111561231f5761231f612d74565b14156123785760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109f5565b600481600481111561238c5761238c612d74565b14156117c25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109f5565b60008260000182815481106123fc576123fc612cae565b9060005260206000200154905092915050565b600081815260018301602052604081205480156124f8576000612433600183612a3a565b855490915060009061244790600190612a3a565b90508181146124ac57600086600001828154811061246757612467612cae565b906000526020600020015490508087600001848154811061248a5761248a612cae565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806124bd576124bd612d8a565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061087d565b600091505061087d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561252f57506000905060036125dc565b8460ff16601b1415801561254757508460ff16601c14155b1561255857506000905060046125dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156125ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125d5576000600192509250506125dc565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161260687828885612502565b935093505050935093915050565b60006020828403121561262657600080fd5b81356001600160e01b0319811681146115dc57600080fd5b80356001600160a01b0381168114611fa357600080fd5b60006020828403121561266757600080fd5b6115dc8261263e565b60005b8381101561268b578181015183820152602001612673565b838111156114d75750506000910152565b600081518084526126b4816020860160208601612670565b601f01601f19169290920160200192915050565b6020815260006115dc602083018461269c565b6000806000604084860312156126f057600080fd5b8335925060208401356001600160401b038082111561270e57600080fd5b818601915086601f83011261272257600080fd5b81358181111561273157600080fd5b87602082850101111561274357600080fd5b6020830194508093505050509250925092565b60006020828403121561276857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561279f5761279f61276f565b604051601f8501601f19908116603f011681019082821181831017156127c7576127c761276f565b816040528093508581528686860111156127e057600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261280b57600080fd5b6115dc83833560208501612785565b6000806040838503121561282d57600080fd5b82356001600160401b0381111561284357600080fd5b61284f858286016127fa565b92505061285e6020840161263e565b90509250929050565b6000806040838503121561287a57600080fd5b8235915061285e6020840161263e565b6001600160a01b0391909116815260200190565b80151581146117c257600080fd5b600080600080608085870312156128c257600080fd5b6128cb8561263e565b93506020850135925060408501356128e28161289e565b915060608501356001600160401b038111156128fd57600080fd5b612909878288016127fa565b91505092959194509250565b60006020828403121561292757600080fd5b81356115dc8161289e565b6000806040838503121561294557600080fd5b50508035926020909101359150565b60006020828403121561296657600080fd5b81356001600160401b0381111561297c57600080fd5b8201601f8101841361298d57600080fd5b611dfa84823560208401612785565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156129fb576129fb6129d2565b500190565b6001600160a01b039390931683526020830191909152604082015260600190565b600060208284031215612a3357600080fd5b5051919050565b600082821015612a4c57612a4c6129d2565b500390565b6000816000190483118215151615612a6b57612a6b6129d2565b500290565b600060208284031215612a8257600080fd5b81516115dc8161289e565b634e487b7160e01b600052601260045260246000fd5b600082612ab257612ab2612a8d565b500690565b6000600019821415612acb57612acb6129d2565b5060010190565b600081612ae157612ae16129d2565b506000190190565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351612b2181601a850160208801612670565b835190830190612b3881601a840160208801612670565b01601a01949350505050565b600181815b80851115612b7f578160001904821115612b6557612b656129d2565b80851615612b7257918102915b93841c9390800290612b49565b509250929050565b600082612b965750600161087d565b81612ba35750600061087d565b8160018114612bb95760028114612bc357612bdf565b600191505061087d565b60ff841115612bd457612bd46129d2565b50506001821b61087d565b5060208310610133831016604e8410600b8410161715612c02575081810a61087d565b612c0c8383612b44565b8060001904821115612c2057612c206129d2565b029392505050565b60006115dc8383612b87565b600082612c4357612c43612a8d565b500490565b600060ff831680612c5b57612c5b612a8d565b8060ff84160491505092915050565b600060ff821660ff84168160ff0481118215151615612c2057612c206129d2565b600060ff821660ff841680821015612ca557612ca56129d2565b90039392505050565b634e487b7160e01b600052603260045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612cf6816017850160208801612670565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612d27816028840160208801612670565b01602801949350505050565b60008251612d45818460208701612670565b9190910192915050565b600060ff821660ff84168060ff03821115612d6c57612d6c6129d2565b019392505050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea2646970667358221220399f68d48a719ce2d7c567189aa9feef0f912bc5392aa2d2ca1e1d682873fab764736f6c6343000809003300000000000000000000000089c3df79aa8a3cbc96caf32f83eba8f1bd3787b90000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000006aca0c92e01277cebfa2ebe2b70e28951d4811d80000000000000000000000000cf36ddc7a5b1c4c94a463cd44ce884abe0a21fd000000000000000000000000e8e7cfce47b614f9fa87547618d662fd5b62f55b0000000000000000000000009550bfebaa3a2b17be89b90c607ac07b3ad8c6300000000000000000000000005e979999e0666cdcded60bf5a447247251526237
Deployed Bytecode
0x6080604052600436106102935760003560e01c8063821ca3021161015a578063a5f60290116100c1578063d547741f1161007a578063d547741f14610797578063d720f9da146107b7578063e86790eb146107d7578063ea820966146107ed578063f1d5f51714610802578063fae965711461082257600080fd5b8063a5f60290146106ec578063ad1c11611461070c578063b948ff2d14610722578063bb52187914610742578063ca15c87314610762578063cd60fe351461078257600080fd5b806399ffbe5f1161011357806399ffbe5f1461064d5780639d198dd31461066d578063a07a2ee71461068d578063a217fddf146106a2578063a30b8ed4146106b7578063a4a3543a146106d657600080fd5b8063821ca30214610597578063841718a6146105ad57806385535cc5146105cd5780639010d07c146105ed57806391bc853d1461060d57806391d148541461062d57600080fd5b806339b1dd4e116101fe57806348a1e66b116101b757806348a1e66b146104f55780634cfda6611461050a5780634dcffde01461052a57806355a373d61461054a57806368428a1b1461056a5780637580d9201461058457600080fd5b806339b1dd4e146104535780633c8463a1146104685780633ccfd60b1461047e5780633f48b04e14610493578063422b1014146104c0578063430bf08a146104d557600080fd5b806326d927591161025057806326d927591461039057806326f9b4e7146103a55780632f2ff15d146103c55780633023eba6146103e5578063357b794e1461041257806336568abe1461043357600080fd5b8063012e32b11461029857806301ffc9a7146102c057806302e3abd2146102f0578063162094c41461031d578063248a9ca31461033f578063251a10b614610370575b600080fd5b3480156102a457600080fd5b506102ad601e81565b6040519081526020015b60405180910390f35b3480156102cc57600080fd5b506102e06102db366004612614565b610858565b60405190151581526020016102b7565b3480156102fc57600080fd5b5061031061030b366004612655565b610883565b6040516102b791906126c8565b34801561032957600080fd5b5061033d6103383660046126db565b61088e565b005b34801561034b57600080fd5b506102ad61035a366004612756565b6000908152600160208190526040909120015490565b34801561037c57600080fd5b5061031061038b36600461281a565b610901565b34801561039c57600080fd5b506102ad610941565b3480156103b157600080fd5b5061033d6103c0366004612756565b610950565b3480156103d157600080fd5b5061033d6103e0366004612867565b61095d565b3480156103f157600080fd5b506102ad610400366004612655565b60096020526000908152604090205481565b34801561041e57600080fd5b50600c546102e090600160a01b900460ff1681565b34801561043f57600080fd5b5061033d61044e366004612867565b610989565b34801561045f57600080fd5b506102ad600181565b34801561047457600080fd5b506102ad60055481565b34801561048a57600080fd5b5061033d610a0c565b34801561049f57600080fd5b506104b36104ae36600461281a565b610a2c565b6040516102b7919061288a565b3480156104cc57600080fd5b506102ad604681565b3480156104e157600080fd5b50600b546104b3906001600160a01b031681565b34801561050157600080fd5b5061033d610a52565b34801561051657600080fd5b5061033d610525366004612655565b610b96565b34801561053657600080fd5b506004546104b3906001600160a01b031681565b34801561055657600080fd5b50600a546104b3906001600160a01b031681565b34801561057657600080fd5b506008546102e09060ff1681565b61033d6105923660046128ac565b610c10565b3480156105a357600080fd5b506102ad60065481565b3480156105b957600080fd5b5061033d6105c8366004612915565b6114dd565b3480156105d957600080fd5b5061033d6105e8366004612655565b61154c565b3480156105f957600080fd5b506104b3610608366004612932565b6115c4565b34801561061957600080fd5b506000546104b3906001600160a01b031681565b34801561063957600080fd5b506102e0610648366004612867565b6115e3565b34801561065957600080fd5b5061033d610668366004612915565b61160e565b34801561067957600080fd5b506102ad610688366004612655565b611630565b34801561069957600080fd5b5061033d61163e565b3480156106ae57600080fd5b506102ad600081565b3480156106c357600080fd5b506008546102e090610100900460ff1681565b3480156106e257600080fd5b506102ad6103e881565b3480156106f857600080fd5b5061033d610707366004612655565b61179c565b34801561071857600080fd5b506102ad61177081565b34801561072e57600080fd5b50600c546104b3906001600160a01b031681565b34801561074e57600080fd5b5061033d61075d366004612756565b6117c5565b34801561076e57600080fd5b506102ad61077d366004612756565b6117d2565b34801561078e57600080fd5b506102ad6117e9565b3480156107a357600080fd5b5061033d6107b2366004612867565b6117f7565b3480156107c357600080fd5b506102ad6107d2366004612954565b61181e565b3480156107e357600080fd5b506102ad60075481565b3480156107f957600080fd5b506102ad600281565b34801561080e57600080fd5b5061033d61081d366004612756565b61185e565b34801561082e57600080fd5b506102ad61083d366004612655565b6001600160a01b031660009081526009602052604090205490565b60006001600160e01b03198216635a05180f60e01b148061087d575061087d82611907565b92915050565b606061087d8261193c565b610896611a83565b600a54604051634312207160e11b81526001600160a01b039091169063862440e2906108ca9086908690869060040161299c565b600060405180830381600087803b1580156108e457600080fd5b505af11580156108f8573d6000803e3d6000fd5b50505050505050565b6060600061090f8484610a2c565b6040805160609290921b6001600160601b03191660208301528051601481840301815260349092019052949350505050565b61094d601e60466129e8565b81565b610958611a83565b600655565b6000828152600160208190526040909120015461097a8133611acb565b6109848383611b2f565b505050565b6001600160a01b03811633146109fe5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610a088282611b51565b5050565b610a14611a83565b600b54610a2a906001600160a01b031647611b73565b565b600080610a3b6107d284610883565b90506000610a498286611c8c565b95945050505050565b610a5a611a83565b600c54600160a01b900460ff1615610aa85760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e481c1c995b5a5b9d1959607a1b60448201526064016109f5565b600a54600c54604051630ab714fb60e11b81526001600160a01b039283169263156e29f692610ae292911690600190604690600401612a00565b600060405180830381600087803b158015610afc57600080fd5b505af1158015610b10573d6000803e3d6000fd5b5050600a54600c54604051630ab714fb60e11b81526001600160a01b03928316945063156e29f69350610b4f9290911690600290601e90600401612a00565b600060405180830381600087803b158015610b6957600080fd5b505af1158015610b7d573d6000803e3d6000fd5b5050600c805460ff60a01b1916600160a01b1790555050565b610b9e611a83565b6001600160a01b038116610bee5760405162461bcd60e51b8152602060048201526017602482015276496e76616c6964207072656d696e74206164647265737360481b60448201526064016109f5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60085460ff16610c545760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016109f5565b600854610100900460ff161580610c825750600854610100900460ff168015610c825750610c828185611cb0565b610cc95760405162461bcd60e51b815260206004820152601860248201527752657175697265732076616c6964207369676e617475726560401b60448201526064016109f5565b6001600160a01b038416610d1a5760405162461bcd60e51b815260206004820152601860248201527743616e6e6f74206d696e7420746f2030206164647265737360401b60448201526064016109f5565b60008311610d5b5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016109f5565b6001600160a01b038416600090815260096020526040902054600554610d8185836129e8565b1115610dbe5760405162461bcd60e51b815260206004820152600c60248201526b15d85b1b195d081b1a5b5a5d60a21b60448201526064016109f5565b600a5460405163bd85b03960e01b8152600160048201526000916001600160a01b03169063bd85b0399060240160206040518083038186803b158015610e0357600080fd5b505afa158015610e17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3b9190612a21565b600a5460405163bd85b03960e01b8152600260048201529192506000916001600160a01b039091169063bd85b0399060240160206040518083038186803b158015610e8557600080fd5b505afa158015610e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebd9190612a21565b90506000610ecd83611770612a3a565b90506000610edd836103e8612a3a565b9050610ee981836129e8565b881115610f275760405162461bcd60e51b815260206004820152600c60248201526b14dd5c1c1b1e481b1a5b5a5d60a21b60448201526064016109f5565b861561118757600754610f3a9089612a51565b6004546001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b158015610f9157600080fd5b505afa158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190612a21565b101561100c5760405162461bcd60e51b8152602060048201526012602482015271155b985d5d1a1bdc9a5e9959081cdc195b9960721b60448201526064016109f5565b6007546110199089612a51565b6004546001600160a01b03166370a08231336040518263ffffffff1660e01b8152600401611047919061288a565b60206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612a21565b10156110d95760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820746f6b656e7360781b60448201526064016109f5565b6004546001600160a01b03166323b872dd33306007548c6110fa9190612a51565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561114957600080fd5b505af115801561115d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111819190612a70565b506111d5565b876006546111959190612a51565b34146111d55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c185e5b595b9d608a1b60448201526064016109f5565b6111df88866129e8565b6001600160a01b038a166000908152600960205260409020558161126e57600a54604051630ab714fb60e11b81526001600160a01b039091169063156e29f690611232908c906002908d90600401612a00565b600060405180830381600087803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b5050505050505050506114d7565b806112a857600a54604051630ab714fb60e11b81526001600160a01b039091169063156e29f690611232908c906001908d90600401612a00565b8181600080805b8c8110156113ce57846112dc5760006112c8828f612a3a565b90506112d481846129e8565b9250506113ce565b836113015760006112ed828f612a3a565b90506112f981856129e8565b9350506113ce565b600061130d85876129e8565b61136c61131a87896129e8565b604080514460208083019190915243828401524860608084019190915233901b6001600160601b03191660808301526094808301949094528251808303909401845260b4909101909152815191012090565b6113769190612aa3565b905085811161139f578361138981612ab7565b945050858061139790612ad2565b9650506113bb565b826113a981612ab7565b93505084806113b790612ad2565b9550505b50806113c681612ab7565b9150506112af565b50811561144e57600a60009054906101000a90046001600160a01b03166001600160a01b031663156e29f68e6001856040518463ffffffff1660e01b815260040161141b93929190612a00565b600060405180830381600087803b15801561143557600080fd5b505af1158015611449573d6000803e3d6000fd5b505050505b80156114cd57600a60009054906101000a90046001600160a01b03166001600160a01b031663156e29f68e6002846040518463ffffffff1660e01b815260040161149a93929190612a00565b600060405180830381600087803b1580156114b457600080fd5b505af11580156114c8573d6000803e3d6000fd5b505050505b5050505050505050505b50505050565b6114e5611a83565b600c54600160a01b900460ff166115395760405162461bcd60e51b81526020600482015260186024820152774d757374207072656d696e74206265666f72652073616c6560401b60448201526064016109f5565b6008805460ff1916911515919091179055565b611554611a83565b6001600160a01b0381166115a25760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207661756c74206164647265737360581b60448201526064016109f5565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526002602052604081206115dc9083611ce7565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b611616611a83565b600880549115156101000261ff0019909216919091179055565b600061087d6107d283610883565b611646611a83565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a08231916116789130910161288a565b60206040518083038186803b15801561169057600080fd5b505afa1580156116a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c89190612a21565b9050600081116117125760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b60448201526064016109f5565b60048054600b5460405163a9059cbb60e01b81526001600160a01b039182169381019390935260248301849052169063a9059cbb90604401602060405180830381600087803b15801561176457600080fd5b505af1158015611778573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a089190612a70565b6117a4611a83565b600080546001600160a01b0319166001600160a01b03831617905550565b50565b6117cd611a83565b600755565b600081815260026020526040812061087d90611cf3565b61094d6103e86117706129e8565b600082815260016020819052604090912001546118148133611acb565b6109848383611b51565b60008082905061182e8151611cfd565b81604051602001611840929190612ae9565b60405160208183030381529060405280519060200120915050919050565b611866611a83565b600555565b600061187683611e02565b80156115dc57506115dc8383611e35565b61189182826115e3565b610a085760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60006115dc836001600160a01b038416611f1e565b60006001600160e01b03198216637965db0b60e01b148061087d57506301ffc9a760e01b6001600160e01b031983161461087d565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015611a7c576000611979826013612a3a565b611984906008612a51565b61198f906002612c28565b6119a2906001600160a01b038716612c34565b60f81b9050600060108260f81c6119b99190612c48565b60f81b905060008160f81c60106119d09190612c6a565b8360f81c6119de9190612c8b565b60f81b90506119ec82611f6d565b856119f8866002612a51565b81518110611a0857611a08612cae565b60200101906001600160f81b031916908160001a905350611a2881611f6d565b85611a34866002612a51565b611a3f9060016129e8565b81518110611a4f57611a4f612cae565b60200101906001600160f81b031916908160001a9053505050508080611a7490612ab7565b915050611963565b5092915050565b611a8e6000336115e3565b610a2a5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016109f5565b611ad582826115e3565b610a0857611aed816001600160a01b03166014611fa8565b611af8836020611fa8565b604051602001611b09929190612cc4565b60408051601f198184030181529082905262461bcd60e51b82526109f5916004016126c8565b611b398282611887565b600082815260026020526040902061098490826118f2565b611b5b8282612143565b600082815260026020526040902061098490826121aa565b80471015611bc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109f5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611c10576040519150601f19603f3d011682016040523d82523d6000602084013e611c15565b606091505b50509050806109845760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109f5565b6000806000611c9b85856121bf565b91509150611ca88161222f565b509392505050565b600080611cbf6107d28461193c565b90506000611ccd8286611c8c565b6000546001600160a01b0391821691161495945050505050565b60006115dc83836123e5565b600061087d825490565b606081611d215750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d4b5780611d3581612ab7565b9150611d449050600a83612c34565b9150611d25565b6000816001600160401b03811115611d6557611d6561276f565b6040519080825280601f01601f191660200182016040528015611d8f576020820181803683370190505b5090505b8415611dfa57611da4600183612a3a565b9150611db1600a86612aa3565b611dbc9060306129e8565b60f81b818381518110611dd157611dd1612cae565b60200101906001600160f81b031916908160001a905350611df3600a86612c34565b9450611d93565b949350505050565b6000611e15826301ffc9a760e01b611e35565b801561087d5750611e2e826001600160e01b0319611e35565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090611e9c908690612d33565b6000604051808303818686fa925050503d8060008114611ed8576040519150601f19603f3d011682016040523d82523d6000602084013e611edd565b606091505b5091509150602081511015611ef8576000935050505061087d565b818015611f14575080806020019051810190611f149190612a70565b9695505050505050565b6000818152600183016020526040812054611f655750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561087d565b50600061087d565b6000600a60f883901c1015611f9457611f8b60f883901c6030612d4f565b60f81b92915050565b611f8b60f883901c6057612d4f565b919050565b60606000611fb7836002612a51565b611fc29060026129e8565b6001600160401b03811115611fd957611fd961276f565b6040519080825280601f01601f191660200182016040528015612003576020820181803683370190505b509050600360fc1b8160008151811061201e5761201e612cae565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061204d5761204d612cae565b60200101906001600160f81b031916908160001a9053506000612071846002612a51565b61207c9060016129e8565b90505b60018111156120f4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120b0576120b0612cae565b1a60f81b8282815181106120c6576120c6612cae565b60200101906001600160f81b031916908160001a90535060049490941c936120ed81612ad2565b905061207f565b5083156115dc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109f5565b61214d82826115e3565b15610a085760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006115dc836001600160a01b03841661240f565b6000808251604114156121f65760208301516040840151606085015160001a6121ea87828585612502565b94509450505050612228565b82516040141561222057602083015160408401516122158683836125e5565b935093505050612228565b506000905060025b9250929050565b600081600481111561224357612243612d74565b141561224c5750565b600181600481111561226057612260612d74565b14156122a95760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b60448201526064016109f5565b60028160048111156122bd576122bd612d74565b141561230b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109f5565b600381600481111561231f5761231f612d74565b14156123785760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109f5565b600481600481111561238c5761238c612d74565b14156117c25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109f5565b60008260000182815481106123fc576123fc612cae565b9060005260206000200154905092915050565b600081815260018301602052604081205480156124f8576000612433600183612a3a565b855490915060009061244790600190612a3a565b90508181146124ac57600086600001828154811061246757612467612cae565b906000526020600020015490508087600001848154811061248a5761248a612cae565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806124bd576124bd612d8a565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061087d565b600091505061087d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561252f57506000905060036125dc565b8460ff16601b1415801561254757508460ff16601c14155b1561255857506000905060046125dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156125ac573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166125d5576000600192509250506125dc565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161260687828885612502565b935093505050935093915050565b60006020828403121561262657600080fd5b81356001600160e01b0319811681146115dc57600080fd5b80356001600160a01b0381168114611fa357600080fd5b60006020828403121561266757600080fd5b6115dc8261263e565b60005b8381101561268b578181015183820152602001612673565b838111156114d75750506000910152565b600081518084526126b4816020860160208601612670565b601f01601f19169290920160200192915050565b6020815260006115dc602083018461269c565b6000806000604084860312156126f057600080fd5b8335925060208401356001600160401b038082111561270e57600080fd5b818601915086601f83011261272257600080fd5b81358181111561273157600080fd5b87602082850101111561274357600080fd5b6020830194508093505050509250925092565b60006020828403121561276857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561279f5761279f61276f565b604051601f8501601f19908116603f011681019082821181831017156127c7576127c761276f565b816040528093508581528686860111156127e057600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261280b57600080fd5b6115dc83833560208501612785565b6000806040838503121561282d57600080fd5b82356001600160401b0381111561284357600080fd5b61284f858286016127fa565b92505061285e6020840161263e565b90509250929050565b6000806040838503121561287a57600080fd5b8235915061285e6020840161263e565b6001600160a01b0391909116815260200190565b80151581146117c257600080fd5b600080600080608085870312156128c257600080fd5b6128cb8561263e565b93506020850135925060408501356128e28161289e565b915060608501356001600160401b038111156128fd57600080fd5b612909878288016127fa565b91505092959194509250565b60006020828403121561292757600080fd5b81356115dc8161289e565b6000806040838503121561294557600080fd5b50508035926020909101359150565b60006020828403121561296657600080fd5b81356001600160401b0381111561297c57600080fd5b8201601f8101841361298d57600080fd5b611dfa84823560208401612785565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156129fb576129fb6129d2565b500190565b6001600160a01b039390931683526020830191909152604082015260600190565b600060208284031215612a3357600080fd5b5051919050565b600082821015612a4c57612a4c6129d2565b500390565b6000816000190483118215151615612a6b57612a6b6129d2565b500290565b600060208284031215612a8257600080fd5b81516115dc8161289e565b634e487b7160e01b600052601260045260246000fd5b600082612ab257612ab2612a8d565b500690565b6000600019821415612acb57612acb6129d2565b5060010190565b600081612ae157612ae16129d2565b506000190190565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351612b2181601a850160208801612670565b835190830190612b3881601a840160208801612670565b01601a01949350505050565b600181815b80851115612b7f578160001904821115612b6557612b656129d2565b80851615612b7257918102915b93841c9390800290612b49565b509250929050565b600082612b965750600161087d565b81612ba35750600061087d565b8160018114612bb95760028114612bc357612bdf565b600191505061087d565b60ff841115612bd457612bd46129d2565b50506001821b61087d565b5060208310610133831016604e8410600b8410161715612c02575081810a61087d565b612c0c8383612b44565b8060001904821115612c2057612c206129d2565b029392505050565b60006115dc8383612b87565b600082612c4357612c43612a8d565b500490565b600060ff831680612c5b57612c5b612a8d565b8060ff84160491505092915050565b600060ff821660ff84168160ff0481118215151615612c2057612c206129d2565b600060ff821660ff841680821015612ca557612ca56129d2565b90039392505050565b634e487b7160e01b600052603260045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612cf6816017850160208801612670565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612d27816028840160208801612670565b01602801949350505050565b60008251612d45818460208701612670565b9190910192915050565b600060ff821660ff84168060ff03821115612d6c57612d6c6129d2565b019392505050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea2646970667358221220399f68d48a719ce2d7c567189aa9feef0f912bc5392aa2d2ca1e1d682873fab764736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000089c3df79aa8a3cbc96caf32f83eba8f1bd3787b90000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000006aca0c92e01277cebfa2ebe2b70e28951d4811d80000000000000000000000000cf36ddc7a5b1c4c94a463cd44ce884abe0a21fd000000000000000000000000e8e7cfce47b614f9fa87547618d662fd5b62f55b0000000000000000000000009550bfebaa3a2b17be89b90c607ac07b3ad8c6300000000000000000000000005e979999e0666cdcded60bf5a447247251526237
-----Decoded View---------------
Arg [0] : _mintable (address): 0x89C3DF79aa8a3cBc96cAf32F83Eba8F1Bd3787b9
Arg [1] : _paymentTokenAddress (address): 0x4d224452801ACEd8B2F0aebE155379bb5D594381
Arg [2] : _signer (address): 0x6ACA0C92E01277cEbFA2EbE2b70E28951d4811D8
Arg [3] : _adminAddress (address): 0x0CF36dDC7A5b1C4C94A463CD44Ce884abE0a21fd
Arg [4] : _devAddress (address): 0xe8E7cfcE47b614f9FA87547618D662Fd5b62f55B
Arg [5] : _vaultAddress (address): 0x9550bFEbaa3a2b17be89B90c607ac07B3Ad8C630
Arg [6] : _premintAddress (address): 0x5E979999e0666cdcDeD60bf5a447247251526237
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000089c3df79aa8a3cbc96caf32f83eba8f1bd3787b9
Arg [1] : 0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381
Arg [2] : 0000000000000000000000006aca0c92e01277cebfa2ebe2b70e28951d4811d8
Arg [3] : 0000000000000000000000000cf36ddc7a5b1c4c94a463cd44ce884abe0a21fd
Arg [4] : 000000000000000000000000e8e7cfce47b614f9fa87547618d662fd5b62f55b
Arg [5] : 0000000000000000000000009550bfebaa3a2b17be89b90c607ac07b3ad8c630
Arg [6] : 0000000000000000000000005e979999e0666cdcded60bf5a447247251526237
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.