Address Contract Verified
Address
0x1e283601f53032D9aaC8Dc73632f4e482E761c70
Balance
0 ETH
Nonce
1
Code Size
16814 bytes
Creator
0x750E4FB7...112c at tx 0x63329483...24d0bb
Indexed Transactions
0
Contract Bytecode
16814 bytes
0x608060405234801561001057600080fd5b50600436106102325760003560e01c806373f4de9f11610130578063c87b56dd116100b8578063f2fde38b1161007c578063f2fde38b14610665578063f5c5a07214610681578063fc52502a146106b1578063fddcb5ea146106cd578063fecfda49146106fd57610232565b8063c87b56dd146105ad578063ca480c30146105dd578063d5abeb01146105f9578063e8a3d48514610617578063e985e9c51461063557610232565b80639abc8320116100ff5780639abc83201461050b578063a0712d6814610529578063a22cb46514610545578063b88d4fde14610561578063c2ba47441461057d57610232565b806373f4de9f14610481578063893da6c9146104b15780638da5cb5b146104cf57806395d89b41146104ed57610232565b806338ca830c116101be57806347c8ff5e1161018257806347c8ff5e146103dd5780635c975abb146103f95780636352211e1461041757806370a0823114610447578063715018a61461047757610232565b806338ca830c1461036157806339f7e37f1461037d5780633ccfd60b1461039957806342842e0e146103a3578063453c2310146103bf57610232565b8063095ea7b311610205578063095ea7b3146102d157806314686e38146102ed57806318160ddd1461030957806322bd5c1c1461032757806323b872dd1461034557610232565b806301ffc9a71461023757806306fdde0314610267578063081812fc1461028557806308cdc2a8146102b5575b600080fd5b610251600480360381019061024c9190612e5a565b610719565b60405161025e919061344e565b60405180910390f35b61026f6107fb565b60405161027c9190613469565b60405180910390f35b61029f600480360381019061029a9190612eed565b61088d565b6040516102ac91906133e7565b60405180910390f35b6102cf60048036038101906102ca9190612e31565b610912565b005b6102eb60048036038101906102e69190612db0565b6109e2565b005b61030760048036038101906103029190612db0565b610afa565b005b610311610bbe565b60405161031e9190613767565b60405180910390f35b61032f610bc8565b60405161033c919061344e565b60405180910390f35b61035f600480360381019061035a9190612caa565b610bdb565b005b61037b60048036038101906103769190612e31565b610c3b565b005b61039760048036038101906103929190612eac565b610d0b565b005b6103a1610da1565b005b6103bd60048036038101906103b89190612caa565b610e66565b005b6103c7610e86565b6040516103d49190613767565b60405180910390f35b6103f760048036038101906103f29190612eac565b610e8c565b005b610401610f22565b60405161040e919061344e565b60405180910390f35b610431600480360381019061042c9190612eed565b610f35565b60405161043e91906133e7565b60405180910390f35b610461600480360381019061045c9190612c45565b610fe7565b60405161046e9190613767565b60405180910390f35b61047f61109f565b005b61049b60048036038101906104969190612c45565b611127565b6040516104a8919061344e565b60405180910390f35b6104b9611174565b6040516104c6919061344e565b60405180910390f35b6104d7611189565b6040516104e491906133e7565b60405180910390f35b6104f56111b3565b6040516105029190613469565b60405180910390f35b610513611245565b6040516105209190613469565b60405180910390f35b610543600480360381019061053e9190612eed565b6112d3565b005b61055f600480360381019061055a9190612d74565b6115ef565b005b61057b60048036038101906105769190612cf9565b611605565b005b61059760048036038101906105929190612c45565b611667565b6040516105a4919061344e565b60405180910390f35b6105c760048036038101906105c29190612eed565b6116f1565b6040516105d49190613469565b60405180910390f35b6105f760048036038101906105f29190612c45565b611725565b005b6106016117e7565b60405161060e9190613767565b60405180910390f35b61061f6117ed565b60405161062c9190613469565b60405180910390f35b61064f600480360381019061064a9190612c6e565b61187f565b60405161065c919061344e565b60405180910390f35b61067f600480360381019061067a9190612c45565b611913565b005b61069b60048036038101906106969190612c45565b611a0b565b6040516106a89190613767565b60405180910390f35b6106cb60048036038101906106c69190612dec565b611a54565b005b6106e760048036038101906106e29190612c45565b611b89565b6040516106f49190613767565b60405180910390f35b61071760048036038101906107129190612eed565b611bd2565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107e457507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107f457506107f382611c58565b5b9050919050565b60606000805461080a906139d2565b80601f0160208091040260200160405190810160405280929190818152602001828054610836906139d2565b80156108835780601f1061085857610100808354040283529160200191610883565b820191906000526020600020905b81548152906001019060200180831161086657829003601f168201915b5050505050905090565b600061089882611cc2565b6108d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ce9061364b565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61091a611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610938611189565b73ffffffffffffffffffffffffffffffffffffffff161461098e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109859061366b565b60405180910390fd5b80600c60006101000a81548160ff0219169083151502179055507fe958428975f3f854c5ee40d97815aabb0ee2e55505bcba8f681de7b2746f2501816040516109d79190613739565b60405180910390a150565b60006109ed82610f35565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a55906136b9565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a7d611d2e565b73ffffffffffffffffffffffffffffffffffffffff161480610aac5750610aab81610aa6611d2e565b61187f565b5b610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae2906135ab565b60405180910390fd5b610af58383611d36565b505050565b610b02611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610b20611189565b73ffffffffffffffffffffffffffffffffffffffff1614610b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6d9061366b565b60405180910390fd5b80600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000600a54905090565b600c60019054906101000a900460ff1681565b610bec610be6611d2e565b82611def565b610c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c22906136f9565b60405180910390fd5b610c36838383611ecd565b505050565b610c43611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610c61611189565b73ffffffffffffffffffffffffffffffffffffffff1614610cb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cae9061366b565b60405180910390fd5b80600c60016101000a81548160ff0219169083151502179055507fe958428975f3f854c5ee40d97815aabb0ee2e55505bcba8f681de7b2746f250181604051610d00919061368b565b60405180910390a150565b610d13611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610d31611189565b73ffffffffffffffffffffffffffffffffffffffff1614610d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7e9061366b565b60405180910390fd5b80600b9080519060200190610d9d929190612a1f565b5050565b610da9611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610dc7611189565b73ffffffffffffffffffffffffffffffffffffffff1614610e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e149061366b565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610e63573d6000803e3d6000fd5b50565b610e8183838360405180602001604052806000815250611605565b505050565b60095481565b610e94611d2e565b73ffffffffffffffffffffffffffffffffffffffff16610eb2611189565b73ffffffffffffffffffffffffffffffffffffffff1614610f08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eff9061366b565b60405180910390fd5b80600f9080519060200190610f1e929190612a1f565b5050565b600c60009054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd5906135eb565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104f906135cb565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6110a7611d2e565b73ffffffffffffffffffffffffffffffffffffffff166110c5611189565b73ffffffffffffffffffffffffffffffffffffffff161461111b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111129061366b565b60405180910390fd5b6111256000612134565b565b60006001600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410159050919050565b600061118060086121fa565b600a5414905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546111c2906139d2565b80601f01602080910402602001604051908101604052809291908181526020018280546111ee906139d2565b801561123b5780601f106112105761010080835404028352916020019161123b565b820191906000526020600020905b81548152906001019060200180831161121e57829003601f168201915b5050505050905090565b600b8054611252906139d2565b80601f016020809104026020016040519081016040528092919081815260200182805461127e906139d2565b80156112cb5780601f106112a0576101008083540402835291602001916112cb565b820191906000526020600020905b8154815290600101906020018083116112ae57829003601f168201915b505050505081565b6000339050600c60009054906101000a900460ff1615611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061354b565b60405180910390fd5b600c60019054906101000a900460ff16156113c1576001600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b79061358b565b60405180910390fd5b5b816113cc60086121fa565b6113d69190613861565b600a54101561141a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611411906136d9565b60405180910390fd5b81600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114659190613861565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156114e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dd90613719565b60405180910390fd5b60005b828110156115ea576114fb6008612208565b600061150760086121fa565b9050611513838261221e565b61154781600b6115228461223c565b6040516020016115339291906133ad565b6040516020818303038152906040526123e9565b6001600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115939190613861565b600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081806115e190613a35565b925050506114e9565b505050565b6116016115fa611d2e565b838361245d565b5050565b611616611610611d2e565b83611def565b611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c906136f9565b60405180910390fd5b611661848484846125ca565b50505050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054119050919050565b6060600b6116fe8361223c565b60405160200161170f9291906133ad565b6040516020818303038152906040529050919050565b61172d611d2e565b73ffffffffffffffffffffffffffffffffffffffff1661174b611189565b73ffffffffffffffffffffffffffffffffffffffff16146117a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117989061366b565b60405180910390fd5b600d60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000905550565b600a5481565b6060600f80546117fc906139d2565b80601f0160208091040260200160405190810160405280929190818152602001828054611828906139d2565b80156118755780601f1061184a57610100808354040283529160200191611875565b820191906000526020600020905b81548152906001019060200180831161185857829003601f168201915b5050505050905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61191b611d2e565b73ffffffffffffffffffffffffffffffffffffffff16611939611189565b73ffffffffffffffffffffffffffffffffffffffff161461198f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119869061366b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156119ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f6906134ab565b60405180910390fd5b611a0881612134565b50565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611a5c611d2e565b73ffffffffffffffffffffffffffffffffffffffff16611a7a611189565b73ffffffffffffffffffffffffffffffffffffffff1614611ad0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac79061366b565b60405180910390fd5b60005b82829050811015611b8457600954600d6000858585818110611b1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9050602002016020810190611b339190612c45565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080611b7c90613a35565b915050611ad3565b505050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611bda611d2e565b73ffffffffffffffffffffffffffffffffffffffff16611bf8611189565b73ffffffffffffffffffffffffffffffffffffffff1614611c4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c459061366b565b60405180910390fd5b8060098190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611da983610f35565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611dfa82611cc2565b611e39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e309061356b565b60405180910390fd5b6000611e4483610f35565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611e865750611e85818561187f565b5b80611ec457508373ffffffffffffffffffffffffffffffffffffffff16611eac8461088d565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611eed82610f35565b73ffffffffffffffffffffffffffffffffffffffff1614611f43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3a906134cb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611fb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faa9061350b565b60405180910390fd5b611fbe838383612626565b611fc9600082611d36565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461201991906138e8565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120709190613861565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461212f83838361262b565b505050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b6001816000016000828254019250508190555050565b612238828260405180602001604052806000815250612630565b5050565b60606000821415612284576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506123e4565b600082905060005b600082146122b657808061229f90613a35565b915050600a826122af91906138b7565b915061228c565b60008167ffffffffffffffff8111156122f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561232a5781602001600182028036833780820191505090505b5090505b600085146123dd5760018261234391906138e8565b9150600a856123529190613a7e565b603061235e9190613861565b60f81b81838151811061239a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856123d691906138b7565b945061232e565b8093505050505b919050565b6123f282611cc2565b612431576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124289061360b565b60405180910390fd5b80600660008481526020019081526020016000209080519060200190612458929190612a1f565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156124cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c39061352b565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516125bd919061344e565b60405180910390a3505050565b6125d5848484611ecd565b6125e18484848461268b565b612620576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126179061348b565b60405180910390fd5b50505050565b505050565b505050565b61263a8383612822565b612647600084848461268b565b612686576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267d9061348b565b60405180910390fd5b505050565b60006126ac8473ffffffffffffffffffffffffffffffffffffffff166129fc565b15612815578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026126d5611d2e565b8786866040518563ffffffff1660e01b81526004016126f79493929190613402565b602060405180830381600087803b15801561271157600080fd5b505af192505050801561274257506040513d601f19601f8201168201806040525081019061273f9190612e83565b60015b6127c5573d8060008114612772576040519150601f19603f3d011682016040523d82523d6000602084013e612777565b606091505b506000815114156127bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b49061348b565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061281a565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612892576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128899061362b565b60405180910390fd5b61289b81611cc2565b156128db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d2906134eb565b60405180910390fd5b6128e760008383612626565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129379190613861565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46129f86000838361262b565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054612a2b906139d2565b90600052602060002090601f016020900481019282612a4d5760008555612a94565b82601f10612a6657805160ff1916838001178555612a94565b82800160010185558215612a94579182015b82811115612a93578251825591602001919060010190612a78565b5b509050612aa19190612aa5565b5090565b5b80821115612abe576000816000905550600101612aa6565b5090565b6000612ad5612ad0846137a7565b613782565b905082815260208101848484011115612aed57600080fd5b612af8848285613990565b509392505050565b6000612b13612b0e846137d8565b613782565b905082815260208101848484011115612b2b57600080fd5b612b36848285613990565b509392505050565b600081359050612b4d8161411c565b92915050565b60008083601f840112612b6557600080fd5b8235905067ffffffffffffffff811115612b7e57600080fd5b602083019150836020820283011115612b9657600080fd5b9250929050565b600081359050612bac81614133565b92915050565b600081359050612bc18161414a565b92915050565b600081519050612bd68161414a565b92915050565b600082601f830112612bed57600080fd5b8135612bfd848260208601612ac2565b91505092915050565b600082601f830112612c1757600080fd5b8135612c27848260208601612b00565b91505092915050565b600081359050612c3f81614161565b92915050565b600060208284031215612c5757600080fd5b6000612c6584828501612b3e565b91505092915050565b60008060408385031215612c8157600080fd5b6000612c8f85828601612b3e565b9250506020612ca085828601612b3e565b9150509250929050565b600080600060608486031215612cbf57600080fd5b6000612ccd86828701612b3e565b9350506020612cde86828701612b3e565b9250506040612cef86828701612c30565b9150509250925092565b60008060008060808587031215612d0f57600080fd5b6000612d1d87828801612b3e565b9450506020612d2e87828801612b3e565b9350506040612d3f87828801612c30565b925050606085013567ffffffffffffffff811115612d5c57600080fd5b612d6887828801612bdc565b91505092959194509250565b60008060408385031215612d8757600080fd5b6000612d9585828601612b3e565b9250506020612da685828601612b9d565b9150509250929050565b60008060408385031215612dc357600080fd5b6000612dd185828601612b3e565b9250506020612de285828601612c30565b9150509250929050565b60008060208385031215612dff57600080fd5b600083013567ffffffffffffffff811115612e1957600080fd5b612e2585828601612b53565b92509250509250929050565b600060208284031215612e4357600080fd5b6000612e5184828501612b9d565b91505092915050565b600060208284031215612e6c57600080fd5b6000612e7a84828501612bb2565b91505092915050565b600060208284031215612e9557600080fd5b6000612ea384828501612bc7565b91505092915050565b600060208284031215612ebe57600080fd5b600082013567ffffffffffffffff811115612ed857600080fd5b612ee484828501612c06565b91505092915050565b600060208284031215612eff57600080fd5b6000612f0d84828501612c30565b91505092915050565b612f1f8161391c565b82525050565b612f2e8161392e565b82525050565b6000612f3f8261381e565b612f498185613834565b9350612f5981856020860161399f565b612f6281613b6b565b840191505092915050565b6000612f7882613829565b612f828185613845565b9350612f9281856020860161399f565b612f9b81613b6b565b840191505092915050565b6000612fb182613829565b612fbb8185613856565b9350612fcb81856020860161399f565b80840191505092915050565b60008154612fe4816139d2565b612fee8186613856565b94506001821660008114613009576001811461301a5761304d565b60ff1983168652818601935061304d565b61302385613809565b60005b8381101561304557815481890152600182019150602081019050613026565b838801955050505b50505092915050565b6000613063603283613845565b915061306e82613b7c565b604082019050919050565b6000613086602683613845565b915061309182613bcb565b604082019050919050565b60006130a9602583613845565b91506130b482613c1a565b604082019050919050565b60006130cc601c83613845565b91506130d782613c69565b602082019050919050565b60006130ef602483613845565b91506130fa82613c92565b604082019050919050565b6000613112601983613845565b915061311d82613ce1565b602082019050919050565b6000613135600e83613845565b915061314082613d0a565b602082019050919050565b6000613158602c83613845565b915061316382613d33565b604082019050919050565b600061317b601083613845565b915061318682613d82565b602082019050919050565b600061319e603883613845565b91506131a982613dab565b604082019050919050565b60006131c1602a83613845565b91506131cc82613dfa565b604082019050919050565b60006131e4602983613845565b91506131ef82613e49565b604082019050919050565b6000613207602e83613845565b915061321282613e98565b604082019050919050565b600061322a602083613845565b915061323582613ee7565b602082019050919050565b600061324d602c83613845565b915061325882613f10565b604082019050919050565b6000613270600583613856565b915061327b82613f5f565b600582019050919050565b6000613293602083613845565b915061329e82613f88565b602082019050919050565b60006132b6601083613845565b91506132c182613fb1565b602082019050919050565b60006132d9602183613845565b91506132e482613fda565b604082019050919050565b60006132fc601483613845565b915061330782614029565b602082019050919050565b600061331f603183613845565b915061332a82614052565b604082019050919050565b6000613342601e83613845565b915061334d826140a1565b602082019050919050565b6000613365600683613845565b9150613370826140ca565b602082019050919050565b6000613388600183613856565b9150613393826140f3565b600182019050919050565b6133a781613986565b82525050565b60006133b98285612fd7565b91506133c48261337b565b91506133d08284612fa6565b91506133db82613263565b91508190509392505050565b60006020820190506133fc6000830184612f16565b92915050565b60006080820190506134176000830187612f16565b6134246020830186612f16565b613431604083018561339e565b81810360608301526134438184612f34565b905095945050505050565b60006020820190506134636000830184612f25565b92915050565b600060208201905081810360008301526134838184612f6d565b905092915050565b600060208201905081810360008301526134a481613056565b9050919050565b600060208201905081810360008301526134c481613079565b9050919050565b600060208201905081810360008301526134e48161309c565b9050919050565b60006020820190508181036000830152613504816130bf565b9050919050565b60006020820190508181036000830152613524816130e2565b9050919050565b6000602082019050818103600083015261354481613105565b9050919050565b6000602082019050818103600083015261356481613128565b9050919050565b600060208201905081810360008301526135848161314b565b9050919050565b600060208201905081810360008301526135a48161316e565b9050919050565b600060208201905081810360008301526135c481613191565b9050919050565b600060208201905081810360008301526135e4816131b4565b9050919050565b60006020820190508181036000830152613604816131d7565b9050919050565b60006020820190508181036000830152613624816131fa565b9050919050565b600060208201905081810360008301526136448161321d565b9050919050565b6000602082019050818103600083015261366481613240565b9050919050565b6000602082019050818103600083015261368481613286565b9050919050565b600060408201905081810360008301526136a4816132a9565b90506136b36020830184612f25565b92915050565b600060208201905081810360008301526136d2816132cc565b9050919050565b600060208201905081810360008301526136f2816132ef565b9050919050565b6000602082019050818103600083015261371281613312565b9050919050565b6000602082019050818103600083015261373281613335565b9050919050565b6000604082019050818103600083015261375281613358565b90506137616020830184612f25565b92915050565b600060208201905061377c600083018461339e565b92915050565b600061378c61379d565b90506137988282613a04565b919050565b6000604051905090565b600067ffffffffffffffff8211156137c2576137c1613b3c565b5b6137cb82613b6b565b9050602081019050919050565b600067ffffffffffffffff8211156137f3576137f2613b3c565b5b6137fc82613b6b565b9050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600061386c82613986565b915061387783613986565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138ac576138ab613aaf565b5b828201905092915050565b60006138c282613986565b91506138cd83613986565b9250826138dd576138dc613ade565b5b828204905092915050565b60006138f382613986565b91506138fe83613986565b92508282101561391157613910613aaf565b5b828203905092915050565b600061392782613966565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156139bd5780820151818401526020810190506139a2565b838111156139cc576000848401525b50505050565b600060028204905060018216806139ea57607f821691505b602082108114156139fe576139fd613b0d565b5b50919050565b613a0d82613b6b565b810181811067ffffffffffffffff82111715613a2c57613a2b613b3c565b5b80604052505050565b6000613a4082613986565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a7357613a72613aaf565b5b600182019050919050565b6000613a8982613986565b9150613a9483613986565b925082613aa457613aa3613ade565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4d696e742073757370656e646564000000000000000000000000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4e6f7420696e2077686974656c69737400000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60008201527f6578697374656e7420746f6b656e000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f616c6c6f774c697374456e61626c656400000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f52656163686564206d617820636f756e74206f662066726565206d696e740000600082015250565b7f7061757365640000000000000000000000000000000000000000000000000000600082015250565b7f2f00000000000000000000000000000000000000000000000000000000000000600082015250565b6141258161391c565b811461413057600080fd5b50565b61413c8161392e565b811461414757600080fd5b50565b6141538161393a565b811461415e57600080fd5b50565b61416a81613986565b811461417557600080fd5b5056fea26469706673582212209a6d47dce4a403f27969308205ffe531171bc90dcdab8026c8350346ae7a364364736f6c63430008040033
Verified Source Code Full Match
Compiler: v0.8.4+commit.c7e474f2
EVM: istanbul
Optimization: No
Jews.sol 145 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract Jews is ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 public maxPerWallet = 1;
uint256 public maxSupply = 5555;
string public baseUri = 'ipfs://bafybeidsfeoe34wcwn55h6r7py565cylsbmc65nbv4onq6f3xms3bh7zni';
bool public paused = true;
bool public allowListEnabled = true;
mapping(address => uint256) private _allowList;
mapping(address => uint256) private _minters;
string private contractURI_;
event PriceUpdated(uint256 newPrice);
event MaxSupplyUpdated(uint256 newMaxSupply);
event BaseUriUpdated(string newBaseUri);
event StateUpdated(string field, bool value);
constructor() ERC721("The Jews", "JEWS") {}
function mint(uint256 quantity) external {
address to = msg.sender;
require(!paused, 'Mint suspended');
if(allowListEnabled) {
require(_allowList[msg.sender] >= 1, 'Not in whitelist');
}
require(maxSupply >= _tokenIds.current() + quantity, "Max supply exceeded!");
require(_allowList[msg.sender] >= _minters[to] + quantity, 'Reached max count of free mint');
uint256 i = 0;
while(i < quantity) {
_tokenIds.increment();
uint256 _tokenId = _tokenIds.current();
super._safeMint(to, _tokenId);
super._setTokenURI(
_tokenId,
string(abi.encodePacked(baseUri,'/', toString(_tokenId), '.json'))
);
_minters[to] = _minters[to] + 1;
i++;
}
}
function contractURI() public view returns (string memory) {
return contractURI_;
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
return string(abi.encodePacked(baseUri,'/', toString(_tokenId), '.json'));
}
function setAllowList(address _address, uint256 q) public onlyOwner {
_allowList[_address] = q;
}
function massSetWhitelist(address[] calldata _addressArray) public onlyOwner {
uint i = 0;
while (i < _addressArray.length) {
_allowList[_addressArray[i]] = maxPerWallet;
i++;
}
}
function removeAllowList(address _address) public onlyOwner {
delete _allowList[_address];
}
function countPerMint(address _address) public view returns(uint256) {
return _allowList[_address];
}
function mintedCount(address _address) public view returns(uint256) {
return _minters[_address];
}
function inAllowList(address _address) public view returns(bool) {
return _allowList[_address] >= 1;
}
function canMint(address _address) public view returns(bool) {
return _allowList[_address] > _minters[_address];
}
function soldOut() public view returns(bool) {
return maxSupply == _tokenIds.current();
}
function totalSupply() public view returns(uint256) {
return maxSupply;
}
function withdraw() external onlyOwner {
payable(msg.sender).transfer(address(this).balance);
}
function updateMaxPerWallet(uint256 _maxPerWallet) public onlyOwner {
maxPerWallet = _maxPerWallet;
}
function updateBaseUri(string memory _baseUri) public onlyOwner {
baseUri = _baseUri;
}
function updateContractUri(string memory _contractURI) public onlyOwner {
contractURI_ = _contractURI;
}
function updatePaused(bool _paused) public onlyOwner {
paused = _paused;
emit StateUpdated("paused", _paused);
}
function updateWhiteList(bool _allowListEnabled) public onlyOwner {
allowListEnabled = _allowListEnabled;
emit StateUpdated("allowListEnabled", _allowListEnabled);
}
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT license
// 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);
}
}
Address.sol 222 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Context.sol 24 lines
// 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;
}
}
Strings.sol 67 lines
// 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);
}
}
Ownable.sol 76 lines
// 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);
}
}
Counters.sol 43 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
ERC721.sol 447 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 overridden 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 || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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);
_afterTokenTransfer(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);
_afterTokenTransfer(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 from incorrect owner");
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);
_afterTokenTransfer(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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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`.
*
* 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;
/**
* @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 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);
}
ERC165.sol 29 lines
// 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;
}
}
IERC165.sol 25 lines
// 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);
}
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
IERC721Metadata.sol 27 lines
// 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);
}
ERC721URIStorage.sol 67 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
/**
* @dev ERC721 token with storage based token URI management.
*/
abstract contract ERC721URIStorage is ERC721 {
using Strings for uint256;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");
string memory _tokenURI = _tokenURIs[tokenId];
string memory base = _baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
return super.tokenURI(tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @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 override {
super._burn(tokenId);
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
}
Read Contract
allowListEnabled 0x22bd5c1c → bool
balanceOf 0x70a08231 → uint256
baseUri 0x9abc8320 → string
canMint 0xc2ba4744 → bool
contractURI 0xe8a3d485 → string
countPerMint 0xf5c5a072 → uint256
getApproved 0x081812fc → address
inAllowList 0x73f4de9f → bool
isApprovedForAll 0xe985e9c5 → bool
maxPerWallet 0x453c2310 → uint256
maxSupply 0xd5abeb01 → uint256
mintedCount 0xfddcb5ea → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
soldOut 0x893da6c9 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
massSetWhitelist 0xfc52502a
address[] _addressArray
mint 0xa0712d68
uint256 quantity
removeAllowList 0xca480c30
address _address
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setAllowList 0x14686e38
address _address
uint256 q
setApprovalForAll 0xa22cb465
address operator
bool approved
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateBaseUri 0x39f7e37f
string _baseUri
updateContractUri 0x47c8ff5e
string _contractURI
updateMaxPerWallet 0xfecfda49
uint256 _maxPerWallet
updatePaused 0x08cdc2a8
bool _paused
updateWhiteList 0x38ca830c
bool _allowListEnabled
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address