Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xF77fA157C4823aA413002a5c7E3305AECFe94920
Balance 0 ETH
Nonce 1
Code Size 17421 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

17421 bytes
0x6080604052600436106102255760003560e01c8063715018a611610123578063b767a098116100ab578063e0a808531161006f578063e0a80853146107e6578063e985e9c51461080f578063ebf0c7171461084c578063efbd73f414610877578063f2fde38b146108a057610225565b8063b767a098146106ef578063b88d4fde14610718578063c87b56dd14610741578063d5abeb011461077e578063db4bec44146107a957610225565b8063954d90d0116100f2578063954d90d01461061757806395d89b4114610654578063a0712d681461067f578063a22cb4651461069b578063a45ba8e7146106c457610225565b8063715018a6146105835780637ec4a6591461059a5780637f00c7a6146105c35780638da5cb5b146105ec57610225565b80633ccfd60b116101b15780635c975abb116101755780635c975abb1461048857806362b99ad4146104b35780636352211e146104de5780636caede3d1461051b57806370a082311461054657610225565b80633ccfd60b146103c957806342842e0e146103e05780634fdd43cb1461040957806351830227146104325780635503a0e81461045d57610225565b806316ba10e0116101f857806316ba10e0146102f857806316c38b3c1461032157806318160ddd1461034a578063239c70ae1461037557806323b872dd146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063081812fc14610292578063095ea7b3146102cf575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190612c74565b6108c9565b60405161025e9190612cbc565b60405180910390f35b34801561027357600080fd5b5061027c6109ab565b6040516102899190612d70565b60405180910390f35b34801561029e57600080fd5b506102b960048036038101906102b49190612dc8565b610a3d565b6040516102c69190612e36565b60405180910390f35b3480156102db57600080fd5b506102f660048036038101906102f19190612e7d565b610ac2565b005b34801561030457600080fd5b5061031f600480360381019061031a9190612ff2565b610bda565b005b34801561032d57600080fd5b5061034860048036038101906103439190613067565b610c70565b005b34801561035657600080fd5b5061035f610d09565b60405161036c91906130a3565b60405180910390f35b34801561038157600080fd5b5061038a610d1a565b60405161039791906130a3565b60405180910390f35b3480156103ac57600080fd5b506103c760048036038101906103c291906130be565b610d20565b005b3480156103d557600080fd5b506103de610d80565b005b3480156103ec57600080fd5b50610407600480360381019061040291906130be565b610e7c565b005b34801561041557600080fd5b50610430600480360381019061042b9190612ff2565b610e9c565b005b34801561043e57600080fd5b50610447610f32565b6040516104549190612cbc565b60405180910390f35b34801561046957600080fd5b50610472610f45565b60405161047f9190612d70565b60405180910390f35b34801561049457600080fd5b5061049d610fd3565b6040516104aa9190612cbc565b60405180910390f35b3480156104bf57600080fd5b506104c8610fe6565b6040516104d59190612d70565b60405180910390f35b3480156104ea57600080fd5b5061050560048036038101906105009190612dc8565b611074565b6040516105129190612e36565b60405180910390f35b34801561052757600080fd5b50610530611126565b60405161053d9190612cbc565b60405180910390f35b34801561055257600080fd5b5061056d60048036038101906105689190613111565b611139565b60405161057a91906130a3565b60405180910390f35b34801561058f57600080fd5b506105986111f1565b005b3480156105a657600080fd5b506105c160048036038101906105bc9190612ff2565b611279565b005b3480156105cf57600080fd5b506105ea60048036038101906105e59190612dc8565b61130f565b005b3480156105f857600080fd5b50610601611395565b60405161060e9190612e36565b60405180910390f35b34801561062357600080fd5b5061063e6004803603810190610639919061319e565b6113bf565b60405161064b9190612cbc565b60405180910390f35b34801561066057600080fd5b50610669611483565b6040516106769190612d70565b60405180910390f35b61069960048036038101906106949190612dc8565b611515565b005b3480156106a757600080fd5b506106c260048036038101906106bd91906131eb565b61166c565b005b3480156106d057600080fd5b506106d9611682565b6040516106e69190612d70565b60405180910390f35b3480156106fb57600080fd5b5061071660048036038101906107119190613067565b611710565b005b34801561072457600080fd5b5061073f600480360381019061073a91906132cc565b6117a9565b005b34801561074d57600080fd5b5061076860048036038101906107639190612dc8565b61180b565b6040516107759190612d70565b60405180910390f35b34801561078a57600080fd5b50610793611964565b6040516107a091906130a3565b60405180910390f35b3480156107b557600080fd5b506107d060048036038101906107cb9190613111565b61196a565b6040516107dd9190612cbc565b60405180910390f35b3480156107f257600080fd5b5061080d60048036038101906108089190613067565b61198a565b005b34801561081b57600080fd5b506108366004803603810190610831919061334f565b611a23565b6040516108439190612cbc565b60405180910390f35b34801561085857600080fd5b50610861611ab7565b60405161086e91906133a8565b60405180910390f35b34801561088357600080fd5b5061089e600480360381019061089991906133c3565b611abd565b005b3480156108ac57600080fd5b506108c760048036038101906108c29190613111565b611bf1565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061099457507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109a457506109a382611ce9565b5b9050919050565b6060600080546109ba90613432565b80601f01602080910402602001604051908101604052809291908181526020018280546109e690613432565b8015610a335780601f10610a0857610100808354040283529160200191610a33565b820191906000526020600020905b815481529060010190602001808311610a1657829003601f168201915b5050505050905090565b6000610a4882611d53565b610a87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7e906134d6565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610acd82611074565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3590613568565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b5d611dbf565b73ffffffffffffffffffffffffffffffffffffffff161480610b8c5750610b8b81610b86611dbf565b611a23565b5b610bcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc2906135fa565b60405180910390fd5b610bd58383611dc7565b505050565b610be2611dbf565b73ffffffffffffffffffffffffffffffffffffffff16610c00611395565b73ffffffffffffffffffffffffffffffffffffffff1614610c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4d90613666565b60405180910390fd5b80600b9080519060200190610c6c929190612b65565b5050565b610c78611dbf565b73ffffffffffffffffffffffffffffffffffffffff16610c96611395565b73ffffffffffffffffffffffffffffffffffffffff1614610cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce390613666565b60405180910390fd5b80601060006101000a81548160ff02191690831515021790555050565b6000610d156007611e80565b905090565b600f5481565b610d31610d2b611dbf565b82611e8e565b610d70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d67906136f8565b60405180910390fd5b610d7b838383611f6c565b505050565b610d88611dbf565b73ffffffffffffffffffffffffffffffffffffffff16610da6611395565b73ffffffffffffffffffffffffffffffffffffffff1614610dfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df390613666565b60405180910390fd5b6000610e06611395565b73ffffffffffffffffffffffffffffffffffffffff1647604051610e2990613749565b60006040518083038185875af1925050503d8060008114610e66576040519150601f19603f3d011682016040523d82523d6000602084013e610e6b565b606091505b5050905080610e7957600080fd5b50565b610e97838383604051806020016040528060008152506117a9565b505050565b610ea4611dbf565b73ffffffffffffffffffffffffffffffffffffffff16610ec2611395565b73ffffffffffffffffffffffffffffffffffffffff1614610f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0f90613666565b60405180910390fd5b80600c9080519060200190610f2e929190612b65565b5050565b601060019054906101000a900460ff1681565b600b8054610f5290613432565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7e90613432565b8015610fcb5780601f10610fa057610100808354040283529160200191610fcb565b820191906000526020600020905b815481529060010190602001808311610fae57829003601f168201915b505050505081565b601060009054906101000a900460ff1681565b600a8054610ff390613432565b80601f016020809104026020016040519081016040528092919081815260200182805461101f90613432565b801561106c5780601f106110415761010080835404028352916020019161106c565b820191906000526020600020905b81548152906001019060200180831161104f57829003601f168201915b505050505081565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561111d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611114906137d0565b60405180910390fd5b80915050919050565b601060029054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a190613862565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6111f9611dbf565b73ffffffffffffffffffffffffffffffffffffffff16611217611395565b73ffffffffffffffffffffffffffffffffffffffff161461126d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126490613666565b60405180910390fd5b61127760006121d3565b565b611281611dbf565b73ffffffffffffffffffffffffffffffffffffffff1661129f611395565b73ffffffffffffffffffffffffffffffffffffffff16146112f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ec90613666565b60405180910390fd5b80600a908051906020019061130b929190612b65565b5050565b611317611dbf565b73ffffffffffffffffffffffffffffffffffffffff16611335611395565b73ffffffffffffffffffffffffffffffffffffffff161461138b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138290613666565b60405180910390fd5b80600f8190555050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080336040516020016113d391906138ca565b604051602081830303815290604052805190602001209050611439848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060085483612299565b611478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146f90613957565b60405180910390fd5b600191505092915050565b60606001805461149290613432565b80601f01602080910402602001604051908101604052809291908181526020018280546114be90613432565b801561150b5780601f106114e05761010080835404028352916020019161150b565b820191906000526020600020905b8154815290600101906020018083116114ee57829003601f168201915b5050505050905090565b806000811180156115285750600f548111155b611567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155e906139c3565b60405180910390fd5b600e5481611573610d09565b61157d9190613a12565b11156115be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b590613ab4565b60405180910390fd5b601060009054906101000a900460ff161561160e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160590613b20565b60405180910390fd5b81600d5461161c9190613b40565b34101561165e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165590613be6565b60405180910390fd5b61166833836122b0565b5050565b61167e611677611dbf565b83836122f0565b5050565b600c805461168f90613432565b80601f01602080910402602001604051908101604052809291908181526020018280546116bb90613432565b80156117085780601f106116dd57610100808354040283529160200191611708565b820191906000526020600020905b8154815290600101906020018083116116eb57829003601f168201915b505050505081565b611718611dbf565b73ffffffffffffffffffffffffffffffffffffffff16611736611395565b73ffffffffffffffffffffffffffffffffffffffff161461178c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178390613666565b60405180910390fd5b80601060026101000a81548160ff02191690831515021790555050565b6117ba6117b4611dbf565b83611e8e565b6117f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f0906136f8565b60405180910390fd5b6118058484848461245d565b50505050565b606061181682611d53565b611855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184c90613c78565b60405180910390fd5b60001515601060019054906101000a900460ff161515141561190357600c805461187e90613432565b80601f01602080910402602001604051908101604052809291908181526020018280546118aa90613432565b80156118f75780601f106118cc576101008083540402835291602001916118f7565b820191906000526020600020905b8154815290600101906020018083116118da57829003601f168201915b5050505050905061195f565b600061190d6124b9565b9050600081511161192d576040518060200160405280600081525061195b565b806119378461254b565b600b60405160200161194b93929190613d68565b6040516020818303038152906040525b9150505b919050565b600e5481565b60096020528060005260406000206000915054906101000a900460ff1681565b611992611dbf565b73ffffffffffffffffffffffffffffffffffffffff166119b0611395565b73ffffffffffffffffffffffffffffffffffffffff1614611a06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fd90613666565b60405180910390fd5b80601060016101000a81548160ff02191690831515021790555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60085481565b81600081118015611ad05750600f548111155b611b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b06906139c3565b60405180910390fd5b600e5481611b1b610d09565b611b259190613a12565b1115611b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5d90613ab4565b60405180910390fd5b611b6e611dbf565b73ffffffffffffffffffffffffffffffffffffffff16611b8c611395565b73ffffffffffffffffffffffffffffffffffffffff1614611be2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd990613666565b60405180910390fd5b611bec82846122b0565b505050565b611bf9611dbf565b73ffffffffffffffffffffffffffffffffffffffff16611c17611395565b73ffffffffffffffffffffffffffffffffffffffff1614611c6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6490613666565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd490613e0b565b60405180910390fd5b611ce6816121d3565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611e3a83611074565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b6000611e9982611d53565b611ed8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecf90613e9d565b60405180910390fd5b6000611ee383611074565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611f255750611f248185611a23565b5b80611f6357508373ffffffffffffffffffffffffffffffffffffffff16611f4b84610a3d565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611f8c82611074565b73ffffffffffffffffffffffffffffffffffffffff1614611fe2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd990613f2f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612052576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204990613fc1565b60405180910390fd5b61205d8383836126ac565b612068600082611dc7565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120b89190613fe1565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461210f9190613a12565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46121ce8383836126b1565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000826122a685846126b6565b1490509392505050565b60005b818110156122eb576122c5600761272b565b6122d8836122d36007611e80565b612741565b80806122e390614015565b9150506122b3565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561235f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612356906140aa565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516124509190612cbc565b60405180910390a3505050565b612468848484611f6c565b6124748484848461275f565b6124b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124aa9061413c565b60405180910390fd5b50505050565b6060600a80546124c890613432565b80601f01602080910402602001604051908101604052809291908181526020018280546124f490613432565b80156125415780601f1061251657610100808354040283529160200191612541565b820191906000526020600020905b81548152906001019060200180831161252457829003601f168201915b5050505050905090565b60606000821415612593576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126a7565b600082905060005b600082146125c55780806125ae90614015565b915050600a826125be919061418b565b915061259b565b60008167ffffffffffffffff8111156125e1576125e0612ec7565b5b6040519080825280601f01601f1916602001820160405280156126135781602001600182028036833780820191505090505b5090505b600085146126a05760018261262c9190613fe1565b9150600a8561263b91906141bc565b60306126479190613a12565b60f81b81838151811061265d5761265c6141ed565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612699919061418b565b9450612617565b8093505050505b919050565b505050565b505050565b60008082905060005b84518110156127205760008582815181106126dd576126dc6141ed565b5b602002602001015190508083116126ff576126f883826128f6565b925061270c565b61270981846128f6565b92505b50808061271890614015565b9150506126bf565b508091505092915050565b6001816000016000828254019250508190555050565b61275b82826040518060200160405280600081525061290d565b5050565b60006127808473ffffffffffffffffffffffffffffffffffffffff16612968565b156128e9578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026127a9611dbf565b8786866040518563ffffffff1660e01b81526004016127cb9493929190614271565b602060405180830381600087803b1580156127e557600080fd5b505af192505050801561281657506040513d601f19601f8201168201806040525081019061281391906142d2565b60015b612899573d8060008114612846576040519150601f19603f3d011682016040523d82523d6000602084013e61284b565b606091505b50600081511415612891576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128889061413c565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506128ee565b600190505b949350505050565b600082600052816020526040600020905092915050565b612917838361298b565b612924600084848461275f565b612963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295a9061413c565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129f29061434b565b60405180910390fd5b612a0481611d53565b15612a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a3b906143b7565b60405180910390fd5b612a50600083836126ac565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612aa09190613a12565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b61600083836126b1565b5050565b828054612b7190613432565b90600052602060002090601f016020900481019282612b935760008555612bda565b82601f10612bac57805160ff1916838001178555612bda565b82800160010185558215612bda579182015b82811115612bd9578251825591602001919060010190612bbe565b5b509050612be79190612beb565b5090565b5b80821115612c04576000816000905550600101612bec565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612c5181612c1c565b8114612c5c57600080fd5b50565b600081359050612c6e81612c48565b92915050565b600060208284031215612c8a57612c89612c12565b5b6000612c9884828501612c5f565b91505092915050565b60008115159050919050565b612cb681612ca1565b82525050565b6000602082019050612cd16000830184612cad565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612d11578082015181840152602081019050612cf6565b83811115612d20576000848401525b50505050565b6000601f19601f8301169050919050565b6000612d4282612cd7565b612d4c8185612ce2565b9350612d5c818560208601612cf3565b612d6581612d26565b840191505092915050565b60006020820190508181036000830152612d8a8184612d37565b905092915050565b6000819050919050565b612da581612d92565b8114612db057600080fd5b50565b600081359050612dc281612d9c565b92915050565b600060208284031215612dde57612ddd612c12565b5b6000612dec84828501612db3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612e2082612df5565b9050919050565b612e3081612e15565b82525050565b6000602082019050612e4b6000830184612e27565b92915050565b612e5a81612e15565b8114612e6557600080fd5b50565b600081359050612e7781612e51565b92915050565b60008060408385031215612e9457612e93612c12565b5b6000612ea285828601612e68565b9250506020612eb385828601612db3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612eff82612d26565b810181811067ffffffffffffffff82111715612f1e57612f1d612ec7565b5b80604052505050565b6000612f31612c08565b9050612f3d8282612ef6565b919050565b600067ffffffffffffffff821115612f5d57612f5c612ec7565b5b612f6682612d26565b9050602081019050919050565b82818337600083830152505050565b6000612f95612f9084612f42565b612f27565b905082815260208101848484011115612fb157612fb0612ec2565b5b612fbc848285612f73565b509392505050565b600082601f830112612fd957612fd8612ebd565b5b8135612fe9848260208601612f82565b91505092915050565b60006020828403121561300857613007612c12565b5b600082013567ffffffffffffffff81111561302657613025612c17565b5b61303284828501612fc4565b91505092915050565b61304481612ca1565b811461304f57600080fd5b50565b6000813590506130618161303b565b92915050565b60006020828403121561307d5761307c612c12565b5b600061308b84828501613052565b91505092915050565b61309d81612d92565b82525050565b60006020820190506130b86000830184613094565b92915050565b6000806000606084860312156130d7576130d6612c12565b5b60006130e586828701612e68565b93505060206130f686828701612e68565b925050604061310786828701612db3565b9150509250925092565b60006020828403121561312757613126612c12565b5b600061313584828501612e68565b91505092915050565b600080fd5b600080fd5b60008083601f84011261315e5761315d612ebd565b5b8235905067ffffffffffffffff81111561317b5761317a61313e565b5b60208301915083602082028301111561319757613196613143565b5b9250929050565b600080602083850312156131b5576131b4612c12565b5b600083013567ffffffffffffffff8111156131d3576131d2612c17565b5b6131df85828601613148565b92509250509250929050565b6000806040838503121561320257613201612c12565b5b600061321085828601612e68565b925050602061322185828601613052565b9150509250929050565b600067ffffffffffffffff82111561324657613245612ec7565b5b61324f82612d26565b9050602081019050919050565b600061326f61326a8461322b565b612f27565b90508281526020810184848401111561328b5761328a612ec2565b5b613296848285612f73565b509392505050565b600082601f8301126132b3576132b2612ebd565b5b81356132c384826020860161325c565b91505092915050565b600080600080608085870312156132e6576132e5612c12565b5b60006132f487828801612e68565b945050602061330587828801612e68565b935050604061331687828801612db3565b925050606085013567ffffffffffffffff81111561333757613336612c17565b5b6133438782880161329e565b91505092959194509250565b6000806040838503121561336657613365612c12565b5b600061337485828601612e68565b925050602061338585828601612e68565b9150509250929050565b6000819050919050565b6133a28161338f565b82525050565b60006020820190506133bd6000830184613399565b92915050565b600080604083850312156133da576133d9612c12565b5b60006133e885828601612db3565b92505060206133f985828601612e68565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061344a57607f821691505b6020821081141561345e5761345d613403565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006134c0602c83612ce2565b91506134cb82613464565b604082019050919050565b600060208201905081810360008301526134ef816134b3565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000613552602183612ce2565b915061355d826134f6565b604082019050919050565b6000602082019050818103600083015261358181613545565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006135e4603883612ce2565b91506135ef82613588565b604082019050919050565b60006020820190508181036000830152613613816135d7565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613650602083612ce2565b915061365b8261361a565b602082019050919050565b6000602082019050818103600083015261367f81613643565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006136e2603183612ce2565b91506136ed82613686565b604082019050919050565b60006020820190508181036000830152613711816136d5565b9050919050565b600081905092915050565b50565b6000613733600083613718565b915061373e82613723565b600082019050919050565b600061375482613726565b9150819050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006137ba602983612ce2565b91506137c58261375e565b604082019050919050565b600060208201905081810360008301526137e9816137ad565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061384c602a83612ce2565b9150613857826137f0565b604082019050919050565b6000602082019050818103600083015261387b8161383f565b9050919050565b60008160601b9050919050565b600061389a82613882565b9050919050565b60006138ac8261388f565b9050919050565b6138c46138bf82612e15565b6138a1565b82525050565b60006138d682846138b3565b60148201915081905092915050565b7f49474e4f52452054484953204552524f523a20436f72726563742070726f6f6660008201527f20676976656e0000000000000000000000000000000000000000000000000000602082015250565b6000613941602683612ce2565b915061394c826138e5565b604082019050919050565b6000602082019050818103600083015261397081613934565b9050919050565b7f496e76616c6964206d696e7420616d6f756e7421000000000000000000000000600082015250565b60006139ad601483612ce2565b91506139b882613977565b602082019050919050565b600060208201905081810360008301526139dc816139a0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613a1d82612d92565b9150613a2883612d92565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613a5d57613a5c6139e3565b5b828201905092915050565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b6000613a9e601483612ce2565b9150613aa982613a68565b602082019050919050565b60006020820190508181036000830152613acd81613a91565b9050919050565b7f54686520636f6e74726163742069732070617573656421000000000000000000600082015250565b6000613b0a601783612ce2565b9150613b1582613ad4565b602082019050919050565b60006020820190508181036000830152613b3981613afd565b9050919050565b6000613b4b82612d92565b9150613b5683612d92565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613b8f57613b8e6139e3565b5b828202905092915050565b7f496e73756666696369656e742066756e64732100000000000000000000000000600082015250565b6000613bd0601383612ce2565b9150613bdb82613b9a565b602082019050919050565b60006020820190508181036000830152613bff81613bc3565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613c62602f83612ce2565b9150613c6d82613c06565b604082019050919050565b60006020820190508181036000830152613c9181613c55565b9050919050565b600081905092915050565b6000613cae82612cd7565b613cb88185613c98565b9350613cc8818560208601612cf3565b80840191505092915050565b60008190508160005260206000209050919050565b60008154613cf681613432565b613d008186613c98565b94506001821660008114613d1b5760018114613d2c57613d5f565b60ff19831686528186019350613d5f565b613d3585613cd4565b60005b83811015613d5757815481890152600182019150602081019050613d38565b838801955050505b50505092915050565b6000613d748286613ca3565b9150613d808285613ca3565b9150613d8c8284613ce9565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613df5602683612ce2565b9150613e0082613d99565b604082019050919050565b60006020820190508181036000830152613e2481613de8565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613e87602c83612ce2565b9150613e9282613e2b565b604082019050919050565b60006020820190508181036000830152613eb681613e7a565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000613f19602583612ce2565b9150613f2482613ebd565b604082019050919050565b60006020820190508181036000830152613f4881613f0c565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613fab602483612ce2565b9150613fb682613f4f565b604082019050919050565b60006020820190508181036000830152613fda81613f9e565b9050919050565b6000613fec82612d92565b9150613ff783612d92565b92508282101561400a576140096139e3565b5b828203905092915050565b600061402082612d92565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614053576140526139e3565b5b600182019050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614094601983612ce2565b915061409f8261405e565b602082019050919050565b600060208201905081810360008301526140c381614087565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614126603283612ce2565b9150614131826140ca565b604082019050919050565b6000602082019050818103600083015261415581614119565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061419682612d92565b91506141a183612d92565b9250826141b1576141b061415c565b5b828204905092915050565b60006141c782612d92565b91506141d283612d92565b9250826141e2576141e161415c565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b60006142438261421c565b61424d8185614227565b935061425d818560208601612cf3565b61426681612d26565b840191505092915050565b60006080820190506142866000830187612e27565b6142936020830186612e27565b6142a06040830185613094565b81810360608301526142b28184614238565b905095945050505050565b6000815190506142cc81612c48565b92915050565b6000602082840312156142e8576142e7612c12565b5b60006142f6848285016142bd565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614335602083612ce2565b9150614340826142ff565b602082019050919050565b6000602082019050818103600083015261436481614328565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006143a1601c83612ce2565b91506143ac8261436b565b602082019050919050565b600060208201905081810360008301526143d081614394565b905091905056fea26469706673582212205c08f9f9d7722c924719c58405905a035a4736be7afe41750ec66b2ab72355cc64736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: No
KaziContract.sol 1390 lines
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol


// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * 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.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a 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++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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


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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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


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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

// 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 v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// File: @openzeppelin/contracts/token/ERC721/ERC721.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;








/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

// File: contracts/KaziV2.sol



pragma solidity >=0.7.0 <0.9.0;





contract KaziContract is ERC721, Ownable {
  using Strings for uint256;
  using Counters for Counters.Counter;

  Counters.Counter private supply;

  bytes32 public root = 0x6584ca7f18181ef50fe9120f31f5e42b7ae02c44893c217fe0f7407e8bcc8ae1;

  mapping(address => bool) public whitelistClaimed;

  string public uriPrefix = "";
  string public uriSuffix = ".json";
  string public hiddenMetadataUri;  

  uint256 private cost = 0.0025 ether;
  uint256 public maxSupply = 3000;
  uint256 public maxMintAmount = 2;

  bool public paused = true;
  bool public revealed = false;
  bool public whitelistMintEnabled = true;

  constructor() ERC721("KaziNFT", "KAZI") {
    setHiddenMetadataUri("ipfs://QmRcZ3tqvQ9gBfiTQgaqFNEDBMEP4112Q8HYR964WuTQRT/hidden.json");
  }

  modifier mintCompliance(uint256 _mintAmount) {
    require(_mintAmount > 0 && _mintAmount <= maxMintAmount, 'Invalid mint amount!');
    require(totalSupply() + _mintAmount <= maxSupply, 'Max supply exceeded!');
    _;
  }

  modifier mintPriceCompliance(uint256 _mintAmount) {
    require(msg.value >= cost * _mintAmount, 'Insufficient funds!');
    _;
  }

  function totalSupply() public view returns (uint256) {
    return supply.current();
  }

  function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
    require(!paused, "The contract is paused!");
    require(msg.value >= cost * _mintAmount, "Insufficient funds!");

    _mintLoop(msg.sender, _mintAmount);
  }
  
  function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
    _mintLoop(_receiver, _mintAmount);
  }

  function walletOfOwner(address _owner)
    private
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount);
    uint256 currentTokenId = 1;
    uint256 ownedTokenIndex = 0;

    while (ownedTokenIndex < ownerTokenCount && currentTokenId <= maxSupply) {
      address currentTokenOwner = ownerOf(currentTokenId);

      if (currentTokenOwner == _owner) {
        ownedTokenIds[ownedTokenIndex] = currentTokenId;

        ownedTokenIndex++;
      }

      currentTokenId++;
    }

    return ownedTokenIds;
  }

  function tokenURI(uint256 _tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(
      _exists(_tokenId),
      "ERC721Metadata: URI query for nonexistent token"
    );

    if (revealed == false) {
      return hiddenMetadataUri;
    }

    string memory currentBaseURI = _baseURI();
    return bytes(currentBaseURI).length > 0
        ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix))
        : "";
  }

  function setRevealed(bool _state) public onlyOwner {
    revealed = _state;
  }

  function setCost(uint256 _cost) private onlyOwner {
    cost = _cost;
  }

  function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
    hiddenMetadataUri = _hiddenMetadataUri;
  }

  function setUriPrefix(string memory _uriPrefix) public onlyOwner {
    uriPrefix = _uriPrefix;
  }

  function setUriSuffix(string memory _uriSuffix) public onlyOwner {
    uriSuffix = _uriSuffix;
  }

  function setPaused(bool _state) public onlyOwner {
    paused = _state;
  }

  function withdraw() public onlyOwner {
    (bool os, ) = payable(owner()).call{value: address(this).balance}("");
    require(os);
  }

  function _mintLoop(address _receiver, uint256 _mintAmount) internal {
    for (uint256 i = 0; i < _mintAmount; i++) {
      supply.increment();
      _safeMint(_receiver, supply.current());
    }
  }

  function _baseURI() internal view virtual override returns (string memory) {
    return uriPrefix;
  }

  function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
    maxMintAmount = _newmaxMintAmount;
  }

  function setWhitelistMintEnabled(bool _state) public onlyOwner {
    whitelistMintEnabled = _state;
  }

  function checkValidity(bytes32[] calldata _merkleProof) public view returns (bool){
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        require(MerkleProof.verify(_merkleProof, root, leaf), "IGNORE THIS ERROR: Correct proof given");
        return true; // Or you can mint tokens here
    }
}

Read Contract

balanceOf 0x70a08231 → uint256
checkValidity 0x954d90d0 → bool
getApproved 0x081812fc → address
hiddenMetadataUri 0xa45ba8e7 → string
isApprovedForAll 0xe985e9c5 → bool
maxMintAmount 0x239c70ae → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
revealed 0x51830227 → bool
root 0xebf0c717 → bytes32
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
uriPrefix 0x62b99ad4 → string
uriSuffix 0x5503a0e8 → string
whitelistClaimed 0xdb4bec44 → bool
whitelistMintEnabled 0x6caede3d → bool

Write Contract 17 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
mintForAddress 0xefbd73f4
uint256 _mintAmount
address _receiver
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
setHiddenMetadataUri 0x4fdd43cb
string _hiddenMetadataUri
setPaused 0x16c38b3c
bool _state
setRevealed 0xe0a80853
bool _state
setUriPrefix 0x7ec4a659
string _uriPrefix
setUriSuffix 0x16ba10e0
string _uriSuffix
setWhitelistMintEnabled 0xb767a098
bool _state
setmaxMintAmount 0x7f00c7a6
uint256 _newmaxMintAmount
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address