Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 1,966 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw All | 16373153 | 708 days ago | IN | 0 ETH | 0.00049365 | ||||
Withdraw All Tok... | 16373151 | 708 days ago | IN | 0 ETH | 0.00095144 | ||||
Mint | 16373139 | 708 days ago | IN | 0 ETH | 0.00313963 | ||||
Mint | 16373134 | 708 days ago | IN | 0 ETH | 0.00362459 | ||||
Mint | 16373132 | 708 days ago | IN | 0 ETH | 0.00368434 | ||||
Mint | 16373130 | 708 days ago | IN | 0 ETH | 0.00407177 | ||||
Mint | 16373129 | 708 days ago | IN | 0 ETH | 0.00454161 | ||||
Mint | 16373125 | 708 days ago | IN | 0 ETH | 0.00406312 | ||||
Mint | 16373122 | 708 days ago | IN | 0 ETH | 0.00411538 | ||||
Mint | 16373116 | 708 days ago | IN | 0 ETH | 0.00425956 | ||||
Mint | 16373113 | 708 days ago | IN | 0 ETH | 0.00436701 | ||||
Mint | 16373106 | 708 days ago | IN | 0 ETH | 0.00377873 | ||||
Mint | 16373105 | 708 days ago | IN | 0 ETH | 0.00388557 | ||||
Mint | 16373103 | 708 days ago | IN | 0 ETH | 0.00385611 | ||||
Mint | 16373101 | 708 days ago | IN | 0 ETH | 0.004091 | ||||
Mint | 16373099 | 708 days ago | IN | 0 ETH | 0.00368936 | ||||
Mint | 16373097 | 708 days ago | IN | 0 ETH | 0.0036571 | ||||
Mint | 16373095 | 708 days ago | IN | 0 ETH | 0.00364892 | ||||
Mint | 16373054 | 708 days ago | IN | 0.24 ETH | 0.00372106 | ||||
Mint | 16373049 | 708 days ago | IN | 0.24 ETH | 0.0035599 | ||||
Mint | 16373045 | 708 days ago | IN | 0.24 ETH | 0.00378615 | ||||
Mint | 16373040 | 708 days ago | IN | 0.24 ETH | 0.00379428 | ||||
Mint | 16373037 | 708 days ago | IN | 0.24 ETH | 0.00367579 | ||||
Mint | 16373034 | 708 days ago | IN | 0.24 ETH | 0.00409044 | ||||
Mint | 16373029 | 708 days ago | IN | 0.24 ETH | 0.00425772 |
Loading...
Loading
Contract Name:
NutsDAONFTMinter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libraries/NftMinter.sol"; import "./libraries/EIP712Authorizer.sol"; /** * @title NUTS Dao NFT Minter */ contract NutsDAONFTMinter is NftMinter, EIP712Authorizer, ReentrancyGuard { using SafeERC20 for IERC20; struct RoundConfiguration { uint256 startTimestamp; uint256 endTimestamp; uint256 maxMint; uint256 minMintPerAddress; uint256 maxMintPerAddress; uint256 ethPrice; uint256 usdcPrice; uint256 nutsPrice; bool isPrivate; } enum PaymentToken { NUTS, USDC, ETH } bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,uint8 paymentToken,uint256 round,address account)"); address public immutable creator; IERC20 public immutable nuts; IERC20 public immutable usdc; uint256 private _maxRoundId; mapping(uint256 => RoundConfiguration) private _rounds; mapping(address => mapping(uint256 => uint256)) private _userMints; mapping(uint256 => uint256) private _roundsMints; event Withdraw(uint256 amount); event WithdrawToken(address token, uint256 amount); modifier whenClaimable() { require(currentStatus == STATUS_READY, "Not claimable"); _; } modifier whenValidQuantity(uint256 quantity_) { require(availableSupply > 0, "No more supply"); require(availableSupply >= quantity_, "Not enough supply"); require(quantity_ > 0, "Qty <= 0"); _; } modifier whenRoundOpened(uint256 round_) { require(_rounds[round_].startTimestamp > 0, "Round not configured"); require(_rounds[round_].startTimestamp <= block.timestamp, "Round not opened"); require(_rounds[round_].endTimestamp == 0 || _rounds[round_].endTimestamp >= block.timestamp, "Round closed"); _; } modifier whenRoundSupplyAvailable(uint256 round_, uint256 quantity_) { require(availableSupplyInRound(round_) >= quantity_, "Round supply exhausted"); _; } constructor( INftCollection collection_, address creator_, IERC20 nuts_, IERC20 usdc_ ) NftMinter(collection_) EIP712Authorizer("NutsDAOMinter", "1.0") { require(creator_ != address(0), "Invalid creator address"); require(address(nuts_) != address(0), "Invalid nuts address"); require(address(usdc_) != address(0), "Invalid usdc address"); creator = creator_; nuts = nuts_; usdc = usdc_; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _syncSupply(); } function _hashMintPayload( uint256 quantity_, uint256 value_, PaymentToken paymentToken_, uint256 round_, address account_ ) internal pure returns (bytes32) { return keccak256(abi.encode(SIGN_MINT_TYPEHASH, quantity_, value_, paymentToken_, round_, account_)); } /** * @dev returns the total number of tokens minted in a round */ function totalMintedTokensInRound(uint256 round_) external view returns (uint256) { return _roundsMints[round_]; } /** * @dev returns the remaining supply available for a round * assumes a round starts after the previous is closed */ function availableSupplyInRound(uint256 round_) public view returns (uint256) { uint256 available = 0; uint256 minted = 0; for (uint256 i = 0; i <= round_; i++) { available += _rounds[i].maxMint; minted += _roundsMints[i]; } return available > minted ? available - minted : 0; } /** * @dev returns the total number of tokens minted by `account` */ function mintedTokensCount(address account) external view returns (uint256) { uint256 total = 0; for (uint256 i = 0; i <= _maxRoundId; i++) { total += _userMints[account][i]; } return total; } /** * @dev returns the number of tokens minted by `account` for a specific round */ function mintedTokensInRound(address account, uint256 round) external view returns (uint256) { return _userMints[account][round]; } /** * @dev returns the configuration for a round */ function getRound(uint256 round_) external view returns (RoundConfiguration memory) { return _rounds[round_]; } /** * @dev configure the round */ function configureRound(uint256 round_, RoundConfiguration calldata configuration_) external onlyOwnerOrOperator { require( configuration_.endTimestamp == 0 || configuration_.startTimestamp < configuration_.endTimestamp, "Invalid timestamps" ); require(configuration_.maxMint > 0, "Invalid max mint"); require(configuration_.minMintPerAddress > 0, "Invalid min mint per address"); require(configuration_.maxMintPerAddress > 0, "Invalid max mint per address"); require(configuration_.maxMintPerAddress >= configuration_.minMintPerAddress, "Invalid mint per address"); _rounds[round_] = configuration_; if (_maxRoundId < round_) { _maxRoundId = round_; } } /** * @dev returns the price in token or ETH for a round */ function getPrice(uint256 round_, PaymentToken paymentToken_) public view returns (uint256) { if (paymentToken_ == PaymentToken.NUTS) return _rounds[round_].nutsPrice; else if (paymentToken_ == PaymentToken.USDC) return _rounds[round_].usdcPrice; else if (paymentToken_ == PaymentToken.ETH) return _rounds[round_].ethPrice; return 0; } /** * @dev mint a `quantity_` NFT (quantity max for a wallet is limited per round) * round_: Round Id * paymentToken_: token used to pay the transaction * signature_: backend signature for the transaction */ function mint( uint256 quantity_, uint256 round_, PaymentToken paymentToken_, bytes memory signature_ ) external payable nonReentrant whenValidQuantity(quantity_) whenRoundSupplyAvailable(round_, quantity_) whenClaimable whenRoundOpened(round_) { address to = _msgSender(); RoundConfiguration memory round = _rounds[round_]; require(_userMints[to][round_] + quantity_ >= round.minMintPerAddress, "Below quantity allowed"); require(_userMints[to][round_] + quantity_ <= round.maxMintPerAddress, "Above quantity allowed"); require(paymentToken_ <= PaymentToken.ETH, "Invalid payment token"); uint256 value = getPrice(round_, paymentToken_) * quantity_; if (round.isPrivate) { require( isAuthorized(_hashMintPayload(quantity_, value, paymentToken_, round_, to), signature_), "Not signed by authorizer" ); } _userMints[to][round_] += quantity_; _roundsMints[round_] += quantity_; if (paymentToken_ == PaymentToken.NUTS) { nuts.safeTransferFrom(to, address(this), value); } else if (paymentToken_ == PaymentToken.USDC) { usdc.safeTransferFrom(to, address(this), value); } else { // PaymentToken.ETH require(msg.value >= value, "Payment failed"); } _mint(quantity_, to); } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address destination_, uint256 quantity_) external onlyOwnerOrOperator whenValidQuantity(quantity_) { require(currentStatus == STATUS_CLOSED, "Status not closed"); _mint(quantity_, destination_); } function _withdraw(uint256 amount) private { require(amount <= address(this).balance, "amount > balance"); require(amount > 0, "Empty amount"); payable(creator).transfer(amount); emit Withdraw(amount); } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { _withdraw(amount); } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { _withdraw(address(this).balance); } /** * @dev withdraw amount of Tokens and send it to CREATOR */ function withdrawToken(address token, uint256 amount) external onlyOwnerOrOperator { IERC20(token).safeTransfer(creator, amount); emit WithdrawToken(token, amount); } /** * @dev withdraw all Tokens and send it to CREATOR */ function withdrawAllTokens() external onlyOwnerOrOperator { uint256 balance = nuts.balanceOf(address(this)); if (balance > 0) { nuts.safeTransfer(creator, balance); emit WithdrawToken(address(nuts), balance); } balance = usdc.balanceOf(address(this)); if (balance > 0) { usdc.safeTransfer(creator, balance); emit WithdrawToken(address(usdc), balance); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./AuthorizeAccess.sol"; import "./OperatorAccess.sol"; import "../interfaces/INftCollection.sol"; /** @title NftMinter. */ contract NftMinter is AuthorizeAccess, OperatorAccess { using Address for address; uint8 public constant STATUS_NOT_INITIALIZED = 0; uint8 public constant STATUS_READY = 1; uint8 public constant STATUS_CLOSED = 2; uint8 public currentStatus = STATUS_NOT_INITIALIZED; uint256 public maxSupply; uint256 public availableSupply; INftCollection public nftCollection; // modifier to allow execution by owner or operator modifier onlyOwnerOrOperator() { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) || hasRole(OPERATOR_ROLE, _msgSender()), "Not an owner or operator" ); _; } constructor(INftCollection nftCollection_) { nftCollection = nftCollection_; } function setStatus(uint8 status_) external onlyOwnerOrOperator { currentStatus = status_; } function _mint(uint256 quantity, address to) internal { require(availableSupply >= quantity, "Not enough supply"); availableSupply -= quantity; nftCollection.mint(to, quantity); } function _syncSupply() internal { uint256 totalSupply = nftCollection.totalSupply(); maxSupply = nftCollection.maxSupply(); availableSupply = maxSupply - totalSupply; } function syncSupply() external onlyOwnerOrOperator { _syncSupply(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./AuthorizeAccess.sol"; /** @title EIP712Authorizer. */ contract EIP712Authorizer is AuthorizeAccess, EIP712 { using ECDSA for bytes32; constructor(string memory eipName_, string memory eipVersion_) EIP712(eipName_, eipVersion_) {} /** * @notice verifify signature is valid for `structHash` and signers is a member of role `AUTHORIZER_ROLE` * @param structHash: hash of the structure to verify the signature against */ function isAuthorized(bytes32 structHash, bytes memory signature) internal view returns (bool) { bytes32 hash = _hashTypedDataV4(structHash); (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && hasRole(AUTHORIZER_ROLE, recovered)) { return true; } return false; } }
// 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 (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract AuthorizeAccess is AccessControl { bytes32 public constant AUTHORIZER_ROLE = keccak256("AUTHORIZER_ROLE"); // Modifier for authorizer roles modifier onlyAuthorizer() { require(hasRole(AUTHORIZER_ROLE, _msgSender()), "Not an authorizer"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract OperatorAccess is AccessControl { bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Modifier for operator roles modifier onlyOperator() { require(hasRole(OPERATOR_ROLE, _msgSender()), "Not an operator"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/IERC721A.sol"; interface INftCollection is IERC721A { function maxSupply() external view returns (uint256); function mint(address to, uint256 quantity) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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); _; } /** * @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 virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", 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 virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library 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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (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) { 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. /// @solidity memory-safe-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 { 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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract INftCollection","name":"collection_","type":"address"},{"internalType":"address","name":"creator_","type":"address"},{"internalType":"contract IERC20","name":"nuts_","type":"address"},{"internalType":"contract IERC20","name":"usdc_","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawToken","type":"event"},{"inputs":[],"name":"AUTHORIZER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGN_MINT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CLOSED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_NOT_INITIALIZED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_READY","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"round_","type":"uint256"}],"name":"availableSupplyInRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"round_","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"endTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"minMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"ethPrice","type":"uint256"},{"internalType":"uint256","name":"usdcPrice","type":"uint256"},{"internalType":"uint256","name":"nutsPrice","type":"uint256"},{"internalType":"bool","name":"isPrivate","type":"bool"}],"internalType":"struct NutsDAONFTMinter.RoundConfiguration","name":"configuration_","type":"tuple"}],"name":"configureRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"creator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStatus","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"round_","type":"uint256"},{"internalType":"enum NutsDAONFTMinter.PaymentToken","name":"paymentToken_","type":"uint8"}],"name":"getPrice","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":"uint256","name":"round_","type":"uint256"}],"name":"getRound","outputs":[{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"endTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"minMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"ethPrice","type":"uint256"},{"internalType":"uint256","name":"usdcPrice","type":"uint256"},{"internalType":"uint256","name":"nutsPrice","type":"uint256"},{"internalType":"bool","name":"isPrivate","type":"bool"}],"internalType":"struct NutsDAONFTMinter.RoundConfiguration","name":"","type":"tuple"}],"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":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity_","type":"uint256"},{"internalType":"uint256","name":"round_","type":"uint256"},{"internalType":"enum NutsDAONFTMinter.PaymentToken","name":"paymentToken_","type":"uint8"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"destination_","type":"address"},{"internalType":"uint256","name":"quantity_","type":"uint256"}],"name":"mintRemaining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"mintedTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"round","type":"uint256"}],"name":"mintedTokensInRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftCollection","outputs":[{"internalType":"contract INftCollection","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nuts","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"status_","type":"uint8"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syncSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"round_","type":"uint256"}],"name":"totalMintedTokensInRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101a06040526001805460ff191690553480156200001c57600080fd5b50604051620030f1380380620030f18339810160408190526200003f916200048f565b604080518082018252600d81526c273aba39a220a7a6b4b73a32b960991b6020808301918252835180850190945260038452620312e360ec1b90840152600480546001600160a01b0319166001600160a01b0389161790558151902060e08190527fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b36101008190524660a052919291839183917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001438184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060c05261012052505060016005555050506001600160a01b0384169050620001b65760405162461bcd60e51b815260206004820152601760248201527f496e76616c69642063726561746f72206164647265737300000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166200020e5760405162461bcd60e51b815260206004820152601460248201527f496e76616c6964206e75747320616464726573730000000000000000000000006044820152606401620001ad565b6001600160a01b038116620002665760405162461bcd60e51b815260206004820152601460248201527f496e76616c6964207573646320616464726573730000000000000000000000006044820152606401620001ad565b6001600160a01b0383811661014052828116610160528116610180526200028f600033620002a3565b62000299620002b3565b5050505062000533565b620002af8282620003c3565b5050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000309573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200032f9190620004f7565b9050600460009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000385573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ab9190620004f7565b6002819055620003bd90829062000511565b60035550565b620003cf82826200044b565b620002af576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620004073390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff165b92915050565b6001600160a01b03811681146200048c57600080fd5b50565b60008060008060808587031215620004a657600080fd5b8451620004b38162000476565b6020860151909450620004c68162000476565b6040860151909350620004d98162000476565b6060860151909250620004ec8162000476565b939692955090935050565b6000602082840312156200050a57600080fd5b5051919050565b818103818111156200047057634e487b7160e01b600052601160045260246000fd5b60805160a05160c05160e0516101005161012051610140516101605161018051612af9620005f8600039600081816103ab01528181610d3d01528181610f6601528181610fee01526110430152600081816106a701528181610cea01528181610e1f01528181610ea70152610efc01526000818161025001528181610ec9015281816110100152818161171d0152611bd20152600061209a015260006120e9015260006120c40152600061201d01526000612047015260006120710152612af96000f3fe6080604052600436106102045760003560e01c8063853828b611610118578063c0a027f4116100a0578063e342156b1161006f578063e342156b14610695578063e6a5f0e9146106c9578063e9d5596a146106fd578063ef8a92351461071d578063f5b541a61461073757600080fd5b8063c0a027f41461061f578063d547741f1461063f578063d5abeb011461065f578063d7b5ac9b1461067557600080fd5b806398cdbb22116100e757806398cdbb22146105815780639e281a98146105a1578063a217fddf146105c1578063acc28f91146105d6578063bc06946f146105eb57600080fd5b8063853828b61461049d5780638920c3f2146104b25780638f1327c0146104d257806391d148541461056157600080fd5b80632f2ff15d1161019b57806361d0c1551161016a57806361d0c155146103e25780636588103b1461040f5780636a76fc9b1461042f57806371546879146104725780637ecc2b561461048757600080fd5b80632f2ff15d1461035957806336568abe146103795780633e413bee146103995780635df5729b146103cd57600080fd5b8063248a9ca3116101d7578063248a9ca3146102c6578063280da6fa146103045780632e1a7d4d146103195780632e49d78b1461033957600080fd5b806301ffc9a71461020957806302d05d3f1461023e5780631ca3c3501461028a57806320e5a06b1461029f575b600080fd5b34801561021557600080fd5b50610229610224366004612543565b610759565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610235565b61029d610298366004612597565b610790565b005b3480156102ab57600080fd5b506102b4600181565b60405160ff9091168152602001610235565b3480156102d257600080fd5b506102f66102e136600461266c565b60009081526020819052604090206001015490565b604051908152602001610235565b34801561031057600080fd5b5061029d610dc2565b34801561032557600080fd5b5061029d61033436600461266c565b61109c565b34801561034557600080fd5b5061029d610354366004612685565b6110ea565b34801561036557600080fd5b5061029d6103743660046126bf565b611145565b34801561038557600080fd5b5061029d6103943660046126bf565b61116f565b3480156103a557600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d957600080fd5b5061029d6111ed565b3480156103ee57600080fd5b506102f66103fd36600461266c565b60009081526009602052604090205490565b34801561041b57600080fd5b50600454610272906001600160a01b031681565b34801561043b57600080fd5b506102f661044a3660046126eb565b6001600160a01b03919091166000908152600860209081526040808320938352929052205490565b34801561047e57600080fd5b506102b4600281565b34801561049357600080fd5b506102f660035481565b3480156104a957600080fd5b5061029d61123c565b3480156104be57600080fd5b5061029d6104cd3660046126eb565b61128a565b3480156104de57600080fd5b506104f26104ed36600461266c565b6113c3565b6040516102359190600061012082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100808401511515818401525092915050565b34801561056d57600080fd5b5061022961057c3660046126bf565b611491565b34801561058d57600080fd5b5061029d61059c366004612715565b6114ba565b3480156105ad57600080fd5b5061029d6105bc3660046126eb565b6116c9565b3480156105cd57600080fd5b506102f6600081565b3480156105e257600080fd5b506102b4600081565b3480156105f757600080fd5b506102f67f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d081565b34801561062b57600080fd5b506102f661063a36600461274f565b611788565b34801561064b57600080fd5b5061029d61065a3660046126bf565b611826565b34801561066b57600080fd5b506102f660025481565b34801561068157600080fd5b506102f661069036600461266c565b61184b565b3480156106a157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156106d557600080fd5b506102f67f34e0929286dae7a46894221c77f50c05e61fbb728b228797b32b50b381f39e2581565b34801561070957600080fd5b506102f6610718366004612772565b6118c5565b34801561072957600080fd5b506001546102b49060ff1681565b34801561074357600080fd5b506102f6600080516020612aa483398151915281565b60006001600160e01b03198216637965db0b60e01b148061078a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6002600554036107e75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600555600354849061082e5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b60448201526064016107de565b8060035410156108505760405162461bcd60e51b81526004016107de9061278d565b6000811161088b5760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b60448201526064016107de565b8385806108978361184b565b10156108de5760405162461bcd60e51b8152602060048201526016602482015275149bdd5b99081cdd5c1c1b1e48195e1a185d5cdd195960521b60448201526064016107de565b6001805460ff16146109225760405162461bcd60e51b815260206004820152600d60248201526c4e6f7420636c61696d61626c6560981b60448201526064016107de565b60008681526007602052604090205486906109765760405162461bcd60e51b8152602060048201526014602482015273149bdd5b99081b9bdd0818dbdb999a59dd5c995960621b60448201526064016107de565b6000818152600760205260409020544210156109c75760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd081bdc195b995960821b60448201526064016107de565b60008181526007602052604090206001015415806109f657506000818152600760205260409020600101544211155b610a315760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b60448201526064016107de565b60008781526007602081815260408084208151610120810183528154815260018201548185015260028201548184015260038201546060820181905260048301546080830152600583015460a0830152600683015460c08301529482015460e082015260089182015460ff161515610100820152338087529184528286208d8752909352932054909190610ac6908c906127ce565b1015610b0d5760405162461bcd60e51b815260206004820152601660248201527510995b1bddc81c5d585b9d1a5d1e48185b1b1bddd95960521b60448201526064016107de565b60808101516001600160a01b03831660009081526008602090815260408083208d8452909152902054610b41908c906127ce565b1115610b885760405162461bcd60e51b815260206004820152601660248201527510589bdd99481c5d585b9d1a5d1e48185b1b1bddd95960521b60448201526064016107de565b6002886002811115610b9c57610b9c6127e1565b1115610be25760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103830bcb6b2b73a103a37b5b2b760591b60448201526064016107de565b60008a610bef8b8b611788565b610bf991906127f7565b905081610100015115610c6857610c1c610c168c838c8e8861191c565b8961197a565b610c685760405162461bcd60e51b815260206004820152601860248201527f4e6f74207369676e656420627920617574686f72697a6572000000000000000060448201526064016107de565b6001600160a01b03831660009081526008602090815260408083208d8452909152812080548d9290610c9b9084906127ce565b909155505060008a815260096020526040812080548d9290610cbe9084906127ce565b9091555060009050896002811115610cd857610cd86127e1565b03610d1757610d126001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168430846119fd565b610da6565b6001896002811115610d2b57610d2b6127e1565b03610d6557610d126001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168430846119fd565b80341015610da65760405162461bcd60e51b815260206004820152600e60248201526d14185e5b595b9d0819985a5b195960921b60448201526064016107de565b610db08b84611a6e565b50506001600555505050505050505050565b610dcd600033611491565b80610deb5750610deb600080516020612aa483398151915233611491565b610e075760405162461bcd60e51b81526004016107de9061280e565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612845565b90508015610f5157610eee6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611b13565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a9910160405180910390a15b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd99190612845565b90508015611099576110356001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000083611b13565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a991015b60405180910390a15b50565b6110a7600033611491565b806110c557506110c5600080516020612aa483398151915233611491565b6110e15760405162461bcd60e51b81526004016107de9061280e565b61109981611b43565b6110f5600033611491565b806111135750611113600080516020612aa483398151915233611491565b61112f5760405162461bcd60e51b81526004016107de9061280e565b6001805460ff191660ff92909216919091179055565b60008281526020819052604090206001015461116081611c4c565b61116a8383611c56565b505050565b6001600160a01b03811633146111df5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016107de565b6111e98282611cda565b5050565b6111f8600033611491565b806112165750611216600080516020612aa483398151915233611491565b6112325760405162461bcd60e51b81526004016107de9061280e565b61123a611d3f565b565b611247600033611491565b806112655750611265600080516020612aa483398151915233611491565b6112815760405162461bcd60e51b81526004016107de9061280e565b61123a47611b43565b611295600033611491565b806112b357506112b3600080516020612aa483398151915233611491565b6112cf5760405162461bcd60e51b81526004016107de9061280e565b806000600354116113135760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b60448201526064016107de565b8060035410156113355760405162461bcd60e51b81526004016107de9061278d565b600081116113705760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b60448201526064016107de565b60015460ff166002146113b95760405162461bcd60e51b815260206004820152601160248201527014dd185d1d5cc81b9bdd0818db1bdcd959607a1b60448201526064016107de565b61116a8284611a6e565b61141460405180610120016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b50600090815260076020818152604092839020835161012081018552815481526001820154928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460a0820152600683015460c08201529082015460e082015260089091015460ff16151561010082015290565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6114c5600033611491565b806114e357506114e3600080516020612aa483398151915233611491565b6114ff5760405162461bcd60e51b81526004016107de9061280e565b60208101351580611514575060208101358135105b6115555760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642074696d657374616d707360701b60448201526064016107de565b600081604001351161159c5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081b585e081b5a5b9d60821b60448201526064016107de565b60008160600135116115f05760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d696e206d696e742070657220616464726573730000000060448201526064016107de565b60008160800135116116445760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d6178206d696e742070657220616464726573730000000060448201526064016107de565b80606001358160800135101561169c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964206d696e74207065722061646472657373000000000000000060448201526064016107de565b600082815260076020526040902081906116b68282612879565b9050508160065410156111e95750600655565b6116d4600033611491565b806116f257506116f2600080516020612aa483398151915233611491565b61170e5760405162461bcd60e51b81526004016107de9061280e565b6117426001600160a01b0383167f000000000000000000000000000000000000000000000000000000000000000083611b13565b604080516001600160a01b0384168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a9910160405180910390a15050565b60008082600281111561179d5761179d6127e1565b036117bb57506000828152600760208190526040909120015461078a565b60018260028111156117cf576117cf6127e1565b036117ec575060008281526007602052604090206006015461078a565b6002826002811115611800576118006127e1565b0361181d575060008281526007602052604090206005015461078a565b50600092915050565b60008281526020819052604090206001015461184181611c4c565b61116a8383611cda565b60008080805b8481116118a45760008181526007602052604090206002015461187490846127ce565b60008281526009602052604090205490935061189090836127ce565b91508061189c816128ec565b915050611851565b508082116118b35760006118bd565b6118bd8183612905565b949350505050565b600080805b6006548111611915576001600160a01b038416600090815260086020908152604080832084845290915290205461190190836127ce565b91508061190d816128ec565b9150506118ca565b5092915050565b60007f34e0929286dae7a46894221c77f50c05e61fbb728b228797b32b50b381f39e25868686868660405160200161195996959493929190612918565b60405160208183030381529060405280519060200120905095945050505050565b60008061198684611e47565b90506000806119958386611e95565b909250905060008160048111156119ae576119ae6127e1565b1480156119e057506119e07f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d083611491565b156119f1576001935050505061078a565b50600095945050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a689085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611eda565b50505050565b816003541015611a905760405162461bcd60e51b81526004016107de9061278d565b8160036000828254611aa29190612905565b9091555050600480546040516340c10f1960e01b81526001600160a01b0384811693820193909352602481018590529116906340c10f1990604401600060405180830381600087803b158015611af757600080fd5b505af1158015611b0b573d6000803e3d6000fd5b505050505050565b6040516001600160a01b03831660248201526044810182905261116a90849063a9059cbb60e01b90606401611a31565b47811115611b865760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b60448201526064016107de565b60008111611bc55760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b60448201526064016107de565b6040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169082156108fc029083906000818181858888f19350505050158015611c1b573d6000803e3d6000fd5b506040518181527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d90602001611090565b6110998133611fac565b611c608282611491565b6111e9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611c963390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611ce48282611491565b156111e9576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db89190612845565b9050600460009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e319190612845565b6002819055611e41908290612905565b60035550565b600061078a611e54612010565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604103611ecb5760208301516040840151606085015160001a611ebf87828585612137565b94509450505050611ed3565b506000905060025b9250929050565b6000611f2f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122249092919063ffffffff16565b80519091501561116a5780806020019051810190611f4d9190612971565b61116a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107de565b611fb68282611491565b6111e957611fce816001600160a01b0316601461223d565b611fd983602061223d565b604051602001611fea9291906129b2565b60408051601f198184030181529082905262461bcd60e51b82526107de91600401612a27565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561206957507f000000000000000000000000000000000000000000000000000000000000000046145b1561209357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561216e575060009050600361221b565b8460ff16601b1415801561218657508460ff16601c14155b15612197575060009050600461221b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156121eb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166122145760006001925092505061221b565b9150600090505b94509492505050565b606061223384846000856123d9565b90505b9392505050565b6060600061224c8360026127f7565b6122579060026127ce565b67ffffffffffffffff81111561226f5761226f612581565b6040519080825280601f01601f191660200182016040528015612299576020820181803683370190505b509050600360fc1b816000815181106122b4576122b4612a5a565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106122e3576122e3612a5a565b60200101906001600160f81b031916908160001a90535060006123078460026127f7565b6123129060016127ce565b90505b600181111561238a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061234657612346612a5a565b1a60f81b82828151811061235c5761235c612a5a565b60200101906001600160f81b031916908160001a90535060049490941c9361238381612a70565b9050612315565b5083156122365760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107de565b60608247101561243a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107de565b6001600160a01b0385163b6124915760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107de565b600080866001600160a01b031685876040516124ad9190612a87565b60006040518083038185875af1925050503d80600081146124ea576040519150601f19603f3d011682016040523d82523d6000602084013e6124ef565b606091505b50915091506124ff82828661250a565b979650505050505050565b60608315612519575081612236565b8251156125295782518084602001fd5b8160405162461bcd60e51b81526004016107de9190612a27565b60006020828403121561255557600080fd5b81356001600160e01b03198116811461223657600080fd5b80356003811061257c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156125ad57600080fd5b84359350602085013592506125c46040860161256d565b9150606085013567ffffffffffffffff808211156125e157600080fd5b818701915087601f8301126125f557600080fd5b81358181111561260757612607612581565b604051601f8201601f19908116603f0116810190838211818310171561262f5761262f612581565b816040528281528a602084870101111561264857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561267e57600080fd5b5035919050565b60006020828403121561269757600080fd5b813560ff8116811461223657600080fd5b80356001600160a01b038116811461257c57600080fd5b600080604083850312156126d257600080fd5b823591506126e2602084016126a8565b90509250929050565b600080604083850312156126fe57600080fd5b612707836126a8565b946020939093013593505050565b60008082840361014081121561272a57600080fd5b83359250610120601f198201121561274157600080fd5b506020830190509250929050565b6000806040838503121561276257600080fd5b823591506126e26020840161256d565b60006020828403121561278457600080fd5b612236826126a8565b6020808252601190820152704e6f7420656e6f75676820737570706c7960781b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561078a5761078a6127b8565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761078a5761078a6127b8565b60208082526018908201527f4e6f7420616e206f776e6572206f72206f70657261746f720000000000000000604082015260600190565b60006020828403121561285757600080fd5b5051919050565b801515811461109957600080fd5b6000813561078a8161285e565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e082013560078201556111e96128d3610100840161286c565b6008830160ff1981541660ff8315151681178255505050565b6000600182016128fe576128fe6127b8565b5060010190565b8181038181111561078a5761078a6127b8565b868152602081018690526040810185905260c081016003851061294b57634e487b7160e01b600052602160045260246000fd5b606082019490945260808101929092526001600160a01b031660a0909101529392505050565b60006020828403121561298357600080fd5b81516122368161285e565b60005b838110156129a9578181015183820152602001612991565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516129ea81601785016020880161298e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612a1b81602884016020880161298e565b01602801949350505050565b6020815260008251806020840152612a4681604085016020870161298e565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600081612a7f57612a7f6127b8565b506000190190565b60008251612a9981846020870161298e565b919091019291505056fe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a26469706673582212204dfabfe879fb4a5a4355018851fd480a81bba9ba06e300c540cd0432f07a2b6164736f6c634300081100330000000000000000000000001744444ca11967be0d6b09685fcc3a435de7291000000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac3000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Deployed Bytecode
0x6080604052600436106102045760003560e01c8063853828b611610118578063c0a027f4116100a0578063e342156b1161006f578063e342156b14610695578063e6a5f0e9146106c9578063e9d5596a146106fd578063ef8a92351461071d578063f5b541a61461073757600080fd5b8063c0a027f41461061f578063d547741f1461063f578063d5abeb011461065f578063d7b5ac9b1461067557600080fd5b806398cdbb22116100e757806398cdbb22146105815780639e281a98146105a1578063a217fddf146105c1578063acc28f91146105d6578063bc06946f146105eb57600080fd5b8063853828b61461049d5780638920c3f2146104b25780638f1327c0146104d257806391d148541461056157600080fd5b80632f2ff15d1161019b57806361d0c1551161016a57806361d0c155146103e25780636588103b1461040f5780636a76fc9b1461042f57806371546879146104725780637ecc2b561461048757600080fd5b80632f2ff15d1461035957806336568abe146103795780633e413bee146103995780635df5729b146103cd57600080fd5b8063248a9ca3116101d7578063248a9ca3146102c6578063280da6fa146103045780632e1a7d4d146103195780632e49d78b1461033957600080fd5b806301ffc9a71461020957806302d05d3f1461023e5780631ca3c3501461028a57806320e5a06b1461029f575b600080fd5b34801561021557600080fd5b50610229610224366004612543565b610759565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b506102727f00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac381565b6040516001600160a01b039091168152602001610235565b61029d610298366004612597565b610790565b005b3480156102ab57600080fd5b506102b4600181565b60405160ff9091168152602001610235565b3480156102d257600080fd5b506102f66102e136600461266c565b60009081526020819052604090206001015490565b604051908152602001610235565b34801561031057600080fd5b5061029d610dc2565b34801561032557600080fd5b5061029d61033436600461266c565b61109c565b34801561034557600080fd5b5061029d610354366004612685565b6110ea565b34801561036557600080fd5b5061029d6103743660046126bf565b611145565b34801561038557600080fd5b5061029d6103943660046126bf565b61116f565b3480156103a557600080fd5b506102727f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156103d957600080fd5b5061029d6111ed565b3480156103ee57600080fd5b506102f66103fd36600461266c565b60009081526009602052604090205490565b34801561041b57600080fd5b50600454610272906001600160a01b031681565b34801561043b57600080fd5b506102f661044a3660046126eb565b6001600160a01b03919091166000908152600860209081526040808320938352929052205490565b34801561047e57600080fd5b506102b4600281565b34801561049357600080fd5b506102f660035481565b3480156104a957600080fd5b5061029d61123c565b3480156104be57600080fd5b5061029d6104cd3660046126eb565b61128a565b3480156104de57600080fd5b506104f26104ed36600461266c565b6113c3565b6040516102359190600061012082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e083015160e0830152610100808401511515818401525092915050565b34801561056d57600080fd5b5061022961057c3660046126bf565b611491565b34801561058d57600080fd5b5061029d61059c366004612715565b6114ba565b3480156105ad57600080fd5b5061029d6105bc3660046126eb565b6116c9565b3480156105cd57600080fd5b506102f6600081565b3480156105e257600080fd5b506102b4600081565b3480156105f757600080fd5b506102f67f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d081565b34801561062b57600080fd5b506102f661063a36600461274f565b611788565b34801561064b57600080fd5b5061029d61065a3660046126bf565b611826565b34801561066b57600080fd5b506102f660025481565b34801561068157600080fd5b506102f661069036600461266c565b61184b565b3480156106a157600080fd5b506102727f000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc081565b3480156106d557600080fd5b506102f67f34e0929286dae7a46894221c77f50c05e61fbb728b228797b32b50b381f39e2581565b34801561070957600080fd5b506102f6610718366004612772565b6118c5565b34801561072957600080fd5b506001546102b49060ff1681565b34801561074357600080fd5b506102f6600080516020612aa483398151915281565b60006001600160e01b03198216637965db0b60e01b148061078a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6002600554036107e75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600555600354849061082e5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b60448201526064016107de565b8060035410156108505760405162461bcd60e51b81526004016107de9061278d565b6000811161088b5760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b60448201526064016107de565b8385806108978361184b565b10156108de5760405162461bcd60e51b8152602060048201526016602482015275149bdd5b99081cdd5c1c1b1e48195e1a185d5cdd195960521b60448201526064016107de565b6001805460ff16146109225760405162461bcd60e51b815260206004820152600d60248201526c4e6f7420636c61696d61626c6560981b60448201526064016107de565b60008681526007602052604090205486906109765760405162461bcd60e51b8152602060048201526014602482015273149bdd5b99081b9bdd0818dbdb999a59dd5c995960621b60448201526064016107de565b6000818152600760205260409020544210156109c75760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd081bdc195b995960821b60448201526064016107de565b60008181526007602052604090206001015415806109f657506000818152600760205260409020600101544211155b610a315760405162461bcd60e51b815260206004820152600c60248201526b149bdd5b990818db1bdcd95960a21b60448201526064016107de565b60008781526007602081815260408084208151610120810183528154815260018201548185015260028201548184015260038201546060820181905260048301546080830152600583015460a0830152600683015460c08301529482015460e082015260089182015460ff161515610100820152338087529184528286208d8752909352932054909190610ac6908c906127ce565b1015610b0d5760405162461bcd60e51b815260206004820152601660248201527510995b1bddc81c5d585b9d1a5d1e48185b1b1bddd95960521b60448201526064016107de565b60808101516001600160a01b03831660009081526008602090815260408083208d8452909152902054610b41908c906127ce565b1115610b885760405162461bcd60e51b815260206004820152601660248201527510589bdd99481c5d585b9d1a5d1e48185b1b1bddd95960521b60448201526064016107de565b6002886002811115610b9c57610b9c6127e1565b1115610be25760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103830bcb6b2b73a103a37b5b2b760591b60448201526064016107de565b60008a610bef8b8b611788565b610bf991906127f7565b905081610100015115610c6857610c1c610c168c838c8e8861191c565b8961197a565b610c685760405162461bcd60e51b815260206004820152601860248201527f4e6f74207369676e656420627920617574686f72697a6572000000000000000060448201526064016107de565b6001600160a01b03831660009081526008602090815260408083208d8452909152812080548d9290610c9b9084906127ce565b909155505060008a815260096020526040812080548d9290610cbe9084906127ce565b9091555060009050896002811115610cd857610cd86127e1565b03610d1757610d126001600160a01b037f000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0168430846119fd565b610da6565b6001896002811115610d2b57610d2b6127e1565b03610d6557610d126001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168430846119fd565b80341015610da65760405162461bcd60e51b815260206004820152600e60248201526d14185e5b595b9d0819985a5b195960921b60448201526064016107de565b610db08b84611a6e565b50506001600555505050505050505050565b610dcd600033611491565b80610deb5750610deb600080516020612aa483398151915233611491565b610e075760405162461bcd60e51b81526004016107de9061280e565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc06001600160a01b0316906370a0823190602401602060405180830381865afa158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e929190612845565b90508015610f5157610eee6001600160a01b037f000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0167f00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac383611b13565b604080516001600160a01b037f000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a9910160405180910390a15b6040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd99190612845565b90508015611099576110356001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48167f00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac383611b13565b604080516001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a991015b60405180910390a15b50565b6110a7600033611491565b806110c557506110c5600080516020612aa483398151915233611491565b6110e15760405162461bcd60e51b81526004016107de9061280e565b61109981611b43565b6110f5600033611491565b806111135750611113600080516020612aa483398151915233611491565b61112f5760405162461bcd60e51b81526004016107de9061280e565b6001805460ff191660ff92909216919091179055565b60008281526020819052604090206001015461116081611c4c565b61116a8383611c56565b505050565b6001600160a01b03811633146111df5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016107de565b6111e98282611cda565b5050565b6111f8600033611491565b806112165750611216600080516020612aa483398151915233611491565b6112325760405162461bcd60e51b81526004016107de9061280e565b61123a611d3f565b565b611247600033611491565b806112655750611265600080516020612aa483398151915233611491565b6112815760405162461bcd60e51b81526004016107de9061280e565b61123a47611b43565b611295600033611491565b806112b357506112b3600080516020612aa483398151915233611491565b6112cf5760405162461bcd60e51b81526004016107de9061280e565b806000600354116113135760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b60448201526064016107de565b8060035410156113355760405162461bcd60e51b81526004016107de9061278d565b600081116113705760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b60448201526064016107de565b60015460ff166002146113b95760405162461bcd60e51b815260206004820152601160248201527014dd185d1d5cc81b9bdd0818db1bdcd959607a1b60448201526064016107de565b61116a8284611a6e565b61141460405180610120016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b50600090815260076020818152604092839020835161012081018552815481526001820154928101929092526002810154938201939093526003830154606082015260048301546080820152600583015460a0820152600683015460c08201529082015460e082015260089091015460ff16151561010082015290565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6114c5600033611491565b806114e357506114e3600080516020612aa483398151915233611491565b6114ff5760405162461bcd60e51b81526004016107de9061280e565b60208101351580611514575060208101358135105b6115555760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642074696d657374616d707360701b60448201526064016107de565b600081604001351161159c5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081b585e081b5a5b9d60821b60448201526064016107de565b60008160600135116115f05760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d696e206d696e742070657220616464726573730000000060448201526064016107de565b60008160800135116116445760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d6178206d696e742070657220616464726573730000000060448201526064016107de565b80606001358160800135101561169c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964206d696e74207065722061646472657373000000000000000060448201526064016107de565b600082815260076020526040902081906116b68282612879565b9050508160065410156111e95750600655565b6116d4600033611491565b806116f257506116f2600080516020612aa483398151915233611491565b61170e5760405162461bcd60e51b81526004016107de9061280e565b6117426001600160a01b0383167f00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac383611b13565b604080516001600160a01b0384168152602081018390527f992ee874049a42cae0757a765cd7f641b6028cc35c3478bde8330bf417c3a7a9910160405180910390a15050565b60008082600281111561179d5761179d6127e1565b036117bb57506000828152600760208190526040909120015461078a565b60018260028111156117cf576117cf6127e1565b036117ec575060008281526007602052604090206006015461078a565b6002826002811115611800576118006127e1565b0361181d575060008281526007602052604090206005015461078a565b50600092915050565b60008281526020819052604090206001015461184181611c4c565b61116a8383611cda565b60008080805b8481116118a45760008181526007602052604090206002015461187490846127ce565b60008281526009602052604090205490935061189090836127ce565b91508061189c816128ec565b915050611851565b508082116118b35760006118bd565b6118bd8183612905565b949350505050565b600080805b6006548111611915576001600160a01b038416600090815260086020908152604080832084845290915290205461190190836127ce565b91508061190d816128ec565b9150506118ca565b5092915050565b60007f34e0929286dae7a46894221c77f50c05e61fbb728b228797b32b50b381f39e25868686868660405160200161195996959493929190612918565b60405160208183030381529060405280519060200120905095945050505050565b60008061198684611e47565b90506000806119958386611e95565b909250905060008160048111156119ae576119ae6127e1565b1480156119e057506119e07f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d083611491565b156119f1576001935050505061078a565b50600095945050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a689085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611eda565b50505050565b816003541015611a905760405162461bcd60e51b81526004016107de9061278d565b8160036000828254611aa29190612905565b9091555050600480546040516340c10f1960e01b81526001600160a01b0384811693820193909352602481018590529116906340c10f1990604401600060405180830381600087803b158015611af757600080fd5b505af1158015611b0b573d6000803e3d6000fd5b505050505050565b6040516001600160a01b03831660248201526044810182905261116a90849063a9059cbb60e01b90606401611a31565b47811115611b865760405162461bcd60e51b815260206004820152601060248201526f616d6f756e74203e2062616c616e636560801b60448201526064016107de565b60008111611bc55760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b60448201526064016107de565b6040516001600160a01b037f00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac3169082156108fc029083906000818181858888f19350505050158015611c1b573d6000803e3d6000fd5b506040518181527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d90602001611090565b6110998133611fac565b611c608282611491565b6111e9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611c963390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611ce48282611491565b156111e9576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000600460009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db89190612845565b9050600460009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e319190612845565b6002819055611e41908290612905565b60035550565b600061078a611e54612010565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604103611ecb5760208301516040840151606085015160001a611ebf87828585612137565b94509450505050611ed3565b506000905060025b9250929050565b6000611f2f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122249092919063ffffffff16565b80519091501561116a5780806020019051810190611f4d9190612971565b61116a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107de565b611fb68282611491565b6111e957611fce816001600160a01b0316601461223d565b611fd983602061223d565b604051602001611fea9291906129b2565b60408051601f198184030181529082905262461bcd60e51b82526107de91600401612a27565b6000306001600160a01b037f00000000000000000000000009ed21e7580eb6162cf51aa521732b1b734b8f5b1614801561206957507f000000000000000000000000000000000000000000000000000000000000000146145b1561209357507f7cd0fe9774ed472eb231384f603eb6fc9e4328c61ba811c6f58cd181cc2b886f90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f7b849cf0a0d28e210384cb67b596c48a7d8f33747193dc3f78a38d4ef06578f1828401527fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b360608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561216e575060009050600361221b565b8460ff16601b1415801561218657508460ff16601c14155b15612197575060009050600461221b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156121eb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166122145760006001925092505061221b565b9150600090505b94509492505050565b606061223384846000856123d9565b90505b9392505050565b6060600061224c8360026127f7565b6122579060026127ce565b67ffffffffffffffff81111561226f5761226f612581565b6040519080825280601f01601f191660200182016040528015612299576020820181803683370190505b509050600360fc1b816000815181106122b4576122b4612a5a565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106122e3576122e3612a5a565b60200101906001600160f81b031916908160001a90535060006123078460026127f7565b6123129060016127ce565b90505b600181111561238a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061234657612346612a5a565b1a60f81b82828151811061235c5761235c612a5a565b60200101906001600160f81b031916908160001a90535060049490941c9361238381612a70565b9050612315565b5083156122365760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107de565b60608247101561243a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107de565b6001600160a01b0385163b6124915760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107de565b600080866001600160a01b031685876040516124ad9190612a87565b60006040518083038185875af1925050503d80600081146124ea576040519150601f19603f3d011682016040523d82523d6000602084013e6124ef565b606091505b50915091506124ff82828661250a565b979650505050505050565b60608315612519575081612236565b8251156125295782518084602001fd5b8160405162461bcd60e51b81526004016107de9190612a27565b60006020828403121561255557600080fd5b81356001600160e01b03198116811461223657600080fd5b80356003811061257c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156125ad57600080fd5b84359350602085013592506125c46040860161256d565b9150606085013567ffffffffffffffff808211156125e157600080fd5b818701915087601f8301126125f557600080fd5b81358181111561260757612607612581565b604051601f8201601f19908116603f0116810190838211818310171561262f5761262f612581565b816040528281528a602084870101111561264857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561267e57600080fd5b5035919050565b60006020828403121561269757600080fd5b813560ff8116811461223657600080fd5b80356001600160a01b038116811461257c57600080fd5b600080604083850312156126d257600080fd5b823591506126e2602084016126a8565b90509250929050565b600080604083850312156126fe57600080fd5b612707836126a8565b946020939093013593505050565b60008082840361014081121561272a57600080fd5b83359250610120601f198201121561274157600080fd5b506020830190509250929050565b6000806040838503121561276257600080fd5b823591506126e26020840161256d565b60006020828403121561278457600080fd5b612236826126a8565b6020808252601190820152704e6f7420656e6f75676820737570706c7960781b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561078a5761078a6127b8565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761078a5761078a6127b8565b60208082526018908201527f4e6f7420616e206f776e6572206f72206f70657261746f720000000000000000604082015260600190565b60006020828403121561285757600080fd5b5051919050565b801515811461109957600080fd5b6000813561078a8161285e565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c0820135600682015560e082013560078201556111e96128d3610100840161286c565b6008830160ff1981541660ff8315151681178255505050565b6000600182016128fe576128fe6127b8565b5060010190565b8181038181111561078a5761078a6127b8565b868152602081018690526040810185905260c081016003851061294b57634e487b7160e01b600052602160045260246000fd5b606082019490945260808101929092526001600160a01b031660a0909101529392505050565b60006020828403121561298357600080fd5b81516122368161285e565b60005b838110156129a9578181015183820152602001612991565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516129ea81601785016020880161298e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612a1b81602884016020880161298e565b01602801949350505050565b6020815260008251806020840152612a4681604085016020870161298e565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600081612a7f57612a7f6127b8565b506000190190565b60008251612a9981846020870161298e565b919091019291505056fe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a26469706673582212204dfabfe879fb4a5a4355018851fd480a81bba9ba06e300c540cd0432f07a2b6164736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001744444ca11967be0d6b09685fcc3a435de7291000000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac3000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
-----Decoded View---------------
Arg [0] : collection_ (address): 0x1744444CA11967bE0D6B09685FCc3a435dE72910
Arg [1] : creator_ (address): 0x99D0acec59a51FF76D87E498b6CB92f8c7119aC3
Arg [2] : nuts_ (address): 0x981dc247745800bD2cA28a4bF147f0385Eaa0bc0
Arg [3] : usdc_ (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000001744444ca11967be0d6b09685fcc3a435de72910
Arg [1] : 00000000000000000000000099d0acec59a51ff76d87e498b6cb92f8c7119ac3
Arg [2] : 000000000000000000000000981dc247745800bd2ca28a4bf147f0385eaa0bc0
Arg [3] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.