Address Contract Verified
Address
0xE63bE4Ed45D32e43Ff9b53AE9930983B0367330a
Balance
0 ETH
Nonce
1
Code Size
21626 bytes
Creator
0x2bA123B9...5735 at tx 0x63d946ad...6550f6
Indexed Transactions
0
Contract Bytecode
21626 bytes
0x6080604052600436106102455760003560e01c806368428a1b11610139578063987a7a7d116100b6578063d547cfb71161007a578063d547cfb71461086a578063da6f4b4814610895578063e985e9c5146108b1578063ee3d17c5146108ee578063f2fde38b1461090a578063fe625fb61461093357610245565b8063987a7a7d14610785578063a035b1fe146107b0578063a22cb465146107db578063b88d4fde14610804578063c87b56dd1461082d57610245565b80638456cb59116100fd5780638456cb59146106b05780638462151c146106c75780638da5cb5b1461070457806395b35c8c1461072f57806395d89b411461075a57610245565b806368428a1b146105ec5780636861616e1461061757806370a0823114610633578063715018a614610670578063841718a61461068757610245565b806340d097c3116101c757806353135ca01161018b57806353135ca0146104f357806355f804b31461051e5780635c975abb146105475780636352211e1461057257806366fca980146105af57610245565b806340d097c31461041257806342842e0e1461043b57806348a6ab7e1461046457806348c8744f1461048d5780634f6ccce7146104b657610245565b806318160ddd1161020e57806318160ddd1461034157806323b872dd1461036c5780632f745c59146103955780633f4ba83a146103d25780633f8121a2146103e957610245565b8062728e461461024a57806301ffc9a71461027357806306fdde03146102b0578063081812fc146102db578063095ea7b314610318575b600080fd5b34801561025657600080fd5b50610271600480360381019061026c9190613d70565b61095c565b005b34801561027f57600080fd5b5061029a60048036038101906102959190613ca0565b6109e2565b6040516102a7919061435f565b60405180910390f35b3480156102bc57600080fd5b506102c56109f4565b6040516102d2919061437a565b60405180910390f35b3480156102e757600080fd5b5061030260048036038101906102fd9190613d70565b610a86565b60405161030f91906142d6565b60405180910390f35b34801561032457600080fd5b5061033f600480360381019061033a9190613b72565b610b0b565b005b34801561034d57600080fd5b50610356610c23565b6040516103639190614717565b60405180910390f35b34801561037857600080fd5b50610393600480360381019061038e9190613a1c565b610c30565b005b3480156103a157600080fd5b506103bc60048036038101906103b79190613b72565b610c90565b6040516103c99190614717565b60405180910390f35b3480156103de57600080fd5b506103e7610d35565b005b3480156103f557600080fd5b50610410600480360381019061040b9190613c73565b610dbb565b005b34801561041e57600080fd5b50610439600480360381019061043491906139af565b610e54565b005b34801561044757600080fd5b50610462600480360381019061045d9190613a1c565b610ef0565b005b34801561047057600080fd5b5061048b60048036038101906104869190613b32565b610f10565b005b34801561049957600080fd5b506104b460048036038101906104af9190613bfb565b61107f565b005b3480156104c257600080fd5b506104dd60048036038101906104d89190613d70565b6111c3565b6040516104ea9190614717565b60405180910390f35b3480156104ff57600080fd5b50610508611234565b604051610515919061435f565b60405180910390f35b34801561052a57600080fd5b5061054560048036038101906105409190613cfa565b611247565b005b34801561055357600080fd5b5061055c6112dd565b604051610569919061435f565b60405180910390f35b34801561057e57600080fd5b5061059960048036038101906105949190613d70565b6112f4565b6040516105a691906142d6565b60405180910390f35b3480156105bb57600080fd5b506105d660048036038101906105d191906139af565b6113a6565b6040516105e391906146fc565b60405180910390f35b3480156105f857600080fd5b506106016113c7565b60405161060e919061435f565b60405180910390f35b610631600480360381019061062c9190613d70565b6113da565b005b34801561063f57600080fd5b5061065a600480360381019061065591906139af565b611543565b6040516106679190614717565b60405180910390f35b34801561067c57600080fd5b506106856115fb565b005b34801561069357600080fd5b506106ae60048036038101906106a99190613c73565b611683565b005b3480156106bc57600080fd5b506106c561171c565b005b3480156106d357600080fd5b506106ee60048036038101906106e991906139af565b6117a2565b6040516106fb919061433d565b60405180910390f35b34801561071057600080fd5b50610719611850565b60405161072691906142d6565b60405180910390f35b34801561073b57600080fd5b5061074461187a565b60405161075191906142d6565b60405180910390f35b34801561076657600080fd5b5061076f6118a0565b60405161077c919061437a565b60405180910390f35b34801561079157600080fd5b5061079a611932565b6040516107a791906142d6565b60405180910390f35b3480156107bc57600080fd5b506107c5611958565b6040516107d29190614717565b60405180910390f35b3480156107e757600080fd5b5061080260048036038101906107fd9190613af2565b61195e565b005b34801561081057600080fd5b5061082b60048036038101906108269190613a6f565b611adf565b005b34801561083957600080fd5b50610854600480360381019061084f9190613d70565b611b41565b604051610861919061437a565b60405180910390f35b34801561087657600080fd5b5061087f611be8565b60405161088c919061437a565b60405180910390f35b6108af60048036038101906108aa9190613d43565b611c76565b005b3480156108bd57600080fd5b506108d860048036038101906108d391906139dc565b611e0a565b6040516108e5919061435f565b60405180910390f35b61090860048036038101906109039190613d43565b611e9e565b005b34801561091657600080fd5b50610931600480360381019061092c91906139af565b612130565b005b34801561093f57600080fd5b5061095a60048036038101906109559190613bb2565b612228565b005b61096461235f565b73ffffffffffffffffffffffffffffffffffffffff16610982611850565b73ffffffffffffffffffffffffffffffffffffffff16146109d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cf906145bc565b60405180910390fd5b80600d8190555050565b60006109ed82612367565b9050919050565b606060008054610a0390614ad2565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2f90614ad2565b8015610a7c5780601f10610a5157610100808354040283529160200191610a7c565b820191906000526020600020905b815481529060010190602001808311610a5f57829003601f168201915b5050505050905090565b6000610a91826123e1565b610ad0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac79061459c565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b16826112f4565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7e9061463c565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ba661235f565b73ffffffffffffffffffffffffffffffffffffffff161480610bd55750610bd481610bcf61235f565b611e0a565b5b610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b906144fc565b60405180910390fd5b610c1e838361244d565b505050565b6000600980549050905090565b610c41610c3b61235f565b82612506565b610c80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c779061465c565b60405180910390fd5b610c8b8383836125e4565b505050565b6000610c9b83611543565b8210610cdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd3906143bc565b60405180910390fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610d3d61235f565b73ffffffffffffffffffffffffffffffffffffffff16610d5b611850565b73ffffffffffffffffffffffffffffffffffffffff1614610db1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da8906145bc565b60405180910390fd5b610db9612840565b565b610dc361235f565b73ffffffffffffffffffffffffffffffffffffffff16610de1611850565b73ffffffffffffffffffffffffffffffffffffffff1614610e37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2e906145bc565b60405180910390fd5b80600f60006101000a81548160ff02191690831515021790555050565b610e5c61235f565b73ffffffffffffffffffffffffffffffffffffffff16610e7a611850565b73ffffffffffffffffffffffffffffffffffffffff1614610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec7906145bc565b60405180910390fd5b610ee381610ede600c6128e2565b6128f0565b610eed600c61290e565b50565b610f0b83838360405180602001604052806000815250611adf565b505050565b610f1861235f565b73ffffffffffffffffffffffffffffffffffffffff16610f36611850565b73ffffffffffffffffffffffffffffffffffffffff1614610f8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f83906145bc565b60405180910390fd5b601561ffff168161ffff1610610fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fce906145dc565b60405180910390fd5b6000610fe1610c23565b905061157d61ffff168282610ff6919061488d565b61ffff161061103a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110319061467c565b60405180910390fd5b60005b8261ffff168161ffff1610156110795761106684828461105d919061488d565b61ffff166128f0565b808061107190614b35565b91505061103d565b50505050565b61108761235f565b73ffffffffffffffffffffffffffffffffffffffff166110a5611850565b73ffffffffffffffffffffffffffffffffffffffff16146110fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f2906145bc565b60405180910390fd5b60008251905060005b8161ffff168161ffff1610156111bd57828161ffff168151811061112b5761112a614c96565b5b602002602001015160116000868461ffff168151811061114e5761114d614c96565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548161ffff021916908361ffff16021790555080806111b590614b35565b915050611104565b50505050565b60006111cd610c23565b821061120e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112059061469c565b60405180910390fd5b6009828154811061122257611221614c96565b5b90600052602060002001549050919050565b600f60009054906101000a900460ff1681565b61124f61235f565b73ffffffffffffffffffffffffffffffffffffffff1661126d611850565b73ffffffffffffffffffffffffffffffffffffffff16146112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba906145bc565b60405180910390fd5b80600e90805190602001906112d9929190613672565b5050565b6000600b60009054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561139d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113949061455c565b60405180910390fd5b80915050919050565b60116020528060005260406000206000915054906101000a900461ffff1681565b600f60019054906101000a900460ff1681565b6113e261235f565b73ffffffffffffffffffffffffffffffffffffffff16611400611850565b73ffffffffffffffffffffffffffffffffffffffff1614611456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144d906145bc565b60405180910390fd5b6000606482611465919061491b565b9050600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6054836114b0919061494c565b9081150290604051600060405180830381858888f193505050506114d357600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60108361151c919061494c565b9081150290604051600060405180830381858888f1935050505061153f57600080fd5b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ab9061453c565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61160361235f565b73ffffffffffffffffffffffffffffffffffffffff16611621611850565b73ffffffffffffffffffffffffffffffffffffffff1614611677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166e906145bc565b60405180910390fd5b6116816000612924565b565b61168b61235f565b73ffffffffffffffffffffffffffffffffffffffff166116a9611850565b73ffffffffffffffffffffffffffffffffffffffff16146116ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f6906145bc565b60405180910390fd5b80600f60016101000a81548160ff02191690831515021790555050565b61172461235f565b73ffffffffffffffffffffffffffffffffffffffff16611742611850565b73ffffffffffffffffffffffffffffffffffffffff1614611798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178f906145bc565b60405180910390fd5b6117a06129ea565b565b606060006117af83611543565b905060008167ffffffffffffffff8111156117cd576117cc614cc5565b5b6040519080825280602002602001820160405280156117fb5781602001602082028036833780820191505090505b50905060005b82811015611845576118138582610c90565b82828151811061182657611825614c96565b5b602002602001018181525050808061183d90614b60565b915050611801565b508092505050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600180546118af90614ad2565b80601f01602080910402602001604051908101604052809291908181526020018280546118db90614ad2565b80156119285780601f106118fd57610100808354040283529160200191611928565b820191906000526020600020905b81548152906001019060200180831161190b57829003601f168201915b5050505050905090565b600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d5481565b61196661235f565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119cb9061445c565b60405180910390fd5b80600560006119e161235f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611a8e61235f565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611ad3919061435f565b60405180910390a35050565b611af0611aea61235f565b83612506565b611b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b269061465c565b60405180910390fd5b611b3b84848484612a8d565b50505050565b6060611b4c826123e1565b611b8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b829061461c565b60405180910390fd5b6000611b95612ae9565b90506000815111611bb55760405180602001604052806000815250611be0565b80611bbf84612b7b565b604051602001611bd09291906142b2565b6040516020818303038152906040525b915050919050565b600e8054611bf590614ad2565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2190614ad2565b8015611c6e5780601f10611c4357610100808354040283529160200191611c6e565b820191906000526020600020905b815481529060010190602001808311611c5157829003601f168201915b505050505081565b600f60019054906101000a900460ff16611cc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cbc9061447c565b60405180910390fd5b601561ffff168161ffff1610611d10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d07906145dc565b60405180910390fd5b6000611d1a610c23565b905061157d61ffff168282611d2f919061488d565b61ffff1610611d73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6a9061467c565b60405180910390fd5b8161ffff16600d54611d85919061494c565b3414611dc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbd906146dc565b60405180910390fd5b60005b8261ffff168161ffff161015611e0557611df2338284611de9919061488d565b61ffff166128f0565b8080611dfd90614b35565b915050611dc9565b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600f60009054906101000a900460ff16611eed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee4906146bc565b60405180910390fd5b6000601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900461ffff16905060008161ffff1611611f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f7d906144bc565b60405180910390fd5b8061ffff168261ffff1610611fd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc79061451c565b60405180910390fd5b6000611fda610c23565b905061157d61ffff168382611fef919061488d565b61ffff1610612033576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202a9061467c565b60405180910390fd5b8261ffff16600d54612045919061494c565b3414612086576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161207d906146dc565b60405180910390fd5b828261209291906149a6565b601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548161ffff021916908361ffff16021790555060005b8361ffff168161ffff16101561212a5761211733828461210e919061488d565b61ffff166128f0565b808061212290614b35565b9150506120ee565b50505050565b61213861235f565b73ffffffffffffffffffffffffffffffffffffffff16612156611850565b73ffffffffffffffffffffffffffffffffffffffff16146121ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121a3906145bc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561221c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612213906143fc565b60405180910390fd5b61222581612924565b50565b61223061235f565b73ffffffffffffffffffffffffffffffffffffffff1661224e611850565b73ffffffffffffffffffffffffffffffffffffffff16146122a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229b906145bc565b60405180910390fd5b806000815181106122b8576122b7614c96565b5b6020026020010151600f60026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060018151811061231457612313614c96565b5b6020026020010151601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123da57506123d982612cdc565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166124c0836112f4565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612511826123e1565b612550576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125479061449c565b60405180910390fd5b600061255b836112f4565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806125ca57508373ffffffffffffffffffffffffffffffffffffffff166125b284610a86565b73ffffffffffffffffffffffffffffffffffffffff16145b806125db57506125da8185611e0a565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16612604826112f4565b73ffffffffffffffffffffffffffffffffffffffff161461265a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612651906145fc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156126ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126c19061443c565b60405180910390fd5b6126d5838383612dbe565b6126e060008261244d565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461273091906149da565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461278791906148c5565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6128486112dd565b612887576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287e9061439c565b60405180910390fd5b6000600b60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6128cb61235f565b6040516128d891906142d6565b60405180910390a1565b600081600001549050919050565b61290a828260405180602001604052806000815250612e16565b5050565b6001816000016000828254019250508190555050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6129f26112dd565b15612a32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a29906144dc565b60405180910390fd5b6001600b60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a7661235f565b604051612a8391906142d6565b60405180910390a1565b612a988484846125e4565b612aa484848484612e71565b612ae3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ada906143dc565b60405180910390fd5b50505050565b6060600e8054612af890614ad2565b80601f0160208091040260200160405190810160405280929190818152602001828054612b2490614ad2565b8015612b715780601f10612b4657610100808354040283529160200191612b71565b820191906000526020600020905b815481529060010190602001808311612b5457829003601f168201915b5050505050905090565b60606000821415612bc3576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612cd7565b600082905060005b60008214612bf5578080612bde90614b60565b915050600a82612bee919061491b565b9150612bcb565b60008167ffffffffffffffff811115612c1157612c10614cc5565b5b6040519080825280601f01601f191660200182016040528015612c435781602001600182028036833780820191505090505b5090505b60008514612cd057600182612c5c91906149da565b9150600a85612c6b9190614ba9565b6030612c7791906148c5565b60f81b818381518110612c8d57612c8c614c96565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612cc9919061491b565b9450612c47565b8093505050505b919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612da757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612db75750612db682613008565b5b9050919050565b612dc66112dd565b15612e06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dfd906144dc565b60405180910390fd5b612e11838383613072565b505050565b612e208383613186565b612e2d6000848484612e71565b612e6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e63906143dc565b60405180910390fd5b505050565b6000612e928473ffffffffffffffffffffffffffffffffffffffff16613354565b15612ffb578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ebb61235f565b8786866040518563ffffffff1660e01b8152600401612edd94939291906142f1565b602060405180830381600087803b158015612ef757600080fd5b505af1925050508015612f2857506040513d601f19601f82011682018060405250810190612f259190613ccd565b60015b612fab573d8060008114612f58576040519150601f19603f3d011682016040523d82523d6000602084013e612f5d565b606091505b50600081511415612fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f9a906143dc565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613000565b600190505b949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61307d838383613367565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156130c0576130bb8161336c565b6130ff565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146130fe576130fd83826133b5565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156131425761313d81613522565b613181565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146131805761317f82826135f3565b5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156131f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131ed9061457c565b60405180910390fd5b6131ff816123e1565b1561323f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132369061441c565b60405180910390fd5b61324b60008383612dbe565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461329b91906148c5565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b505050565b600980549050600a600083815260200190815260200160002081905550600981908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016133c284611543565b6133cc91906149da565b90506000600860008481526020019081526020016000205490508181146134b1576000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816008600083815260200190815260200160002081905550505b6008600084815260200190815260200160002060009055600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000600160098054905061353691906149da565b90506000600a600084815260200190815260200160002054905060006009838154811061356657613565614c96565b5b90600052602060002001549050806009838154811061358857613587614c96565b5b906000526020600020018190555081600a600083815260200190815260200160002081905550600a60008581526020019081526020016000206000905560098054806135d7576135d6614c67565b5b6001900381819060005260206000200160009055905550505050565b60006135fe83611543565b905081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806008600084815260200190815260200160002081905550505050565b82805461367e90614ad2565b90600052602060002090601f0160209004810192826136a057600085556136e7565b82601f106136b957805160ff19168380011785556136e7565b828001600101855582156136e7579182015b828111156136e65782518255916020019190600101906136cb565b5b5090506136f491906136f8565b5090565b5b808211156137115760008160009055506001016136f9565b5090565b600061372861372384614757565b614732565b9050808382526020820190508285602086028201111561374b5761374a614cf9565b5b60005b8581101561377b57816137618882613879565b84526020840193506020830192505060018101905061374e565b5050509392505050565b600061379861379384614783565b614732565b905080838252602082019050828560208602820111156137bb576137ba614cf9565b5b60005b858110156137eb57816137d18882613985565b8452602084019350602083019250506001810190506137be565b5050509392505050565b6000613808613803846147af565b614732565b90508281526020810184848401111561382457613823614cfe565b5b61382f848285614a90565b509392505050565b600061384a613845846147e0565b614732565b90508281526020810184848401111561386657613865614cfe565b5b613871848285614a90565b509392505050565b600081359050613888816153d1565b92915050565b600082601f8301126138a3576138a2614cf4565b5b81356138b3848260208601613715565b91505092915050565b600082601f8301126138d1576138d0614cf4565b5b81356138e1848260208601613785565b91505092915050565b6000813590506138f9816153e8565b92915050565b60008135905061390e816153ff565b92915050565b600081519050613923816153ff565b92915050565b600082601f83011261393e5761393d614cf4565b5b813561394e8482602086016137f5565b91505092915050565b600082601f83011261396c5761396b614cf4565b5b813561397c848260208601613837565b91505092915050565b60008135905061399481615416565b92915050565b6000813590506139a98161542d565b92915050565b6000602082840312156139c5576139c4614d08565b5b60006139d384828501613879565b91505092915050565b600080604083850312156139f3576139f2614d08565b5b6000613a0185828601613879565b9250506020613a1285828601613879565b9150509250929050565b600080600060608486031215613a3557613a34614d08565b5b6000613a4386828701613879565b9350506020613a5486828701613879565b9250506040613a658682870161399a565b9150509250925092565b60008060008060808587031215613a8957613a88614d08565b5b6000613a9787828801613879565b9450506020613aa887828801613879565b9350506040613ab98782880161399a565b925050606085013567ffffffffffffffff811115613ada57613ad9614d03565b5b613ae687828801613929565b91505092959194509250565b60008060408385031215613b0957613b08614d08565b5b6000613b1785828601613879565b9250506020613b28858286016138ea565b9150509250929050565b60008060408385031215613b4957613b48614d08565b5b6000613b5785828601613879565b9250506020613b6885828601613985565b9150509250929050565b60008060408385031215613b8957613b88614d08565b5b6000613b9785828601613879565b9250506020613ba88582860161399a565b9150509250929050565b600060208284031215613bc857613bc7614d08565b5b600082013567ffffffffffffffff811115613be657613be5614d03565b5b613bf28482850161388e565b91505092915050565b60008060408385031215613c1257613c11614d08565b5b600083013567ffffffffffffffff811115613c3057613c2f614d03565b5b613c3c8582860161388e565b925050602083013567ffffffffffffffff811115613c5d57613c5c614d03565b5b613c69858286016138bc565b9150509250929050565b600060208284031215613c8957613c88614d08565b5b6000613c97848285016138ea565b91505092915050565b600060208284031215613cb657613cb5614d08565b5b6000613cc4848285016138ff565b91505092915050565b600060208284031215613ce357613ce2614d08565b5b6000613cf184828501613914565b91505092915050565b600060208284031215613d1057613d0f614d08565b5b600082013567ffffffffffffffff811115613d2e57613d2d614d03565b5b613d3a84828501613957565b91505092915050565b600060208284031215613d5957613d58614d08565b5b6000613d6784828501613985565b91505092915050565b600060208284031215613d8657613d85614d08565b5b6000613d948482850161399a565b91505092915050565b6000613da98383614294565b60208301905092915050565b613dbe81614a0e565b82525050565b6000613dcf82614821565b613dd9818561484f565b9350613de483614811565b8060005b83811015613e15578151613dfc8882613d9d565b9750613e0783614842565b925050600181019050613de8565b5085935050505092915050565b613e2b81614a20565b82525050565b6000613e3c8261482c565b613e468185614860565b9350613e56818560208601614a9f565b613e5f81614d0d565b840191505092915050565b6000613e7582614837565b613e7f8185614871565b9350613e8f818560208601614a9f565b613e9881614d0d565b840191505092915050565b6000613eae82614837565b613eb88185614882565b9350613ec8818560208601614a9f565b80840191505092915050565b6000613ee1601483614871565b9150613eec82614d1e565b602082019050919050565b6000613f04602b83614871565b9150613f0f82614d47565b604082019050919050565b6000613f27603283614871565b9150613f3282614d96565b604082019050919050565b6000613f4a602683614871565b9150613f5582614de5565b604082019050919050565b6000613f6d601c83614871565b9150613f7882614e34565b602082019050919050565b6000613f90602483614871565b9150613f9b82614e5d565b604082019050919050565b6000613fb3601983614871565b9150613fbe82614eac565b602082019050919050565b6000613fd6601283614871565b9150613fe182614ed5565b602082019050919050565b6000613ff9602c83614871565b915061400482614efe565b604082019050919050565b600061401c602383614871565b915061402782614f4d565b604082019050919050565b600061403f601083614871565b915061404a82614f9c565b602082019050919050565b6000614062603883614871565b915061406d82614fc5565b604082019050919050565b6000614085601e83614871565b915061409082615014565b602082019050919050565b60006140a8602a83614871565b91506140b38261503d565b604082019050919050565b60006140cb602983614871565b91506140d68261508c565b604082019050919050565b60006140ee602083614871565b91506140f9826150db565b602082019050919050565b6000614111602c83614871565b915061411c82615104565b604082019050919050565b6000614134602083614871565b915061413f82615153565b602082019050919050565b6000614157602383614871565b91506141628261517c565b604082019050919050565b600061417a602983614871565b9150614185826151cb565b604082019050919050565b600061419d602f83614871565b91506141a88261521a565b604082019050919050565b60006141c0602183614871565b91506141cb82615269565b604082019050919050565b60006141e3603183614871565b91506141ee826152b8565b604082019050919050565b6000614206602083614871565b915061421182615307565b602082019050919050565b6000614229602c83614871565b915061423482615330565b604082019050919050565b600061424c601583614871565b91506142578261537f565b602082019050919050565b600061426f601883614871565b915061427a826153a8565b602082019050919050565b61428e81614a58565b82525050565b61429d81614a86565b82525050565b6142ac81614a86565b82525050565b60006142be8285613ea3565b91506142ca8284613ea3565b91508190509392505050565b60006020820190506142eb6000830184613db5565b92915050565b60006080820190506143066000830187613db5565b6143136020830186613db5565b61432060408301856142a3565b81810360608301526143328184613e31565b905095945050505050565b600060208201905081810360008301526143578184613dc4565b905092915050565b60006020820190506143746000830184613e22565b92915050565b600060208201905081810360008301526143948184613e6a565b905092915050565b600060208201905081810360008301526143b581613ed4565b9050919050565b600060208201905081810360008301526143d581613ef7565b9050919050565b600060208201905081810360008301526143f581613f1a565b9050919050565b6000602082019050818103600083015261441581613f3d565b9050919050565b6000602082019050818103600083015261443581613f60565b9050919050565b6000602082019050818103600083015261445581613f83565b9050919050565b6000602082019050818103600083015261447581613fa6565b9050919050565b6000602082019050818103600083015261449581613fc9565b9050919050565b600060208201905081810360008301526144b581613fec565b9050919050565b600060208201905081810360008301526144d58161400f565b9050919050565b600060208201905081810360008301526144f581614032565b9050919050565b6000602082019050818103600083015261451581614055565b9050919050565b6000602082019050818103600083015261453581614078565b9050919050565b600060208201905081810360008301526145558161409b565b9050919050565b60006020820190508181036000830152614575816140be565b9050919050565b60006020820190508181036000830152614595816140e1565b9050919050565b600060208201905081810360008301526145b581614104565b9050919050565b600060208201905081810360008301526145d581614127565b9050919050565b600060208201905081810360008301526145f58161414a565b9050919050565b600060208201905081810360008301526146158161416d565b9050919050565b6000602082019050818103600083015261463581614190565b9050919050565b60006020820190508181036000830152614655816141b3565b9050919050565b60006020820190508181036000830152614675816141d6565b9050919050565b60006020820190508181036000830152614695816141f9565b9050919050565b600060208201905081810360008301526146b58161421c565b9050919050565b600060208201905081810360008301526146d58161423f565b9050919050565b600060208201905081810360008301526146f581614262565b9050919050565b60006020820190506147116000830184614285565b92915050565b600060208201905061472c60008301846142a3565b92915050565b600061473c61474d565b90506147488282614b04565b919050565b6000604051905090565b600067ffffffffffffffff82111561477257614771614cc5565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561479e5761479d614cc5565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156147ca576147c9614cc5565b5b6147d382614d0d565b9050602081019050919050565b600067ffffffffffffffff8211156147fb576147fa614cc5565b5b61480482614d0d565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600061489882614a58565b91506148a383614a58565b92508261ffff038211156148ba576148b9614bda565b5b828201905092915050565b60006148d082614a86565b91506148db83614a86565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156149105761490f614bda565b5b828201905092915050565b600061492682614a86565b915061493183614a86565b92508261494157614940614c09565b5b828204905092915050565b600061495782614a86565b915061496283614a86565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561499b5761499a614bda565b5b828202905092915050565b60006149b182614a58565b91506149bc83614a58565b9250828210156149cf576149ce614bda565b5b828203905092915050565b60006149e582614a86565b91506149f083614a86565b925082821015614a0357614a02614bda565b5b828203905092915050565b6000614a1982614a66565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015614abd578082015181840152602081019050614aa2565b83811115614acc576000848401525b50505050565b60006002820490506001821680614aea57607f821691505b60208210811415614afe57614afd614c38565b5b50919050565b614b0d82614d0d565b810181811067ffffffffffffffff82111715614b2c57614b2b614cc5565b5b80604052505050565b6000614b4082614a58565b915061ffff821415614b5557614b54614bda565b5b600182019050919050565b6000614b6b82614a86565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614b9e57614b9d614bda565b5b600182019050919050565b6000614bb482614a86565b9150614bbf83614a86565b925082614bcf57614bce614c09565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f53616c65206973206e6f74206163746976650000000000000000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4e6f20746f6b656e7320726573657276656420666f7220796f7572206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f43616e6e6f74206d696e74206d6f7265207468616e2072657365727665640000600082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f596f752063616e206f6e6c79204d696e7420323020746f6b656e73206174206f60008201527f6e63650000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f43616e6e6f74206d696e74206d6f7265207468616e206d617820737570706c79600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f50726573616c65206973206e6f74206163746976650000000000000000000000600082015250565b7f57726f6e6720616d6f756e74206f66204554482073656e740000000000000000600082015250565b6153da81614a0e565b81146153e557600080fd5b50565b6153f181614a20565b81146153fc57600080fd5b50565b61540881614a2c565b811461541357600080fd5b50565b61541f81614a58565b811461542a57600080fd5b50565b61543681614a86565b811461544157600080fd5b5056fea26469706673582212203f525428de903034acb35ccded6c1ae7cfe364a2a85ba4edc43927968f59935664736f6c63430008070033
Verified Source Code Full Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: No
RareBunniClubNFT.sol 162 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
//Join the RareBunniClub 5500k RareBunnies!
//Twitter twitter.com/rarebunni
//Discord https://discord.gg/js6ZDpMguS
//Web rarebunniclub.com
contract RareBunniClubNFT is ERC721, Ownable, ERC721Enumerable, Pausable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
constructor() ERC721("RareBunniClub", "RareBunni") {}
// Maximum limit of tokens that can ever exist
uint16 constant MAX_SUPPLY = 5501; //its 5500
uint16 constant MAX_MINT = 21; //its 20
// Price of each token converted to WEI
uint256 public price = 0.02 ether;
string public baseTokenURI = "";
// Starting and stopping sale and presale
bool public presaleActive = false;
bool public saleActive = false;
// Team addresses
address public teamW1;
address public CommunityW;
// List of addresses that have a number of reserved tokens for presale
mapping (address => uint16) public presaleAddresses;
function _baseURI() internal view virtual override returns (string memory) {
return baseTokenURI;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
return super.supportsInterface(interfaceId);
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId);
}
function tokensOfOwner(address addr) public view returns(uint256[] memory) {
uint256 tokenCount = balanceOf(addr);
uint256[] memory tokensId = new uint256[](tokenCount);
for(uint256 i; i < tokenCount; i++){
tokensId[i] = tokenOfOwnerByIndex(addr, i);
}
return tokensId;
}
// Exclusive Presale Bunni Mint
function mintPresaleToken(uint16 _amount) public payable {
require( presaleActive, "Presale is not active" );
uint16 reservedAmt = presaleAddresses[msg.sender];
require( reservedAmt > 0, "No tokens reserved for your address" );
require( _amount < reservedAmt, "Cannot mint more than reserved" );
uint16 supply = uint16(totalSupply());
require( supply + _amount < MAX_SUPPLY, "Cannot mint more than max supply" );
require( msg.value == price * _amount, "Wrong amount of ETH sent" );
presaleAddresses[msg.sender] = reservedAmt - _amount;
for(uint16 i; i < _amount; i++){
_safeMint( msg.sender, supply + i );
}
}
// Mint a Bunni
function mintSaleToken(uint16 _amount) public payable {
require( saleActive, "Sale is not active" );
require( _amount < MAX_MINT, "You can only Mint 20 tokens at once" );
uint16 supply = uint16(totalSupply());
require( supply + _amount < MAX_SUPPLY, "Cannot mint more than max supply" );
require( msg.value == price * _amount, "Wrong amount of ETH sent" );
for(uint16 i; i < _amount; i++){
_safeMint( msg.sender, supply + i );
}
}
////////ONLY OWNER BELOW SOZ
function safeMint(address to) public onlyOwner {
_safeMint(to, _tokenIdCounter.current());
_tokenIdCounter.increment();
}
// Free Bunnies!
function giveAway(address _to, uint16 _amount) public onlyOwner() {
require( _amount < MAX_MINT, "You can only Mint 20 tokens at once" );
uint16 supply = uint16(totalSupply());
require( supply + _amount < MAX_SUPPLY, "Cannot mint more than max supply" );
for(uint16 i; i < _amount; i++){
_safeMint( _to, supply + i );
}
}
// Start and stop presale
function setPresaleActive(bool _val) public onlyOwner {
presaleActive = _val;
}
// Start and stop sale
function setSaleActive(bool _val) public onlyOwner {
saleActive = _val;
}
// Set new baseURI
function setBaseURI(string memory _baseURIVar) public onlyOwner {
baseTokenURI = _baseURIVar;
}
// Set team addresses
function setTeamAddresses(address[] memory _a) public onlyOwner {
teamW1 = _a[0];
CommunityW = _a[1];
}
//Priced in WEI. This is just incase ETH goes TO DAMN HIGH, and we need to lower the mint price
function updateMintPrice(uint256 _newPrice) external onlyOwner() {
price = _newPrice;
}
//Set reserved presale spots
function setPresaleReservedAddresses(address[] memory _a, uint16[] memory _amount) public onlyOwner {
uint16 length = uint16(_a.length);
for(uint16 i; i < length; i++){
presaleAddresses[_a[i]] = _amount[i];
}
}
//IN WEI Monies go back into development, Community Wallet Visit our Discord https://discord.gg/js6ZDpMguS RareBunniClub!
function payTheBunniTeam(uint256 _amount) public payable onlyOwner {
uint256 percent = _amount / 100;
require(payable(teamW1).send(percent * 84));
require(payable(CommunityW).send(percent * 16));
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
}
Address.sol 216 lines
// SPDX-License-Identifier: MIT
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 23 lines
// SPDX-License-Identifier: MIT
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 66 lines
// SPDX-License-Identifier: MIT
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 71 lines
// SPDX-License-Identifier: MIT
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() {
_setOwner(_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 {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Counters.sol 42 lines
// SPDX-License-Identifier: MIT
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;
}
}
Pausable.sol 90 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
ERC721.sol 411 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_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 {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev 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 {}
}
IERC721.sol 142 lines
// SPDX-License-Identifier: MIT
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;
}
ERC165.sol 28 lines
// SPDX-License-Identifier: MIT
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 24 lines
// SPDX-License-Identifier: MIT
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 26 lines
// SPDX-License-Identifier: MIT
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);
}
IERC721Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
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);
}
ERC721Enumerable.sol 162 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "./IERC721Enumerable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
IERC721Enumerable.sol 28 lines
// SPDX-License-Identifier: MIT
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
CommunityW 0x95b35c8c → address
balanceOf 0x70a08231 → uint256
baseTokenURI 0xd547cfb7 → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
presaleActive 0x53135ca0 → bool
presaleAddresses 0x66fca980 → uint16
price 0xa035b1fe → uint256
saleActive 0x68428a1b → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
teamW1 0x987a7a7d → address
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
totalSupply 0x18160ddd → uint256
Write Contract 20 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
giveAway 0x48a6ab7e
address _to
uint16 _amount
mintPresaleToken 0xee3d17c5
uint16 _amount
mintSaleToken 0xda6f4b48
uint16 _amount
pause 0x8456cb59
No parameters
payTheBunniTeam 0x6861616e
uint256 _amount
renounceOwnership 0x715018a6
No parameters
safeMint 0x40d097c3
address to
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 _baseURIVar
setPresaleActive 0x3f8121a2
bool _val
setPresaleReservedAddresses 0x48c8744f
address[] _a
uint16[] _amount
setSaleActive 0x841718a6
bool _val
setTeamAddresses 0xfe625fb6
address[] _a
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
updateMintPrice 0x00728e46
uint256 _newPrice
Recent Transactions
No transactions found for this address