Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x01bE25A7a70a4fd35599Bf70606e51EbA74c23aF
Balance 0 ETH
Nonce 1
Code Size 18806 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

18806 bytes
0x60806040526004361061025c5760003560e01c806369add11d11610144578063b88d4fde116100b6578063d5abeb011161007a578063d5abeb0114610867578063d93ecff914610892578063dc33e681146108bd578063e922fa3c146108fa578063e985e9c514610923578063f2fde38b146109605761025c565b8063b88d4fde1461078f578063bca9b530146107ab578063bd32fb66146107d6578063c87b56dd146107ff578063d447c7581461083c5761025c565b8063791a251911610108578063791a2519146106915780638da5cb5b146106ba57806395d89b41146106e55780639b6860c814610710578063a22cb4651461073b578063aa98e0c6146107645761025c565b806369add11d146105cf5780636afcb7b0146105f85780636f8b44b01461061457806370a082311461063d578063715018a61461067a5761025c565b806332366a61116101dd5780635117fb88116101a15780635117fb88146104bf57806352dc6ad9146104e857806354214f69146105255780635bc020bc14610550578063603f4d52146105675780636352211e146105925761025c565b806332366a611461040f5780633ccfd60b1461043857806340c84b0e1461044f57806342842e0e1461047a57806349f2553a146104965761025c565b8063095ea7b311610224578063095ea7b31461035a57806318160ddd146103765780631b004d25146103a1578063213f3ea2146103ca57806323b872dd146103f35761025c565b806301ffc9a71461026157806306fdde031461029e578063081812fc146102c9578063084c40881461030657806309008f0a1461032f575b600080fd5b34801561026d57600080fd5b5061028860048036038101906102839190613128565b610989565b6040516102959190613170565b60405180910390f35b3480156102aa57600080fd5b506102b3610a1b565b6040516102c0919061321b565b60405180910390f35b3480156102d557600080fd5b506102f060048036038101906102eb9190613273565b610aad565b6040516102fd91906132e1565b60405180910390f35b34801561031257600080fd5b5061032d60048036038101906103289190613273565b610b2c565b005b34801561033b57600080fd5b50610344610bc8565b604051610351919061321b565b60405180910390f35b610374600480360381019061036f9190613328565b610c56565b005b34801561038257600080fd5b5061038b610d9a565b6040516103989190613377565b60405180910390f35b3480156103ad57600080fd5b506103c860048036038101906103c39190613437565b610db1565b005b3480156103d657600080fd5b506103f160048036038101906103ec9190613273565b610ff9565b005b61040d60048036038101906104089190613497565b61100b565b005b34801561041b57600080fd5b50610436600480360381019061043191906134ea565b6111ed565b005b34801561044457600080fd5b5061044d611221565b005b34801561045b57600080fd5b5061046461134c565b604051610471919061321b565b60405180910390f35b610494600480360381019061048f9190613497565b6113da565b005b3480156104a257600080fd5b506104bd60048036038101906104b89190613647565b6115bc565b005b3480156104cb57600080fd5b506104e660048036038101906104e191906134ea565b6115d7565b005b3480156104f457600080fd5b5061050f600480360381019061050a9190613690565b61160b565b60405161051c91906136cc565b60405180910390f35b34801561053157600080fd5b5061053a61161d565b6040516105479190613170565b60405180910390f35b34801561055c57600080fd5b50610565611630565b005b34801561057357600080fd5b5061057c611664565b604051610589919061375e565b60405180910390f35b34801561059e57600080fd5b506105b960048036038101906105b49190613273565b611677565b6040516105c691906132e1565b60405180910390f35b3480156105db57600080fd5b506105f660048036038101906105f191906138ff565b611689565b005b610612600480360381019061060d91906134ea565b6117a8565b005b34801561062057600080fd5b5061063b60048036038101906106369190613273565b6119f2565b005b34801561064957600080fd5b50610664600480360381019061065f9190613690565b611a48565b6040516106719190613377565b60405180910390f35b34801561068657600080fd5b5061068f611b00565b005b34801561069d57600080fd5b506106b860048036038101906106b39190613273565b611b14565b005b3480156106c657600080fd5b506106cf611b26565b6040516106dc91906132e1565b60405180910390f35b3480156106f157600080fd5b506106fa611b50565b604051610707919061321b565b60405180910390f35b34801561071c57600080fd5b50610725611be2565b6040516107329190613377565b60405180910390f35b34801561074757600080fd5b50610762600480360381019061075d91906139a3565b611be8565b005b34801561077057600080fd5b50610779611cf3565b60405161078691906139fc565b60405180910390f35b6107a960048036038101906107a49190613ab8565b611cf9565b005b3480156107b757600080fd5b506107c0611ede565b6040516107cd91906136cc565b60405180910390f35b3480156107e257600080fd5b506107fd60048036038101906107f89190613b67565b611ef8565b005b34801561080b57600080fd5b5061082660048036038101906108219190613273565b611f0a565b604051610833919061321b565b60405180910390f35b34801561084857600080fd5b50610851612058565b60405161085e9190613377565b60405180910390f35b34801561087357600080fd5b5061087c61205e565b6040516108899190613377565b60405180910390f35b34801561089e57600080fd5b506108a7612064565b6040516108b491906136cc565b60405180910390f35b3480156108c957600080fd5b506108e460048036038101906108df9190613690565b61207e565b6040516108f19190613377565b60405180910390f35b34801561090657600080fd5b50610921600480360381019061091c9190613647565b612090565b005b34801561092f57600080fd5b5061094a60048036038101906109459190613b94565b6120ab565b6040516109579190613170565b60405180910390f35b34801561096c57600080fd5b5061098760048036038101906109829190613690565b61213f565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109e457506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610a145750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060028054610a2a90613c03565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5690613c03565b8015610aa35780601f10610a7857610100808354040283529160200191610aa3565b820191906000526020600020905b815481529060010190602001808311610a8657829003601f168201915b5050505050905090565b6000610ab8826121c2565b610aee576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610b34612221565b600280811115610b4757610b466136e7565b5b811115610b89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8090613c80565b60405180910390fd5b806002811115610b9c57610b9b6136e7565b5b600860146101000a81548160ff02191690836002811115610bc057610bbf6136e7565b5b021790555050565b600f8054610bd590613c03565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0190613c03565b8015610c4e5780601f10610c2357610100808354040283529160200191610c4e565b820191906000526020600020905b815481529060010190602001808311610c3157829003601f168201915b505050505081565b6000610c6182611677565b90508073ffffffffffffffffffffffffffffffffffffffff16610c8261229f565b73ffffffffffffffffffffffffffffffffffffffff1614610ce557610cae81610ca961229f565b6120ab565b610ce4576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610da46122a7565b6001546000540303905090565b8282600954610e28838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508233604051602001610e0d9190613ce8565b604051602081830303815290604052805190602001206122b0565b610e67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5e90613d4f565b60405180910390fd5b8367ffffffffffffffff16600a5481610e7e6122c7565b610e889190613d9e565b1115610ec9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec090613e44565b60405180910390fd5b6002806002811115610ede57610edd6136e7565b5b600860149054906101000a900460ff166002811115610f0057610eff6136e7565b5b14610f40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3790613eb0565b60405180910390fd5b6000610f4b336122da565b9050600d60089054906101000a900467ffffffffffffffff1667ffffffffffffffff168782610f7a9190613ed0565b67ffffffffffffffff161115610fc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbc90613f58565b60405180910390fd5b610fda338883610fd59190613ed0565b612327565b610fee338867ffffffffffffffff166123dd565b505050505050505050565b611001612221565b80600b8190555050565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156111db573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361107d57611078848484612598565b6111e7565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b81526004016110c6929190613f78565b602060405180830381865afa1580156110e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111079190613fb6565b801561119957506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611157929190613f78565b602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111989190613fb6565b5b6111da57336040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016111d191906132e1565b60405180910390fd5b5b6111e6848484612598565b5b50505050565b6111f5612221565b80600d60086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b611229612221565b600073012d8e2ce2716b260718abe39062a76be15570b373ffffffffffffffffffffffffffffffffffffffff1660646006476112659190613fe3565b61126f9190614054565b60405161127b906140b6565b60006040518083038185875af1925050503d80600081146112b8576040519150601f19603f3d011682016040523d82523d6000602084013e6112bd565b606091505b50509050806112cb57600080fd5b60006112d5611b26565b73ffffffffffffffffffffffffffffffffffffffff16476040516112f8906140b6565b60006040518083038185875af1925050503d8060008114611335576040519150601f19603f3d011682016040523d82523d6000602084013e61133a565b606091505b505090508061134857600080fd5b5050565b600e805461135990613c03565b80601f016020809104026020016040519081016040528092919081815260200182805461138590613c03565b80156113d25780601f106113a7576101008083540402835291602001916113d2565b820191906000526020600020905b8154815290600101906020018083116113b557829003601f168201915b505050505081565b8260006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156115aa573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361144c576114478484846128ba565b6115b6565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401611495929190613f78565b602060405180830381865afa1580156114b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d69190613fb6565b801561156857506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611526929190613f78565b602060405180830381865afa158015611543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115679190613fb6565b5b6115a957336040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016115a091906132e1565b60405180910390fd5b5b6115b58484846128ba565b5b50505050565b6115c4612221565b80600e90816115d39190614277565b5050565b6115df612221565b80600d60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6000611616826122da565b9050919050565b601060009054906101000a900460ff1681565b611638612221565b601060009054906101000a900460ff1615601060006101000a81548160ff021916908315150217905550565b600860149054906101000a900460ff1681565b6000611682826128da565b9050919050565b611691612221565b80518251146116d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cc906143bb565b60405180910390fd5b60005b82518110156117a357600a548282815181106116f7576116f66143db565b5b60200260200101516117076122c7565b6117119190613d9e565b1115611752576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174990613e44565b60405180910390fd5b611790838281518110611768576117676143db565b5b6020026020010151838381518110611783576117826143db565b5b60200260200101516123dd565b808061179b9061440a565b9150506116d8565b505050565b8067ffffffffffffffff16600a54816117bf6122c7565b6117c99190613d9e565b111561180a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180190613e44565b60405180910390fd5b600180600281111561181f5761181e6136e7565b5b600860149054906101000a900460ff166002811115611841576118406136e7565b5b14611881576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187890613eb0565b60405180910390fd5b600b548367ffffffffffffffff166118976122c7565b6118a19190613d9e565b11156118e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d9906144c4565b60405180910390fd5b600d60009054906101000a900467ffffffffffffffff1667ffffffffffffffff168367ffffffffffffffff16611917336122da565b67ffffffffffffffff1661192a336129a6565b61193491906144e4565b61193e9190613d9e565b111561197f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197690613f58565b60405180910390fd5b8267ffffffffffffffff16600c546119979190613fe3565b3410156119d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d090614564565b60405180910390fd5b6119ed338467ffffffffffffffff166123dd565b505050565b6119fa612221565b600a548110611a3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a35906145f6565b60405180910390fd5b80600a8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611aaf576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611b08612221565b611b1260006129fd565b565b611b1c612221565b80600c8190555050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054611b5f90613c03565b80601f0160208091040260200160405190810160405280929190818152602001828054611b8b90613c03565b8015611bd85780601f10611bad57610100808354040283529160200191611bd8565b820191906000526020600020905b815481529060010190602001808311611bbb57829003601f168201915b5050505050905090565b600c5481565b8060076000611bf561229f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611ca261229f565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611ce79190613170565b60405180910390a35050565b60095481565b8360006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611eca573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d6c57611d6785858585612ac3565b611ed7565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401611db5929190613f78565b602060405180830381865afa158015611dd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df69190613fb6565b8015611e8857506daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b8152600401611e46929190613f78565b602060405180830381865afa158015611e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e879190613fb6565b5b611ec957336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401611ec091906132e1565b60405180910390fd5b5b611ed685858585612ac3565b5b5050505050565b600d60009054906101000a900467ffffffffffffffff1681565b611f00612221565b8060098190555050565b6060611f15826121c2565b611f54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4b90614688565b60405180910390fd5b601060009054906101000a900460ff16611ffa57600f8054611f7590613c03565b80601f0160208091040260200160405190810160405280929190818152602001828054611fa190613c03565b8015611fee5780601f10611fc357610100808354040283529160200191611fee565b820191906000526020600020905b815481529060010190602001808311611fd157829003601f168201915b50505050509050612053565b6000612004612b36565b90506000815111612024576040518060200160405280600081525061204f565b8061202e84612bc8565b60405160200161203f929190614730565b6040516020818303038152906040525b9150505b919050565b600b5481565b600a5481565b600d60089054906101000a900467ffffffffffffffff1681565b6000612089826129a6565b9050919050565b612098612221565b80600f90816120a79190614277565b5050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612147612221565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ad906147d1565b60405180910390fd5b6121bf816129fd565b50565b6000816121cd6122a7565b111580156121dc575060005482105b801561221a575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b612229612c96565b73ffffffffffffffffffffffffffffffffffffffff16612247611b26565b73ffffffffffffffffffffffffffffffffffffffff161461229d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122949061483d565b60405180910390fd5b565b600033905090565b60006001905090565b6000826122bd8584612c9e565b1490509392505050565b60006122d16122a7565b60005403905090565b600060c0600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c9050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600082905060c081901b77ffffffffffffffffffffffffffffffffffffffffffffffff831617915081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505050565b6000805490506000820361241d576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61242a6000848385612cf4565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506124a1836124926000866000612cfa565b61249b85612d22565b17612d32565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461254257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612507565b506000820361257d576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506125936000848385612d5d565b505050565b60006125a3826128da565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461260a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061261684612d63565b9150915061262c818761262761229f565b612d8a565b612678576126418661263c61229f565b6120ab565b612677576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036126de576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126eb8686866001612cf4565b80156126f657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506127c4856127a0888887612cfa565b7c020000000000000000000000000000000000000000000000000000000017612d32565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361284a5760006001850190506000600460008381526020019081526020016000205403612848576000548114612847578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128b28686866001612d5d565b505050505050565b6128d583838360405180602001604052806000815250611cf9565b505050565b600080829050806128e96122a7565b1161296f5760005481101561296e5760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082160361296c575b60008103612962576004600083600190039350838152602001908152602001600020549050612938565b80925050506129a1565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612ace84848461100b565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612b3057612af984848484612dce565b612b2f576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060600e8054612b4590613c03565b80601f0160208091040260200160405190810160405280929190818152602001828054612b7190613c03565b8015612bbe5780601f10612b9357610100808354040283529160200191612bbe565b820191906000526020600020905b815481529060010190602001808311612ba157829003601f168201915b5050505050905090565b606060006001612bd784612f1e565b01905060008167ffffffffffffffff811115612bf657612bf561351c565b5b6040519080825280601f01601f191660200182016040528015612c285781602001600182028036833780820191505090505b509050600082602001820190505b600115612c8b578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581612c7f57612c7e614025565b5b04945060008503612c36575b819350505050919050565b600033905090565b60008082905060005b8451811015612ce957612cd482868381518110612cc757612cc66143db565b5b6020026020010151613071565b91508080612ce19061440a565b915050612ca7565b508091505092915050565b50505050565b60008060e883901c905060e8612d1186868461309c565b62ffffff16901b9150509392505050565b60006001821460e11b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612df461229f565b8786866040518563ffffffff1660e01b8152600401612e1694939291906148b2565b6020604051808303816000875af1925050508015612e5257506040513d601f19601f82011682018060405250810190612e4f9190614913565b60015b612ecb573d8060008114612e82576040519150601f19603f3d011682016040523d82523d6000602084013e612e87565b606091505b506000815103612ec3576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612f7c577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612f7257612f71614025565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612fb9576d04ee2d6d415b85acef81000000008381612faf57612fae614025565b5b0492506020810190505b662386f26fc100008310612fe857662386f26fc100008381612fde57612fdd614025565b5b0492506010810190505b6305f5e1008310613011576305f5e100838161300757613006614025565b5b0492506008810190505b612710831061303657612710838161302c5761302b614025565b5b0492506004810190505b60648310613059576064838161304f5761304e614025565b5b0492506002810190505b600a8310613068576001810190505b80915050919050565b60008183106130895761308482846130a5565b613094565b61309383836130a5565b5b905092915050565b60009392505050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613105816130d0565b811461311057600080fd5b50565b600081359050613122816130fc565b92915050565b60006020828403121561313e5761313d6130c6565b5b600061314c84828501613113565b91505092915050565b60008115159050919050565b61316a81613155565b82525050565b60006020820190506131856000830184613161565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156131c55780820151818401526020810190506131aa565b60008484015250505050565b6000601f19601f8301169050919050565b60006131ed8261318b565b6131f78185613196565b93506132078185602086016131a7565b613210816131d1565b840191505092915050565b6000602082019050818103600083015261323581846131e2565b905092915050565b6000819050919050565b6132508161323d565b811461325b57600080fd5b50565b60008135905061326d81613247565b92915050565b600060208284031215613289576132886130c6565b5b60006132978482850161325e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006132cb826132a0565b9050919050565b6132db816132c0565b82525050565b60006020820190506132f660008301846132d2565b92915050565b613305816132c0565b811461331057600080fd5b50565b600081359050613322816132fc565b92915050565b6000806040838503121561333f5761333e6130c6565b5b600061334d85828601613313565b925050602061335e8582860161325e565b9150509250929050565b6133718161323d565b82525050565b600060208201905061338c6000830184613368565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126133b7576133b6613392565b5b8235905067ffffffffffffffff8111156133d4576133d3613397565b5b6020830191508360208202830111156133f0576133ef61339c565b5b9250929050565b600067ffffffffffffffff82169050919050565b613414816133f7565b811461341f57600080fd5b50565b6000813590506134318161340b565b92915050565b6000806000604084860312156134505761344f6130c6565b5b600084013567ffffffffffffffff81111561346e5761346d6130cb565b5b61347a868287016133a1565b9350935050602061348d86828701613422565b9150509250925092565b6000806000606084860312156134b0576134af6130c6565b5b60006134be86828701613313565b93505060206134cf86828701613313565b92505060406134e08682870161325e565b9150509250925092565b600060208284031215613500576134ff6130c6565b5b600061350e84828501613422565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613554826131d1565b810181811067ffffffffffffffff821117156135735761357261351c565b5b80604052505050565b60006135866130bc565b9050613592828261354b565b919050565b600067ffffffffffffffff8211156135b2576135b161351c565b5b6135bb826131d1565b9050602081019050919050565b82818337600083830152505050565b60006135ea6135e584613597565b61357c565b90508281526020810184848401111561360657613605613517565b5b6136118482856135c8565b509392505050565b600082601f83011261362e5761362d613392565b5b813561363e8482602086016135d7565b91505092915050565b60006020828403121561365d5761365c6130c6565b5b600082013567ffffffffffffffff81111561367b5761367a6130cb565b5b61368784828501613619565b91505092915050565b6000602082840312156136a6576136a56130c6565b5b60006136b484828501613313565b91505092915050565b6136c6816133f7565b82525050565b60006020820190506136e160008301846136bd565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613727576137266136e7565b5b50565b600081905061373882613716565b919050565b60006137488261372a565b9050919050565b6137588161373d565b82525050565b6000602082019050613773600083018461374f565b92915050565b600067ffffffffffffffff8211156137945761379361351c565b5b602082029050602081019050919050565b60006137b86137b384613779565b61357c565b905080838252602082019050602084028301858111156137db576137da61339c565b5b835b8181101561380457806137f08882613313565b8452602084019350506020810190506137dd565b5050509392505050565b600082601f83011261382357613822613392565b5b81356138338482602086016137a5565b91505092915050565b600067ffffffffffffffff8211156138575761385661351c565b5b602082029050602081019050919050565b600061387b6138768461383c565b61357c565b9050808382526020820190506020840283018581111561389e5761389d61339c565b5b835b818110156138c757806138b3888261325e565b8452602084019350506020810190506138a0565b5050509392505050565b600082601f8301126138e6576138e5613392565b5b81356138f6848260208601613868565b91505092915050565b60008060408385031215613916576139156130c6565b5b600083013567ffffffffffffffff811115613934576139336130cb565b5b6139408582860161380e565b925050602083013567ffffffffffffffff811115613961576139606130cb565b5b61396d858286016138d1565b9150509250929050565b61398081613155565b811461398b57600080fd5b50565b60008135905061399d81613977565b92915050565b600080604083850312156139ba576139b96130c6565b5b60006139c885828601613313565b92505060206139d98582860161398e565b9150509250929050565b6000819050919050565b6139f6816139e3565b82525050565b6000602082019050613a1160008301846139ed565b92915050565b600067ffffffffffffffff821115613a3257613a3161351c565b5b613a3b826131d1565b9050602081019050919050565b6000613a5b613a5684613a17565b61357c565b905082815260208101848484011115613a7757613a76613517565b5b613a828482856135c8565b509392505050565b600082601f830112613a9f57613a9e613392565b5b8135613aaf848260208601613a48565b91505092915050565b60008060008060808587031215613ad257613ad16130c6565b5b6000613ae087828801613313565b9450506020613af187828801613313565b9350506040613b028782880161325e565b925050606085013567ffffffffffffffff811115613b2357613b226130cb565b5b613b2f87828801613a8a565b91505092959194509250565b613b44816139e3565b8114613b4f57600080fd5b50565b600081359050613b6181613b3b565b92915050565b600060208284031215613b7d57613b7c6130c6565b5b6000613b8b84828501613b52565b91505092915050565b60008060408385031215613bab57613baa6130c6565b5b6000613bb985828601613313565b9250506020613bca85828601613313565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613c1b57607f821691505b602082108103613c2e57613c2d613bd4565b5b50919050565b7f73616c65207374617465206e6f742076616c6964000000000000000000000000600082015250565b6000613c6a601483613196565b9150613c7582613c34565b602082019050919050565b60006020820190508181036000830152613c9981613c5d565b9050919050565b60008160601b9050919050565b6000613cb882613ca0565b9050919050565b6000613cca82613cad565b9050919050565b613ce2613cdd826132c0565b613cbf565b82525050565b6000613cf48284613cd1565b60148201915081905092915050565b7f4164647265737320646f6573206e6f7420657869737420696e206c6973740000600082015250565b6000613d39601e83613196565b9150613d4482613d03565b602082019050919050565b60006020820190508181036000830152613d6881613d2c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613da98261323d565b9150613db48361323d565b9250828201905080821115613dcc57613dcb613d6f565b5b92915050565b7f4e6f7420656e6f75676820746f6b656e732072656d61696e696e6720746f206d60008201527f696e740000000000000000000000000000000000000000000000000000000000602082015250565b6000613e2e602383613196565b9150613e3982613dd2565b604082019050919050565b60006020820190508181036000830152613e5d81613e21565b9050919050565b7f73616c65206973206e6f74206163746976650000000000000000000000000000600082015250565b6000613e9a601283613196565b9150613ea582613e64565b602082019050919050565b60006020820190508181036000830152613ec981613e8d565b9050919050565b6000613edb826133f7565b9150613ee6836133f7565b9250828201905067ffffffffffffffff811115613f0657613f05613d6f565b5b92915050565b7f4d6178696d756d206d696e74696e67206c696d69742065786365656465640000600082015250565b6000613f42601e83613196565b9150613f4d82613f0c565b602082019050919050565b60006020820190508181036000830152613f7181613f35565b9050919050565b6000604082019050613f8d60008301856132d2565b613f9a60208301846132d2565b9392505050565b600081519050613fb081613977565b92915050565b600060208284031215613fcc57613fcb6130c6565b5b6000613fda84828501613fa1565b91505092915050565b6000613fee8261323d565b9150613ff98361323d565b92508282026140078161323d565b9150828204841483151761401e5761401d613d6f565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061405f8261323d565b915061406a8361323d565b92508261407a57614079614025565b5b828204905092915050565b600081905092915050565b50565b60006140a0600083614085565b91506140ab82614090565b600082019050919050565b60006140c182614093565b9150819050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261412d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826140f0565b61413786836140f0565b95508019841693508086168417925050509392505050565b6000819050919050565b600061417461416f61416a8461323d565b61414f565b61323d565b9050919050565b6000819050919050565b61418e83614159565b6141a261419a8261417b565b8484546140fd565b825550505050565b600090565b6141b76141aa565b6141c2818484614185565b505050565b5b818110156141e6576141db6000826141af565b6001810190506141c8565b5050565b601f82111561422b576141fc816140cb565b614205846140e0565b81016020851015614214578190505b614228614220856140e0565b8301826141c7565b50505b505050565b600082821c905092915050565b600061424e60001984600802614230565b1980831691505092915050565b6000614267838361423d565b9150826002028217905092915050565b6142808261318b565b67ffffffffffffffff8111156142995761429861351c565b5b6142a38254613c03565b6142ae8282856141ea565b600060209050601f8311600181146142e157600084156142cf578287015190505b6142d9858261425b565b865550614341565b601f1984166142ef866140cb565b60005b82811015614317578489015182556001820191506020850194506020810190506142f2565b868310156143345784890151614330601f89168261423d565b8355505b6001600288020188555050505b505050505050565b7f696e76616c696420617272617973206f66206164647265737320616e64206e7560008201527f6d62657200000000000000000000000000000000000000000000000000000000602082015250565b60006143a5602483613196565b91506143b082614349565b604082019050919050565b600060208201905081810360008301526143d481614398565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006144158261323d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361444757614446613d6f565b5b600182019050919050565b7f4d696e74656420746865206d6178696d756d206e6f206f66207075626c69632060008201527f746f6b656e730000000000000000000000000000000000000000000000000000602082015250565b60006144ae602683613196565b91506144b982614452565b604082019050919050565b600060208201905081810360008301526144dd816144a1565b9050919050565b60006144ef8261323d565b91506144fa8361323d565b925082820390508181111561451257614511613d6f565b5b92915050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b600061454e600e83613196565b915061455982614518565b602082019050919050565b6000602082019050818103600083015261457d81614541565b9050919050565b7f6d617820737570706c792063616e6e6f74206265206d6f7265207468616e206360008201527f757272656e740000000000000000000000000000000000000000000000000000602082015250565b60006145e0602683613196565b91506145eb82614584565b604082019050919050565b6000602082019050818103600083015261460f816145d3565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614672602f83613196565b915061467d82614616565b604082019050919050565b600060208201905081810360008301526146a181614665565b9050919050565b600081905092915050565b60006146be8261318b565b6146c881856146a8565b93506146d88185602086016131a7565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061471a6005836146a8565b9150614725826146e4565b600582019050919050565b600061473c82856146b3565b915061474882846146b3565b91506147538261470d565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006147bb602683613196565b91506147c68261475f565b604082019050919050565b600060208201905081810360008301526147ea816147ae565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614827602083613196565b9150614832826147f1565b602082019050919050565b600060208201905081810360008301526148568161481a565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006148848261485d565b61488e8185614868565b935061489e8185602086016131a7565b6148a7816131d1565b840191505092915050565b60006080820190506148c760008301876132d2565b6148d460208301866132d2565b6148e16040830185613368565b81810360608301526148f38184614879565b905095945050505050565b60008151905061490d816130fc565b92915050565b600060208284031215614929576149286130c6565b5b6000614937848285016148fe565b9150509291505056fea2646970667358221220f37c364f9479e5a9f17580f788c8fa42aa8166e6437cdfba7c7a77a38b3d004164736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: No
main.sol 2498 lines
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023.

