Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,560 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 14013462 | 1072 days ago | IN | 0.15 ETH | 0.00433325 | ||||
Signed Mint | 14010176 | 1072 days ago | IN | 0.125 ETH | 0.00206744 | ||||
Mint | 14009528 | 1073 days ago | IN | 0.15 ETH | 0.0030136 | ||||
Mint | 14007949 | 1073 days ago | IN | 0.15 ETH | 0.003767 | ||||
Mint | 14007901 | 1073 days ago | IN | 0.15 ETH | 0.00370718 | ||||
Mint | 14007858 | 1073 days ago | IN | 0.2 ETH | 0.00482584 | ||||
Mint | 14006911 | 1073 days ago | IN | 0.3 ETH | 0.0041437 | ||||
Mint | 14006318 | 1073 days ago | IN | 0.15 ETH | 0.0048971 | ||||
Mint | 14006287 | 1073 days ago | IN | 0.3 ETH | 0.0066307 | ||||
Mint | 14006259 | 1073 days ago | IN | 0.15 ETH | 0.00651922 | ||||
Release | 14006239 | 1073 days ago | IN | 0 ETH | 0.01116608 | ||||
Mint | 14006238 | 1073 days ago | IN | 0.15 ETH | 0.0056505 | ||||
Release | 14006233 | 1073 days ago | IN | 0 ETH | 0.01227476 | ||||
Release | 14006231 | 1073 days ago | IN | 0 ETH | 0.01342426 | ||||
Release | 14006230 | 1073 days ago | IN | 0 ETH | 0.01421394 | ||||
Release | 14006227 | 1073 days ago | IN | 0 ETH | 0.00996944 | ||||
Release | 14006222 | 1073 days ago | IN | 0 ETH | 0.01332839 | ||||
Release | 14006218 | 1073 days ago | IN | 0 ETH | 0.01236238 | ||||
Mint | 14006208 | 1073 days ago | IN | 0.6 ETH | 0.00734565 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.15 ETH | 0.00665252 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.15 ETH | 0.0066591 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.15 ETH | 0.00669677 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.15 ETH | 0.00669677 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.3 ETH | 0.00669677 | ||||
Mint | 14006206 | 1073 days ago | IN | 0.15 ETH | 0.00669677 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14006239 | 1073 days ago | 14.18915625 ETH | ||||
14006233 | 1073 days ago | 7.09457812 ETH | ||||
14006231 | 1073 days ago | 7.09457812 ETH | ||||
14006230 | 1073 days ago | 47.2971875 ETH | ||||
14006227 | 1073 days ago | 113.4945 ETH | ||||
14006222 | 1073 days ago | 189.1575 ETH | ||||
14006218 | 1073 days ago | 378.315 ETH | ||||
14005409 | 1073 days ago | 0.2 ETH | ||||
14005307 | 1073 days ago | 0.15 ETH | ||||
14005196 | 1073 days ago | 0.01 ETH | ||||
14005194 | 1073 days ago | 0.01 ETH | ||||
14005193 | 1073 days ago | 0.1 ETH | ||||
14005172 | 1073 days ago | 0.02 ETH | ||||
14005165 | 1073 days ago | 0.02 ETH | ||||
14005131 | 1073 days ago | 0.04 ETH | ||||
14005130 | 1073 days ago | 0.03 ETH | ||||
14005130 | 1073 days ago | 0.02 ETH | ||||
14005012 | 1073 days ago | 0.02 ETH | ||||
14005011 | 1073 days ago | 0.02 ETH | ||||
14005006 | 1073 days ago | 0.02 ETH | ||||
14005006 | 1073 days ago | 0.01 ETH | ||||
14004995 | 1073 days ago | 0.02 ETH | ||||
14004995 | 1073 days ago | 0.04 ETH | ||||
14004995 | 1073 days ago | 0.06 ETH | ||||
14004993 | 1073 days ago | 0.02 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x5233cd00...56e9b57A2 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Minter
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 /// @dev WE_ARE_KLOUD /// KLOUD is the artistical embodiment of limitless /// creativity in anonymity. With this NFT drop, the collector enters the /// KLOUD, owning a unique visual & musical art piece derived from the /// generative algorithm that is KLOUD x HOOKER x COMPUTER. /// /// Genesis SoundMint Drop. /******************************************************************************* * ::::cllllccc: * * .:lollc:::;;;:ccc:: * * cc;......' ',::: * * :cl:..... .,::: * * :;... .... .;: * * cl:......... .;: * * coc'......... .,: * * :c:,''........ .;: * * ::;,........... .'; * * ::,............. '; * * ::,'............ '; * * :;'',,'........ ': * * ::;;::,......... .; * * ::::;'.''........ .; * * :;,,::,....... .; * * :::od:''''''.. .: * * :cclc;''...... .; * * xdc,......................': * * :cc:;:oO0 NKNXkc..........'',;::;;;;;:: * * :ccc:,',cc:coxOKNNO:.......'',;: * * col;'....',,;lodk0KKx;......'', * * ;cl:'.......',:coxkOOOxl:;'..';;;:lc:; * * ;::;'........,;;:lxkdccodddolldxdc::: * * ;;,,;,.... ..,,;codoc;,;cxKK0OO0kl;cc:;; * * ;;,'';,...........,cll:cc,'',lkO0000kdooc;;; * * ,,,'';,...'.......':ll:cc,...';oOOOO00kddo:;, * * ,,'';,..........',;cl:::,''''';oxkkkO0Okxxc;, * * ,,,'',,.......',;:loddc,,'.',;;:ldxxkkO0Okkko;, * * '''',,.......'':lodxdc,'....';:clodxkOO0OxkOl,' * * '''''.......','.;loddc,''....',;clodxkkO0OxOkc' * * '.............,,':oxko;,'''.....';codxkkOOxx0x; * * .............,;;cdko;;,,''......,cldxkOOkxO0l * * ...'....''....':clxo;;,,,''......,codxkOkdk0d * * ....'....';,....,codo;,,,,'''.....':odxkOOxxO * * ......'........',,;lxl;;;,,'''....',:lodxkkxx * * ......'.........';;;ol::;;,;cc;;cooc;;codkOk * * ...............'';col;;,'',;lodkkdlc:;lxddkx: * * .......'........;:cldo:,,,,'.'cx0Okdoc:ldc:xx; * *******************************************************************************/ pragma solidity 0.8.10; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; import "./Provenance.sol"; import "./interfaces/IBaseToken.sol"; contract Minter is AccessControlEnumerable, Provenance, PaymentSplitter { /* --------------------------------- Globals -------------------------------- */ bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); address public tokenContract; // Token to be minted. address public mintSigner; // Signer who may approve addresses to mint. uint256 public price; // Ether price per token. uint256 public maxBlockPurchase; // Max that may be purchased per block by one address. uint256 public maxWalletPurchase; // Total max that may be purchased by one address. bool public saleIsActive; // Sale live toggle. bool public signedMintIsActive; // Whitelist/presale signed mint live toggle. mapping (address => uint256) lastBlock; // Track per minter which block they last minted. mapping (address => uint256) totalMinted; // Track per minter total they minted. mapping (bytes32 => bool) public nonces; // Track consumed non-sequential nonces. /* --------------------------------- Events --------------------------------- */ event LogPriceUpdated(uint256 newPrice); event LogMint(address indexed sender, uint256 indexed price, uint256 numberMinted, uint256 totalMinted); /* -------------------------------- Modifiers ------------------------------- */ /** * @dev Throws if called by any account other than the admin. */ modifier onlyAdmin() { require( hasRole(ADMIN_ROLE, _msgSender()), "onlyAdmin: caller is not the admin"); _; } /* ------------------------------- Constructor ------------------------------ */ constructor( address _tokenContract, address[] memory payees, uint256[] memory shares_ ) PaymentSplitter(payees, shares_) { tokenContract = _tokenContract; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(ADMIN_ROLE, _msgSender()); } /* ------------------------------ Admin Methods ----------------------------- */ function setPrice(uint256 newPrice) public onlyAdmin { price = newPrice; emit LogPriceUpdated(newPrice); } function setProvenance(bytes32 provenanceHash) public onlyAdmin { _setProvenance(provenanceHash); } function setRevealTime(uint256 timestamp) public onlyAdmin { _setRevealTime(timestamp); } function setMaxWalletPurchase(uint256 newMax) public onlyAdmin { maxWalletPurchase = newMax; } function setMaxBlockPurchase(uint256 newMax) public onlyAdmin { maxBlockPurchase = newMax; } function setMintSigner(address signer) public onlyAdmin { mintSigner = signer; } function reserveTokens(uint256 num) public onlyAdmin { for (uint256 i = 0; i < num; i++) { IBaseToken(tokenContract).mint(_msgSender()); } } function flipSignedMintState() public onlyAdmin { signedMintIsActive = !signedMintIsActive; } function flipSaleState() public onlyAdmin { saleIsActive = !saleIsActive; } function sweep(address token, address to, uint256 amount) external onlyAdmin returns (bool) { return IERC20(token).transfer(to, amount); } /* ------------------------------ Public Reveal ----------------------------- */ function finalizeReveal() public { _finalizeStartingIndex(IBaseToken(tokenContract).maxSupply()); } /* ----------------------------- Whitelist Mint ----------------------------- */ function signedMint( uint256 numberOfTokens, uint256 maxPermitted, bytes memory signature, bytes32 nonce ) public payable { require(signedMintIsActive, "Minter: signedMint is not active"); require(numberOfTokens <= maxPermitted, "Minter: numberOfTokens exceeds maxPermitted"); bool signatureIsValid = SignatureChecker.isValidSignatureNow( mintSigner, hashTransaction(msg.sender, maxPermitted, nonce), signature ); require(signatureIsValid, "Minter: invalid signature"); require(!nonces[nonce], "Minter: nonce already used"); nonces[nonce] = true; sharedMintBehavior(numberOfTokens); } /* ------------------------------- Public Mint ------------------------------ */ function mint(uint256 numberOfTokens) public payable { require(saleIsActive, "Minter: Sale is not active"); sharedMintBehavior(numberOfTokens); _setStartingBlock( IBaseToken(tokenContract).totalMinted(), IBaseToken(tokenContract).maxSupply() ); } /* --------------------------------- Signing -------------------------------- */ function hashTransaction( address sender, uint256 numberOfTokens, bytes32 nonce ) public view returns(bytes32) { return ECDSA.toEthSignedMessageHash( keccak256(abi.encode(address(this), sender, numberOfTokens, nonce)) ); } /* ------------------------------ Internal ----------------------------- */ function maxPurchaseBehavior(uint256 numberOfTokens, uint256 maxPerBlock, uint256 maxPerWallet) internal { // Reentrancy check. require(lastBlock[msg.sender] != block.number, "Minter: Sender already minted this block"); lastBlock[msg.sender] = block.number; if(maxPerBlock != 0) { require(numberOfTokens <= maxPerBlock, "Minter: maxBlockPurchase exceeded"); } if(maxPerWallet != 0) { totalMinted[msg.sender] += numberOfTokens; require(totalMinted[msg.sender] <= maxPerWallet, "Minter: Sender reached mint max"); } } function sharedMintBehavior(uint256 numberOfTokens) internal { require(numberOfTokens > 0, "Minter: numberOfTokens is 0"); require(price != 0, "Minter: price not set"); uint256 expectedValue = price * numberOfTokens; require(expectedValue <= msg.value, "Minter: Sent ether value is incorrect"); // Save gas by failing early. uint256 currentTotal = IBaseToken(tokenContract).totalMinted(); require(currentTotal + numberOfTokens <= IBaseToken(tokenContract).maxSupply(), "Minter: Purchase would exceed max supply"); // Reentrancy check DO NOT MOVE. maxPurchaseBehavior(numberOfTokens, maxBlockPurchase, maxWalletPurchase); for (uint i = 0; i < numberOfTokens; i++) { IBaseToken(tokenContract).mint(msg.sender); } emit LogMint(msg.sender, price, numberOfTokens, IBaseToken(tokenContract).totalMinted()); // Return the change. if(expectedValue < msg.value) { payable(_msgSender()).call{value: msg.value-expectedValue}(""); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and * ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with * smart contract wallets such as Argent and Gnosis. * * Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change * through time. It could return true at block N and false at block N+1 (or the opposite). * * _Available since v4.1._ */ library SignatureChecker { function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector); } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.10; contract Provenance { // Provenance hash for metadata. bytes32 public provenance; uint256 public startingIndex; uint256 public startingIndexBlock; uint256 public revealTimestamp; /* ------------------------------ Internal Methods ----------------------------- */ function _setProvenance(bytes32 provenanceHash) internal { provenance = provenanceHash; } function _setRevealTime(uint256 timestamp) internal { revealTimestamp = timestamp; } function _finalizeStartingIndex(uint256 maxSupply) internal { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = (uint(blockhash(startingIndexBlock)) % maxSupply) + 1; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if (block.number - startingIndexBlock > 255) { startingIndex = (uint(blockhash(block.number-1)) % maxSupply) + 1; } // Prevent default sequence if (startingIndex == 1) { startingIndex = startingIndex + 1; } } function _setStartingBlock(uint256 currentCount, uint256 maxSupply) internal { /** * Source of randomness. Theoretical miner withhold manipulation possible but should be sufficient in a pragmatic sense */ if (startingIndexBlock == 0 && (currentCount == maxSupply || block.timestamp >= revealTimestamp)) { startingIndexBlock = block.number; } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.10; interface IBaseToken { function initialize( string memory name_, string memory symbol_ ) external; function grantRole(bytes32 role, address account) external; function DEFAULT_ADMIN_ROLE() external returns(bytes32); function MINTER_ROLE() external returns(bytes32); function mint(address to) external; function totalMinted() external returns (uint256); function maxSupply() external returns (uint256); function setBaseURI(string memory baseURI_) external; function setTokenURI(uint256 tokenId, string memory newTokenURI) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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 // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberMinted","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalMinted","type":"uint256"}],"name":"LogMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"LogPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN_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":"finalizeReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSignedMintState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"hashTransaction","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBlockPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nonces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"num","type":"uint256"}],"name":"reserveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"setMaxBlockPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"setMaxWalletPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"setMintSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"provenanceHash","type":"bytes32"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"setRevealTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"maxPermitted","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"signedMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"signedMintIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sweep","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106102765760003560e01c8063a035b1fe1161014f578063d547741f116100c1578063e84a97281161007a578063e84a9728146109cb578063eb8d2444146109f4578063f0b57a6a14610a1f578063f1520f3114610a48578063f17af48d14610a73578063f62f3c1114610a9e576102bd565b8063d547741f146108bb578063d79779b2146108e4578063dddbc55014610921578063e05d9fe71461094c578063e33b7de314610975578063e36d6498146109a0576102bd565b8063c5a41c0311610113578063c5a41c03146107ba578063ca15c873146107d1578063cb774d471461080e578063ce7c2ac214610839578063d031370b14610876578063d2bafe4e1461089f576102bd565b8063a035b1fe146106f4578063a0712d681461071f578063a217fddf1461073b578063a3e9825214610766578063c1e2850714610791576102bd565b806348b75044116101e85780638b83209b116101ac5780638b83209b1461059a5780639010d07c146105d757806391b7f5ed1461061457806391d148541461063d5780639852595c1461067a5780639e317f12146106b7576102bd565b806348b75044146104b557806355a373d6146104de57806362c067671461050957806365370c211461054657806375b238fc1461056f576102bd565b80632f2ff15d1161023a5780632f2ff15d146103cd57806334918dfd146103f65780633575ae671461040d57806336568abe146104245780633a98ef391461044d578063406072a914610478576102bd565b806301ffc9a7146102c25780630f7309e8146102ff578063191655871461032a578063236e8c4d14610353578063248a9ca314610390576102bd565b366102bd577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706102a4610ac9565b346040516102b3929190613788565b60405180910390a1005b600080fd5b3480156102ce57600080fd5b506102e960048036038101906102e4919061381d565b610ad1565b6040516102f69190613865565b60405180910390f35b34801561030b57600080fd5b50610314610b4b565b6040516103219190613899565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906138f2565b610b51565b005b34801561035f57600080fd5b5061037a600480360381019061037591906139a3565b610cfc565b6040516103879190613899565b60405180910390f35b34801561039c57600080fd5b506103b760048036038101906103b291906139f6565b610d3c565b6040516103c49190613899565b60405180910390f35b3480156103d957600080fd5b506103f460048036038101906103ef9190613a23565b610d5b565b005b34801561040257600080fd5b5061040b610d84565b005b34801561041957600080fd5b50610422610e20565b005b34801561043057600080fd5b5061044b60048036038101906104469190613a23565b610ebd565b005b34801561045957600080fd5b50610462610f40565b60405161046f9190613a63565b60405180910390f35b34801561048457600080fd5b5061049f600480360381019061049a9190613abc565b610f4a565b6040516104ac9190613a63565b60405180910390f35b3480156104c157600080fd5b506104dc60048036038101906104d79190613abc565b610fd1565b005b3480156104ea57600080fd5b506104f361128a565b6040516105009190613afc565b60405180910390f35b34801561051557600080fd5b50610530600480360381019061052b9190613b17565b6112b0565b60405161053d9190613865565b60405180910390f35b34801561055257600080fd5b5061056d60048036038101906105689190613b6a565b6113a9565b005b34801561057b57600080fd5b50610584611423565b6040516105919190613899565b60405180910390f35b3480156105a657600080fd5b506105c160048036038101906105bc9190613b6a565b611447565b6040516105ce9190613afc565b60405180910390f35b3480156105e357600080fd5b506105fe60048036038101906105f99190613b97565b61148f565b60405161060b9190613afc565b60405180910390f35b34801561062057600080fd5b5061063b60048036038101906106369190613b6a565b6114be565b005b34801561064957600080fd5b50610664600480360381019061065f9190613a23565b61156f565b6040516106719190613865565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190613bd7565b6115d9565b6040516106ae9190613a63565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d991906139f6565b611622565b6040516106eb9190613865565b60405180910390f35b34801561070057600080fd5b50610709611642565b6040516107169190613a63565b60405180910390f35b61073960048036038101906107349190613b6a565b611648565b005b34801561074757600080fd5b506107506117d1565b60405161075d9190613899565b60405180910390f35b34801561077257600080fd5b5061077b6117d8565b6040516107889190613865565b60405180910390f35b34801561079d57600080fd5b506107b860048036038101906107b39190613b6a565b6117eb565b005b3480156107c657600080fd5b506107cf611867565b005b3480156107dd57600080fd5b506107f860048036038101906107f391906139f6565b611903565b6040516108059190613a63565b60405180910390f35b34801561081a57600080fd5b50610823611927565b6040516108309190613a63565b60405180910390f35b34801561084557600080fd5b50610860600480360381019061085b9190613bd7565b61192d565b60405161086d9190613a63565b60405180910390f35b34801561088257600080fd5b5061089d60048036038101906108989190613b6a565b611976565b005b6108b960048036038101906108b49190613d4a565b611a9c565b005b3480156108c757600080fd5b506108e260048036038101906108dd9190613a23565b611c46565b005b3480156108f057600080fd5b5061090b60048036038101906109069190613dcd565b611c6f565b6040516109189190613a63565b60405180910390f35b34801561092d57600080fd5b50610936611cb8565b6040516109439190613a63565b60405180910390f35b34801561095857600080fd5b50610973600480360381019061096e9190613b6a565b611cbe565b005b34801561098157600080fd5b5061098a611d38565b6040516109979190613a63565b60405180910390f35b3480156109ac57600080fd5b506109b5611d42565b6040516109c29190613a63565b60405180910390f35b3480156109d757600080fd5b506109f260048036038101906109ed9190613bd7565b611d48565b005b348015610a0057600080fd5b50610a09611dfc565b604051610a169190613865565b60405180910390f35b348015610a2b57600080fd5b50610a466004803603810190610a4191906139f6565b611e0f565b005b348015610a5457600080fd5b50610a5d611e8b565b604051610a6a9190613a63565b60405180910390f35b348015610a7f57600080fd5b50610a88611e91565b604051610a959190613afc565b60405180910390f35b348015610aaa57600080fd5b50610ab3611eb7565b604051610ac09190613a63565b60405180910390f35b600033905090565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b445750610b4382611fcd565b5b9050919050565b60025481565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90613e7d565b60405180910390fd5b6000610bdd611d38565b47610be89190613ecc565b90506000610bff8383610bfa866115d9565b612047565b90506000811415610c45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3c90613f94565b60405180910390fd5b80600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c949190613ecc565b925050819055508060076000828254610cad9190613ecc565b92505081905550610cbe83826120b5565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610cef929190614013565b60405180910390a1505050565b6000610d3330858585604051602001610d18949392919061403c565b604051602081830303815290604052805190602001206121a9565b90509392505050565b6000806000838152602001908152602001600020600101549050919050565b610d6482610d3c565b610d7581610d70610ac9565b6121d9565b610d7f8383612276565b505050565b610db57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610db0610ac9565b61156f565b610df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610deb906140f3565b60405180910390fd5b601260009054906101000a900460ff1615601260006101000a81548160ff021916908315150217905550565b610ebb600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d5abeb016040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610e92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb69190614128565b6122aa565b565b610ec5610ac9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f29906141c7565b60405180910390fd5b610f3c82826123c2565b5050565b6000600654905090565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611053576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104a90613e7d565b60405180910390fd5b600061105e83611c6f565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016110979190613afc565b602060405180830381865afa1580156110b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d89190614128565b6110e29190613ecc565b905060006110fa83836110f58787610f4a565b612047565b90506000811415611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790613f94565b60405180910390fd5b80600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111cc9190613ecc565b9250508190555080600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112229190613ecc565b925050819055506112348484836123f6565b8373ffffffffffffffffffffffffffffffffffffffff167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a848360405161127c929190613788565b60405180910390a250505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006112e37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756112de610ac9565b61156f565b611322576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611319906140f3565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b815260040161135d929190613788565b6020604051808303816000875af115801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a09190614213565b90509392505050565b6113da7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756113d5610ac9565b61156f565b611419576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611410906140f3565b60405180910390fd5b8060118190555050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b6000600a828154811061145d5761145c614240565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006114b6826001600086815260200190815260200160002061247c90919063ffffffff16565b905092915050565b6114ef7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756114ea610ac9565b61156f565b61152e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611525906140f3565b60405180910390fd5b80600f819055507ff382320ca3328eca73b923efa9b8df7bd6ea405d6d4fa855a00db3ee406361c9816040516115649190613a63565b60405180910390a150565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60156020528060005260406000206000915054906101000a900460ff1681565b600f5481565b601260009054906101000a900460ff16611697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168e906142bb565b60405180910390fd5b6116a081612496565b6117ce600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a2309ff86040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611712573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117369190614128565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d5abeb016040518163ffffffff1660e01b81526004016020604051808303816000875af11580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c99190614128565b612914565b50565b6000801b81565b601260019054906101000a900460ff1681565b61181c7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611817610ac9565b61156f565b61185b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611852906140f3565b60405180910390fd5b61186481612943565b50565b6118987fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611893610ac9565b61156f565b6118d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ce906140f3565b60405180910390fd5b601260019054906101000a900460ff1615601260016101000a81548160ff021916908315150217905550565b60006119206001600084815260200190815260200160002061294d565b9050919050565b60035481565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6119a77fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756119a2610ac9565b61156f565b6119e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dd906140f3565b60405180910390fd5b60005b81811015611a9857600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a627842611a37610ac9565b6040518263ffffffff1660e01b8152600401611a539190613afc565b600060405180830381600087803b158015611a6d57600080fd5b505af1158015611a81573d6000803e3d6000fd5b505050508080611a90906142db565b9150506119e9565b5050565b601260019054906101000a900460ff16611aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae290614370565b60405180910390fd5b82841115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590614402565b60405180910390fd5b6000611b67600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611b61338786610cfc565b85612962565b905080611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba09061446e565b60405180910390fd5b6015600083815260200190815260200160002060009054906101000a900460ff1615611c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c01906144da565b60405180910390fd5b60016015600084815260200190815260200160002060006101000a81548160ff021916908315150217905550611c3f85612496565b5050505050565b611c4f82610d3c565b611c6081611c5b610ac9565b6121d9565b611c6a83836123c2565b505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60115481565b611cef7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611cea610ac9565b61156f565b611d2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d25906140f3565b60405180910390fd5b8060108190555050565b6000600754905090565b60045481565b611d797fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611d74610ac9565b61156f565b611db8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611daf906140f3565b60405180910390fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601260009054906101000a900460ff1681565b611e407fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611e3b610ac9565b61156f565b611e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e76906140f3565b60405180910390fd5b611e8881612b47565b50565b60105481565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b611ec7828261156f565b611f9957600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f3e610ac9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611fc5836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612b51565b905092915050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612040575061203f82612bc1565b5b9050919050565b600081600654600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548561209891906144fa565b6120a29190614583565b6120ac91906145b4565b90509392505050565b804710156120f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ef90614634565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161211e90614685565b60006040518083038185875af1925050503d806000811461215b576040519150601f19603f3d011682016040523d82523d6000602084013e612160565b606091505b50509050806121a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219b9061470c565b60405180910390fd5b505050565b6000816040516020016121bc91906147a4565b604051602081830303815290604052805190602001209050919050565b6121e3828261156f565b612272576122088173ffffffffffffffffffffffffffffffffffffffff166014612c2b565b6122168360001c6020612c2b565b6040516020016122279291906148d1565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122699190614944565b60405180910390fd5b5050565b6122808282611ebd565b6122a58160016000858152602001908152602001600020611f9d90919063ffffffff16565b505050565b6000600354146122ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e6906149b2565b60405180910390fd5b60006004541415612335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232c90614a1e565b60405180910390fd5b6001816004544060001c6123499190614a3e565b6123539190613ecc565b60038190555060ff6004544361236991906145b4565b111561239e5760018160014361237f91906145b4565b4060001c61238d9190614a3e565b6123979190613ecc565b6003819055505b600160035414156123bf5760016003546123b89190613ecc565b6003819055505b50565b6123cc8282612e67565b6123f18160016000858152602001908152602001600020612f4890919063ffffffff16565b505050565b6124778363a9059cbb60e01b8484604051602401612415929190613788565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f78565b505050565b600061248b836000018361303f565b60001c905092915050565b600081116124d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124d090614abb565b60405180910390fd5b6000600f54141561251f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251690614b27565b60405180910390fd5b600081600f5461252f91906144fa565b905034811115612574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256b90614bb9565b60405180910390fd5b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a2309ff86040518163ffffffff1660e01b81526004016020604051808303816000875af11580156125e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126099190614128565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d5abeb016040518163ffffffff1660e01b81526004016020604051808303816000875af115801561267a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269e9190614128565b83826126aa9190613ecc565b11156126eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126e290614c4b565b60405180910390fd5b6126fa8360105460115461306a565b60005b838110156127a557600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636a627842336040518263ffffffff1660e01b81526004016127609190613afc565b600060405180830381600087803b15801561277a57600080fd5b505af115801561278e573d6000803e3d6000fd5b50505050808061279d906142db565b9150506126fd565b50600f543373ffffffffffffffffffffffffffffffffffffffff167f5f11830295067c4bcc7d02d4e3b048cd7427be50a3aeb6afc9d3d559ee64bcfa85600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a2309ff86040518163ffffffff1660e01b81526004016020604051808303816000875af1158015612851573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128759190614128565b604051612883929190614c6b565b60405180910390a33482101561290f5761289b610ac9565b73ffffffffffffffffffffffffffffffffffffffff1682346128bd91906145b4565b6040516128c990614685565b60006040518083038185875af1925050503d8060008114612906576040519150601f19603f3d011682016040523d82523d6000602084013e61290b565b606091505b5050505b505050565b600060045414801561293257508082148061293157506005544210155b5b1561293f57436004819055505b5050565b8060058190555050565b600061295b82600001613262565b9050919050565b60008060006129718585613273565b915091506000600481111561298957612988614c94565b5b81600481111561299c5761299b614c94565b5b1480156129d457508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156129e457600192505050612b40565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b8888604051602401612a19929190614d18565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051612a839190614d79565b600060405180830381855afa9150503d8060008114612abe576040519150601f19603f3d011682016040523d82523d6000602084013e612ac3565b606091505b5091509150818015612ad6575060208151145b8015612b395750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681806020019051810190612b189190614da5565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9450505050505b9392505050565b8060028190555050565b6000612b5d83836132f6565b612bb6578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612bbb565b600090505b92915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b606060006002836002612c3e91906144fa565b612c489190613ecc565b67ffffffffffffffff811115612c6157612c60613c1f565b5b6040519080825280601f01601f191660200182016040528015612c935781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612ccb57612cca614240565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612d2f57612d2e614240565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612d6f91906144fa565b612d799190613ecc565b90505b6001811115612e19577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612dbb57612dba614240565b5b1a60f81b828281518110612dd257612dd1614240565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080612e1290614dd2565b9050612d7c565b5060008414612e5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e5490614e48565b60405180910390fd5b8091505092915050565b612e71828261156f565b15612f4457600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612ee9610ac9565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000612f70836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613319565b905092915050565b6000612fda826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661342d9092919063ffffffff16565b905060008151111561303a5780806020019051810190612ffa9190614213565b613039576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161303090614eda565b60405180910390fd5b5b505050565b600082600001828154811061305757613056614240565b5b9060005260206000200154905092915050565b43601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156130ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130e390614f6c565b60405180910390fd5b43601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000821461317c578183111561317b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161317290614ffe565b60405180910390fd5b5b6000811461325d5782601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546131d39190613ecc565b9250508190555080601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561325c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132539061506a565b60405180910390fd5b5b505050565b600081600001805490509050919050565b6000806041835114156132b55760008060006020860151925060408601519150606086015160001a90506132a987828585613445565b945094505050506132ef565b6040835114156132e65760008060208501519150604085015190506132db868383613552565b9350935050506132ef565b60006002915091505b9250929050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461342157600060018261334b91906145b4565b905060006001866000018054905061336391906145b4565b90508181146133d257600086600001828154811061338457613383614240565b5b90600052602060002001549050808760000184815481106133a8576133a7614240565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806133e6576133e561508a565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613427565b60009150505b92915050565b606061343c84846000856135a0565b90509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613480576000600391509150613549565b601b8560ff16141580156134985750601c8560ff1614155b156134aa576000600491509150613549565b6000600187878787604051600081526020016040526040516134cf94939291906150d5565b6020604051602081039080840390855afa1580156134f1573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561354057600060019250925050613549565b80600092509250505b94509492505050565b6000806000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85169150601b8560ff1c01905061359287828885613445565b935093505050935093915050565b6060824710156135e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135dc9061518c565b60405180910390fd5b6135ee856136b4565b61362d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613624906151f8565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516136569190614d79565b60006040518083038185875af1925050503d8060008114613693576040519150601f19603f3d011682016040523d82523d6000602084013e613698565b606091505b50915091506136a88282866136c7565b92505050949350505050565b600080823b905060008111915050919050565b606083156136d757829050613727565b6000835111156136ea5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161371e9190614944565b60405180910390fd5b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137598261372e565b9050919050565b6137698161374e565b82525050565b6000819050919050565b6137828161376f565b82525050565b600060408201905061379d6000830185613760565b6137aa6020830184613779565b9392505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6137fa816137c5565b811461380557600080fd5b50565b600081359050613817816137f1565b92915050565b600060208284031215613833576138326137bb565b5b600061384184828501613808565b91505092915050565b60008115159050919050565b61385f8161384a565b82525050565b600060208201905061387a6000830184613856565b92915050565b6000819050919050565b61389381613880565b82525050565b60006020820190506138ae600083018461388a565b92915050565b60006138bf8261372e565b9050919050565b6138cf816138b4565b81146138da57600080fd5b50565b6000813590506138ec816138c6565b92915050565b600060208284031215613908576139076137bb565b5b6000613916848285016138dd565b91505092915050565b6139288161374e565b811461393357600080fd5b50565b6000813590506139458161391f565b92915050565b6139548161376f565b811461395f57600080fd5b50565b6000813590506139718161394b565b92915050565b61398081613880565b811461398b57600080fd5b50565b60008135905061399d81613977565b92915050565b6000806000606084860312156139bc576139bb6137bb565b5b60006139ca86828701613936565b93505060206139db86828701613962565b92505060406139ec8682870161398e565b9150509250925092565b600060208284031215613a0c57613a0b6137bb565b5b6000613a1a8482850161398e565b91505092915050565b60008060408385031215613a3a57613a396137bb565b5b6000613a488582860161398e565b9250506020613a5985828601613936565b9150509250929050565b6000602082019050613a786000830184613779565b92915050565b6000613a898261374e565b9050919050565b613a9981613a7e565b8114613aa457600080fd5b50565b600081359050613ab681613a90565b92915050565b60008060408385031215613ad357613ad26137bb565b5b6000613ae185828601613aa7565b9250506020613af285828601613936565b9150509250929050565b6000602082019050613b116000830184613760565b92915050565b600080600060608486031215613b3057613b2f6137bb565b5b6000613b3e86828701613936565b9350506020613b4f86828701613936565b9250506040613b6086828701613962565b9150509250925092565b600060208284031215613b8057613b7f6137bb565b5b6000613b8e84828501613962565b91505092915050565b60008060408385031215613bae57613bad6137bb565b5b6000613bbc8582860161398e565b9250506020613bcd85828601613962565b9150509250929050565b600060208284031215613bed57613bec6137bb565b5b6000613bfb84828501613936565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613c5782613c0e565b810181811067ffffffffffffffff82111715613c7657613c75613c1f565b5b80604052505050565b6000613c896137b1565b9050613c958282613c4e565b919050565b600067ffffffffffffffff821115613cb557613cb4613c1f565b5b613cbe82613c0e565b9050602081019050919050565b82818337600083830152505050565b6000613ced613ce884613c9a565b613c7f565b905082815260208101848484011115613d0957613d08613c09565b5b613d14848285613ccb565b509392505050565b600082601f830112613d3157613d30613c04565b5b8135613d41848260208601613cda565b91505092915050565b60008060008060808587031215613d6457613d636137bb565b5b6000613d7287828801613962565b9450506020613d8387828801613962565b935050604085013567ffffffffffffffff811115613da457613da36137c0565b5b613db087828801613d1c565b9250506060613dc18782880161398e565b91505092959194509250565b600060208284031215613de357613de26137bb565b5b6000613df184828501613aa7565b91505092915050565b600082825260208201905092915050565b7f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060008201527f7368617265730000000000000000000000000000000000000000000000000000602082015250565b6000613e67602683613dfa565b9150613e7282613e0b565b604082019050919050565b60006020820190508181036000830152613e9681613e5a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ed78261376f565b9150613ee28361376f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f1757613f16613e9d565b5b828201905092915050565b7f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060008201527f647565207061796d656e74000000000000000000000000000000000000000000602082015250565b6000613f7e602b83613dfa565b9150613f8982613f22565b604082019050919050565b60006020820190508181036000830152613fad81613f71565b9050919050565b6000819050919050565b6000613fd9613fd4613fcf8461372e565b613fb4565b61372e565b9050919050565b6000613feb82613fbe565b9050919050565b6000613ffd82613fe0565b9050919050565b61400d81613ff2565b82525050565b60006040820190506140286000830185614004565b6140356020830184613779565b9392505050565b60006080820190506140516000830187613760565b61405e6020830186613760565b61406b6040830185613779565b614078606083018461388a565b95945050505050565b7f6f6e6c7941646d696e3a2063616c6c6572206973206e6f74207468652061646d60008201527f696e000000000000000000000000000000000000000000000000000000000000602082015250565b60006140dd602283613dfa565b91506140e882614081565b604082019050919050565b6000602082019050818103600083015261410c816140d0565b9050919050565b6000815190506141228161394b565b92915050565b60006020828403121561413e5761413d6137bb565b5b600061414c84828501614113565b91505092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006141b1602f83613dfa565b91506141bc82614155565b604082019050919050565b600060208201905081810360008301526141e0816141a4565b9050919050565b6141f08161384a565b81146141fb57600080fd5b50565b60008151905061420d816141e7565b92915050565b600060208284031215614229576142286137bb565b5b6000614237848285016141fe565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4d696e7465723a2053616c65206973206e6f7420616374697665000000000000600082015250565b60006142a5601a83613dfa565b91506142b08261426f565b602082019050919050565b600060208201905081810360008301526142d481614298565b9050919050565b60006142e68261376f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561431957614318613e9d565b5b600182019050919050565b7f4d696e7465723a207369676e65644d696e74206973206e6f7420616374697665600082015250565b600061435a602083613dfa565b915061436582614324565b602082019050919050565b600060208201905081810360008301526143898161434d565b9050919050565b7f4d696e7465723a206e756d6265724f66546f6b656e732065786365656473206d60008201527f61785065726d6974746564000000000000000000000000000000000000000000602082015250565b60006143ec602b83613dfa565b91506143f782614390565b604082019050919050565b6000602082019050818103600083015261441b816143df565b9050919050565b7f4d696e7465723a20696e76616c6964207369676e617475726500000000000000600082015250565b6000614458601983613dfa565b915061446382614422565b602082019050919050565b600060208201905081810360008301526144878161444b565b9050919050565b7f4d696e7465723a206e6f6e636520616c72656164792075736564000000000000600082015250565b60006144c4601a83613dfa565b91506144cf8261448e565b602082019050919050565b600060208201905081810360008301526144f3816144b7565b9050919050565b60006145058261376f565b91506145108361376f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561454957614548613e9d565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061458e8261376f565b91506145998361376f565b9250826145a9576145a8614554565b5b828204905092915050565b60006145bf8261376f565b91506145ca8361376f565b9250828210156145dd576145dc613e9d565b5b828203905092915050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b600061461e601d83613dfa565b9150614629826145e8565b602082019050919050565b6000602082019050818103600083015261464d81614611565b9050919050565b600081905092915050565b50565b600061466f600083614654565b915061467a8261465f565b600082019050919050565b600061469082614662565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b60006146f6603a83613dfa565b91506147018261469a565b604082019050919050565b60006020820190508181036000830152614725816146e9565b9050919050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b600061476d601c8361472c565b915061477882614737565b601c82019050919050565b6000819050919050565b61479e61479982613880565b614783565b82525050565b60006147af82614760565b91506147bb828461478d565b60208201915081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061480060178361472c565b915061480b826147ca565b601782019050919050565b600081519050919050565b60005b8381101561483f578082015181840152602081019050614824565b8381111561484e576000848401525b50505050565b600061485f82614816565b614869818561472c565b9350614879818560208601614821565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006148bb60118361472c565b91506148c682614885565b601182019050919050565b60006148dc826147f3565b91506148e88285614854565b91506148f3826148ae565b91506148ff8284614854565b91508190509392505050565b600061491682614816565b6149208185613dfa565b9350614930818560208601614821565b61493981613c0e565b840191505092915050565b6000602082019050818103600083015261495e818461490b565b905092915050565b7f5374617274696e6720696e64657820697320616c726561647920736574000000600082015250565b600061499c601d83613dfa565b91506149a782614966565b602082019050919050565b600060208201905081810360008301526149cb8161498f565b9050919050565b7f5374617274696e6720696e64657820626c6f636b206d75737420626520736574600082015250565b6000614a08602083613dfa565b9150614a13826149d2565b602082019050919050565b60006020820190508181036000830152614a37816149fb565b9050919050565b6000614a498261376f565b9150614a548361376f565b925082614a6457614a63614554565b5b828206905092915050565b7f4d696e7465723a206e756d6265724f66546f6b656e7320697320300000000000600082015250565b6000614aa5601b83613dfa565b9150614ab082614a6f565b602082019050919050565b60006020820190508181036000830152614ad481614a98565b9050919050565b7f4d696e7465723a207072696365206e6f74207365740000000000000000000000600082015250565b6000614b11601583613dfa565b9150614b1c82614adb565b602082019050919050565b60006020820190508181036000830152614b4081614b04565b9050919050565b7f4d696e7465723a2053656e742065746865722076616c756520697320696e636f60008201527f7272656374000000000000000000000000000000000000000000000000000000602082015250565b6000614ba3602583613dfa565b9150614bae82614b47565b604082019050919050565b60006020820190508181036000830152614bd281614b96565b9050919050565b7f4d696e7465723a20507572636861736520776f756c6420657863656564206d6160008201527f7820737570706c79000000000000000000000000000000000000000000000000602082015250565b6000614c35602883613dfa565b9150614c4082614bd9565b604082019050919050565b60006020820190508181036000830152614c6481614c28565b9050919050565b6000604082019050614c806000830185613779565b614c8d6020830184613779565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000614cea82614cc3565b614cf48185614cce565b9350614d04818560208601614821565b614d0d81613c0e565b840191505092915050565b6000604082019050614d2d600083018561388a565b8181036020830152614d3f8184614cdf565b90509392505050565b6000614d5382614cc3565b614d5d8185614654565b9350614d6d818560208601614821565b80840191505092915050565b6000614d858284614d48565b915081905092915050565b600081519050614d9f816137f1565b92915050565b600060208284031215614dbb57614dba6137bb565b5b6000614dc984828501614d90565b91505092915050565b6000614ddd8261376f565b91506000821415614df157614df0613e9d565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000614e32602083613dfa565b9150614e3d82614dfc565b602082019050919050565b60006020820190508181036000830152614e6181614e25565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000614ec4602a83613dfa565b9150614ecf82614e68565b604082019050919050565b60006020820190508181036000830152614ef381614eb7565b9050919050565b7f4d696e7465723a2053656e64657220616c7265616479206d696e74656420746860008201527f697320626c6f636b000000000000000000000000000000000000000000000000602082015250565b6000614f56602883613dfa565b9150614f6182614efa565b604082019050919050565b60006020820190508181036000830152614f8581614f49565b9050919050565b7f4d696e7465723a206d6178426c6f636b5075726368617365206578636565646560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614fe8602183613dfa565b9150614ff382614f8c565b604082019050919050565b6000602082019050818103600083015261501781614fdb565b9050919050565b7f4d696e7465723a2053656e6465722072656163686564206d696e74206d617800600082015250565b6000615054601f83613dfa565b915061505f8261501e565b602082019050919050565b6000602082019050818103600083015261508381615047565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060ff82169050919050565b6150cf816150b9565b82525050565b60006080820190506150ea600083018761388a565b6150f760208301866150c6565b615104604083018561388a565b615111606083018461388a565b95945050505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615176602683613dfa565b91506151818261511a565b604082019050919050565b600060208201905081810360008301526151a581615169565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006151e2601d83613dfa565b91506151ed826151ac565b602082019050919050565b60006020820190508181036000830152615211816151d5565b905091905056fea2646970667358221220bdbd9b5e865a1023d0fb01f0fd3c530e8084e8d7da308fed996bf215e2a28d2164736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
GLMR | 100.00% | $0.23587 | 0.15 | $0.035381 |
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.