Contract of The Association NFT's Sales. Submitted by Kleros Curate.
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 21,101 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Retrieve ERC20 | 16802873 | 774 days ago | IN | 0 ETH | 0.00616012 | ||||
Transfer | 15793151 | 915 days ago | IN | 0 ETH | 0.00077059 | ||||
Transfer | 15581001 | 944 days ago | IN | 0.54 ETH | 0.00028866 | ||||
Transfer | 15580998 | 944 days ago | IN | 0.46 ETH | 0.0002854 | ||||
Transfer | 15580997 | 944 days ago | IN | 0.46 ETH | 0.00027231 | ||||
Transfer | 15580997 | 944 days ago | IN | 0.45 ETH | 0.00027231 | ||||
Transfer | 15580996 | 944 days ago | IN | 0.45 ETH | 0.00027526 | ||||
Mint_approved | 15254914 | 996 days ago | IN | 0 ETH | 0.00048054 | ||||
Mint_approved | 15137388 | 1014 days ago | IN | 0 ETH | 0.00078312 | ||||
Transfer | 14900344 | 1054 days ago | IN | 0.05 ETH | 0.00203799 | ||||
Mint_approved | 14865685 | 1060 days ago | IN | 0 ETH | 0.00075056 | ||||
Mint_approved | 14863206 | 1060 days ago | IN | 0 ETH | 0.00084438 | ||||
Mint_approved | 14854301 | 1061 days ago | IN | 0 ETH | 0.00200623 | ||||
Transfer | 14845433 | 1063 days ago | IN | 3.77609199 ETH | 0.0014301 | ||||
Transfer | 14831587 | 1065 days ago | IN | 0.05 ETH | 0.00137456 | ||||
Transfer | 14821122 | 1067 days ago | IN | 0 ETH | 0.00036822 | ||||
Transfer | 14813187 | 1068 days ago | IN | 1 ETH | 0.00139745 | ||||
Transfer | 14794022 | 1071 days ago | IN | 0 ETH | 0.00743804 | ||||
Transfer | 14786827 | 1072 days ago | IN | 0.04 ETH | 0.00286305 | ||||
Mint_approved | 14745354 | 1079 days ago | IN | 0 ETH | 0.00724144 | ||||
Transfer | 14725708 | 1082 days ago | IN | 0.015 ETH | 0.00156001 | ||||
Transfer | 14712386 | 1084 days ago | IN | 0.05 ETH | 0.00303943 | ||||
Transfer | 14711591 | 1084 days ago | IN | 0 ETH | 0.00108743 | ||||
Transfer | 14688889 | 1088 days ago | IN | 0.1 ETH | 0.401776 | ||||
Transfer | 14673894 | 1090 days ago | IN | 0.07 ETH | 0.00323433 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 15581001 | 944 days ago | 0.486 ETH | ||||
Transfer | 15581001 | 944 days ago | 0.054 ETH | ||||
Transfer | 15580998 | 944 days ago | 0.414 ETH | ||||
Transfer | 15580998 | 944 days ago | 0.046 ETH | ||||
Transfer | 15580997 | 944 days ago | 0.414 ETH | ||||
Transfer | 15580997 | 944 days ago | 0.046 ETH | ||||
Transfer | 15580997 | 944 days ago | 0.405 ETH | ||||
Transfer | 15580997 | 944 days ago | 0.045 ETH | ||||
Transfer | 15580996 | 944 days ago | 0.405 ETH | ||||
Transfer | 15580996 | 944 days ago | 0.045 ETH | ||||
- | 14900344 | 1054 days ago | 0.045 ETH | ||||
- | 14900344 | 1054 days ago | 0.005 ETH | ||||
- | 14845433 | 1063 days ago | 3.39848279 ETH | ||||
- | 14845433 | 1063 days ago | 0.37760919 ETH | ||||
- | 14831587 | 1065 days ago | 0.045 ETH | ||||
- | 14831587 | 1065 days ago | 0.005 ETH | ||||
- | 14813187 | 1068 days ago | 0.9 ETH | ||||
- | 14813187 | 1068 days ago | 0.1 ETH | ||||
- | 14786827 | 1072 days ago | 0.036 ETH | ||||
- | 14786827 | 1072 days ago | 0.004 ETH | ||||
- | 14725708 | 1082 days ago | 0.0135 ETH | ||||
- | 14725708 | 1082 days ago | 0.0015 ETH | ||||
- | 14712386 | 1084 days ago | 0.045 ETH | ||||
- | 14712386 | 1084 days ago | 0.005 ETH | ||||
- | 14688889 | 1088 days ago | 0.09 ETH |
Loading...
Loading
Contract Name:
The_Association_Sales
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.7; // SPDX-Licence-Identifier: GPL-3.0-or-later /* kkkkkkkOK0kkOXN0kkOXKkkkkkk0WMMM0kXMMMW0kkkkOXMMMNOdoodkXMWWKxoood0WMMMNOkkkk0NMMMW0doookXMWKkkkKMMN0kkkkONXkkkkkkkOK0kkOXMW0xoooxKWMXkkkOXMKkkONXkxkk ........l:...x0;..,Oo......:XMWX:,0MWMK;.....xMM0:. .,ONx'. .lXNd,......;kWXl. .,kNl...oWM0,....'ko........c:...kXl. .'xNd....dWo..'OKdl;. ;. .':o, .x0' .kl .,,oN0c'.'kNMMk. cWNc ', :x' .:. .xd. .,'. '0d ';. ,0l lWMd. lx;. ':o, .xd. .:. 'Oo ;Xo .kW0ocd Wx. '0WK, .x0' .kl cNWWK; .,kMWo . ,KX; dO;..cl. ;Kd..'dc lKk; .xc oK, .kl lWWc .. :XMx. ,0WK, .xl lX; .xo .xo .kk..lx Mk. '0MK; ok. .kl :KKXO' .dllNX; ', .kX; c00KXNx. .x0KXNXc oXO; .dc oNOxxkKc lWK, ,, '0Mk. ,KMK, .xl lX: .dl cc .kO:;;; Mk. '0MK, .. .kl ..l0: ,;.oO' :l dWo ..,lK0, .':kXc oXO; .d: oMMMMMWc lWO. cc .xMk. ,KMK, .xl lX: .dl . ., .kKo;,, Mk. '0MK, .. .kl .''lX0, .;:xd. ox. cNNxc,'. :X0o;,. .xc oXO; .d: oMMMMMNc lWd dd lWk. ,KMK, .xl lX: .dl .;. .kMWdc: Mk. '0MK, .oO' .kl cXNWWMXo. lNWl .' ,0NXXXXd. 'ONXXXK; c: lXO; .dc oNkooxKc lNc .. ;Xk. ,KMK, .xl lX: .dl .o, .kMWOxo Mk. '0MK, .x0' .kl cXNWMMMWKl;kX; .xo..'kk. ,o;..lKc lc oKk; .xc o0, .kl l0, .Ok. ,KMK, .xl lK; .xo .kl .OWNNXc Mk. '0MK; .x0' .kl ..'lNMMMMWdxO. .dk, ol .' :k' .,. .xo ':,. 'Od .,. ,0l lk. 'xx' dk. ,KMK, .xx. .,. 'Oo .kO. .kKdol. MO,..:KMXc..'kK:..;Od......cXMMMMM0kx,..cXWo...o0o'.....:0Wk;.....'dNKc. 'xNXo'.....;ONo...od'..lNNl...dO,..cXMXc..,kNd'.....,kWd..,ONl...;0WWWNl MNK00KWMWX00KNWK00KWN000000XWMMMMMWWNKK0XWMN000XWWXOxkkKWMMMN0kxkOXWMMN0dllooxKWWMMXOkkk0NMWX000XX000XMMX000XNK00XWMWX00KNMMXOkkk0NMMNK0KNWX000KNMMMWX */ /// @author: galaxis.xyz - The platform for decentralized communities. import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777.sol"; import "./ssp/community_interface.sol"; import "./ssp/sale_configuration.sol"; import "./ssp/recovery.sol"; import "./ssp/IRNG.sol"; import "./ssp/dusty.sol"; import "./ssp/card_with_card.sol"; import "./ssp/token_interface.sol"; struct sale_data { uint256 maxTokens; uint256 mintPosition; address[] wallets; uint16[] shares; uint256 fullPrice; uint256 discountPrice; uint256 presaleStart; uint256 presaleEnd; uint256 saleStart; uint256 saleEnd; uint256 dustPrice; bool areTokensLocked; uint256 maxFreeEC; uint256 totalFreeEC; uint256 maxDiscount; uint256 totalDiscount; uint256 freePerAddress; uint256 discountedPerAddress; string tokenPreRevealURI; address signer; bool presaleIsActive; bool saleIsActive; bool dustMintingActive; uint256 freeClaimedByThisUser; uint256 discountedClaimedByThisUser; address etherCards; address DUST; address ecVault; uint256 maxPerSaleMint; uint256 MaxUserMintable; uint256 userMinted; bool randomReceived; bool secondReceived; uint256 randomCL; uint256 randomCL2; uint256 ts1; uint256 ts; } struct sale_params { uint256 projectID; token_interface token; IERC721 ec; address dust; uint256 maxTokens; uint256 maxDiscount; //<--- max sold in presale across presale dust / eth uint256 maxPerSaleMint; uint256 clientMintLimit; uint256 ecMintLimit; uint256 discountedPerAddress; //<-- should apply to all presale uint256 freeForEC; //<-- for EC card holders uint256 discountPrice; //<-- for EC card holders - if zero not available should have *** dust *** uint256 discountDustPrice; //<-- for EC card holders - if zero not available should have *** dust *** uint256 fullPrice; address signer; uint256 saleStart; uint256 saleEnd; uint256 presaleStart; uint256 presaleEnd; uint256 fullDustPrice; address[] wallets; uint16[] shares; } // check approval limit - start / end of presale contract The_Association_Sales is sale_configuration, Ownable, recovery, ReentrancyGuard, dusty, card_with_card { using SafeMath for uint256; using Strings for uint256; uint256 public immutable projectID; token_interface public _token; uint256 immutable _MaxUserMintable; uint256 _userMinted; uint256 _ts1; uint256 _ts2; address private immutable _DUST; IERC721 private immutable _EC; uint16 public batchNumber; mapping(address => uint256) _freeClaimedPerWallet; mapping(address => uint256) _discountedClaimedPerWallet; event RandomProcessed( uint256 stage, uint256 randUsed_, uint256 _start, uint256 _stop, uint256 _supply ); event batchWhitelistMint(uint16 indexed batchNumber, address receiver); event ETHPresale(address from, uint256 number_of_items, uint256 price); event ETHSale(address buyer, uint256 number_to_buy, uint256 ethAmount); event Allowed(address, bool); modifier onlyAllowed() { require( _token.permitted(msg.sender) || (msg.sender == owner()), "Unauthorised" ); _; } // the constructor takes the bare minimum to conduct a presale and sale. constructor(sale_params memory sp) dusty( sp.dust, sp.signer, sp.fullDustPrice, sp.discountDustPrice, sp.maxPerSaleMint, sp.wallets, sp.shares ) card_with_card(sp.signer) { projectID = sp.projectID; _EC = sp.ec; _token = sp.token; _DUST = sp.dust; _MaxUserMintable = sp.maxTokens - (sp.clientMintLimit + sp.ecMintLimit); _maxSupply = sp.maxTokens; _maxDiscount = sp.maxDiscount; _discountedPerAddress = sp.discountedPerAddress; _discountPrice = sp.discountPrice; _fullPrice = sp.fullPrice; _saleStart = sp.saleStart; _saleEnd = sp.saleEnd; _presaleStart = sp.presaleStart; _presaleEnd = sp.presaleEnd; _maxFreeEC = sp.freeForEC; } function _split(uint256 amount) internal { // console.log("num wallets",wallets.length); bool sent; uint256 _total; for (uint256 j = 0; j < wallets.length; j++) { uint256 _amount = (amount * shares[j]) / 1000; if (j == wallets.length - 1) { _amount = amount - _total; } else { _total += _amount; } (sent, ) = wallets[j].call{value: _amount}(""); // don't use send or xfer (gas) require(sent, "Failed to send Ether"); } } function setup(uint16 _batchNumber) external onlyAllowed { batchNumber = _batchNumber; } function checkDiscountAvailable(address buyer) public view returns ( bool[3] memory, bool, uint256, uint256, uint256 ) { bool _final = false; return ( [false, false, true], _final, // _final, _discountedClaimedPerWallet[buyer], // EC presold[buyer], // Not in use. _token.availableToMint() ); } function mint_approved( vData memory info, uint256 number_of_items_requested, uint16 _batchNumber ) external { require(batchNumber == _batchNumber, "!batch"); address from = msg.sender; require(verify(info), "Unauthorised access secret"); _discountedClaimedPerWallet[msg.sender] += 1; require( _discountedClaimedPerWallet[msg.sender] <= 1, "Number exceeds max discounted per address" ); presold[from] = 1; _mintCards(number_of_items_requested, from); emit batchWhitelistMint(_batchNumber, msg.sender); } // make sure this respects ec_limit and client_limit function mint(uint256 numberOfCards) external { _discountedClaimedPerWallet[msg.sender] += numberOfCards; require( _discountedClaimedPerWallet[msg.sender] <= maxPerSaleMint, "Number exceeds max discounted per address" ); require(checkSaleIsActive(), "sale is not open"); require( numberOfCards <= maxPerSaleMint, "Exceeds max per Transaction Mint" ); _mintPayable(numberOfCards, msg.sender, _fullPrice); } function _mintPayable( uint256 numberOfCards, address recipient, uint256 price ) internal override { _mintCards(numberOfCards, recipient); } function _mintCards(uint256 numberOfCards, address recipient) internal override(dusty, card_with_card) { _userMinted += numberOfCards; require( _userMinted <= _MaxUserMintable, "This exceeds maximum number of user mintable cards" ); _token.mintCards(numberOfCards, recipient); } function _mintDiscountCards(uint256 numberOfCards, address recipient) internal override(dusty, card_with_card) { _totalDiscount += numberOfCards; require( _maxDiscount >= _totalDiscount, "Too many discount tokens claimed" ); _mintCards(numberOfCards, recipient); } function _mintDiscountPayable( uint256 numberOfCards, address recipient, uint256 price ) internal override(card_with_card) { require(msg.value == numberOfCards.mul(price), "wrong amount sent"); _mintDiscountCards(numberOfCards, recipient); // _split(msg.value); } function setSaleDates(uint256 _start, uint256 _end) external onlyAllowed { _saleStart = _start; _saleEnd = _end; } function setPresaleDates(uint256 _start, uint256 _end) external onlyAllowed { _presaleStart = _start; _presaleEnd = _end; } function setMaxPerSaleMint(uint256 _maxPerSaleMint) external onlyOwner { maxPerSaleMint = _maxPerSaleMint; } function checkSaleIsActive() public view override returns (bool) { if ((_saleStart <= block.timestamp) && (_saleEnd >= block.timestamp)) return true; return false; } function checkPresaleIsActive() public view override returns (bool) { if ( (_presaleStart <= block.timestamp) && (_presaleEnd >= block.timestamp) ) return true; return false; } function setWallets( address payable[] memory _wallets, uint16[] memory _shares ) public onlyOwner { require(_wallets.length == _shares.length, "!l"); wallets = _wallets; shares = _shares; } receive() external payable { _split(msg.value); } function tellEverything(address addr) external view returns (sale_data memory) { // if community module active - get the community.taken[msg.sender] token_interface.TKS memory tokenData = _token.tellEverything(); return sale_data( _maxSupply, tokenData._mintPosition, wallets, shares, _fullPrice, _discountPrice, _presaleStart, _presaleEnd, _saleStart, _saleEnd, _dustPrice, tokenData._lockTillSaleEnd, _maxFreeEC, _totalFreeEC, _maxDiscount, _totalDiscount, _freePerAddress, _discountedPerAddress, _token.tokenPreRevealURI(), _signer, checkPresaleIsActive(), checkSaleIsActive(), checkSaleIsActive() && (fullDustPrice > 0 || discountDustPrice > 0), _freeClaimedPerWallet[addr], _discountedClaimedPerWallet[addr], address(_EC), _DUST, _ecVault, maxPerSaleMint, _MaxUserMintable, _userMinted, tokenData._randomReceived, tokenData._secondReceived, tokenData._randomCL, tokenData._randomCL2, tokenData._ts1, tokenData._ts2 ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol) pragma solidity ^0.8.0; /** * @dev Interface of the global ERC1820 Registry, as defined in the * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more * than a single interface for each account. Contracts can implement interfaces * for themselves, but externally-owned accounts (EOA) must delegate this to a * contract. * * {IERC165} interfaces can also be queried via the registry. * * For an in-depth explanation and source code analysis, see the EIP text. */ interface IERC1820Registry { /** * @dev Sets `newManager` as the manager for `account`. A manager of an * account is able to set interface implementers for it. * * By default, each account is its own manager. Passing a value of `0x0` in * `newManager` will reset the manager to this initial state. * * Emits a {ManagerChanged} event. * * Requirements: * * - the caller must be the current manager for `account`. */ function setManager(address account, address newManager) external; /** * @dev Returns the manager for `account`. * * See {setManager}. */ function getManager(address account) external view returns (address); /** * @dev Sets the `implementer` contract as ``account``'s implementer for * `interfaceHash`. * * `account` being the zero address is an alias for the caller's address. * The zero address can also be used in `implementer` to remove an old one. * * See {interfaceHash} to learn how these are created. * * Emits an {InterfaceImplementerSet} event. * * Requirements: * * - the caller must be the current manager for `account`. * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not * end in 28 zeroes). * - `implementer` must implement {IERC1820Implementer} and return true when * queried for support, unless `implementer` is the caller. See * {IERC1820Implementer-canImplementInterfaceForAddress}. */ function setInterfaceImplementer( address account, bytes32 _interfaceHash, address implementer ) external; /** * @dev Returns the implementer of `interfaceHash` for `account`. If no such * implementer is registered, returns the zero address. * * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 * zeroes), `account` will be queried for support of it. * * `account` being the zero address is an alias for the caller's address. */ function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** * @notice Updates the cache with whether the contract implements an ERC165 interface or not. * @param account Address of the contract for which to update the cache. * @param interfaceId ERC165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** * @notice Checks whether a contract implements an ERC165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777Recipient { /** * @dev Called by an {IERC777} token contract whenever tokens are being * moved or created into a registered account (`to`). The type of operation * is conveyed by `from` being the zero address or not. * * This call occurs _after_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the post-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC777Token standard as defined in the EIP. * * This contract uses the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and * {ERC1820Implementer}. */ interface IERC777 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external view returns (string memory); /** * @dev Returns the smallest part of the token that is not divisible. This * means all token operations (creation, movement and destruction) must have * amounts that are a multiple of this number. * * For most token contracts, this value will equal 1. */ function granularity() external view returns (uint256); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by an account (`owner`). */ function balanceOf(address owner) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * If send or receive hooks are registered for the caller and `recipient`, * the corresponding functions will be called with `data` and empty * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - the caller must have at least `amount` tokens. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function send( address recipient, uint256 amount, bytes calldata data ) external; /** * @dev Destroys `amount` tokens from the caller's account, reducing the * total supply. * * If a send hook is registered for the caller, the corresponding function * will be called with `data` and empty `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - the caller must have at least `amount` tokens. */ function burn(uint256 amount, bytes calldata data) external; /** * @dev Returns true if an account is an operator of `tokenHolder`. * Operators can send and burn tokens on behalf of their owners. All * accounts are their own operator. * * See {operatorSend} and {operatorBurn}. */ function isOperatorFor(address operator, address tokenHolder) external view returns (bool); /** * @dev Make an account an operator of the caller. * * See {isOperatorFor}. * * Emits an {AuthorizedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function authorizeOperator(address operator) external; /** * @dev Revoke an account's operator status for the caller. * * See {isOperatorFor} and {defaultOperators}. * * Emits a {RevokedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function revokeOperator(address operator) external; /** * @dev Returns the list of default operators. These accounts are operators * for all token holders, even if {authorizeOperator} was never called on * them. * * This list is immutable, but individual holders may revoke these via * {revokeOperator}, in which case {isOperatorFor} will return false. */ function defaultOperators() external view returns (address[] memory); /** * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must * be an operator of `sender`. * * If send or receive hooks are registered for `sender` and `recipient`, * the corresponding functions will be called with `data` and * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - `sender` cannot be the zero address. * - `sender` must have at least `amount` tokens. * - the caller must be an operator for `sender`. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; /** * @dev Destroys `amount` tokens from `account`, reducing the total supply. * The caller must be an operator of `account`. * * If a send hook is registered for `account`, the corresponding function * will be called with `data` and `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. * - the caller must be an operator for `account`. */ function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); event AuthorizedOperator(address indexed operator, address indexed tokenHolder); event RevokedOperator(address indexed operator, address indexed tokenHolder); }
pragma solidity ^0.8.7; interface community_interface { function community_claimed(address) external view returns (uint256); function communityPurchase( address recipient, uint256 tokenCount, bytes memory signature, uint256 role ) external payable; }
pragma solidity ^0.8.7; contract sale_configuration { uint256 _maxSupply; uint256 _clientMintLimit; uint256 _ecMintLimit; uint256 _fullPrice; uint256 _discountPrice; // obsolete uint256 _communityPrice; // obsolete uint256 _presaleStart; // obsolete uint256 _presaleEnd; // obsolete uint256 _saleStart; uint256 _saleEnd; uint256 _dustPrice; // obsolete uint256 _discountedPerAddress; // obsolete uint256 _totalDiscount; // obsolete uint256 _maxDiscount; // obsolete uint256 _maxPerSaleMint; uint256 _freePerAddress; address _signer; uint256 _maxFreeEC; // obsolete uint256 _totalFreeEC; // obsolete uint256 _ecMintPosition; uint256 _clientMintPosition; address _ecVault; }
pragma solidity ^0.8.7; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract recovery is Ownable { // blackhole prevention methods function retrieveETH() external onlyOwner { (bool sent, ) = payable(msg.sender).call{value: address(this).balance}(""); // don't use send or xfer (gas) require(sent, "Failed to send Ether"); } function retrieveERC20(address _tracker, uint256 amount) external onlyOwner { IERC20(_tracker).transfer(msg.sender, amount); } function retrieve721(address _tracker, uint256 id) external onlyOwner { IERC721(_tracker).transferFrom(address(this), msg.sender, id); } }
pragma solidity ^0.8.7; interface IRNG { function requestRandomNumber() external returns (bytes32); function requestRandomNumberWithCallback() external returns (bytes32); function isRequestComplete(bytes32 requestId) external view returns (bool isCompleted); function randomNumber(bytes32 requestId) external view returns (uint256 randomNum); function setAuth(address user, bool grant) external; }
pragma solidity ^0.8.7; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777.sol"; //import "hardhat/console.sol"; abstract contract dusty is IERC777Recipient, ReentrancyGuard { // struct community_data { // uint256 start; // uint256 end; // uint256 price; // bool isDust; // uint256 max_purchase; // address purchaser; // } address DUST_TOKEN; address signer; address[] wallets; uint16[] shares; uint256 fullDustPrice; uint256 discountDustPrice; uint256 maxPerSaleMint; mapping(address => uint256) presold; bytes32 private constant TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); event DustPresale(address from, uint256 number_of_items, uint256 price); event DustSale(address buyer, uint256 number_to_buy, uint256 dustAmount); constructor( address dust, address _signer, uint256 _fullDustPrice, uint256 _discountDustPrice, uint256 _maxPerSaleMint, address[] memory _wallets, uint16[] memory _shares ) { DUST_TOKEN = dust; _ERC1820_REGISTRY.setInterfaceImplementer( address(this), TOKENS_RECIPIENT_INTERFACE_HASH, address(this) ); wallets = _wallets; shares = _shares; signer = _signer; fullDustPrice = _fullDustPrice; discountDustPrice = _discountDustPrice; maxPerSaleMint = _maxPerSaleMint; } // https://twitter.com/nicksdjohnson/status/1485769228481605639?s=20&t=22PZlf-8awaea2bubNw72A // ``` // bytes4 selector = bytes4(data[:4]); // uint256 id = uint256(bytes32(data[4:36])); // ``` struct vData { bool mint_free; uint256 max_mint; address from; uint256 start; uint256 end; uint256 eth_price; uint256 dust_price; bytes signature; } function checkSaleIsActive() public view virtual returns (bool); function checkPresaleIsActive() public view virtual returns (bool); function tokensReceived( address, address from, address, uint256 amount, bytes calldata userData, bytes calldata ) external override nonReentrant {} function _mintCards(uint256 numberOfCards, address recipient) internal virtual; function _mintDiscountCards(uint256 numberOfCards, address recipient) internal virtual; function verify(vData memory info) public view returns (bool) { require(info.from != address(0), "INVALID_SIGNER"); bytes memory cat = abi.encode( info.from, info.start, info.end, info.eth_price, info.dust_price, info.max_mint, info.mint_free ); // console.log("data-->"); // console.logBytes(cat); bytes32 hash = keccak256(cat); // console.log("hash ->"); // console.logBytes32(hash); require(info.signature.length == 65, "Invalid signature length"); bytes32 sigR; bytes32 sigS; uint8 sigV; bytes memory signature = info.signature; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { sigR := mload(add(signature, 0x20)) sigS := mload(add(signature, 0x40)) sigV := byte(0, mload(add(signature, 0x60))) } bytes32 data = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", hash) ); address recovered = ecrecover(data, sigV, sigR, sigS); return signer == recovered; } }
pragma solidity ^0.8.7; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // import "hardhat/console.sol"; abstract contract card_with_card { struct saleInfo { address token_address; uint256 start; uint256 end; uint256 price; uint256 max_per_user; uint256 total; bool oneForOne; bytes signature; } address cwc_signer; constructor(address _signer) { cwc_signer = _signer; } function _mintCards(uint256 numberOfCards, address recipient) internal virtual; function _mintDiscountCards(uint256 numberOfCards, address recipient) internal virtual; function _mintDiscountPayable( uint256 numberOfCards, address recipient, uint256 price ) internal virtual; function _mintPayable( uint256 numberOfCards, address recipient, uint256 price ) internal virtual; function verify(saleInfo calldata sp) internal view returns (bool) { require(sp.token_address != address(0), "INVALID_TOKEN_ADDRESS"); bytes memory cat = abi.encode( sp.token_address, sp.start, sp.end, sp.price, sp.max_per_user, sp.total, sp.oneForOne ); bytes32 hash = keccak256(cat); require(sp.signature.length == 65, "Invalid signature length"); bytes32 sigR; bytes32 sigS; uint8 sigV; bytes memory signature = sp.signature; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { sigR := mload(add(signature, 0x20)) sigS := mload(add(signature, 0x40)) sigV := byte(0, mload(add(signature, 0x60))) } bytes32 data = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", hash) ); address recovered = ecrecover(data, sigV, sigR, sigS); return cwc_signer == recovered; } }
pragma solidity ^0.8.7; interface token_interface { struct TKS { // Token Kitchen Sink uint256 _mintPosition; uint256 _ts1; uint256 _ts2; bool _randomReceived; bool _secondReceived; uint256 _randomCL; uint256 _randomCL2; bool _lockTillSaleEnd; } function setAllowed(address _addr, bool _state) external; function permitted(address) external view returns (bool); function mintCards(uint256 numberOfCards, address recipient) external; function tellEverything() external view returns (TKS memory); function tokenPreRevealURI() external view returns (string memory); function availableToMint() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/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); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"components":[{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"contract token_interface","name":"token","type":"address"},{"internalType":"contract IERC721","name":"ec","type":"address"},{"internalType":"address","name":"dust","type":"address"},{"internalType":"uint256","name":"maxTokens","type":"uint256"},{"internalType":"uint256","name":"maxDiscount","type":"uint256"},{"internalType":"uint256","name":"maxPerSaleMint","type":"uint256"},{"internalType":"uint256","name":"clientMintLimit","type":"uint256"},{"internalType":"uint256","name":"ecMintLimit","type":"uint256"},{"internalType":"uint256","name":"discountedPerAddress","type":"uint256"},{"internalType":"uint256","name":"freeForEC","type":"uint256"},{"internalType":"uint256","name":"discountPrice","type":"uint256"},{"internalType":"uint256","name":"discountDustPrice","type":"uint256"},{"internalType":"uint256","name":"fullPrice","type":"uint256"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"saleStart","type":"uint256"},{"internalType":"uint256","name":"saleEnd","type":"uint256"},{"internalType":"uint256","name":"presaleStart","type":"uint256"},{"internalType":"uint256","name":"presaleEnd","type":"uint256"},{"internalType":"uint256","name":"fullDustPrice","type":"uint256"},{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint16[]","name":"shares","type":"uint16[]"}],"internalType":"struct sale_params","name":"sp","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Allowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_of_items","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"DustPresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_to_buy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dustAmount","type":"uint256"}],"name":"DustSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_of_items","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"ETHPresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_to_buy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"ETHSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"stage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randUsed_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_stop","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"RandomProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"batchNumber","type":"uint16"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"batchWhitelistMint","type":"event"},{"inputs":[],"name":"_token","outputs":[{"internalType":"contract token_interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchNumber","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"}],"name":"checkDiscountAvailable","outputs":[{"internalType":"bool[3]","name":"","type":"bool[3]"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkPresaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkSaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfCards","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"mint_free","type":"bool"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"eth_price","type":"uint256"},{"internalType":"uint256","name":"dust_price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct dusty.vData","name":"info","type":"tuple"},{"internalType":"uint256","name":"number_of_items_requested","type":"uint256"},{"internalType":"uint16","name":"_batchNumber","type":"uint16"}],"name":"mint_approved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"retrieve721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"retrieveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieveETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerSaleMint","type":"uint256"}],"name":"setMaxPerSaleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"setPresaleDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"setSaleDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"_wallets","type":"address[]"},{"internalType":"uint16[]","name":"_shares","type":"uint16[]"}],"name":"setWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_batchNumber","type":"uint16"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"tellEverything","outputs":[{"components":[{"internalType":"uint256","name":"maxTokens","type":"uint256"},{"internalType":"uint256","name":"mintPosition","type":"uint256"},{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint16[]","name":"shares","type":"uint16[]"},{"internalType":"uint256","name":"fullPrice","type":"uint256"},{"internalType":"uint256","name":"discountPrice","type":"uint256"},{"internalType":"uint256","name":"presaleStart","type":"uint256"},{"internalType":"uint256","name":"presaleEnd","type":"uint256"},{"internalType":"uint256","name":"saleStart","type":"uint256"},{"internalType":"uint256","name":"saleEnd","type":"uint256"},{"internalType":"uint256","name":"dustPrice","type":"uint256"},{"internalType":"bool","name":"areTokensLocked","type":"bool"},{"internalType":"uint256","name":"maxFreeEC","type":"uint256"},{"internalType":"uint256","name":"totalFreeEC","type":"uint256"},{"internalType":"uint256","name":"maxDiscount","type":"uint256"},{"internalType":"uint256","name":"totalDiscount","type":"uint256"},{"internalType":"uint256","name":"freePerAddress","type":"uint256"},{"internalType":"uint256","name":"discountedPerAddress","type":"uint256"},{"internalType":"string","name":"tokenPreRevealURI","type":"string"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"presaleIsActive","type":"bool"},{"internalType":"bool","name":"saleIsActive","type":"bool"},{"internalType":"bool","name":"dustMintingActive","type":"bool"},{"internalType":"uint256","name":"freeClaimedByThisUser","type":"uint256"},{"internalType":"uint256","name":"discountedClaimedByThisUser","type":"uint256"},{"internalType":"address","name":"etherCards","type":"address"},{"internalType":"address","name":"DUST","type":"address"},{"internalType":"address","name":"ecVault","type":"address"},{"internalType":"uint256","name":"maxPerSaleMint","type":"uint256"},{"internalType":"uint256","name":"MaxUserMintable","type":"uint256"},{"internalType":"uint256","name":"userMinted","type":"uint256"},{"internalType":"bool","name":"randomReceived","type":"bool"},{"internalType":"bool","name":"secondReceived","type":"bool"},{"internalType":"uint256","name":"randomCL","type":"uint256"},{"internalType":"uint256","name":"randomCL2","type":"uint256"},{"internalType":"uint256","name":"ts1","type":"uint256"},{"internalType":"uint256","name":"ts","type":"uint256"}],"internalType":"struct sale_data","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"mint_free","type":"bool"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"eth_price","type":"uint256"},{"internalType":"uint256","name":"dust_price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct dusty.vData","name":"info","type":"tuple"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101006040523480156200001257600080fd5b5060405162002fc438038062002fc48339810160408190526200003591620004fb565b806101c001518160600151826101c001518361026001518461018001518560c00151866102800151876102a001516200007d620000776200026160201b60201c565b62000265565b6001601755601880546001600160a01b0319166001600160a01b0389161790556040516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200011757600080fd5b505af11580156200012c573d6000803e3d6000fd5b50508351620001459250601a91506020850190620002b7565b5080516200015b90601b90602084019062000321565b5050601980546001600160a01b03199081166001600160a01b0397881617909155601c9490945550601d91909155601e5560208054821694831694909417845584516080526040850151606090811b6001600160601b031990811660e0908152958701516021805490941694169390931790915580850151901b1660c0525061010082015190820151620001f091906200071a565b816080015162000201919062000735565b60a09081526080820151600055810151600d55610120810151600b556101608101516004556101a08101516003556101e0810151600855610200810151600955610220810151600655610240810151600755610140015160115562000794565b3390565b601680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280548282559060005260206000209081019282156200030f579160200282015b828111156200030f57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002d8565b506200031d929150620003c7565b5090565b82805482825590600052602060002090600f016010900481019282156200030f5791602002820160005b838211156200038d57835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026200034b565b8015620003bd5782816101000a81549061ffff02191690556002016020816001010492830192600103026200038d565b50506200031d9291505b5b808211156200031d5760008155600101620003c8565b8051620003eb816200077b565b919050565b600082601f8301126200040257600080fd5b815160206200041b6200041583620006f4565b620006c1565b80838252828201915082860187848660051b89010111156200043c57600080fd5b60005b858110156200046857815162000455816200077b565b845292840192908401906001016200043f565b5090979650505050505050565b600082601f8301126200048757600080fd5b815160206200049a6200041583620006f4565b80838252828201915082860187848660051b8901011115620004bb57600080fd5b6000805b86811015620004ed57825161ffff81168114620004da578283fd5b85529385019391850191600101620004bf565b509198975050505050505050565b6000602082840312156200050e57600080fd5b81516001600160401b03808211156200052657600080fd5b908301906102c082860312156200053c57600080fd5b6200054662000695565b825181526200055860208401620003de565b60208201526200056b60408401620003de565b60408201526200057e60608401620003de565b60608201526080838101519082015260a0808401519082015260c0808401519082015260e08084015190820152610100808401519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a080840151908201526101c0620005fd818501620003de565b908201526101e08381015190820152610200808401519082015261022080840151908201526102408084015190820152610260808401519082015261028080840151838111156200064d57600080fd5b6200065b88828701620003f0565b8284015250506102a080840151838111156200067657600080fd5b620006848882870162000475565b918301919091525095945050505050565b6040516102c081016001600160401b0381118282101715620006bb57620006bb62000765565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620006ec57620006ec62000765565b604052919050565b60006001600160401b0382111562000710576200071062000765565b5060051b60200190565b600082198211156200073057620007306200074f565b500190565b6000828210156200074a576200074a6200074f565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200079157600080fd5b50565b60805160a05160c05160601c60e05160601c6127e9620007db6000396000610de501526000610e11015260008181610e580152611a4d0152600061031201526127e96000f3fe6080604052600436106101785760003560e01c8063a0712d68116100cb578063dc12abb51161007f578063ea6cdcd211610059578063ea6cdcd21461043a578063ecd0c0c31461045a578063f2fde38b1461047a57600080fd5b8063dc12abb5146103da578063ddf8fa7e146103fa578063e5fa5f311461041a57600080fd5b8063b0c77f35116100b0578063b0c77f3514610382578063ba87306514610397578063d5b014c3146103c557600080fd5b8063a0712d6814610342578063a5b3abfb1461036257600080fd5b806367666d741161012d5780638da5cb5b116101075780638da5cb5b146102ae5780638df9da46146102e05780639c30ea511461030057600080fd5b806367666d74146102475780636f219bd614610274578063715018a61461029957600080fd5b80631efc6b041161015e5780631efc6b04146101cd57806332a8cf9e146101ed5780634ac52ecd1461020d57600080fd5b806223de291461018d57806317fd1e2f146101ad57600080fd5b36610188576101863461049a565b005b600080fd5b34801561019957600080fd5b506101866101a8366004611e91565b61060a565b3480156101b957600080fd5b506101866101c8366004611f42565b61066c565b3480156101d957600080fd5b506101866101e8366004611f6e565b610764565b3480156101f957600080fd5b50610186610208366004612221565b610836565b34801561021957600080fd5b5061022d610228366004611e6d565b610895565b60405161023e959493929190612319565b60405180910390f35b34801561025357600080fd5b50610267610262366004611e6d565b610982565b60405161023e9190612369565b34801561028057600080fd5b50610289610ecb565b604051901515815260200161023e565b3480156102a557600080fd5b50610186610ef2565b3480156102ba57600080fd5b506016546001600160a01b03165b6040516001600160a01b03909116815260200161023e565b3480156102ec57600080fd5b506101866102fb3660046121af565b610f58565b34801561030c57600080fd5b506103347f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161023e565b34801561034e57600080fd5b5061018661035d366004612221565b611102565b34801561036e57600080fd5b5061018661037d366004611f42565b61124f565b34801561038e57600080fd5b5061028961132d565b3480156103a357600080fd5b506025546103b29061ffff1681565b60405161ffff909116815260200161023e565b3480156103d157600080fd5b5061018661134b565b3480156103e657600080fd5b506101866103f5366004612253565b61143d565b34801561040657600080fd5b50610186610415366004612206565b611513565b34801561042657600080fd5b50610186610435366004612253565b6115f6565b34801561044657600080fd5b50610289610455366004612172565b6116cc565b34801561046657600080fd5b506021546102c8906001600160a01b031681565b34801561048657600080fd5b50610186610495366004611e6d565b6118f7565b60008060005b601a548110156106045760006103e8601b83815481106104c2576104c2612764565b600091825260209091206010820401546104ec91600f166002026101000a900461ffff16876126d1565b6104f691906126af565b601a54909150610508906001906126f0565b8214156105205761051983866126f0565b905061052d565b61052a8184612697565b92505b601a828154811061054057610540612764565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d8060008114610594576040519150601f19603f3d011682016040523d82523d6000602084013e610599565b606091505b505080945050836105f15760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064015b60405180910390fd5b50806105fc81612733565b9150506104a0565b50505050565b6002601754141561065d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e8565b50506001601755505050505050565b6016546001600160a01b031633146106c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f9190612037565b505050565b6016546001600160a01b031633146107be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b805182511461080f5760405162461bcd60e51b815260206004820152600260248201527f216c00000000000000000000000000000000000000000000000000000000000060448201526064016105e8565b815161082290601a906020850190611b3c565b50805161075f90601b906020840190611bae565b6016546001600160a01b031633146108905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b601e55565b61089d611c52565b60408051606081018252600080825260208083018290526001838501526001600160a01b0380871683526027825284832054601f83528584205460215487517f74601c3c00000000000000000000000000000000000000000000000000000000815297519597889788978897889792968896909590949316926374601c3c9260048083019392829003018186803b15801561093757600080fd5b505afa15801561094b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096f919061223a565b939b929a50909850965090945092505050565b610ac5604051806104a0016040528060008152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016060815260200160006001600160a01b03168152602001600015158152602001600015158152602001600015158152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600015158152602001600015158152602001600081526020016000815260200160008152602001600081525090565b602154604080517f2f151b7600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632f151b7691600480830192610100929190829003018186803b158015610b2457600080fd5b505afa158015610b38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5c91906120cb565b9050604051806104a00160405280600054815260200182600001518152602001601a805480602002602001604051908101604052809291908181526020018280548015610bd257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bb4575b50505050508152602001601b805480602002602001604051908101604052809291908181526020018280548015610c5057602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610c175790505b50505050508152602001600354815260200160045481526020016006548152602001600754815260200160085481526020016009548152602001600a5481526020018260e001511515815260200160115481526020016012548152602001600d548152602001600c548152602001600f548152602001600b548152602001602160009054906101000a90046001600160a01b03166001600160a01b031663bcc0f7256040518163ffffffff1660e01b815260040160006040518083038186803b158015610d1c57600080fd5b505afa158015610d30573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d589190810190612054565b81526010546001600160a01b03166020820152604001610d7661132d565b15158152602001610d85610ecb565b15158152602001610d94610ecb565b8015610dae57506000601c541180610dae57506000601d54115b151581526001600160a01b0394851660008181526026602090815260408083205482860152928252602781529082902054828401527f000000000000000000000000000000000000000000000000000000000000000087166060808501919091527f0000000000000000000000000000000000000000000000000000000000000000881660808086019190915260155490981660a080860191909152601e5460c0808701919091527f000000000000000000000000000000000000000000000000000000000000000060e08701526022546101008701529187015115156101208601529786015115156101408501529685015161016084015295840151610180830152948301516101a082015291909301516101c0909101525090565b60004260085411158015610ee157504260095410155b15610eec5750600190565b50600090565b6016546001600160a01b03163314610f4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b610f5660006119d2565b565b60255461ffff828116911614610fb05760405162461bcd60e51b815260206004820152600660248201527f216261746368000000000000000000000000000000000000000000000000000060448201526064016105e8565b33610fba846116cc565b6110065760405162461bcd60e51b815260206004820152601a60248201527f556e617574686f7269736564206163636573732073656372657400000000000060448201526064016105e8565b336000908152602760205260408120805460019290611026908490612697565b9091555050336000908152602760205260409020546001101561109d5760405162461bcd60e51b815260206004820152602960248201527f4e756d6265722065786365656473206d617820646973636f756e74656420706560448201526872206164647265737360b81b60648201526084016105e8565b6001600160a01b0381166000908152601f60205260409020600190556110c38382611a31565b60405133815261ffff8316907f01945d29b0ca5ed6c040963fd02660745b70c4ae2e20234793b268045e5f81b69060200160405180910390a250505050565b3360009081526027602052604081208054839290611121908490612697565b9091555050601e543360009081526027602052604090205411156111995760405162461bcd60e51b815260206004820152602960248201527f4e756d6265722065786365656473206d617820646973636f756e74656420706560448201526872206164647265737360b81b60648201526084016105e8565b6111a1610ecb565b6111ed5760405162461bcd60e51b815260206004820152601060248201527f73616c65206973206e6f74206f70656e0000000000000000000000000000000060448201526064016105e8565b601e5481111561123f5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d617820706572205472616e73616374696f6e204d696e7460448201526064016105e8565b61124c8133600354611b32565b50565b6016546001600160a01b031633146112a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd906064015b600060405180830381600087803b15801561131157600080fd5b505af1158015611325573d6000803e3d6000fd5b505050505050565b60004260065411158015610ee157504260075410610eec5750600190565b6016546001600160a01b031633146113a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b604051600090339047908381818185875af1925050503d80600081146113e7576040519150601f19603f3d011682016040523d82523d6000602084013e6113ec565b606091505b505090508061124c5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016105e8565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561148057600080fd5b505afa158015611494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b89190612037565b806114cd57506016546001600160a01b031633145b6115085760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b600691909155600755565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561155657600080fd5b505afa15801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e9190612037565b806115a357506016546001600160a01b031633145b6115de5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b6025805461ffff191661ffff92909216919091179055565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561163957600080fd5b505afa15801561164d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116719190612037565b8061168657506016546001600160a01b031633145b6116c15760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b600891909155600955565b60408101516000906001600160a01b03166117295760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016105e8565b60008260400151836060015184608001518560a001518660c001518760200151886000015160405160200161179c97969594939291906001600160a01b03979097168752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b60408051601f198184030181529190528051602082012060e0850151519192509060411461180c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e677468000000000000000060448201526064016105e8565b60e0840151602080820151604080840151606085015191517f19457468657265756d205369676e6564204d6573736167653a0a33320000000094810194909452603c840186905291939192600091821a929190605c0160408051601f198184030181528282528051602091820120600080855291840180845281905260ff87169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156118cd573d6000803e3d6000fd5b5050604051601f1901516019546001600160a01b039081169116149b9a5050505050505050505050565b6016546001600160a01b031633146119515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6001600160a01b0381166119cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105e8565b61124c815b601680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8160226000828254611a439190612697565b90915550506022547f00000000000000000000000000000000000000000000000000000000000000001015611ae05760405162461bcd60e51b815260206004820152603260248201527f546869732065786365656473206d6178696d756d206e756d626572206f66207560448201527f736572206d696e7461626c65206361726473000000000000000000000000000060648201526084016105e8565b6021546040517f134f3337000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0383811660248301529091169063134f3337906044016112f7565b61075f8383611a31565b828054828255906000526020600020908101928215611b9e579160200282015b82811115611b9e578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611b5c565b50611baa929150611c70565b5090565b82805482825590600052602060002090600f01601090048101928215611b9e5791602002820160005b83821115611c1757835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302611bd7565b8015611c455782816101000a81549061ffff0219169055600201602081600101049283019260010302611c17565b5050611baa929150611c70565b60405180606001604052806003906020820280368337509192915050565b5b80821115611baa5760008155600101611c71565b8035611c9081612790565b919050565b600082601f830112611ca657600080fd5b81356020611cbb611cb68361264b565b61261a565b80838252828201915082860187848660051b8901011115611cdb57600080fd5b60005b85811015611d0157611cef82611e5b565b84529284019290840190600101611cde565b5090979650505050505050565b8035611c90816127a5565b8051611c90816127a5565b60008083601f840112611d3657600080fd5b50813567ffffffffffffffff811115611d4e57600080fd5b602083019150836020828501011115611d6657600080fd5b9250929050565b600082601f830112611d7e57600080fd5b8135611d8c611cb68261266f565b818152846020838601011115611da157600080fd5b816020850160208301376000918101602001919091529392505050565b60006101008284031215611dd157600080fd5b611dd96125f0565b9050611de482611d0e565b815260208201356020820152611dfc60408301611c85565b6040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013567ffffffffffffffff811115611e4357600080fd5b611e4f84828501611d6d565b60e08301525092915050565b803561ffff81168114611c9057600080fd5b600060208284031215611e7f57600080fd5b8135611e8a81612790565b9392505050565b60008060008060008060008060c0898b031215611ead57600080fd5b8835611eb881612790565b97506020890135611ec881612790565b96506040890135611ed881612790565b955060608901359450608089013567ffffffffffffffff80821115611efc57600080fd5b611f088c838d01611d24565b909650945060a08b0135915080821115611f2157600080fd5b50611f2e8b828c01611d24565b999c989b5096995094979396929594505050565b60008060408385031215611f5557600080fd5b8235611f6081612790565b946020939093013593505050565b60008060408385031215611f8157600080fd5b823567ffffffffffffffff80821115611f9957600080fd5b818501915085601f830112611fad57600080fd5b81356020611fbd611cb68361264b565b8083825282820191508286018a848660051b8901011115611fdd57600080fd5b600096505b84871015612009578035611ff581612790565b835260019690960195918301918301611fe2565b509650508601359250508082111561202057600080fd5b5061202d85828601611c95565b9150509250929050565b60006020828403121561204957600080fd5b8151611e8a816127a5565b60006020828403121561206657600080fd5b815167ffffffffffffffff81111561207d57600080fd5b8201601f8101841361208e57600080fd5b805161209c611cb68261266f565b8181528560208385010111156120b157600080fd5b6120c2826020830160208601612707565b95945050505050565b60006101008083850312156120df57600080fd5b6040519081019067ffffffffffffffff821181831017156121025761210261277a565b816040528351815260208401516020820152604084015160408201526060840151915061212e826127a5565b81606082015261214060808501611d19565b608082015260a084015160a082015260c084015160c082015261216560e08501611d19565b60e0820152949350505050565b60006020828403121561218457600080fd5b813567ffffffffffffffff81111561219b57600080fd5b6121a784828501611dbe565b949350505050565b6000806000606084860312156121c457600080fd5b833567ffffffffffffffff8111156121db57600080fd5b6121e786828701611dbe565b935050602084013591506121fd60408501611e5b565b90509250925092565b60006020828403121561221857600080fd5b611e8a82611e5b565b60006020828403121561223357600080fd5b5035919050565b60006020828403121561224c57600080fd5b5051919050565b6000806040838503121561226657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156122ae5781516001600160a01b031687529582019590820190600101612289565b509495945050505050565b600081518084526020808501945080840160005b838110156122ae57815161ffff16875295820195908201906001016122cd565b60008151808452612305816020860160208601612707565b601f01601f19169290920160200192915050565b60e08101818760005b60038110156123435781511515835260209283019290910190600101612322565b5050509415156060820152608081019390935260a083019190915260c090910152919050565b602081528151602082015260208201516040820152600060408301516104a080606085015261239c6104c0850183612275565b91506060850151601f19808685030160808701526123ba84836122b9565b9350608087015160a087015260a087015160c087015260c087015160e087015260e0870151915061010082818801528088015192505061012082818801528088015192505061014082818801528088015192505061016082818801528088015192505061018061242d8188018415159052565b8701516101a0878101919091528701516101c0808801919091528701516101e08088019190915287015161020080880191909152870151610220808801919091528701516102408088019190915287015186850382016102608089019190915290925061249a85846122ed565b945080880151925050506102806124bb818701836001600160a01b03169052565b86015190506102a06124d08682018315159052565b86015190506102c06124e58682018315159052565b86015190506102e06124fa8682018315159052565b86015161030086810191909152860151610320808701919091528601519050610340612530818701836001600160a01b03169052565b860151905061036061254c868201836001600160a01b03169052565b8601519050610380612568868201836001600160a01b03169052565b8601516103a0868101919091528601516103c0808701919091528601516103e08087019190915286015190506104006125a48187018315159052565b86015190506104206125b98682018315159052565b8601516104408681019190915286015161046080870191909152860151610480808701919091529095015193019290925250919050565b604051610100810167ffffffffffffffff811182821017156126145761261461277a565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156126435761264361277a565b604052919050565b600067ffffffffffffffff8211156126655761266561277a565b5060051b60200190565b600067ffffffffffffffff8211156126895761268961277a565b50601f01601f191660200190565b600082198211156126aa576126aa61274e565b500190565b6000826126cc57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156126eb576126eb61274e565b500290565b6000828210156127025761270261274e565b500390565b60005b8381101561272257818101518382015260200161270a565b838111156106045750506000910152565b60006000198214156127475761274761274e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461124c57600080fd5b801515811461124c57600080fdfea26469706673582212204cfce9af8b3a2980893c993a573042fd148a63ed8a0e6c859b46346958b9eac364736f6c63430008070033000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000009b8b9c7c02be0bd0aa4d669bf6a1f6003424c6dc0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab350000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab3500000000000000000000000000000000000000000000000000000000000046500000000000000000000000000000000000000000000000000000000000004088000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004d800000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010a741a462780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010a741a46278000000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000000000000000000000000000000000014b230ce3000000000000000000000000000000000000000000000000000000014b230ce30000000000000000000000000000000000000000000000000000000062602e000000000000000000000000000000000000000000000000000000000062617f80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000384
Deployed Bytecode
0x6080604052600436106101785760003560e01c8063a0712d68116100cb578063dc12abb51161007f578063ea6cdcd211610059578063ea6cdcd21461043a578063ecd0c0c31461045a578063f2fde38b1461047a57600080fd5b8063dc12abb5146103da578063ddf8fa7e146103fa578063e5fa5f311461041a57600080fd5b8063b0c77f35116100b0578063b0c77f3514610382578063ba87306514610397578063d5b014c3146103c557600080fd5b8063a0712d6814610342578063a5b3abfb1461036257600080fd5b806367666d741161012d5780638da5cb5b116101075780638da5cb5b146102ae5780638df9da46146102e05780639c30ea511461030057600080fd5b806367666d74146102475780636f219bd614610274578063715018a61461029957600080fd5b80631efc6b041161015e5780631efc6b04146101cd57806332a8cf9e146101ed5780634ac52ecd1461020d57600080fd5b806223de291461018d57806317fd1e2f146101ad57600080fd5b36610188576101863461049a565b005b600080fd5b34801561019957600080fd5b506101866101a8366004611e91565b61060a565b3480156101b957600080fd5b506101866101c8366004611f42565b61066c565b3480156101d957600080fd5b506101866101e8366004611f6e565b610764565b3480156101f957600080fd5b50610186610208366004612221565b610836565b34801561021957600080fd5b5061022d610228366004611e6d565b610895565b60405161023e959493929190612319565b60405180910390f35b34801561025357600080fd5b50610267610262366004611e6d565b610982565b60405161023e9190612369565b34801561028057600080fd5b50610289610ecb565b604051901515815260200161023e565b3480156102a557600080fd5b50610186610ef2565b3480156102ba57600080fd5b506016546001600160a01b03165b6040516001600160a01b03909116815260200161023e565b3480156102ec57600080fd5b506101866102fb3660046121af565b610f58565b34801561030c57600080fd5b506103347f000000000000000000000000000000000000000000000000000000000000000481565b60405190815260200161023e565b34801561034e57600080fd5b5061018661035d366004612221565b611102565b34801561036e57600080fd5b5061018661037d366004611f42565b61124f565b34801561038e57600080fd5b5061028961132d565b3480156103a357600080fd5b506025546103b29061ffff1681565b60405161ffff909116815260200161023e565b3480156103d157600080fd5b5061018661134b565b3480156103e657600080fd5b506101866103f5366004612253565b61143d565b34801561040657600080fd5b50610186610415366004612206565b611513565b34801561042657600080fd5b50610186610435366004612253565b6115f6565b34801561044657600080fd5b50610289610455366004612172565b6116cc565b34801561046657600080fd5b506021546102c8906001600160a01b031681565b34801561048657600080fd5b50610186610495366004611e6d565b6118f7565b60008060005b601a548110156106045760006103e8601b83815481106104c2576104c2612764565b600091825260209091206010820401546104ec91600f166002026101000a900461ffff16876126d1565b6104f691906126af565b601a54909150610508906001906126f0565b8214156105205761051983866126f0565b905061052d565b61052a8184612697565b92505b601a828154811061054057610540612764565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d8060008114610594576040519150601f19603f3d011682016040523d82523d6000602084013e610599565b606091505b505080945050836105f15760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064015b60405180910390fd5b50806105fc81612733565b9150506104a0565b50505050565b6002601754141561065d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105e8565b50506001601755505050505050565b6016546001600160a01b031633146106c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f9190612037565b505050565b6016546001600160a01b031633146107be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b805182511461080f5760405162461bcd60e51b815260206004820152600260248201527f216c00000000000000000000000000000000000000000000000000000000000060448201526064016105e8565b815161082290601a906020850190611b3c565b50805161075f90601b906020840190611bae565b6016546001600160a01b031633146108905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b601e55565b61089d611c52565b60408051606081018252600080825260208083018290526001838501526001600160a01b0380871683526027825284832054601f83528584205460215487517f74601c3c00000000000000000000000000000000000000000000000000000000815297519597889788978897889792968896909590949316926374601c3c9260048083019392829003018186803b15801561093757600080fd5b505afa15801561094b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096f919061223a565b939b929a50909850965090945092505050565b610ac5604051806104a0016040528060008152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016060815260200160006001600160a01b03168152602001600015158152602001600015158152602001600015158152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600015158152602001600015158152602001600081526020016000815260200160008152602001600081525090565b602154604080517f2f151b7600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632f151b7691600480830192610100929190829003018186803b158015610b2457600080fd5b505afa158015610b38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5c91906120cb565b9050604051806104a00160405280600054815260200182600001518152602001601a805480602002602001604051908101604052809291908181526020018280548015610bd257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bb4575b50505050508152602001601b805480602002602001604051908101604052809291908181526020018280548015610c5057602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610c175790505b50505050508152602001600354815260200160045481526020016006548152602001600754815260200160085481526020016009548152602001600a5481526020018260e001511515815260200160115481526020016012548152602001600d548152602001600c548152602001600f548152602001600b548152602001602160009054906101000a90046001600160a01b03166001600160a01b031663bcc0f7256040518163ffffffff1660e01b815260040160006040518083038186803b158015610d1c57600080fd5b505afa158015610d30573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610d589190810190612054565b81526010546001600160a01b03166020820152604001610d7661132d565b15158152602001610d85610ecb565b15158152602001610d94610ecb565b8015610dae57506000601c541180610dae57506000601d54115b151581526001600160a01b0394851660008181526026602090815260408083205482860152928252602781529082902054828401527f0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab3587166060808501919091527f0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab35881660808086019190915260155490981660a080860191909152601e5460c0808701919091527f000000000000000000000000000000000000000000000000000000000000408860e08701526022546101008701529187015115156101208601529786015115156101408501529685015161016084015295840151610180830152948301516101a082015291909301516101c0909101525090565b60004260085411158015610ee157504260095410155b15610eec5750600190565b50600090565b6016546001600160a01b03163314610f4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b610f5660006119d2565b565b60255461ffff828116911614610fb05760405162461bcd60e51b815260206004820152600660248201527f216261746368000000000000000000000000000000000000000000000000000060448201526064016105e8565b33610fba846116cc565b6110065760405162461bcd60e51b815260206004820152601a60248201527f556e617574686f7269736564206163636573732073656372657400000000000060448201526064016105e8565b336000908152602760205260408120805460019290611026908490612697565b9091555050336000908152602760205260409020546001101561109d5760405162461bcd60e51b815260206004820152602960248201527f4e756d6265722065786365656473206d617820646973636f756e74656420706560448201526872206164647265737360b81b60648201526084016105e8565b6001600160a01b0381166000908152601f60205260409020600190556110c38382611a31565b60405133815261ffff8316907f01945d29b0ca5ed6c040963fd02660745b70c4ae2e20234793b268045e5f81b69060200160405180910390a250505050565b3360009081526027602052604081208054839290611121908490612697565b9091555050601e543360009081526027602052604090205411156111995760405162461bcd60e51b815260206004820152602960248201527f4e756d6265722065786365656473206d617820646973636f756e74656420706560448201526872206164647265737360b81b60648201526084016105e8565b6111a1610ecb565b6111ed5760405162461bcd60e51b815260206004820152601060248201527f73616c65206973206e6f74206f70656e0000000000000000000000000000000060448201526064016105e8565b601e5481111561123f5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d617820706572205472616e73616374696f6e204d696e7460448201526064016105e8565b61124c8133600354611b32565b50565b6016546001600160a01b031633146112a95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd906064015b600060405180830381600087803b15801561131157600080fd5b505af1158015611325573d6000803e3d6000fd5b505050505050565b60004260065411158015610ee157504260075410610eec5750600190565b6016546001600160a01b031633146113a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b604051600090339047908381818185875af1925050503d80600081146113e7576040519150601f19603f3d011682016040523d82523d6000602084013e6113ec565b606091505b505090508061124c5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064016105e8565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561148057600080fd5b505afa158015611494573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b89190612037565b806114cd57506016546001600160a01b031633145b6115085760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b600691909155600755565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561155657600080fd5b505afa15801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e9190612037565b806115a357506016546001600160a01b031633145b6115de5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b6025805461ffff191661ffff92909216919091179055565b602154604051636cc301e360e01b81523360048201526001600160a01b0390911690636cc301e39060240160206040518083038186803b15801561163957600080fd5b505afa15801561164d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116719190612037565b8061168657506016546001600160a01b031633145b6116c15760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b60448201526064016105e8565b600891909155600955565b60408101516000906001600160a01b03166117295760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016105e8565b60008260400151836060015184608001518560a001518660c001518760200151886000015160405160200161179c97969594939291906001600160a01b03979097168752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b60408051601f198184030181529190528051602082012060e0850151519192509060411461180c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e677468000000000000000060448201526064016105e8565b60e0840151602080820151604080840151606085015191517f19457468657265756d205369676e6564204d6573736167653a0a33320000000094810194909452603c840186905291939192600091821a929190605c0160408051601f198184030181528282528051602091820120600080855291840180845281905260ff87169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156118cd573d6000803e3d6000fd5b5050604051601f1901516019546001600160a01b039081169116149b9a5050505050505050505050565b6016546001600160a01b031633146119515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e8565b6001600160a01b0381166119cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105e8565b61124c815b601680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8160226000828254611a439190612697565b90915550506022547f00000000000000000000000000000000000000000000000000000000000040881015611ae05760405162461bcd60e51b815260206004820152603260248201527f546869732065786365656473206d6178696d756d206e756d626572206f66207560448201527f736572206d696e7461626c65206361726473000000000000000000000000000060648201526084016105e8565b6021546040517f134f3337000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0383811660248301529091169063134f3337906044016112f7565b61075f8383611a31565b828054828255906000526020600020908101928215611b9e579160200282015b82811115611b9e578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611b5c565b50611baa929150611c70565b5090565b82805482825590600052602060002090600f01601090048101928215611b9e5791602002820160005b83821115611c1757835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302611bd7565b8015611c455782816101000a81549061ffff0219169055600201602081600101049283019260010302611c17565b5050611baa929150611c70565b60405180606001604052806003906020820280368337509192915050565b5b80821115611baa5760008155600101611c71565b8035611c9081612790565b919050565b600082601f830112611ca657600080fd5b81356020611cbb611cb68361264b565b61261a565b80838252828201915082860187848660051b8901011115611cdb57600080fd5b60005b85811015611d0157611cef82611e5b565b84529284019290840190600101611cde565b5090979650505050505050565b8035611c90816127a5565b8051611c90816127a5565b60008083601f840112611d3657600080fd5b50813567ffffffffffffffff811115611d4e57600080fd5b602083019150836020828501011115611d6657600080fd5b9250929050565b600082601f830112611d7e57600080fd5b8135611d8c611cb68261266f565b818152846020838601011115611da157600080fd5b816020850160208301376000918101602001919091529392505050565b60006101008284031215611dd157600080fd5b611dd96125f0565b9050611de482611d0e565b815260208201356020820152611dfc60408301611c85565b6040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013567ffffffffffffffff811115611e4357600080fd5b611e4f84828501611d6d565b60e08301525092915050565b803561ffff81168114611c9057600080fd5b600060208284031215611e7f57600080fd5b8135611e8a81612790565b9392505050565b60008060008060008060008060c0898b031215611ead57600080fd5b8835611eb881612790565b97506020890135611ec881612790565b96506040890135611ed881612790565b955060608901359450608089013567ffffffffffffffff80821115611efc57600080fd5b611f088c838d01611d24565b909650945060a08b0135915080821115611f2157600080fd5b50611f2e8b828c01611d24565b999c989b5096995094979396929594505050565b60008060408385031215611f5557600080fd5b8235611f6081612790565b946020939093013593505050565b60008060408385031215611f8157600080fd5b823567ffffffffffffffff80821115611f9957600080fd5b818501915085601f830112611fad57600080fd5b81356020611fbd611cb68361264b565b8083825282820191508286018a848660051b8901011115611fdd57600080fd5b600096505b84871015612009578035611ff581612790565b835260019690960195918301918301611fe2565b509650508601359250508082111561202057600080fd5b5061202d85828601611c95565b9150509250929050565b60006020828403121561204957600080fd5b8151611e8a816127a5565b60006020828403121561206657600080fd5b815167ffffffffffffffff81111561207d57600080fd5b8201601f8101841361208e57600080fd5b805161209c611cb68261266f565b8181528560208385010111156120b157600080fd5b6120c2826020830160208601612707565b95945050505050565b60006101008083850312156120df57600080fd5b6040519081019067ffffffffffffffff821181831017156121025761210261277a565b816040528351815260208401516020820152604084015160408201526060840151915061212e826127a5565b81606082015261214060808501611d19565b608082015260a084015160a082015260c084015160c082015261216560e08501611d19565b60e0820152949350505050565b60006020828403121561218457600080fd5b813567ffffffffffffffff81111561219b57600080fd5b6121a784828501611dbe565b949350505050565b6000806000606084860312156121c457600080fd5b833567ffffffffffffffff8111156121db57600080fd5b6121e786828701611dbe565b935050602084013591506121fd60408501611e5b565b90509250925092565b60006020828403121561221857600080fd5b611e8a82611e5b565b60006020828403121561223357600080fd5b5035919050565b60006020828403121561224c57600080fd5b5051919050565b6000806040838503121561226657600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156122ae5781516001600160a01b031687529582019590820190600101612289565b509495945050505050565b600081518084526020808501945080840160005b838110156122ae57815161ffff16875295820195908201906001016122cd565b60008151808452612305816020860160208601612707565b601f01601f19169290920160200192915050565b60e08101818760005b60038110156123435781511515835260209283019290910190600101612322565b5050509415156060820152608081019390935260a083019190915260c090910152919050565b602081528151602082015260208201516040820152600060408301516104a080606085015261239c6104c0850183612275565b91506060850151601f19808685030160808701526123ba84836122b9565b9350608087015160a087015260a087015160c087015260c087015160e087015260e0870151915061010082818801528088015192505061012082818801528088015192505061014082818801528088015192505061016082818801528088015192505061018061242d8188018415159052565b8701516101a0878101919091528701516101c0808801919091528701516101e08088019190915287015161020080880191909152870151610220808801919091528701516102408088019190915287015186850382016102608089019190915290925061249a85846122ed565b945080880151925050506102806124bb818701836001600160a01b03169052565b86015190506102a06124d08682018315159052565b86015190506102c06124e58682018315159052565b86015190506102e06124fa8682018315159052565b86015161030086810191909152860151610320808701919091528601519050610340612530818701836001600160a01b03169052565b860151905061036061254c868201836001600160a01b03169052565b8601519050610380612568868201836001600160a01b03169052565b8601516103a0868101919091528601516103c0808701919091528601516103e08087019190915286015190506104006125a48187018315159052565b86015190506104206125b98682018315159052565b8601516104408681019190915286015161046080870191909152860151610480808701919091529095015193019290925250919050565b604051610100810167ffffffffffffffff811182821017156126145761261461277a565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156126435761264361277a565b604052919050565b600067ffffffffffffffff8211156126655761266561277a565b5060051b60200190565b600067ffffffffffffffff8211156126895761268961277a565b50601f01601f191660200190565b600082198211156126aa576126aa61274e565b500190565b6000826126cc57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156126eb576126eb61274e565b500290565b6000828210156127025761270261274e565b500390565b60005b8381101561272257818101518382015260200161270a565b838111156106045750506000910152565b60006000198214156127475761274761274e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461124c57600080fd5b801515811461124c57600080fdfea26469706673582212204cfce9af8b3a2980893c993a573042fd148a63ed8a0e6c859b46346958b9eac364736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000009b8b9c7c02be0bd0aa4d669bf6a1f6003424c6dc0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab350000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab3500000000000000000000000000000000000000000000000000000000000046500000000000000000000000000000000000000000000000000000000000004088000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004d800000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010a741a462780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010a741a46278000000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000000000000000000000000000000000014b230ce3000000000000000000000000000000000000000000000000000000014b230ce30000000000000000000000000000000000000000000000000000000062602e000000000000000000000000000000000000000000000000000000000062617f80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000384
-----Decoded View---------------
Arg [0] : sp (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [2] : 0000000000000000000000009b8b9c7c02be0bd0aa4d669bf6a1f6003424c6dc
Arg [3] : 0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab35
Arg [4] : 0000000000000000000000008598b4d577824bdd04a42404ac2dfcfd8b0dab35
Arg [5] : 0000000000000000000000000000000000000000000000000000000000004650
Arg [6] : 0000000000000000000000000000000000000000000000000000000000004088
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 00000000000000000000000000000000000000000000000000000000000004d8
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000f0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000010a741a46278000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 000000000000000000000000000000000000000000000000010a741a46278000
Arg [15] : 000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7
Arg [16] : 000000000000000000000000000000000000000000000000000000014b230ce3
Arg [17] : 000000000000000000000000000000000000000000000000000000014b230ce3
Arg [18] : 0000000000000000000000000000000000000000000000000000000062602e00
Arg [19] : 0000000000000000000000000000000000000000000000000000000062617f80
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000320
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [24] : 000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7
Arg [25] : 000000000000000000000000669f499e7ba51836bb76f7dd2bc3c1a37a5342d7
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000384
Loading...
Loading
Loading...
Loading
OVERVIEW
Contract of The Association NFT's SalesMultichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.220206 | 0.1 | $0.022021 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.