Address Contract Partially Verified
Address
0x5f000496058985d984bD16C1c7b56804EE17771d
Balance
0 ETH
Nonce
1
Code Size
16186 bytes
Creator
0x9DE3A105...dFD0 at tx 0x0b0c7368...3fcd3f
Indexed Transactions
0
Contract Bytecode
16186 bytes
0x60806040526004361061027d5760003560e01c80636c0360eb1161014f578063b88d4fde116100c1578063dc33e6811161007a578063dc33e6811461096a578063e1cf8baa146109a7578063e268e4d3146109d0578063e985e9c5146109f9578063f2c4ce1e14610a36578063f2fde38b14610a5f5761027d565b8063b88d4fde1461085a578063bd7a199814610883578063c6682862146108ae578063c87b56dd146108d9578063d5abeb0114610916578063da3ef23f146109415761027d565b8063940cd05b11610113578063940cd05b1461075957806395d89b41146107825780639c70b512146107ad578063a0712d68146107d8578063a22cb465146107f4578063a7cd52cb1461081d5761027d565b80636c0360eb1461067257806370a082311461069d578063715018a6146106da5780638462151c146106f15780638da5cb5b1461072e5761027d565b8063351de26e116101f357806350839bef116101ac57806350839bef14610560578063518302271461058b57806355f804b3146105b65780635c975abb146105df578063624208ae1461060a5780636352211e146106355761027d565b8063351de26e146104755780633af32abf1461049e5780633c952764146104db5780633ccfd60b1461050457806342842e0e1461050e57806344a0d68a146105375761027d565b8063095ea7b311610245578063095ea7b31461037b5780630fbe4fe2146103a457806313faede6146103cd578063149835a0146103f857806318160ddd1461042157806323b872dd1461044c5761027d565b806301ffc9a71461028257806302329a29146102bf57806306fdde03146102e8578063081812fc14610313578063081c8c4414610350575b600080fd5b34801561028e57600080fd5b506102a960048036038101906102a491906130ec565b610a88565b6040516102b69190613603565b60405180910390f35b3480156102cb57600080fd5b506102e660048036038101906102e191906130bf565b610b1a565b005b3480156102f457600080fd5b506102fd610b3f565b60405161030a919061361e565b60405180910390f35b34801561031f57600080fd5b5061033a6004803603810190610335919061318f565b610bd1565b604051610347919061357a565b60405180910390f35b34801561035c57600080fd5b50610365610c50565b604051610372919061361e565b60405180910390f35b34801561038757600080fd5b506103a2600480360381019061039d919061307f565b610cde565b005b3480156103b057600080fd5b506103cb60048036038101906103c6919061318f565b610e22565b005b3480156103d957600080fd5b506103e2610fd7565b6040516103ef91906137a0565b60405180910390f35b34801561040457600080fd5b5061041f600480360381019061041a919061318f565b610fdd565b005b34801561042d57600080fd5b50610436610fef565b60405161044391906137a0565b60405180910390f35b34801561045857600080fd5b50610473600480360381019061046e9190612f69565b611006565b005b34801561048157600080fd5b5061049c6004803603810190610497919061318f565b61132b565b005b3480156104aa57600080fd5b506104c560048036038101906104c09190612efc565b61133d565b6040516104d291906137a0565b60405180910390f35b3480156104e757600080fd5b5061050260048036038101906104fd91906130bf565b611386565b005b61050c6113ab565b005b34801561051a57600080fd5b5061053560048036038101906105309190612f69565b6114d6565b005b34801561054357600080fd5b5061055e6004803603810190610559919061318f565b6114f6565b005b34801561056c57600080fd5b50610575611508565b60405161058291906137a0565b60405180910390f35b34801561059757600080fd5b506105a061150e565b6040516105ad9190613603565b60405180910390f35b3480156105c257600080fd5b506105dd60048036038101906105d89190613146565b611521565b005b3480156105eb57600080fd5b506105f4611543565b6040516106019190613603565b60405180910390f35b34801561061657600080fd5b5061061f611556565b60405161062c91906137a0565b60405180910390f35b34801561064157600080fd5b5061065c6004803603810190610657919061318f565b61155c565b604051610669919061357a565b60405180910390f35b34801561067e57600080fd5b5061068761156e565b604051610694919061361e565b60405180910390f35b3480156106a957600080fd5b506106c460048036038101906106bf9190612efc565b6115fc565b6040516106d191906137a0565b60405180910390f35b3480156106e657600080fd5b506106ef6116b5565b005b3480156106fd57600080fd5b5061071860048036038101906107139190612efc565b6116c9565b60405161072591906135e1565b60405180910390f35b34801561073a57600080fd5b50610743611813565b604051610750919061357a565b60405180910390f35b34801561076557600080fd5b50610780600480360381019061077b91906130bf565b61183d565b005b34801561078e57600080fd5b50610797611862565b6040516107a4919061361e565b60405180910390f35b3480156107b957600080fd5b506107c26118f4565b6040516107cf9190613603565b60405180910390f35b6107f260048036038101906107ed919061318f565b611907565b005b34801561080057600080fd5b5061081b6004803603810190610816919061303f565b611cc9565b005b34801561082957600080fd5b50610844600480360381019061083f9190612efc565b611e41565b60405161085191906137a0565b60405180910390f35b34801561086657600080fd5b50610881600480360381019061087c9190612fbc565b611e59565b005b34801561088f57600080fd5b50610898611ecc565b6040516108a591906137a0565b60405180910390f35b3480156108ba57600080fd5b506108c3611ed2565b6040516108d0919061361e565b60405180910390f35b3480156108e557600080fd5b5061090060048036038101906108fb919061318f565b611f60565b60405161090d919061361e565b60405180910390f35b34801561092257600080fd5b5061092b6120b9565b60405161093891906137a0565b60405180910390f35b34801561094d57600080fd5b5061096860048036038101906109639190613146565b6120bf565b005b34801561097657600080fd5b50610991600480360381019061098c9190612efc565b6120e1565b60405161099e91906137a0565b60405180910390f35b3480156109b357600080fd5b506109ce60048036038101906109c9919061318f565b6120f3565b005b3480156109dc57600080fd5b506109f760048036038101906109f2919061318f565b612105565b005b348015610a0557600080fd5b50610a206004803603810190610a1b9190612f29565b612117565b604051610a2d9190613603565b60405180910390f35b348015610a4257600080fd5b50610a5d6004803603810190610a589190613146565b6121ab565b005b348015610a6b57600080fd5b50610a866004803603810190610a819190612efc565b6121cd565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ae357506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610b135750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610b22612251565b80601260006101000a81548160ff02191690831515021790555050565b606060028054610b4e90613aa9565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7a90613aa9565b8015610bc75780601f10610b9c57610100808354040283529160200191610bc7565b820191906000526020600020905b815481529060010190602001808311610baa57829003601f168201915b5050505050905090565b6000610bdc826122cf565b610c12576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600c8054610c5d90613aa9565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8990613aa9565b8015610cd65780601f10610cab57610100808354040283529160200191610cd6565b820191906000526020600020905b815481529060010190602001808311610cb957829003601f168201915b505050505081565b6000610ce98261155c565b90508073ffffffffffffffffffffffffffffffffffffffff16610d0a61232e565b73ffffffffffffffffffffffffffffffffffffffff1614610d6d57610d3681610d3161232e565b612117565b610d6c576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60026009541415610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f90613760565b60405180910390fd5b6002600981905550601260009054906101000a900460ff1615610ec0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb790613720565b60405180910390fd5b60115481610ed4610ecf61232e565b612336565b610ede91906138de565b1115610f1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1690613740565b60405180910390fd5b601154811115610f64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5b90613640565b60405180910390fd5b600f5481610f70610fef565b610f7a91906138de565b1115610fbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb290613680565b60405180910390fd5b610fcc610fc661232e565b8261238d565b600160098190555050565b600d5481565b610fe5612251565b80600e8190555050565b6000610ff96123ab565b6001546000540303905090565b6000611011826123b4565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611078576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061108484612482565b9150915061109a818761109561232e565b6124a9565b6110e6576110af866110aa61232e565b612117565b6110e5576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561114d576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61115a86868660016124ed565b801561116557600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506112338561120f8888876124f3565b7c02000000000000000000000000000000000000000000000000000000001761251b565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841614156112bb5760006001850190506000600460008381526020019081526020016000205414156112b95760005481146112b8578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46113238686866001612546565b505050505050565b611333612251565b8060118190555050565b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61138e612251565b80601260026101000a81548160ff02191690831515021790555050565b6113b3612251565b6000733f122cae3d814c4140a6b1d5c4c99c97c7e9d92073ffffffffffffffffffffffffffffffffffffffff1660646021476113ef9190613965565b6113f99190613934565b60405161140590613565565b60006040518083038185875af1925050503d8060008114611442576040519150601f19603f3d011682016040523d82523d6000602084013e611447565b606091505b505090508061145557600080fd5b600061145f611813565b73ffffffffffffffffffffffffffffffffffffffff164760405161148290613565565b60006040518083038185875af1925050503d80600081146114bf576040519150601f19603f3d011682016040523d82523d6000602084013e6114c4565b606091505b50509050806114d257600080fd5b5050565b6114f183838360405180602001604052806000815250611e59565b505050565b6114fe612251565b80600d8190555050565b600f5481565b601260019054906101000a900460ff1681565b611529612251565b80600a908051906020019061153f929190612cc1565b5050565b601260009054906101000a900460ff1681565b60115481565b6000611567826123b4565b9050919050565b600a805461157b90613aa9565b80601f01602080910402602001604051908101604052809291908181526020018280546115a790613aa9565b80156115f45780601f106115c9576101008083540402835291602001916115f4565b820191906000526020600020905b8154815290600101906020018083116115d757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611664576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6116bd612251565b6116c7600061254c565b565b606060008060006116d9856115fc565b905060008167ffffffffffffffff8111156116f7576116f6613c42565b5b6040519080825280602002602001820160405280156117255781602001602082028036833780820191505090505b509050611730612d47565b600061173a6123ab565b90505b8386146118055761174d81612612565b915081604001511561175e576117fa565b600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461179e57816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156117f957808387806001019850815181106117ec576117eb613c13565b5b6020026020010181815250505b5b80600101905061173d565b508195505050505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611845612251565b80601260016101000a81548160ff02191690831515021790555050565b60606003805461187190613aa9565b80601f016020809104026020016040519081016040528092919081815260200182805461189d90613aa9565b80156118ea5780601f106118bf576101008083540402835291602001916118ea565b820191906000526020600020905b8154815290600101906020018083116118cd57829003601f168201915b5050505050905090565b601260029054906101000a900460ff1681565b6002600954141561194d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194490613760565b60405180910390fd5b600260098190555060011515601260029054906101000a900460ff1615151415611b1157601260009054906101000a900460ff16156119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b890613720565b60405180910390fd5b601054811115611a06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fd90613780565b60405180910390fd5b600e5481611a12610fef565b611a1c91906138de565b1115611a5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a54906136c0565b60405180910390fd5b60105481611a71611a6c61232e565b612336565b611a7b91906138de565b1115611abc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab390613740565b60405180910390fd5b80600d54611aca9190613965565b341015611b0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0390613700565b60405180910390fd5b611cad565b601260009054906101000a900460ff1615611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613720565b60405180910390fd5b601054811115611ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9d90613780565b60405180910390fd5b600e5481611bb2610fef565b611bbc91906138de565b1115611bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf4906136c0565b60405180910390fd5b60105481611c11611c0c61232e565b612336565b611c1b91906138de565b1115611c5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5390613740565b60405180910390fd5b80600d54611c6a9190613965565b341015611cac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca390613700565b60405180910390fd5b5b611cbe611cb861232e565b8261238d565b600160098190555050565b611cd161232e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d36576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611d4361232e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611df061232e565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611e359190613603565b60405180910390a35050565b60136020528060005260406000206000915090505481565b611e64848484611006565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611ec657611e8f8484848461263d565b611ec5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60105481565b600b8054611edf90613aa9565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0b90613aa9565b8015611f585780601f10611f2d57610100808354040283529160200191611f58565b820191906000526020600020905b815481529060010190602001808311611f3b57829003601f168201915b505050505081565b6060611f6b826122cf565b611faa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa190613660565b60405180910390fd5b60001515601260019054906101000a900460ff161515141561205857600c8054611fd390613aa9565b80601f0160208091040260200160405190810160405280929190818152602001828054611fff90613aa9565b801561204c5780601f106120215761010080835404028352916020019161204c565b820191906000526020600020905b81548152906001019060200180831161202f57829003601f168201915b505050505090506120b4565b600061206261279d565b9050600081511161208257604051806020016040528060008152506120b0565b8061208c8461282f565b600b6040516020016120a093929190613534565b6040516020818303038152906040525b9150505b919050565b600e5481565b6120c7612251565b80600b90805190602001906120dd929190612cc1565b5050565b60006120ec82612336565b9050919050565b6120fb612251565b80600f8190555050565b61210d612251565b8060108190555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6121b3612251565b80600c90805190602001906121c9929190612cc1565b5050565b6121d5612251565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223c906136a0565b60405180910390fd5b61224e8161254c565b50565b612259612990565b73ffffffffffffffffffffffffffffffffffffffff16612277611813565b73ffffffffffffffffffffffffffffffffffffffff16146122cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c4906136e0565b60405180910390fd5b565b6000816122da6123ab565b111580156122e9575060005482105b8015612327575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b6123a7828260405180602001604052806000815250612998565b5050565b60006001905090565b600080829050806123c36123ab565b1161244b5760005481101561244a5760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612448575b600081141561243e576004600083600190039350838152602001908152602001600020549050612413565b809250505061247d565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861250a868684612a35565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61261a612d47565b6126366004600084815260200190815260200160002054612a3e565b9050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261266361232e565b8786866040518563ffffffff1660e01b81526004016126859493929190613595565b602060405180830381600087803b15801561269f57600080fd5b505af19250505080156126d057506040513d601f19601f820116820180604052508101906126cd9190613119565b60015b61274a573d8060008114612700576040519150601f19603f3d011682016040523d82523d6000602084013e612705565b606091505b50600081511415612742576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6060600a80546127ac90613aa9565b80601f01602080910402602001604051908101604052809291908181526020018280546127d890613aa9565b80156128255780601f106127fa57610100808354040283529160200191612825565b820191906000526020600020905b81548152906001019060200180831161280857829003601f168201915b5050505050905090565b60606000821415612877576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061298b565b600082905060005b600082146128a957808061289290613b0c565b915050600a826128a29190613934565b915061287f565b60008167ffffffffffffffff8111156128c5576128c4613c42565b5b6040519080825280601f01601f1916602001820160405280156128f75781602001600182028036833780820191505090505b5090505b600085146129845760018261291091906139bf565b9150600a8561291f9190613b55565b603061292b91906138de565b60f81b81838151811061294157612940613c13565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561297d9190613934565b94506128fb565b8093505050505b919050565b600033905090565b6129a28383612af4565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612a3057600080549050600083820390505b6129e2600086838060010194508661263d565b612a18576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106129cf578160005414612a2d57600080fd5b50505b505050565b60009392505050565b612a46612d47565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b6000805490506000821415612b35576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612b4260008483856124ed565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612bb983612baa60008660006124f3565b612bb385612cb1565b1761251b565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612c5a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612c1f565b506000821415612c96576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612cac6000848385612546565b505050565b60006001821460e11b9050919050565b828054612ccd90613aa9565b90600052602060002090601f016020900481019282612cef5760008555612d36565b82601f10612d0857805160ff1916838001178555612d36565b82800160010185558215612d36579182015b82811115612d35578251825591602001919060010190612d1a565b5b509050612d439190612d96565b5090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b5b80821115612daf576000816000905550600101612d97565b5090565b6000612dc6612dc1846137e0565b6137bb565b905082815260208101848484011115612de257612de1613c76565b5b612ded848285613a67565b509392505050565b6000612e08612e0384613811565b6137bb565b905082815260208101848484011115612e2457612e23613c76565b5b612e2f848285613a67565b509392505050565b600081359050612e4681613ea8565b92915050565b600081359050612e5b81613ebf565b92915050565b600081359050612e7081613ed6565b92915050565b600081519050612e8581613ed6565b92915050565b600082601f830112612ea057612e9f613c71565b5b8135612eb0848260208601612db3565b91505092915050565b600082601f830112612ece57612ecd613c71565b5b8135612ede848260208601612df5565b91505092915050565b600081359050612ef681613eed565b92915050565b600060208284031215612f1257612f11613c80565b5b6000612f2084828501612e37565b91505092915050565b60008060408385031215612f4057612f3f613c80565b5b6000612f4e85828601612e37565b9250506020612f5f85828601612e37565b9150509250929050565b600080600060608486031215612f8257612f81613c80565b5b6000612f9086828701612e37565b9350506020612fa186828701612e37565b9250506040612fb286828701612ee7565b9150509250925092565b60008060008060808587031215612fd657612fd5613c80565b5b6000612fe487828801612e37565b9450506020612ff587828801612e37565b935050604061300687828801612ee7565b925050606085013567ffffffffffffffff81111561302757613026613c7b565b5b61303387828801612e8b565b91505092959194509250565b6000806040838503121561305657613055613c80565b5b600061306485828601612e37565b925050602061307585828601612e4c565b9150509250929050565b6000806040838503121561309657613095613c80565b5b60006130a485828601612e37565b92505060206130b585828601612ee7565b9150509250929050565b6000602082840312156130d5576130d4613c80565b5b60006130e384828501612e4c565b91505092915050565b60006020828403121561310257613101613c80565b5b600061311084828501612e61565b91505092915050565b60006020828403121561312f5761312e613c80565b5b600061313d84828501612e76565b91505092915050565b60006020828403121561315c5761315b613c80565b5b600082013567ffffffffffffffff81111561317a57613179613c7b565b5b61318684828501612eb9565b91505092915050565b6000602082840312156131a5576131a4613c80565b5b60006131b384828501612ee7565b91505092915050565b60006131c88383613516565b60208301905092915050565b6131dd816139f3565b82525050565b60006131ee82613867565b6131f88185613895565b935061320383613842565b8060005b8381101561323457815161321b88826131bc565b975061322683613888565b925050600181019050613207565b5085935050505092915050565b61324a81613a05565b82525050565b600061325b82613872565b61326581856138a6565b9350613275818560208601613a76565b61327e81613c85565b840191505092915050565b60006132948261387d565b61329e81856138c2565b93506132ae818560208601613a76565b6132b781613c85565b840191505092915050565b60006132cd8261387d565b6132d781856138d3565b93506132e7818560208601613a76565b80840191505092915050565b6000815461330081613aa9565b61330a81866138d3565b94506001821660008114613325576001811461333657613369565b60ff19831686528186019350613369565b61333f85613852565b60005b8381101561336157815481890152600182019150602081019050613342565b838801955050505b50505092915050565b600061337f6018836138c2565b915061338a82613c96565b602082019050919050565b60006133a26030836138c2565b91506133ad82613cbf565b604082019050919050565b60006133c5601c836138c2565b91506133d082613d0e565b602082019050919050565b60006133e86026836138c2565b91506133f382613d37565b604082019050919050565b600061340b600a836138c2565b915061341682613d86565b602082019050919050565b600061342e6020836138c2565b915061343982613daf565b602082019050919050565b60006134516000836138b7565b915061345c82613dd8565b600082019050919050565b60006134746012836138c2565b915061347f82613ddb565b602082019050919050565b60006134976012836138c2565b91506134a282613e04565b602082019050919050565b60006134ba601b836138c2565b91506134c582613e2d565b602082019050919050565b60006134dd601f836138c2565b91506134e882613e56565b602082019050919050565b6000613500601f836138c2565b915061350b82613e7f565b602082019050919050565b61351f81613a5d565b82525050565b61352e81613a5d565b82525050565b600061354082866132c2565b915061354c82856132c2565b915061355882846132f3565b9150819050949350505050565b600061357082613444565b9150819050919050565b600060208201905061358f60008301846131d4565b92915050565b60006080820190506135aa60008301876131d4565b6135b760208301866131d4565b6135c46040830185613525565b81810360608301526135d68184613250565b905095945050505050565b600060208201905081810360008301526135fb81846131e3565b905092915050565b60006020820190506136186000830184613241565b92915050565b600060208201905081810360008301526136388184613289565b905092915050565b6000602082019050818103600083015261365981613372565b9050919050565b6000602082019050818103600083015261367981613395565b9050919050565b60006020820190508181036000830152613699816133b8565b9050919050565b600060208201905081810360008301526136b9816133db565b9050919050565b600060208201905081810360008301526136d9816133fe565b9050919050565b600060208201905081810360008301526136f981613421565b9050919050565b6000602082019050818103600083015261371981613467565b9050919050565b600060208201905081810360008301526137398161348a565b9050919050565b60006020820190508181036000830152613759816134ad565b9050919050565b60006020820190508181036000830152613779816134d0565b9050919050565b60006020820190508181036000830152613799816134f3565b9050919050565b60006020820190506137b56000830184613525565b92915050565b60006137c56137d6565b90506137d18282613adb565b919050565b6000604051905090565b600067ffffffffffffffff8211156137fb576137fa613c42565b5b61380482613c85565b9050602081019050919050565b600067ffffffffffffffff82111561382c5761382b613c42565b5b61383582613c85565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006138e982613a5d565b91506138f483613a5d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561392957613928613b86565b5b828201905092915050565b600061393f82613a5d565b915061394a83613a5d565b92508261395a57613959613bb5565b5b828204905092915050565b600061397082613a5d565b915061397b83613a5d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156139b4576139b3613b86565b5b828202905092915050565b60006139ca82613a5d565b91506139d583613a5d565b9250828210156139e8576139e7613b86565b5b828203905092915050565b60006139fe82613a3d565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015613a94578082015181840152602081019050613a79565b83811115613aa3576000848401525b50505050565b60006002820490506001821680613ac157607f821691505b60208210811415613ad557613ad4613be4565b5b50919050565b613ae482613c85565b810181811067ffffffffffffffff82111715613b0357613b02613c42565b5b80604052505050565b6000613b1782613a5d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613b4a57613b49613b86565b5b600182019050919050565b6000613b6082613a5d565b9150613b6b83613a5d565b925082613b7b57613b7a613bb5565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f6d6178206d696e74207065722054782065786365656465640000000000000000600082015250565b7f455243373231414d657461646174613a2055524920717565727920666f72206e60008201527f6f6e6578697374656e7420746f6b656e00000000000000000000000000000000602082015250565b7f57686974656c697374204d6178537570706c7920657863656564656400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f576520536f6c646f757400000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b7f696e73756666696369656e742066756e64730000000000000000000000000000600082015250565b7f436f6e7472616374206973207061757365640000000000000000000000000000600082015250565b7f4d6178204e4654205065722057616c6c65742065786365656465640000000000600082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f6d6178206d696e7420616d6f756e742070657220747820657863656564656400600082015250565b613eb1816139f3565b8114613ebc57600080fd5b50565b613ec881613a05565b8114613ed357600080fd5b50565b613edf81613a11565b8114613eea57600080fd5b50565b613ef681613a5d565b8114613f0157600080fd5b5056fea2646970667358221220bbf106fccfe7c1ac1e5dc24d8ba0a9b2fb40beedf39124840335fa430e3e16ce64736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
CoolAICats.sol 1842 lines
// SPDX-License-Identifier: GPL-3.0
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// 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;
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
// File: @openzeppelin/contracts/utils/Context.sol
// 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;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
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);
}
}
// File: erc721a/contracts/IERC721A.sol
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* The caller cannot approve to their own address.
*/
error ApproveToCaller();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables
* (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`,
* checking first that contract recipients are aware of the ERC721 protocol
* to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move
* this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the
* zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
// File: erc721a/contracts/ERC721A.sol
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Reference type for token approval.
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @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, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @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) public virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @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) public virtual override {
if (operator == _msgSenderERC721A()) revert ApproveToCaller();
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @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. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
// =============================================================
// TRANSFER OPERATIONS
// =============================================================
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) public virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @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 memory _data
) public virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* 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, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
// =============================================================
// MINT OPERATIONS
// =============================================================
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// `balance` and `numberMinted` have a maximum limit of 2**64.
// `tokenId` has a maximum limit of 2**256.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 toMasked;
uint256 end = startTokenId + quantity;
// Use assembly to loop and emit the `Transfer` event for gas savings.
assembly {
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
toMasked := and(to, _BITMASK_ADDRESS)
// Emit the `Transfer` event.
log4(
0, // Start of data (0, since no data).
0, // End of data (0, since no data).
_TRANSFER_EVENT_SIGNATURE, // Signature.
0, // `address(0)`.
toMasked, // `to`.
startTokenId // `tokenId`.
)
for {
let tokenId := add(startTokenId, 1)
} iszero(eq(tokenId, end)) {
tokenId := add(tokenId, 1)
} {
// Emit the `Transfer` event. Similar to above.
log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
}
}
if (toMasked == 0) revert MintToZeroAddress();
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTim...
// [truncated — 66688 bytes total]
Read Contract
FreeSupply 0x50839bef → uint256
MaxperWallet 0xbd7a1998 → uint256
MaxperWalletFree 0x624208ae → uint256
allowlist 0xa7cd52cb → uint256
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseURI 0x6c0360eb → string
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isWhitelisted 0x3af32abf → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
notRevealedUri 0x081c8c44 → string
numberMinted 0xdc33e681 → uint256
onlyWhitelisted 0x9c70b512 → bool
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
revealed 0x51830227 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
totalSupply 0x18160ddd → uint256
Write Contract 21 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
freemint 0x0fbe4fe2
uint256 tokens
mint 0xa0712d68
uint256 tokens
pause 0x02329a29
bool _state
renounceOwnership 0x715018a6
No parameters
reveal 0x940cd05b
bool _state
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseExtension 0xda3ef23f
string _newBaseExtension
setBaseURI 0x55f804b3
string _newBaseURI
setCost 0x44a0d68a
uint256 _newCost
setFreeMaxPerWallet 0x351de26e
uint256 _limit
setFreesupply 0xe1cf8baa
uint256 _newsupply
setMaxPerWallet 0xe268e4d3
uint256 _limit
setMaxsupply 0x149835a0
uint256 _newsupply
setNotRevealedURI 0xf2c4ce1e
string _notRevealedURI
setOnlyWhitelisted 0x3c952764
bool _state
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address