Address Contract Partially Verified
Address
0x508Ffd6A182E90532B9B6CBCA47010dc4aD411c6
Balance
0 ETH
Nonce
1
Code Size
20510 bytes
Creator
0x41D4bCA4...03C2 at tx 0xdb1954c5...7f0b08
Indexed Transactions
0
Contract Bytecode
20510 bytes
0x6080604052600436106102cd5760003560e01c806370a0823111610175578063babf5e37116100dc578063d6492d8111610095578063f29f15af1161006f578063f29f15af14610a6f578063f2fde38b14610a98578063f9020e3314610ac1578063f968adbe14610aec576102d4565b8063d6492d81146109eb578063e985e9c514610a16578063efd0cbf914610a53576102d4565b8063babf5e37146108ec578063c3bb0cc214610915578063c6f6f2161461093e578063c87b56dd14610967578063d0bfb810146109a4578063d5abeb01146109c0576102d4565b806389ba959c1161012e57806389ba959c146107f05780638da5cb5b1461081b57806395d89b4114610846578063a22cb46514610871578063ad3e31b71461089a578063b88d4fde146108c3576102d4565b806370a0823114610708578063715018a6146107455780637f5f5a451461075c57806380a0bcc61461078757806381d8488f146107b057806387491c60146107d9576102d4565b8063333171bb1161023457806354214f69116101ed57806355f804b3116101c757806355f804b31461064c5780635c975abb146106755780635daaf45d146106a05780636352211e146106cb576102d4565b806354214f69146105cb57806354ea6585146105f657806355234ec014610621576102d4565b8063333171bb146104f9578063341927ea146105105780633ccfd60b146105395780633fab10061461055057806342842e0e146105795780634530a832146105a2576102d4565b8063162d226111610286578063162d2261146103fb57806318160ddd146104265780631b60efb0146104515780631e760e881461047a57806323b872dd146104a557806325ee97e3146104ce576102d4565b806301ffc9a7146102d957806306fdde0314610316578063081812fc14610341578063095ea7b31461037e5780630f7309e8146103a757806310969523146103d2576102d4565b366102d457005b600080fd5b3480156102e557600080fd5b5061030060048036038101906102fb9190613c1d565b610b17565b60405161030d9190613c65565b60405180910390f35b34801561032257600080fd5b5061032b610bf9565b6040516103389190613d19565b60405180910390f35b34801561034d57600080fd5b5061036860048036038101906103639190613d71565b610c8b565b6040516103759190613ddf565b60405180910390f35b34801561038a57600080fd5b506103a560048036038101906103a09190613e26565b610d07565b005b3480156103b357600080fd5b506103bc610e12565b6040516103c99190613d19565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190613f9b565b610ea0565b005b34801561040757600080fd5b50610410610f36565b60405161041d9190613d19565b60405180910390f35b34801561043257600080fd5b5061043b610fc4565b6040516104489190613ff3565b60405180910390f35b34801561045d57600080fd5b5061047860048036038101906104739190613e26565b610fdb565b005b34801561048657600080fd5b5061048f6110c2565b60405161049c9190613ff3565b60405180910390f35b3480156104b157600080fd5b506104cc60048036038101906104c7919061400e565b6110c8565b005b3480156104da57600080fd5b506104e36110d8565b6040516104f09190613ff3565b60405180910390f35b34801561050557600080fd5b5061050e6110de565b005b34801561051c57600080fd5b506105376004803603810190610532919061415f565b611186565b005b34801561054557600080fd5b5061054e611457565b005b34801561055c57600080fd5b5061057760048036038101906105729190613f9b565b6115b3565b005b34801561058557600080fd5b506105a0600480360381019061059b919061400e565b611673565b005b3480156105ae57600080fd5b506105c960048036038101906105c49190613d71565b611693565b005b3480156105d757600080fd5b506105e0611719565b6040516105ed9190613c65565b60405180910390f35b34801561060257600080fd5b5061060b61172c565b6040516106189190613ff3565b60405180910390f35b34801561062d57600080fd5b50610636611736565b6040516106439190613ff3565b60405180910390f35b34801561065857600080fd5b50610673600480360381019061066e9190613f9b565b611757565b005b34801561068157600080fd5b5061068a6117ed565b6040516106979190613c65565b60405180910390f35b3480156106ac57600080fd5b506106b5611800565b6040516106c29190613ff3565b60405180910390f35b3480156106d757600080fd5b506106f260048036038101906106ed9190613d71565b61180a565b6040516106ff9190613ddf565b60405180910390f35b34801561071457600080fd5b5061072f600480360381019061072a91906141bb565b611820565b60405161073c9190613ff3565b60405180910390f35b34801561075157600080fd5b5061075a6118f0565b005b34801561076857600080fd5b50610771611978565b60405161077e9190613ff3565b60405180910390f35b34801561079357600080fd5b506107ae60048036038101906107a991906141e8565b61197e565b005b3480156107bc57600080fd5b506107d760048036038101906107d29190613d71565b611a04565b005b3480156107e557600080fd5b506107ee611a8a565b005b3480156107fc57600080fd5b50610805611b1c565b6040516108129190614224565b60405180910390f35b34801561082757600080fd5b50610830611b22565b60405161083d9190613ddf565b60405180910390f35b34801561085257600080fd5b5061085b611b4c565b6040516108689190613d19565b60405180910390f35b34801561087d57600080fd5b506108986004803603810190610893919061426b565b611bde565b005b3480156108a657600080fd5b506108c160048036038101906108bc91906141e8565b611d56565b005b3480156108cf57600080fd5b506108ea60048036038101906108e5919061434c565b611ddc565b005b3480156108f857600080fd5b50610913600480360381019061090e9190613d71565b611e58565b005b34801561092157600080fd5b5061093c60048036038101906109379190613f9b565b611ede565b005b34801561094a57600080fd5b5061096560048036038101906109609190613d71565b611f74565b005b34801561097357600080fd5b5061098e60048036038101906109899190613d71565b611ffa565b60405161099b9190613d19565b60405180910390f35b6109be60048036038101906109b9919061415f565b6121d3565b005b3480156109cc57600080fd5b506109d56124e8565b6040516109e29190613ff3565b60405180910390f35b3480156109f757600080fd5b50610a006124ee565b604051610a0d9190614224565b60405180910390f35b348015610a2257600080fd5b50610a3d6004803603810190610a3891906143cf565b6124f4565b604051610a4a9190613c65565b60405180910390f35b610a6d6004803603810190610a689190613d71565b612588565b005b348015610a7b57600080fd5b50610a966004803603810190610a919190613d71565b6127a9565b005b348015610aa457600080fd5b50610abf6004803603810190610aba91906141bb565b61282f565b005b348015610acd57600080fd5b50610ad6612927565b604051610ae39190613ff3565b60405180910390f35b348015610af857600080fd5b50610b0161292d565b604051610b0e9190613ff3565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610be257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610bf25750610bf182612933565b5b9050919050565b606060028054610c089061443e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c349061443e565b8015610c815780601f10610c5657610100808354040283529160200191610c81565b820191906000526020600020905b815481529060010190602001808311610c6457829003601f168201915b5050505050905090565b6000610c968261299d565b610ccc576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610d128261180a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d7a576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610d996129eb565b73ffffffffffffffffffffffffffffffffffffffff1614158015610dcb5750610dc981610dc46129eb565b6124f4565b155b15610e02576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0d8383836129f3565b505050565b60168054610e1f9061443e565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4b9061443e565b8015610e985780601f10610e6d57610100808354040283529160200191610e98565b820191906000526020600020905b815481529060010190602001808311610e7b57829003601f168201915b505050505081565b610ea86129eb565b73ffffffffffffffffffffffffffffffffffffffff16610ec6611b22565b73ffffffffffffffffffffffffffffffffffffffff1614610f1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f13906144bc565b60405180910390fd5b8060169080519060200190610f32929190613acb565b5050565b60178054610f439061443e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f6f9061443e565b8015610fbc5780601f10610f9157610100808354040283529160200191610fbc565b820191906000526020600020905b815481529060010190602001808311610f9f57829003601f168201915b505050505081565b6000610fce612aa5565b6001546000540303905090565b610fe36129eb565b73ffffffffffffffffffffffffffffffffffffffff16611001611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611057576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104e906144bc565b60405180910390fd5b6000611061610fc4565b9050600e548282611072919061450b565b11156110b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110aa906145ad565b60405180910390fd5b6110bd8383612aaa565b505050565b60125481565b6110d3838383612ac8565b505050565b60145481565b6110e66129eb565b73ffffffffffffffffffffffffffffffffffffffff16611104611b22565b73ffffffffffffffffffffffffffffffffffffffff161461115a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611151906144bc565b60405180910390fd5b601960009054906101000a900460ff1615601960006101000a81548160ff021916908315150217905550565b600260095414156111cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c390614619565b60405180910390fd5b6002600981905550601960009054906101000a900460ff1615611224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121b90614685565b60405180910390fd5b600060185414611269576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611260906146f1565b60405180910390fd5b6000611273610fc4565b905060125481106112b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b09061475d565b60405180910390fd5b601354600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061133c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611333906147ef565b60405180910390fd5b60003360405160200161134f9190614857565b60405160208183030381529060405280519060200120905061137381846001612fb9565b6113b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a9906148e4565b60405180910390fd5b83600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611401919061450b565b925050819055506114123385612aaa565b7f90ddedd5a25821bba11fbb98de02ec1f75c1be90ae147d6450ce873e7b78b5d8336040516114419190613ddf565b60405180910390a1505060016009819055505050565b61145f6129eb565b73ffffffffffffffffffffffffffffffffffffffff1661147d611b22565b73ffffffffffffffffffffffffffffffffffffffff16146114d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ca906144bc565b60405180910390fd5b6000479050733e33f56c2308484696896aea4d58ac493c2c243473ffffffffffffffffffffffffffffffffffffffff166108fc6127106123f0846115179190614904565b611521919061498d565b9081150290604051600060405180830381858888f1935050505061154457600080fd5b73e7e085e4a469ac08b12c1231f5c37410d9b12bfd73ffffffffffffffffffffffffffffffffffffffff166108fc612710610320846115839190614904565b61158d919061498d565b9081150290604051600060405180830381858888f193505050506115b057600080fd5b50565b6115bb6129eb565b73ffffffffffffffffffffffffffffffffffffffff166115d9611b22565b73ffffffffffffffffffffffffffffffffffffffff161461162f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611626906144bc565b60405180910390fd5b8060159080519060200190611645929190613acb565b50601960019054906101000a900460ff1615601960016101000a81548160ff02191690831515021790555050565b61168e83838360405180602001604052806000815250611ddc565b505050565b61169b6129eb565b73ffffffffffffffffffffffffffffffffffffffff166116b9611b22565b73ffffffffffffffffffffffffffffffffffffffff161461170f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611706906144bc565b60405180910390fd5b8060108190555050565b601960019054906101000a900460ff1681565b6000601054905090565b600080611741610fc4565b600e5461174e91906149be565b90508091505090565b61175f6129eb565b73ffffffffffffffffffffffffffffffffffffffff1661177d611b22565b73ffffffffffffffffffffffffffffffffffffffff16146117d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ca906144bc565b60405180910390fd5b80601590805190602001906117e9929190613acb565b5050565b601960009054906101000a900460ff1681565b6000600f54905090565b600061181582612fec565b600001519050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611888576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b6118f86129eb565b73ffffffffffffffffffffffffffffffffffffffff16611916611b22565b73ffffffffffffffffffffffffffffffffffffffff161461196c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611963906144bc565b60405180910390fd5b611976600061327b565b565b60135481565b6119866129eb565b73ffffffffffffffffffffffffffffffffffffffff166119a4611b22565b73ffffffffffffffffffffffffffffffffffffffff16146119fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f1906144bc565b60405180910390fd5b80600a8190555050565b611a0c6129eb565b73ffffffffffffffffffffffffffffffffffffffff16611a2a611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611a80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a77906144bc565b60405180910390fd5b80600f8190555050565b611a926129eb565b73ffffffffffffffffffffffffffffffffffffffff16611ab0611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afd906144bc565b60405180910390fd5b6000611b10610fc4565b905080600e8190555050565b600a5481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054611b5b9061443e565b80601f0160208091040260200160405190810160405280929190818152602001828054611b879061443e565b8015611bd45780601f10611ba957610100808354040283529160200191611bd4565b820191906000526020600020905b815481529060010190602001808311611bb757829003601f168201915b5050505050905090565b611be66129eb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c4b576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611c586129eb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611d056129eb565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d4a9190613c65565b60405180910390a35050565b611d5e6129eb565b73ffffffffffffffffffffffffffffffffffffffff16611d7c611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611dd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc9906144bc565b60405180910390fd5b80600b8190555050565b611de7848484612ac8565b611e068373ffffffffffffffffffffffffffffffffffffffff16613341565b8015611e1b5750611e1984848484613354565b155b15611e52576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b611e606129eb565b73ffffffffffffffffffffffffffffffffffffffff16611e7e611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611ed4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecb906144bc565b60405180910390fd5b8060128190555050565b611ee66129eb565b73ffffffffffffffffffffffffffffffffffffffff16611f04611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611f5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f51906144bc565b60405180910390fd5b8060179080519060200190611f70929190613acb565b5050565b611f7c6129eb565b73ffffffffffffffffffffffffffffffffffffffff16611f9a611b22565b73ffffffffffffffffffffffffffffffffffffffff1614611ff0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe7906144bc565b60405180910390fd5b8060118190555050565b60606120058261299d565b612044576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203b90614a64565b60405180910390fd5b60001515601960019054906101000a900460ff16151514156120f2576017805461206d9061443e565b80601f01602080910402602001604051908101604052809291908181526020018280546120999061443e565b80156120e65780601f106120bb576101008083540402835291602001916120e6565b820191906000526020600020905b8154815290600101906020018083116120c957829003601f168201915b505050505090506121ce565b6000601580546121019061443e565b80601f016020809104026020016040519081016040528092919081815260200182805461212d9061443e565b801561217a5780601f1061214f5761010080835404028352916020019161217a565b820191906000526020600020905b81548152906001019060200180831161215d57829003601f168201915b50505050509050600081511161219f57604051806020016040528060008152506121ca565b806121a9846134b4565b6040516020016121ba929190614b0c565b6040516020818303038152906040525b9150505b919050565b60026009541415612219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221090614619565b60405180910390fd5b6002600981905550601960009054906101000a900460ff1615612271576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226890614685565b60405180910390fd5b6001601854146122b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ad90614b87565b60405180910390fd5b81600f546122c49190614904565b341015612306576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122fd90614bf3565b60405180910390fd5b6000336040516020016123199190614857565b60405160208183030381529060405280519060200120905061233d81836000612fb9565b61237c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237390614c85565b60405180910390fd5b601454600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106123ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f6906147ef565b60405180910390fd5b601154831115612444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243b90614cf1565b60405180910390fd5b82600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612493919061450b565b925050819055506124a43384612aaa565b7f90ddedd5a25821bba11fbb98de02ec1f75c1be90ae147d6450ce873e7b78b5d8336040516124d39190613ddf565b60405180910390a15060016009819055505050565b600e5481565b600b5481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600260095414156125ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c590614619565b60405180910390fd5b6002600981905550601960009054906101000a900460ff1615612626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261d90614685565b60405180910390fd5b60026018541461266b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161266290614d5d565b60405180910390fd5b6000612675610fc4565b9050600e548282612686919061450b565b11156126c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126be906145ad565b60405180910390fd5b60115482111561270c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270390614cf1565b60405180910390fd5b8160105461271a9190614904565b34101561275c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161275390614bf3565b60405180910390fd5b6127663383612aaa565b7f90ddedd5a25821bba11fbb98de02ec1f75c1be90ae147d6450ce873e7b78b5d8336040516127959190613ddf565b60405180910390a150600160098190555050565b6127b16129eb565b73ffffffffffffffffffffffffffffffffffffffff166127cf611b22565b73ffffffffffffffffffffffffffffffffffffffff1614612825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281c906144bc565b60405180910390fd5b8060188190555050565b6128376129eb565b73ffffffffffffffffffffffffffffffffffffffff16612855611b22565b73ffffffffffffffffffffffffffffffffffffffff16146128ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a2906144bc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561291b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291290614def565b60405180910390fd5b6129248161327b565b50565b60185481565b60115481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000816129a8612aa5565b111580156129b7575060005482105b80156129e4575060046000838152602001908152602001600020600001601c9054906101000a900460ff16155b9050919050565b600033905090565b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600090565b612ac4828260405180602001604052806000815250613615565b5050565b6000612ad382612fec565b90506000816000015173ffffffffffffffffffffffffffffffffffffffff16612afa6129eb565b73ffffffffffffffffffffffffffffffffffffffff161480612b2d5750612b2c8260000151612b276129eb565b6124f4565b5b80612b725750612b3b6129eb565b73ffffffffffffffffffffffffffffffffffffffff16612b5a84610c8b565b73ffffffffffffffffffffffffffffffffffffffff16145b905080612bab576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614612c14576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612c7b576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612c888585856001613627565b612c9860008484600001516129f3565b6001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550836004600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600085815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000600184019050600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612f4957600054811015612f485782600001516004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082602001516004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5b50828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612fb2858585600161362d565b5050505050565b60008115612fd557612fce83600a5486613633565b9050612fe5565b612fe283600b5486613633565b90505b9392505050565b612ff4613b51565b600082905080613002612aa5565b11158015613011575060005481105b15613244576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050806040015161324257600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614613126578092505050613276565b5b60011561324157818060019003925050600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461323c578092505050613276565b613127565b5b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080823b905060008111915050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261337a6129eb565b8786866040518563ffffffff1660e01b815260040161339c9493929190614e64565b602060405180830381600087803b1580156133b657600080fd5b505af19250505080156133e757506040513d601f19601f820116820180604052508101906133e49190614ec5565b60015b613461573d8060008114613417576040519150601f19603f3d011682016040523d82523d6000602084013e61341c565b606091505b50600081511415613459576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b606060008214156134fc576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613610565b600082905060005b6000821461352e57808061351790614ef2565b915050600a82613527919061498d565b9150613504565b60008167ffffffffffffffff81111561354a57613549613e70565b5b6040519080825280601f01601f19166020018201604052801561357c5781602001600182028036833780820191505090505b5090505b600085146136095760018261359591906149be565b9150600a856135a49190614f3b565b60306135b0919061450b565b60f81b8183815181106135c6576135c5614f6c565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85613602919061498d565b9450613580565b8093505050505b919050565b613622838383600161364a565b505050565b50505050565b50505050565b6000826136408584613a18565b1490509392505050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156136b7576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008414156136f2576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136ff6000868387613627565b83600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160088282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550846004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000819050600085820190508380156138c957506138c88773ffffffffffffffffffffffffffffffffffffffff16613341565b5b1561398f575b818773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461393e6000888480600101955088613354565b613974576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808214156138cf57826000541461398a57600080fd5b6139fb565b5b818060010192508773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a480821415613990575b816000819055505050613a11600086838761362d565b5050505050565b60008082905060005b8451811015613ac0576000858281518110613a3f57613a3e614f6c565b5b60200260200101519050808311613a80578281604051602001613a63929190614fbc565b604051602081830303815290604052805190602001209250613aac565b8083604051602001613a93929190614fbc565b6040516020818303038152906040528051906020012092505b508080613ab890614ef2565b915050613a21565b508091505092915050565b828054613ad79061443e565b90600052602060002090601f016020900481019282613af95760008555613b40565b82601f10613b1257805160ff1916838001178555613b40565b82800160010185558215613b40579182015b82811115613b3f578251825591602001919060010190613b24565b5b509050613b4d9190613b94565b5090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff1681526020016000151581525090565b5b80821115613bad576000816000905550600101613b95565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613bfa81613bc5565b8114613c0557600080fd5b50565b600081359050613c1781613bf1565b92915050565b600060208284031215613c3357613c32613bbb565b5b6000613c4184828501613c08565b91505092915050565b60008115159050919050565b613c5f81613c4a565b82525050565b6000602082019050613c7a6000830184613c56565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613cba578082015181840152602081019050613c9f565b83811115613cc9576000848401525b50505050565b6000601f19601f8301169050919050565b6000613ceb82613c80565b613cf58185613c8b565b9350613d05818560208601613c9c565b613d0e81613ccf565b840191505092915050565b60006020820190508181036000830152613d338184613ce0565b905092915050565b6000819050919050565b613d4e81613d3b565b8114613d5957600080fd5b50565b600081359050613d6b81613d45565b92915050565b600060208284031215613d8757613d86613bbb565b5b6000613d9584828501613d5c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613dc982613d9e565b9050919050565b613dd981613dbe565b82525050565b6000602082019050613df46000830184613dd0565b92915050565b613e0381613dbe565b8114613e0e57600080fd5b50565b600081359050613e2081613dfa565b92915050565b60008060408385031215613e3d57613e3c613bbb565b5b6000613e4b85828601613e11565b9250506020613e5c85828601613d5c565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613ea882613ccf565b810181811067ffffffffffffffff82111715613ec757613ec6613e70565b5b80604052505050565b6000613eda613bb1565b9050613ee68282613e9f565b919050565b600067ffffffffffffffff821115613f0657613f05613e70565b5b613f0f82613ccf565b9050602081019050919050565b82818337600083830152505050565b6000613f3e613f3984613eeb565b613ed0565b905082815260208101848484011115613f5a57613f59613e6b565b5b613f65848285613f1c565b509392505050565b600082601f830112613f8257613f81613e66565b5b8135613f92848260208601613f2b565b91505092915050565b600060208284031215613fb157613fb0613bbb565b5b600082013567ffffffffffffffff811115613fcf57613fce613bc0565b5b613fdb84828501613f6d565b91505092915050565b613fed81613d3b565b82525050565b60006020820190506140086000830184613fe4565b92915050565b60008060006060848603121561402757614026613bbb565b5b600061403586828701613e11565b935050602061404686828701613e11565b925050604061405786828701613d5c565b9150509250925092565b600067ffffffffffffffff82111561407c5761407b613e70565b5b602082029050602081019050919050565b600080fd5b6000819050919050565b6140a581614092565b81146140b057600080fd5b50565b6000813590506140c28161409c565b92915050565b60006140db6140d684614061565b613ed0565b905080838252602082019050602084028301858111156140fe576140fd61408d565b5b835b81811015614127578061411388826140b3565b845260208401935050602081019050614100565b5050509392505050565b600082601f83011261414657614145613e66565b5b81356141568482602086016140c8565b91505092915050565b6000806040838503121561417657614175613bbb565b5b600061418485828601613d5c565b925050602083013567ffffffffffffffff8111156141a5576141a4613bc0565b5b6141b185828601614131565b9150509250929050565b6000602082840312156141d1576141d0613bbb565b5b60006141df84828501613e11565b91505092915050565b6000602082840312156141fe576141fd613bbb565b5b600061420c848285016140b3565b91505092915050565b61421e81614092565b82525050565b60006020820190506142396000830184614215565b92915050565b61424881613c4a565b811461425357600080fd5b50565b6000813590506142658161423f565b92915050565b6000806040838503121561428257614281613bbb565b5b600061429085828601613e11565b92505060206142a185828601614256565b9150509250929050565b600067ffffffffffffffff8211156142c6576142c5613e70565b5b6142cf82613ccf565b9050602081019050919050565b60006142ef6142ea846142ab565b613ed0565b90508281526020810184848401111561430b5761430a613e6b565b5b614316848285613f1c565b509392505050565b600082601f83011261433357614332613e66565b5b81356143438482602086016142dc565b91505092915050565b6000806000806080858703121561436657614365613bbb565b5b600061437487828801613e11565b945050602061438587828801613e11565b935050604061439687828801613d5c565b925050606085013567ffffffffffffffff8111156143b7576143b6613bc0565b5b6143c38782880161431e565b91505092959194509250565b600080604083850312156143e6576143e5613bbb565b5b60006143f485828601613e11565b925050602061440585828601613e11565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061445657607f821691505b6020821081141561446a5761446961440f565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006144a6602083613c8b565b91506144b182614470565b602082019050919050565b600060208201905081810360008301526144d581614499565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061451682613d3b565b915061452183613d3b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614556576145556144dc565b5b828201905092915050565b7f536f7272792c206e6f7420656e6f756768206c65667421000000000000000000600082015250565b6000614597601783613c8b565b91506145a282614561565b602082019050919050565b600060208201905081810360008301526145c68161458a565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614603601f83613c8b565b915061460e826145cd565b602082019050919050565b60006020820190508181036000830152614632816145f6565b9050919050565b7f4d696e74696e6720697320706175736564000000000000000000000000000000600082015250565b600061466f601183613c8b565b915061467a82614639565b602082019050919050565b6000602082019050818103600083015261469e81614662565b9050919050565b7f46726565206d696e74206e6f7420616374697665000000000000000000000000600082015250565b60006146db601483613c8b565b91506146e6826146a5565b602082019050919050565b6000602082019050818103600083015261470a816146ce565b9050919050565b7f536f7272792c2077652072616e206f7574206f662066726565206f6e65732100600082015250565b6000614747601f83613c8b565b915061475282614711565b602082019050919050565b600060208201905081810360008301526147768161473a565b9050919050565b7f536f7272792c20796f7520616c7265616479206f776e20746865206d6178206160008201527f6c6c6f7765640000000000000000000000000000000000000000000000000000602082015250565b60006147d9602683613c8b565b91506147e48261477d565b604082019050919050565b60006020820190508181036000830152614808816147cc565b9050919050565b60008160601b9050919050565b60006148278261480f565b9050919050565b60006148398261481c565b9050919050565b61485161484c82613dbe565b61482e565b82525050565b60006148638284614840565b60148201915081905092915050565b7f536f7272792c20796f7520617265206e6f74206c697374656420666f7220667260008201527f6565206d696e7400000000000000000000000000000000000000000000000000602082015250565b60006148ce602783613c8b565b91506148d982614872565b604082019050919050565b600060208201905081810360008301526148fd816148c1565b9050919050565b600061490f82613d3b565b915061491a83613d3b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614953576149526144dc565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061499882613d3b565b91506149a383613d3b565b9250826149b3576149b261495e565b5b828204905092915050565b60006149c982613d3b565b91506149d483613d3b565b9250828210156149e7576149e66144dc565b5b828203905092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614a4e602f83613c8b565b9150614a59826149f2565b604082019050919050565b60006020820190508181036000830152614a7d81614a41565b9050919050565b600081905092915050565b6000614a9a82613c80565b614aa48185614a84565b9350614ab4818560208601613c9c565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000614af6600583614a84565b9150614b0182614ac0565b600582019050919050565b6000614b188285614a8f565b9150614b248284614a8f565b9150614b2f82614ae9565b91508190509392505050565b7f57686974656c697374206e6f7420616374697665000000000000000000000000600082015250565b6000614b71601483613c8b565b9150614b7c82614b3b565b602082019050919050565b60006020820190508181036000830152614ba081614b64565b9050919050565b7f536f7272792c206e6f7420656e6f75676820616d6f756e742073656e74210000600082015250565b6000614bdd601e83613c8b565b9150614be882614ba7565b602082019050919050565b60006020820190508181036000830152614c0c81614bd0565b9050919050565b7f536f7272792c20796f7520617265206e6f74206c697374656420666f7220776860008201527f6974656c69737400000000000000000000000000000000000000000000000000602082015250565b6000614c6f602783613c8b565b9150614c7a82614c13565b604082019050919050565b60006020820190508181036000830152614c9e81614c62565b9050919050565b7f536f7272792c20746f6f206d616e7920706572207472616e73616374696f6e00600082015250565b6000614cdb601f83613c8b565b9150614ce682614ca5565b602082019050919050565b60006020820190508181036000830152614d0a81614cce565b9050919050565b7f5075626c69632073616c65206e6f742061637469766500000000000000000000600082015250565b6000614d47601683613c8b565b9150614d5282614d11565b602082019050919050565b60006020820190508181036000830152614d7681614d3a565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614dd9602683613c8b565b9150614de482614d7d565b604082019050919050565b60006020820190508181036000830152614e0881614dcc565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614e3682614e0f565b614e408185614e1a565b9350614e50818560208601613c9c565b614e5981613ccf565b840191505092915050565b6000608082019050614e796000830187613dd0565b614e866020830186613dd0565b614e936040830185613fe4565b8181036060830152614ea58184614e2b565b905095945050505050565b600081519050614ebf81613bf1565b92915050565b600060208284031215614edb57614eda613bbb565b5b6000614ee984828501614eb0565b91505092915050565b6000614efd82613d3b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614f3057614f2f6144dc565b5b600182019050919050565b6000614f4682613d3b565b9150614f5183613d3b565b925082614f6157614f6061495e565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b614fb6614fb182614092565b614f9b565b82525050565b6000614fc88285614fa5565b602082019150614fd88284614fa5565b602082019150819050939250505056fea26469706673582212207811eec7fda9a7c8b13756e5400dcdc7fd61bf420dbf0d1894919c887345f12564736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: No
HP.sol 201 lines
// ___ ___
// ( ) ( ) .-.
// | | .-. ___ ___ .--. | | .-. .-.. ___ ___ .-.. .-.. ( __) .--. .--.
// | |/ \ ( )( ) / _ \ | |/ \ / \ ( )( ) / \ / \ (''") / \ / _ \
// | .-. . | | | | . .' `. ; | .-. . ' .-, ; | | | | ' .-, ; ' .-, ; | | | .-. ; . .' `. ;
// | | | | | | | | | ' | | | | | | | | . | | | | | | | . | | | . | | | | | | | | ' | |
// | | | | | | | | _\_`.(___) | | | | | | | | | | | | | | | | | | | | | | | |/ | _\_`.(___)
// | | | | | | | | ( ). '. | | | | | | | | | | | | | | | | | | | | | | | ' _.' ( ). '.
// | | | | | | ; ' | | `\ | | | | | | | ' | | | ; ' | | ' | | | ' | | | | .'.-. | | `\ |
// | | | | ' `-' / ; '._,' ' | | | | | `-' ' ' `-' / | `-' ' | `-' ' | | ' `-' / ; '._,' '
// (___)(___) '.__.' '.___.' (___)(___) | \__.' '.__.' | \__.' | \__.' (___) `.__.' '.___.'
// | | | | | |
// (___) (___) (___)
//
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ERC721A.sol";
contract HushPuppies is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRootFree = "";
bytes32 public merkleRootWL = "";
mapping (address => uint256) private mintedFree;
mapping (address => uint256) private mintedWL;
uint256 public maxSupply = 7777;
uint256 private priceWL = 0.0077 ether;
uint256 private pricePublic = 0.0077 ether;
uint256 public maxPerTx = 10;
uint256 public qtyFree = 2222;
uint256 public maxPerWalletFree = 3;
uint256 public maxPerWalletWL = 10;
string private baseURI = "";
string public provenance = "";
string public uriNotRevealed = "";
uint256 public saleStatus = 0; // 0 - free, 1 - whitelist, 2 - public
bool public paused = true;
bool public isRevealed;
event Minted(address caller);
constructor() ERC721A("Hush Puppies", "HP") {}
// verify merkle tree leaf
function _verify(bytes32 leaf, bytes32[] memory proof, bool isFree) internal view returns (bool){
if(isFree){
return MerkleProof.verify(proof, merkleRootFree, leaf);
}else{
return MerkleProof.verify(proof, merkleRootWL, leaf);
}
}
// mints a free token to the caller
function mintFree(uint256 qty, bytes32[] memory proof) public nonReentrant {
require(!paused, "Minting is paused");
require(saleStatus == 0, 'Free mint not active');
uint256 supply = totalSupply();
require(supply < qtyFree, "Sorry, we ran out of free ones!");
require(mintedFree[msg.sender] < maxPerWalletFree, "Sorry, you already own the max allowed");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(_verify(leaf, proof, true), "Sorry, you are not listed for free mint");
mintedFree[msg.sender] += qty;
_safeMint(msg.sender, qty);
emit Minted(msg.sender);
}
function mintWL(uint256 qty, bytes32[] memory proof) external payable nonReentrant{
require(!paused, "Minting is paused");
require(saleStatus == 1, 'Whitelist not active');
// uint256 supply = totalSupply();
require(msg.value >= priceWL * qty, "Sorry, not enough amount sent!");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(_verify(leaf, proof, false), "Sorry, you are not listed for whitelist");
require(mintedWL[msg.sender] < maxPerWalletWL, "Sorry, you already own the max allowed");
require(qty <= maxPerTx, "Sorry, too many per transaction");
mintedWL[msg.sender] += qty;
_safeMint(msg.sender, qty);
emit Minted(msg.sender);
}
function mintPublic(uint256 qty) external payable nonReentrant{
require(!paused, "Minting is paused");
require(saleStatus == 2, 'Public sale not active');
uint256 supply = totalSupply();
require(supply + qty <= maxSupply, "Sorry, not enough left!");
require(qty <= maxPerTx, "Sorry, too many per transaction");
require(msg.value >= pricePublic * qty, "Sorry, not enough amount sent!");
_safeMint(msg.sender, qty);
emit Minted(msg.sender);
}
function mintGiveaway(address _to, uint256 qty) external onlyOwner{
uint256 supply = totalSupply();
require(supply + qty <= maxSupply, "Sorry, not enough left!");
_safeMint(_to, qty);
}
function remaining() public view returns(uint256){
uint256 left = maxSupply - totalSupply();
return left;
}
function getPricePublic() public view returns (uint256){
return pricePublic;
}
function getPriceWL() public view returns (uint256){
return priceWL;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
if (isRevealed == false) {
return uriNotRevealed;
}
string memory base = baseURI;
return bytes(base).length > 0 ? string(abi.encodePacked(base, tokenId.toString(), ".json")) : "";
}
// ADMIN FUNCTIONS
function flipPaused() public onlyOwner {
paused = !paused;
}
function setMerkleRootFree(bytes32 _merkleRoot) public onlyOwner {
merkleRootFree = _merkleRoot;
}
function setMerkleRootWL(bytes32 _merkleRoot) public onlyOwner {
merkleRootWL = _merkleRoot;
}
function setSaleStatus(uint256 _saleStatus) public onlyOwner {
saleStatus = _saleStatus;
}
// close minting forever!
function closeMinting() public onlyOwner {
uint256 supply = totalSupply();
maxSupply = supply;
}
function flipRevealed(string memory _URI) public onlyOwner {
baseURI = _URI;
isRevealed = !isRevealed;
}
function setBaseURI(string memory _URI) public onlyOwner {
baseURI = _URI;
}
function setUriNotRevealed(string memory _URI) public onlyOwner {
uriNotRevealed = _URI;
}
function setPricePublic(uint256 _newPrice) public onlyOwner {
pricePublic = _newPrice;
}
function setPriceWL(uint256 _newPrice) public onlyOwner {
priceWL = _newPrice;
}
function setMaxPerTx(uint256 _newMax) public onlyOwner {
maxPerTx = _newMax;
}
function changeFree(uint256 _free) public onlyOwner {
qtyFree = _free;
}
function setProvenanceHash(string memory _provenance) public onlyOwner {
provenance = _provenance;
}
function withdraw() onlyOwner public {
uint256 balance = address(this).balance;
require(payable(0x3E33f56c2308484696896aEa4d58AC493C2C2434).send((balance * 9200) / 10000));
require(payable(0xe7e085E4A469AC08b12c1231f5C37410d9B12bFd).send((balance * 800) / 10000));
}
receive() external payable {}
}
ERC721A.sol 613 lines
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error BurnedQueryForZeroAddress();
error AuxQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
}
// Compiler will pack this into a single 256bit word.
struct AddressData {
// Realistically, 2**64-1 is more than enough.
uint64 balance;
// Keeps track of mint count with minimal overhead for tokenomics.
uint64 numberMinted;
// Keeps track of burn count with minimal overhead for tokenomics.
uint64 numberBurned;
// For miscellaneous variable(s) pertaining to the address
// (e.g. number of whitelist mint slots used).
// If there are multiple variables, please pack them into a uint64.
uint64 aux;
}
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
// The number of tokens burned.
uint256 internal _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 _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// 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;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than _currentIndex - _startTokenId() times
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
// Counter underflow is impossible as _currentIndex does not decrement,
// and it is initialized to _startTokenId()
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @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 override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return uint256(_addressData[owner].balance);
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
if (owner == address(0)) revert MintedQueryForZeroAddress();
return uint256(_addressData[owner].numberMinted);
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
if (owner == address(0)) revert BurnedQueryForZeroAddress();
return uint256(_addressData[owner].numberBurned);
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
if (owner == address(0)) revert AuxQueryForZeroAddress();
return _addressData[owner].aux;
}
/**
* Sets the auxillary 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 {
if (owner == address(0)) revert AuxQueryForZeroAddress();
_addressData[owner].aux = aux;
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr && curr < _currentIndex) {
TokenOwnership memory ownership = _ownerships[curr];
if (!ownership.burned) {
if (ownership.addr != address(0)) {
return ownership;
}
// Invariant:
// There will always be an ownership that has an address and is not burned
// before an ownership that does not have an address and is not burned.
// Hence, curr will not underflow.
while (true) {
curr--;
ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
return _ownershipOf(tokenId).addr;
}
/**
* @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) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
address owner = ERC721A.ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_approve(to, tokenId, owner);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSender()) revert ApproveToCaller();
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_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 {
_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 {
_transfer(from, to, tokenId);
if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @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`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
return _startTokenId() <= tokenId && tokenId < _currentIndex &&
!_ownerships[tokenId].burned;
}
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, '');
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
_mint(to, quantity, _data, true);
}
/**
* @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.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
// updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
if (safe && to.isContract()) {
do {
emit Transfer(address(0), to, updatedIndex);
if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (updatedIndex != end);
// Reentrancy protection
if (_currentIndex != startTokenId) revert();
} else {
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex != end);
}
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) private {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
isApprovedForAll(prevOwnership.addr, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, prevOwnership.addr);
// 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 {
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
_ownerships[tokenId].addr = to;
_ownerships[tokenId].startTimestamp = uint64(block.timestamp);
// If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
// Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
uint256 nextTokenId = tokenId + 1;
if (_ownerships[nextTokenId].addr == address(0)) {
// This will suffice for checking _exists(nextTokenId),
// as a burned slot cannot contain the zero address.
if (nextTokenId < _currentIndex) {
_ownerships[nextTokenId].addr = prevOwnership.addr;
_ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @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 {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
_beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, prevOwnership.addr);
// 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 {
_addressData[prevOwnership.addr].balance -= 1;
_addressData[prevOwnership.addr].numberBurned += 1;
// Keep track of who burned the token, and the timestamp of burning.
_ownerships[tokenId].addr = prevOwnership.addr;
_ownerships[tokenId].startTimestamp = uint64(block.timestamp);
_ownerships[tokenId].burned = true;
// If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
// Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
uint256 nextTokenId = tokenId + 1;
if (_ownerships[nextTokenId].addr == address(0)) {
// This will suffice for checking _exists(nextTokenId),
// as a burned slot cannot contain the zero address.
if (nextTokenId < _currentIndex) {
_ownerships[nextTokenId].addr = prevOwnership.addr;
_ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(prevOwnership.addr, address(0), tokenId);
_afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
/**
* @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 {}
}
Address.sol 217 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
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);
}
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
ReentrancyGuard.sol 63 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
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 v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
MerkleProof.sol 52 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
return computedHash;
}
}
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);
}
IERC721Enumerable.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
Read Contract
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
getPricePublic 0x54ea6585 → uint256
getPriceWL 0x5daaf45d → uint256
isApprovedForAll 0xe985e9c5 → bool
isRevealed 0x54214f69 → bool
maxPerTx 0xf968adbe → uint256
maxPerWalletFree 0x7f5f5a45 → uint256
maxPerWalletWL 0x25ee97e3 → uint256
maxSupply 0xd5abeb01 → uint256
merkleRootFree 0x89ba959c → bytes32
merkleRootWL 0xd6492d81 → bytes32
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
provenance 0x0f7309e8 → string
qtyFree 0x1e760e88 → uint256
remaining 0x55234ec0 → uint256
saleStatus 0xf9020e33 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
uriNotRevealed 0x162d2261 → string
Write Contract 25 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
changeFree 0xbabf5e37
uint256 _free
closeMinting 0x87491c60
No parameters
flipPaused 0x333171bb
No parameters
flipRevealed 0x3fab1006
string _URI
mintFree 0x341927ea
uint256 qty
bytes32[] proof
mintGiveaway 0x1b60efb0
address _to
uint256 qty
mintPublic 0xefd0cbf9
uint256 qty
mintWL 0xd0bfb810
uint256 qty
bytes32[] proof
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _URI
setMaxPerTx 0xc6f6f216
uint256 _newMax
setMerkleRootFree 0x80a0bcc6
bytes32 _merkleRoot
setMerkleRootWL 0xad3e31b7
bytes32 _merkleRoot
setPricePublic 0x4530a832
uint256 _newPrice
setPriceWL 0x81d8488f
uint256 _newPrice
setProvenanceHash 0x10969523
string _provenance
setSaleStatus 0xf29f15af
uint256 _saleStatus
setUriNotRevealed 0xc3bb0cc2
string _URI
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address