Address Contract Partially Verified
Address
0x02Cf5C2e8F61Fe50cE8F20A3b60838015f23C618
Balance
0 ETH
Nonce
1
Code Size
19625 bytes
Creator
0x4a4BBC76...CF0A at tx 0xa12a7eb8...8bfc16
Indexed Transactions
0
Contract Bytecode
19625 bytes
0x6080604052600436106102885760003560e01c80636352211e1161015a57806399a2557a116100c1578063c23dc68f1161007a578063c23dc68f14610989578063c87b56dd146109c6578063d5abeb0114610a03578063e6d37b8814610a2e578063e985e9c514610a4a578063f2fde38b14610a8757610288565b806399a2557a14610874578063a035b1fe146108b1578063a22cb465146108dc578063a2309ff814610905578063b324044e14610930578063b88d4fde1461096d57610288565b80637cb64759116101135780637cb64759146107645780638462151c1461078d5780638488bb4e146107ca5780638da5cb5b146107f557806391b7f5ed1461082057806395d89b411461084957610288565b80636352211e146106545780636b8f9c43146106915780636c0360eb146106ba57806370a08231146106e5578063715018a6146107225780637c59aa351461073957610288565b80632db11544116101fe57806342842e0e116101b757806342842e0e1461055557806342966c681461057157806351f02e8a1461059a578063536ebc60146105c357806355f804b3146105ee5780635bbb21771461061757610288565b80632db115441461047a5780632eb4a7ab146104965780632fc5a4cf146104c1578063375a069a146104ea5780633ccfd60b1461051357806341f434341461052a57610288565b80630a5dda72116102505780630a5dda721461037957806311e6ad7b146103b657806311f706ec146103df57806318160ddd14610408578063200d2ed21461043357806323b872dd1461045e57610288565b806301ffc9a71461028d57806306af692d146102ca57806306fdde03146102f5578063081812fc14610320578063095ea7b31461035d575b600080fd5b34801561029957600080fd5b506102b460048036038101906102af9190613368565b610ab0565b6040516102c191906133b0565b60405180910390f35b3480156102d657600080fd5b506102df610b42565b6040516102ec91906133e4565b60405180910390f35b34801561030157600080fd5b5061030a610b48565b604051610317919061348f565b60405180910390f35b34801561032c57600080fd5b50610347600480360381019061034291906134dd565b610bda565b604051610354919061354b565b60405180910390f35b61037760048036038101906103729190613592565b610c59565b005b34801561038557600080fd5b506103a0600480360381019061039b91906135d2565b610c72565b6040516103ad91906133e4565b60405180910390f35b3480156103c257600080fd5b506103dd60048036038101906103d891906134dd565b610c84565b005b3480156103eb57600080fd5b5061040660048036038101906104019190613624565b610c96565b005b34801561041457600080fd5b5061041d610ccb565b60405161042a91906133e4565b60405180910390f35b34801561043f57600080fd5b50610448610ce2565b60405161045591906136c8565b60405180910390f35b610478600480360381019061047391906136e3565b610cf5565b005b610494600480360381019061048f91906134dd565b610d44565b005b3480156104a257600080fd5b506104ab610f8a565b6040516104b8919061374f565b60405180910390f35b3480156104cd57600080fd5b506104e860048036038101906104e391906135d2565b610f90565b005b3480156104f657600080fd5b50610511600480360381019061050c91906134dd565b610fdc565b005b34801561051f57600080fd5b50610528611048565b005b34801561053657600080fd5b5061053f61112f565b60405161054c91906137c9565b60405180910390f35b61056f600480360381019061056a91906136e3565b611141565b005b34801561057d57600080fd5b50610598600480360381019061059391906134dd565b611190565b005b3480156105a657600080fd5b506105c160048036038101906105bc91906134dd565b61122e565b005b3480156105cf57600080fd5b506105d8611240565b6040516105e591906133e4565b60405180910390f35b3480156105fa57600080fd5b5061061560048036038101906106109190613919565b611246565b005b34801561062357600080fd5b5061063e600480360381019061063991906139c2565b611261565b60405161064b9190613b72565b60405180910390f35b34801561066057600080fd5b5061067b600480360381019061067691906134dd565b611324565b604051610688919061354b565b60405180910390f35b34801561069d57600080fd5b506106b860048036038101906106b391906135d2565b611336565b005b3480156106c657600080fd5b506106cf611382565b6040516106dc919061348f565b60405180910390f35b3480156106f157600080fd5b5061070c600480360381019061070791906135d2565b611410565b60405161071991906133e4565b60405180910390f35b34801561072e57600080fd5b506107376114c8565b005b34801561074557600080fd5b5061074e6114dc565b60405161075b919061354b565b60405180910390f35b34801561077057600080fd5b5061078b60048036038101906107869190613bc0565b611502565b005b34801561079957600080fd5b506107b460048036038101906107af91906135d2565b611514565b6040516107c19190613cab565b60405180910390f35b3480156107d657600080fd5b506107df611657565b6040516107ec919061354b565b60405180910390f35b34801561080157600080fd5b5061080a61167d565b604051610817919061354b565b60405180910390f35b34801561082c57600080fd5b50610847600480360381019061084291906134dd565b6116a7565b005b34801561085557600080fd5b5061085e6116b9565b60405161086b919061348f565b60405180910390f35b34801561088057600080fd5b5061089b60048036038101906108969190613ccd565b61174b565b6040516108a89190613cab565b60405180910390f35b3480156108bd57600080fd5b506108c6611957565b6040516108d391906133e4565b60405180910390f35b3480156108e857600080fd5b5061090360048036038101906108fe9190613d4c565b61195d565b005b34801561091157600080fd5b5061091a611976565b60405161092791906133e4565b60405180910390f35b34801561093c57600080fd5b5061095760048036038101906109529190613de2565b611985565b60405161096491906133b0565b60405180910390f35b61098760048036038101906109829190613ef7565b6119e8565b005b34801561099557600080fd5b506109b060048036038101906109ab91906134dd565b611a39565b6040516109bd9190613fcf565b60405180910390f35b3480156109d257600080fd5b506109ed60048036038101906109e891906134dd565b611aa3565b6040516109fa919061348f565b60405180910390f35b348015610a0f57600080fd5b50610a18611b41565b604051610a2591906133e4565b60405180910390f35b610a486004803603810190610a439190613fea565b611b47565b005b348015610a5657600080fd5b50610a716004803603810190610a6c919061405e565b611dda565b604051610a7e91906133b0565b60405180910390f35b348015610a9357600080fd5b50610aae6004803603810190610aa991906135d2565b611e6e565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b0b57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610b3b5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600d5481565b606060028054610b57906140cd565b80601f0160208091040260200160405190810160405280929190818152602001828054610b83906140cd565b8015610bd05780601f10610ba557610100808354040283529160200191610bd0565b820191906000526020600020905b815481529060010190602001808311610bb357829003601f168201915b5050505050905090565b6000610be582611ef1565b610c1b576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610c6381611f50565b610c6d838361204d565b505050565b6000610c7d82612191565b9050919050565b610c8c6121e8565b80600d8190555050565b610c9e6121e8565b80600b60146101000a81548160ff02191690836002811115610cc357610cc2613651565b5b021790555050565b6000610cd5612266565b6001546000540303905090565b600b60149054906101000a900460ff1681565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d3357610d3233611f50565b5b610d3e84848461226f565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da99061414a565b60405180910390fd5b600280811115610dc557610dc4613651565b5b600b60149054906101000a900460ff166002811115610de757610de6613651565b5b14610e27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1e906141b6565b60405180910390fd5b80600e54610e359190614205565b341015610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e90614293565b60405180910390fd5b600d5481610e83612591565b610e8d91906142b3565b1115610ece576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec590614333565b60405180910390fd5b600c5481610eda612591565b610ee491906142b3565b1115610f25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1c9061439f565b60405180910390fd5b600f5481610f3233612191565b610f3c91906142b3565b1115610f7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f749061440b565b60405180910390fd5b610f8733826125a4565b50565b600a5481565b610f986121e8565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610fe46121e8565b600c5481610ff0612591565b610ffa91906142b3565b111561103b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110329061439f565b60405180910390fd5b61104533826125a4565b50565b6110506121e8565b60004790506000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16836040516110a29061445c565b60006040518083038185875af1925050503d80600081146110df576040519150601f19603f3d011682016040523d82523d6000602084013e6110e4565b606091505b5050809150508061112a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611121906144bd565b60405180910390fd5b505050565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461117f5761117e33611f50565b5b61118a8484846125c2565b50505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611220576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112179061454f565b60405180910390fd5b61122b8160006125e2565b50565b6112366121e8565b80600f8190555050565b600f5481565b61124e6121e8565b806009908161125d9190614711565b5050565b6060600083839050905060008167ffffffffffffffff811115611287576112866137ee565b5b6040519080825280602002602001820160405280156112c057816020015b6112ad6132ad565b8152602001906001900390816112a55790505b50905060005b828114611318576112ef8686838181106112e3576112e26147e3565b5b90506020020135611a39565b828281518110611302576113016147e3565b5b60200260200101819052508060010190506112c6565b50809250505092915050565b600061132f82612834565b9050919050565b61133e6121e8565b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6009805461138f906140cd565b80601f01602080910402602001604051908101604052809291908181526020018280546113bb906140cd565b80156114085780601f106113dd57610100808354040283529160200191611408565b820191906000526020600020905b8154815290600101906020018083116113eb57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611477576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6114d06121e8565b6114da6000612900565b565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61150a6121e8565b80600a8190555050565b6060600080600061152485611410565b905060008167ffffffffffffffff811115611542576115416137ee565b5b6040519080825280602002602001820160405280156115705781602001602082028036833780820191505090505b50905061157b6132ad565b6000611585612266565b90505b83861461164957611598816129c6565b9150816040015161163e57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146115e357816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361163d57808387806001019850815181106116305761162f6147e3565b5b6020026020010181815250505b5b806001019050611588565b508195505050505050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6116af6121e8565b80600e8190555050565b6060600380546116c8906140cd565b80601f01602080910402602001604051908101604052809291908181526020018280546116f4906140cd565b80156117415780601f1061171657610100808354040283529160200191611741565b820191906000526020600020905b81548152906001019060200180831161172457829003601f168201915b5050505050905090565b6060818310611786576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117916129f1565b905061179b612266565b8510156117ad576117aa612266565b94505b808411156117b9578093505b60006117c487611410565b9050848610156117e75760008686039050818110156117e1578091505b506117ec565b600090505b60008167ffffffffffffffff811115611808576118076137ee565b5b6040519080825280602002602001820160405280156118365781602001602082028036833780820191505090505b5090506000820361184d5780945050505050611950565b600061185888611a39565b90506000816040015161186d57816000015190505b60008990505b8881141580156118835750848714155b1561194257611891816129c6565b9250826040015161193757600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff16146118dc57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119365780848880600101995081518110611929576119286147e3565b5b6020026020010181815250505b5b806001019050611873565b508583528296505050505050505b9392505050565b600e5481565b8161196781611f50565b61197183836129fa565b505050565b6000611980612591565b905090565b60006119de838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600a546119d98888612b05565b612b38565b9050949350505050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a2657611a2533611f50565b5b611a3285858585612b4f565b5050505050565b611a416132ad565b611a496132ad565b611a51612266565b831080611a655750611a616129f1565b8310155b15611a735780915050611a9e565b611a7c836129c6565b9050806040015115611a915780915050611a9e565b611a9a83612bc2565b9150505b919050565b6060611aae82611ef1565b611ae4576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611aee612be2565b90506000815103611b0e5760405180602001604052806000815250611b39565b80611b1884612c74565b604051602001611b2992919061484e565b6040516020818303038152906040525b915050919050565b600c5481565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611bb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bac9061414a565b60405180910390fd5b60006002811115611bc957611bc8613651565b5b600b60149054906101000a900460ff166002811115611beb57611bea613651565b5b14611c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c22906148be565b60405180910390fd5b83600e54611c399190614205565b341015611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7290614293565b60405180910390fd5b600d5484611c87612591565b611c9191906142b3565b1115611cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc990614333565b60405180910390fd5b600c5484611cde612591565b611ce891906142b3565b1115611d29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d209061439f565b60405180910390fd5b611d3533848484611985565b611d74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6b9061492a565b60405180910390fd5b8284611d7f33612191565b611d8991906142b3565b1115611dca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dc19061440b565b60405180910390fd5b611dd433856125a4565b50505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611e766121e8565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ee5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edc906149bc565b60405180910390fd5b611eee81612900565b50565b600081611efc612266565b11158015611f0b575060005482105b8015611f49575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b111561204a576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611fc79291906149dc565b602060405180830381865afa158015611fe4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120089190614a1a565b61204957806040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401612040919061354b565b60405180910390fd5b5b50565b600061205882611324565b90508073ffffffffffffffffffffffffffffffffffffffff16612079612cc4565b73ffffffffffffffffffffffffffffffffffffffff16146120dc576120a5816120a0612cc4565b611dda565b6120db576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b6121f0612ccc565b73ffffffffffffffffffffffffffffffffffffffff1661220e61167d565b73ffffffffffffffffffffffffffffffffffffffff1614612264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225b90614a93565b60405180910390fd5b565b60006001905090565b600061227a82612834565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146122e1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806122ed84612cd4565b9150915061230381876122fe612cc4565b612cfb565b61234f5761231886612313612cc4565b611dda565b61234e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036123b5576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123c28686866001612d3f565b80156123cd57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001019190508190555061249b85612477888887612d45565b7c020000000000000000000000000000000000000000000000000000000017612d6d565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612521576000600185019050600060046000838152602001908152602001600020540361251f57600054811461251e578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125898686866001612d98565b505050505050565b600061259b612266565b60005403905090565b6125be828260405180602001604052806000815250612d9e565b5050565b6125dd838383604051806020016040528060008152506119e8565b505050565b60006125ed83612834565b9050600081905060008061260086612cd4565b9150915084156126695761261c8184612617612cc4565b612cfb565b612668576126318361262c612cc4565b611dda565b612667576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b612677836000886001612d3f565b801561268257600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061272a836126e785600088612d45565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717612d6d565b600460008881526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008516036127b057600060018701905060006004600083815260200190815260200160002054036127ae5760005481146127ad578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461281a836000886001612d98565b600160008154809291906001019190505550505050505050565b60008082905080612843612266565b116128c9576000548110156128c85760006004600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216036128c6575b600081036128bc576004600083600190039350838152602001908152602001600020549050612892565b80925050506128fb565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6129ce6132ad565b6129ea6004600084815260200190815260200160002054612e3b565b9050919050565b60008054905090565b8060076000612a07612cc4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612ab4612cc4565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612af991906133b0565b60405180910390a35050565b60008282604051602001612b1a929190614b1c565b60405160208183030381529060405280519060200120905092915050565b600082612b458584612ef1565b1490509392505050565b612b5a848484610cf5565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612bbc57612b8584848484612f47565b612bbb576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b612bca6132ad565b612bdb612bd683612834565b612e3b565b9050919050565b606060098054612bf1906140cd565b80601f0160208091040260200160405190810160405280929190818152602001828054612c1d906140cd565b8015612c6a5780601f10612c3f57610100808354040283529160200191612c6a565b820191906000526020600020905b815481529060010190602001808311612c4d57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612caf57600184039350600a81066030018453600a8104905080612c8d575b50828103602084039350808452505050919050565b600033905090565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612d5c868684613097565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b612da883836130a0565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612e3657600080549050600083820390505b612de86000868380600101945086612f47565b612e1e576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818110612dd5578160005414612e3357600080fd5b50505b505050565b612e436132ad565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008082905060005b8451811015612f3c57612f2782868381518110612f1a57612f196147e3565b5b602002602001015161325b565b91508080612f3490614b48565b915050612efa565b508091505092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612f6d612cc4565b8786866040518563ffffffff1660e01b8152600401612f8f9493929190614be5565b6020604051808303816000875af1925050508015612fcb57506040513d601f19601f82011682018060405250810190612fc89190614c46565b60015b613044573d8060008114612ffb576040519150601f19603f3d011682016040523d82523d6000602084013e613000565b606091505b50600081510361303c576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b600080549050600082036130e0576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6130ed6000848385612d3f565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613164836131556000866000612d45565b61315e85613286565b17612d6d565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461320557808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506131ca565b5060008203613240576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506132566000848385612d98565b505050565b60008183106132735761326e8284613296565b61327e565b61327d8383613296565b5b905092915050565b60006001821460e11b9050919050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61334581613310565b811461335057600080fd5b50565b6000813590506133628161333c565b92915050565b60006020828403121561337e5761337d613306565b5b600061338c84828501613353565b91505092915050565b60008115159050919050565b6133aa81613395565b82525050565b60006020820190506133c560008301846133a1565b92915050565b6000819050919050565b6133de816133cb565b82525050565b60006020820190506133f960008301846133d5565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561343957808201518184015260208101905061341e565b60008484015250505050565b6000601f19601f8301169050919050565b6000613461826133ff565b61346b818561340a565b935061347b81856020860161341b565b61348481613445565b840191505092915050565b600060208201905081810360008301526134a98184613456565b905092915050565b6134ba816133cb565b81146134c557600080fd5b50565b6000813590506134d7816134b1565b92915050565b6000602082840312156134f3576134f2613306565b5b6000613501848285016134c8565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006135358261350a565b9050919050565b6135458161352a565b82525050565b6000602082019050613560600083018461353c565b92915050565b61356f8161352a565b811461357a57600080fd5b50565b60008135905061358c81613566565b92915050565b600080604083850312156135a9576135a8613306565b5b60006135b78582860161357d565b92505060206135c8858286016134c8565b9150509250929050565b6000602082840312156135e8576135e7613306565b5b60006135f68482850161357d565b91505092915050565b6003811061360c57600080fd5b50565b60008135905061361e816135ff565b92915050565b60006020828403121561363a57613639613306565b5b60006136488482850161360f565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003811061369157613690613651565b5b50565b60008190506136a282613680565b919050565b60006136b282613694565b9050919050565b6136c2816136a7565b82525050565b60006020820190506136dd60008301846136b9565b92915050565b6000806000606084860312156136fc576136fb613306565b5b600061370a8682870161357d565b935050602061371b8682870161357d565b925050604061372c868287016134c8565b9150509250925092565b6000819050919050565b61374981613736565b82525050565b60006020820190506137646000830184613740565b92915050565b6000819050919050565b600061378f61378a6137858461350a565b61376a565b61350a565b9050919050565b60006137a182613774565b9050919050565b60006137b382613796565b9050919050565b6137c3816137a8565b82525050565b60006020820190506137de60008301846137ba565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61382682613445565b810181811067ffffffffffffffff82111715613845576138446137ee565b5b80604052505050565b60006138586132fc565b9050613864828261381d565b919050565b600067ffffffffffffffff821115613884576138836137ee565b5b61388d82613445565b9050602081019050919050565b82818337600083830152505050565b60006138bc6138b784613869565b61384e565b9050828152602081018484840111156138d8576138d76137e9565b5b6138e384828561389a565b509392505050565b600082601f830112613900576138ff6137e4565b5b81356139108482602086016138a9565b91505092915050565b60006020828403121561392f5761392e613306565b5b600082013567ffffffffffffffff81111561394d5761394c61330b565b5b613959848285016138eb565b91505092915050565b600080fd5b600080fd5b60008083601f840112613982576139816137e4565b5b8235905067ffffffffffffffff81111561399f5761399e613962565b5b6020830191508360208202830111156139bb576139ba613967565b5b9250929050565b600080602083850312156139d9576139d8613306565b5b600083013567ffffffffffffffff8111156139f7576139f661330b565b5b613a038582860161396c565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613a448161352a565b82525050565b600067ffffffffffffffff82169050919050565b613a6781613a4a565b82525050565b613a7681613395565b82525050565b600062ffffff82169050919050565b613a9481613a7c565b82525050565b608082016000820151613ab06000850182613a3b565b506020820151613ac36020850182613a5e565b506040820151613ad66040850182613a6d565b506060820151613ae96060850182613a8b565b50505050565b6000613afb8383613a9a565b60808301905092915050565b6000602082019050919050565b6000613b1f82613a0f565b613b298185613a1a565b9350613b3483613a2b565b8060005b83811015613b65578151613b4c8882613aef565b9750613b5783613b07565b925050600181019050613b38565b5085935050505092915050565b60006020820190508181036000830152613b8c8184613b14565b905092915050565b613b9d81613736565b8114613ba857600080fd5b50565b600081359050613bba81613b94565b92915050565b600060208284031215613bd657613bd5613306565b5b6000613be484828501613bab565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613c22816133cb565b82525050565b6000613c348383613c19565b60208301905092915050565b6000602082019050919050565b6000613c5882613bed565b613c628185613bf8565b9350613c6d83613c09565b8060005b83811015613c9e578151613c858882613c28565b9750613c9083613c40565b925050600181019050613c71565b5085935050505092915050565b60006020820190508181036000830152613cc58184613c4d565b905092915050565b600080600060608486031215613ce657613ce5613306565b5b6000613cf48682870161357d565b9350506020613d05868287016134c8565b9250506040613d16868287016134c8565b9150509250925092565b613d2981613395565b8114613d3457600080fd5b50565b600081359050613d4681613d20565b92915050565b60008060408385031215613d6357613d62613306565b5b6000613d718582860161357d565b9250506020613d8285828601613d37565b9150509250929050565b60008083601f840112613da257613da16137e4565b5b8235905067ffffffffffffffff811115613dbf57613dbe613962565b5b602083019150836020820283011115613ddb57613dda613967565b5b9250929050565b60008060008060608587031215613dfc57613dfb613306565b5b6000613e0a8782880161357d565b9450506020613e1b878288016134c8565b935050604085013567ffffffffffffffff811115613e3c57613e3b61330b565b5b613e4887828801613d8c565b925092505092959194509250565b600067ffffffffffffffff821115613e7157613e706137ee565b5b613e7a82613445565b9050602081019050919050565b6000613e9a613e9584613e56565b61384e565b905082815260208101848484011115613eb657613eb56137e9565b5b613ec184828561389a565b509392505050565b600082601f830112613ede57613edd6137e4565b5b8135613eee848260208601613e87565b91505092915050565b60008060008060808587031215613f1157613f10613306565b5b6000613f1f8782880161357d565b9450506020613f308782880161357d565b9350506040613f41878288016134c8565b925050606085013567ffffffffffffffff811115613f6257613f6161330b565b5b613f6e87828801613ec9565b91505092959194509250565b608082016000820151613f906000850182613a3b565b506020820151613fa36020850182613a5e565b506040820151613fb66040850182613a6d565b506060820151613fc96060850182613a8b565b50505050565b6000608082019050613fe46000830184613f7a565b92915050565b6000806000806060858703121561400457614003613306565b5b6000614012878288016134c8565b9450506020614023878288016134c8565b935050604085013567ffffffffffffffff8111156140445761404361330b565b5b61405087828801613d8c565b925092505092959194509250565b6000806040838503121561407557614074613306565b5b60006140838582860161357d565b92505060206140948582860161357d565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806140e557607f821691505b6020821081036140f8576140f761409e565b5b50919050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000614134601e8361340a565b915061413f826140fe565b602082019050919050565b6000602082019050818103600083015261416381614127565b9050919050565b7f5075626c69632073616c65206e6f7420617661696c61626c6500000000000000600082015250565b60006141a060198361340a565b91506141ab8261416a565b602082019050919050565b600060208201905081810360008301526141cf81614193565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614210826133cb565b915061421b836133cb565b9250828202614229816133cb565b915082820484148315176142405761423f6141d6565b5b5092915050565b7f4e6f7420656e6f756768204554482073656e7400000000000000000000000000600082015250565b600061427d60138361340a565b915061428882614247565b602082019050919050565b600060208201905081810360008301526142ac81614270565b9050919050565b60006142be826133cb565b91506142c9836133cb565b92508282019050808211156142e1576142e06141d6565b5b92915050565b7f43757272656e746c79206e6f7420656e6f75676820737570706c790000000000600082015250565b600061431d601b8361340a565b9150614328826142e7565b602082019050919050565b6000602082019050818103600083015261434c81614310565b9050919050565b7f4e6f7420656e6f75676820737570706c79000000000000000000000000000000600082015250565b600061438960118361340a565b915061439482614353565b602082019050919050565b600060208201905081810360008301526143b88161437c565b9050919050565b7f4578636565647320616c6c6f7765642077616c6c6574207175616e7469747900600082015250565b60006143f5601f8361340a565b9150614400826143bf565b602082019050919050565b60006020820190508181036000830152614424816143e8565b9050919050565b600081905092915050565b50565b600061444660008361442b565b915061445182614436565b600082019050919050565b600061446782614439565b9150819050919050565b7f5472616e73616374696f6e20556e7375636365737366756c0000000000000000600082015250565b60006144a760188361340a565b91506144b282614471565b602082019050919050565b600060208201905081810360008301526144d68161449a565b9050919050565b7f5468652063616c6c6572206973206e6f74207468652062616c6c657220636f6e60008201527f7472616374000000000000000000000000000000000000000000000000000000602082015250565b600061453960258361340a565b9150614544826144dd565b604082019050919050565b600060208201905081810360008301526145688161452c565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026145d17fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614594565b6145db8683614594565b95508019841693508086168417925050509392505050565b600061460e614609614604846133cb565b61376a565b6133cb565b9050919050565b6000819050919050565b614628836145f3565b61463c61463482614615565b8484546145a1565b825550505050565b600090565b614651614644565b61465c81848461461f565b505050565b5b8181101561468057614675600082614649565b600181019050614662565b5050565b601f8211156146c5576146968161456f565b61469f84614584565b810160208510156146ae578190505b6146c26146ba85614584565b830182614661565b50505b505050565b600082821c905092915050565b60006146e8600019846008026146ca565b1980831691505092915050565b600061470183836146d7565b9150826002028217905092915050565b61471a826133ff565b67ffffffffffffffff811115614733576147326137ee565b5b61473d82546140cd565b614748828285614684565b600060209050601f83116001811461477b5760008415614769578287015190505b61477385826146f5565b8655506147db565b601f1984166147898661456f565b60005b828110156147b15784890151825560018201915060208501945060208101905061478c565b868310156147ce57848901516147ca601f8916826146d7565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b6000614828826133ff565b6148328185614812565b935061484281856020860161341b565b80840191505092915050565b600061485a828561481d565b9150614866828461481d565b91508190509392505050565b7f53616c65206e6f7420617661696c61626c650000000000000000000000000000600082015250565b60006148a860128361340a565b91506148b382614872565b602082019050919050565b600060208201905081810360008301526148d78161489b565b9050919050565b7f57616c6c657420766572696669636174696f6e206661696c6564000000000000600082015250565b6000614914601a8361340a565b915061491f826148de565b602082019050919050565b6000602082019050818103600083015261494381614907565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006149a660268361340a565b91506149b18261494a565b604082019050919050565b600060208201905081810360008301526149d581614999565b9050919050565b60006040820190506149f1600083018561353c565b6149fe602083018461353c565b9392505050565b600081519050614a1481613d20565b92915050565b600060208284031215614a3057614a2f613306565b5b6000614a3e84828501614a05565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614a7d60208361340a565b9150614a8882614a47565b602082019050919050565b60006020820190508181036000830152614aac81614a70565b9050919050565b60008160601b9050919050565b6000614acb82614ab3565b9050919050565b6000614add82614ac0565b9050919050565b614af5614af08261352a565b614ad2565b82525050565b6000819050919050565b614b16614b11826133cb565b614afb565b82525050565b6000614b288285614ae4565b601482019150614b388284614b05565b6020820191508190509392505050565b6000614b53826133cb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614b8557614b846141d6565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000614bb782614b90565b614bc18185614b9b565b9350614bd181856020860161341b565b614bda81613445565b840191505092915050565b6000608082019050614bfa600083018761353c565b614c07602083018661353c565b614c1460408301856133d5565b8181036060830152614c268184614bac565b905095945050505050565b600081519050614c408161333c565b92915050565b600060208284031215614c5c57614c5b613306565b5b6000614c6a84828501614c31565b9150509291505056fea264697066735822122042bf5f3f023b1f324b3d416021b63b4556cbdc65e9464e8eac5aaea271b580b664736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
Booster.sol 2446 lines
// File: operator-filter-registry/src/lib/Constants.sol
pragma solidity ^0.8.17;
address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// File: operator-filter-registry/src/IOperatorFilterRegistry.sol
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
/**
* @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
* true if supplied registrant address is not registered.
*/
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
/**
* @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
*/
function register(address registrant) external;
/**
* @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
*/
function registerAndSubscribe(address registrant, address subscription) external;
/**
* @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
* address without subscribing.
*/
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
/**
* @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
* Note that this does not remove any filtered addresses or codeHashes.
* Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
*/
function unregister(address addr) external;
/**
* @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
*/
function updateOperator(address registrant, address operator, bool filtered) external;
/**
* @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
*/
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
/**
* @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
*/
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
/**
* @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
*/
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
/**
* @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
* subscription if present.
* Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
* subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
* used.
*/
function subscribe(address registrant, address registrantToSubscribe) external;
/**
* @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
*/
function unsubscribe(address registrant, bool copyExistingEntries) external;
/**
* @notice Get the subscription address of a given registrant, if any.
*/
function subscriptionOf(address addr) external returns (address registrant);
/**
* @notice Get the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscribers(address registrant) external returns (address[] memory);
/**
* @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscriberAt(address registrant, uint256 index) external returns (address);
/**
* @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
*/
function copyEntriesOf(address registrant, address registrantToCopy) external;
/**
* @notice Returns true if operator is filtered by a given address or its subscription.
*/
function isOperatorFiltered(address registrant, address operator) external returns (bool);
/**
* @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
*/
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
/**
* @notice Returns true if a codeHash is filtered by a given address or its subscription.
*/
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
/**
* @notice Returns a list of filtered operators for a given address or its subscription.
*/
function filteredOperators(address addr) external returns (address[] memory);
/**
* @notice Returns the set of filtered codeHashes for a given address or its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
/**
* @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
/**
* @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
/**
* @notice Returns true if an address has registered
*/
function isRegistered(address addr) external returns (bool);
/**
* @dev Convenience method to compute the code hash of an arbitrary contract
*/
function codeHashOf(address addr) external returns (bytes32);
}
// File: operator-filter-registry/src/OperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title OperatorFilterer
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry.
* @dev This smart contract is meant to be inherited by token contracts so they can use the following:
* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
* Please note that if your token contract does not provide an owner with EIP-173, it must provide
* administration methods on the contract itself to interact with the registry otherwise the subscription
* will be locked to the options set during construction.
*/
abstract contract OperatorFilterer {
/// @dev Emitted when an operator is not allowed.
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);
/// @dev The constructor that is called when the contract is being deployed.
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (subscribe) {
OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
OPERATOR_FILTER_REGISTRY.register(address(this));
}
}
}
}
/**
* @dev A helper function to check if an operator is allowed.
*/
modifier onlyAllowedOperator(address from) virtual {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from != msg.sender) {
_checkFilterOperator(msg.sender);
}
_;
}
/**
* @dev A helper function to check if an operator approval is allowed.
*/
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
/**
* @dev A helper function to check if an operator is allowed.
*/
function _checkFilterOperator(address operator) internal view virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
// under normal circumstances, this function will revert rather than return false, but inheriting contracts
// may specify their own OperatorFilterRegistry implementations, which may behave differently
if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}
// File: operator-filter-registry/src/DefaultOperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title DefaultOperatorFilterer
* @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
* @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide
* administration methods on the contract itself to interact with the registry otherwise the subscription
* will be locked to the options set during construction.
*/
abstract contract DefaultOperatorFilterer is OperatorFilterer {
/// @dev The constructor that is called when the contract is being deployed.
constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
* OpenZeppelin's JavaScript library generates merkle trees that are safe
* against this attack out of the box.
*/
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 Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: erc721a/contracts/IERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables
* (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`,
* checking first that contract recipients are aware of the ERC721 protocol
* to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move
* this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @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 payable;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
// File: erc721a/contracts/extensions/IERC721ABurnable.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721ABurnable.
*/
interface IERC721ABurnable is IERC721A {
/**
* @dev Burns `tokenId`. See {ERC721A-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) external;
}
// File: erc721a/contracts/extensions/IERC721AQueryable.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721AQueryable.
*/
interface IERC721AQueryable is IERC721A {
/**
* Invalid query range (`start` >= `stop`).
*/
error InvalidQueryRange();
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);
/**
* @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
* See {ERC721AQueryable-explicitOwnershipOf}
*/
function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`,
* in the range [`start`, `stop`)
* (i.e. `start <= tokenId < stop`).
*
* This function allows for tokens to be queried if the collection
* grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
*
* Requirements:
*
* - `start < stop`
*/
function tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) external view returns (uint256[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`.
*
* This function scans the ownership mapping and is O(`totalSupply`) in complexity.
* It is meant to be called off-chain.
*
* See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
* multiple smaller scans if the collection is large enough to cause
* an out-of-gas error (10K collections should be fine).
*/
function tokensOfOwner(address owner) external view returns (uint256[] memory);
}
// File: erc721a/contracts/ERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
...
// [truncated — 91828 bytes total]
Read Contract
OPERATOR_FILTER_REGISTRY 0x41f43434 → address
balanceOf 0x70a08231 → uint256
ballerContract 0x7c59aa35 → address
baseURI 0x6c0360eb → string
batchSupply 0x06af692d → uint256
explicitOwnershipOf 0xc23dc68f → tuple
explicitOwnershipsOf 0x5bbb2177 → tuple[]
getApproved 0x081812fc → address
getQuantityMintedForAddress 0x0a5dda72 → uint256
isApprovedForAll 0xe985e9c5 → bool
isWalletWhitelisted 0xb324044e → bool
maxSupply 0xd5abeb01 → uint256
merkleRoot 0x2eb4a7ab → bytes32
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
payoutWallet 0x8488bb4e → address
price 0xa035b1fe → uint256
publicAllowedQuantity 0x536ebc60 → uint256
status 0x200d2ed2 → uint8
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
tokensOfOwnerIn 0x99a2557a → uint256[]
totalMinted 0xa2309ff8 → 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
burn 0x42966c68
uint256 tokenId
devMint 0x375a069a
uint256 quantity
mint 0xe6d37b88
uint256 quantity
uint256 allowedQuantity
bytes32[] proof
publicMint 0x2db11544
uint256 quantity
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
setBallerContract 0x2fc5a4cf
address _ballerContract
setBaseURI 0x55f804b3
string uri
setBatchSupply 0x11e6ad7b
uint256 _supply
setContractStatus 0x11f706ec
uint8 _status
setMerkleRoot 0x7cb64759
bytes32 _merkleRoot
setPayoutWallet 0x6b8f9c43
address _wallet
setPrice 0x91b7f5ed
uint256 _price
setPublicAllowedQuantity 0x51f02e8a
uint256 _quantity
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address