// SPDX-License-Identifier: MIT

// File: operator-filter-registry/src/IOperatorFilterRegistry.sol


pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

// File: operator-filter-registry/src/OperatorFilterer.sol


pragma solidity ^0.8.13;


abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant operatorFilterRegistry =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    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(operatorFilterRegistry).code.length > 0) {
            if (subscribe) {
                operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    operatorFilterRegistry.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(operatorFilterRegistry).code.length > 0) {
            // 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) {
                _;
                return;
            }
            if (
                !(
                    operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)
                        && operatorFilterRegistry.isOperatorAllowed(address(this), from)
                )
            ) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }
}

// File: operator-filter-registry/src/DefaultOperatorFilterer.sol


pragma solidity ^0.8.13;


abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_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/math/Math.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

// File: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;


/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File: erc721a/contracts/IERC721A.sol


// ERC721A Contracts v4.2.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/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://eip...

// [truncated — 89359 bytes total]

Read Contract

balanceOf 0x70a08231 → uint256
baseURL 0x40c84b0e → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isRevealed 0x54214f69 → bool
maxPublicTokens 0xd447c758 → uint256
maxPublicTokensPerWallet 0xbca9b530 → uint64
maxSupply 0xd5abeb01 → uint256
maxWLTokensPerWallet 0xd93ecff9 → uint64
name 0x06fdde03 → string
numberMinted 0xdc33e681 → uint256
numberMintedWl 0x52dc6ad9 → uint64
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
publicSalePrice 0x9b6860c8 → uint256
saleState 0x603f4d52 → uint8
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
unRevealedURL 0x09008f0a → string
whitelistMerkleRoot 0xaa98e0c6 → bytes32

Write Contract 21 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address to
uint256 tokenId
mintTo 0x69add11d
address[] _to
uint256[] _numberOfTokens
publicMint 0x6afcb7b0
uint64 numberOfTokens
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
setBaseURL 0x49f2553a
string _baseURL
setMaxPublicTokens 0x213f3ea2
uint256 _maxPublicTokens
setMaxPublicTokensPerWallet 0x5117fb88
uint64 _maxPublicTokensPerWallet
setMaxSupply 0x6f8b44b0
uint256 _newMaxSupply
setMaxWLTokensPerWallet 0x32366a61
uint64 _maxWLTokensPerWallet
setPublicSalePrice 0x791a2519
uint256 _price
setSaleState 0x084c4088
uint256 newSaleState
setUnRevealedURL 0xe922fa3c
string _unRevealedURL
setWhitelistMerkleRoot 0xbd32fb66
bytes32 merkleRoot
toggleRevealed 0x5bc020bc
No parameters
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistMint 0x1b004d25
bytes32[] merkleProof
uint64 numberOfTokens
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address