Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x0b77583D36eE81fdF1B1504d6d7554cd89063101
Balance 0 ETH
Nonce 2
Code Size 20037 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

20037 bytes
0x6080604052600436106101f25760003560e01c80636b87d24c1161010d57806395d89b41116100a0578063b88d4fde1161006f578063b88d4fde146106ef578063be985ac914610718578063c87b56dd14610755578063e985e9c514610792578063f2fde38b146107cf576101f9565b806395d89b4114610635578063a22cb46514610660578063a7ecd37e14610689578063b6640091146106b2576101f9565b80637284e416116100dc5780637284e4161461058b5780637931b3e4146105b65780638da5cb5b146105df5780638fc734841461060a576101f9565b80636b87d24c146104e15780636c02a9311461050c57806370a0823114610537578063715018a614610574576101f9565b80632653f517116101855780634f64b2be116101545780634f64b2be1461040f57806358cd25131461044e5780636352211e1461047957806365902b0a146104b6576101f9565b80632653f517146103795780632dab1e36146103a45780633ccfd60b146103cf57806342842e0e146103e6576101f9565b8063102581d2116101c1578063102581d2146102cc57806314e4354a146103095780631816ee7e1461032557806323b872dd14610350576101f9565b806301ffc9a7146101fe57806306fdde031461023b578063081812fc14610266578063095ea7b3146102a3576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b5061022560048036038101906102209190612ee8565b6107f8565b6040516102329190612f30565b60405180910390f35b34801561024757600080fd5b506102506108da565b60405161025d9190612fe4565b60405180910390f35b34801561027257600080fd5b5061028d6004803603810190610288919061303c565b61096c565b60405161029a91906130aa565b60405180910390f35b3480156102af57600080fd5b506102ca60048036038101906102c591906130f1565b6109b2565b005b3480156102d857600080fd5b506102f360048036038101906102ee919061303c565b610ac9565b6040516103009190613186565b60405180910390f35b610323600480360381019061031e91906133b4565b610afa565b005b34801561033157600080fd5b5061033a610f89565b6040516103479190612fe4565b60405180910390f35b34801561035c57600080fd5b50610377600480360381019061037291906134b1565b610fa5565b005b34801561038557600080fd5b5061038e611005565b60405161039b9190612fe4565b60405180910390f35b3480156103b057600080fd5b506103b9611021565b6040516103c69190612fe4565b60405180910390f35b3480156103db57600080fd5b506103e4611040565b005b3480156103f257600080fd5b5061040d600480360381019061040891906134b1565b611091565b005b34801561041b57600080fd5b506104366004803603810190610431919061303c565b6110b1565b60405161044593929190613504565b60405180910390f35b34801561045a57600080fd5b50610463611273565b60405161047091906135af565b60405180910390f35b34801561048557600080fd5b506104a0600480360381019061049b919061303c565b611299565b6040516104ad91906130aa565b60405180910390f35b3480156104c257600080fd5b506104cb61131f565b6040516104d89190612fe4565b60405180910390f35b3480156104ed57600080fd5b506104f661133b565b6040516105039190612fe4565b60405180910390f35b34801561051857600080fd5b506105216113c9565b60405161052e9190612fe4565b60405180910390f35b34801561054357600080fd5b5061055e600480360381019061055991906135ca565b611402565b60405161056b9190613606565b60405180910390f35b34801561058057600080fd5b506105896114b9565b005b34801561059757600080fd5b506105a06114cd565b6040516105ad9190612fe4565b60405180910390f35b3480156105c257600080fd5b506105dd60048036038101906105d89190613621565b6114e9565b005b3480156105eb57600080fd5b506105f461150b565b60405161060191906130aa565b60405180910390f35b34801561061657600080fd5b5061061f611535565b60405161062c9190612fe4565b60405180910390f35b34801561064157600080fd5b5061064a6115c3565b6040516106579190612fe4565b60405180910390f35b34801561066c57600080fd5b5061068760048036038101906106829190613696565b611655565b005b34801561069557600080fd5b506106b060048036038101906106ab91906135ca565b61166b565b005b3480156106be57600080fd5b506106d960048036038101906106d49190613621565b6116b7565b6040516106e69190613606565b60405180910390f35b3480156106fb57600080fd5b50610716600480360381019061071191906136d6565b6116e5565b005b34801561072457600080fd5b5061073f600480360381019061073a919061303c565b611747565b60405161074c9190613186565b60405180910390f35b34801561076157600080fd5b5061077c6004803603810190610777919061303c565b611a0c565b6040516107899190612fe4565b60405180910390f35b34801561079e57600080fd5b506107b960048036038101906107b49190613759565b611b2f565b6040516107c69190612f30565b60405180910390f35b3480156107db57600080fd5b506107f660048036038101906107f191906135ca565b611bc3565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108c357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108d357506108d282611c46565b5b9050919050565b6060600080546108e9906137c8565b80601f0160208091040260200160405190810160405280929190818152602001828054610915906137c8565b80156109625780601f1061093757610100808354040283529160200191610962565b820191906000526020600020905b81548152906001019060200180831161094557829003601f168201915b5050505050905090565b600061097782611cb0565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109bd82611299565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a249061386b565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a4c611cfb565b73ffffffffffffffffffffffffffffffffffffffff161480610a7b5750610a7a81610a75611cfb565b611b2f565b5b610aba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab1906138fd565b60405180910390fd5b610ac48383611d03565b505050565b6060610ad482611747565b604051602001610ae49190613a3d565b6040516020818303038152906040529050919050565b6000858585604051602001610b1193929190613a6a565b60405160208183030381529060405290506000600c82604051610b349190613a9b565b90815260200160405180910390205414610b83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7a90613afe565b60405180910390fd5b610539600a541115610bca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc190613b6a565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397aba7f985856040518363ffffffff1660e01b8152600401610c60929190613b99565b602060405180830381865afa158015610c7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca19190613bde565b73ffffffffffffffffffffffffffffffffffffffff1614610cf7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cee90613c57565b60405180910390fd5b82600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631de810a1836040518263ffffffff1660e01b8152600401610d539190612fe4565b602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d949190613c8c565b14610dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcb90613d05565b60405180910390fd5b610ddc61150b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e5957662386f26fc10000341015610e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4f90613d71565b60405180910390fd5b5b60006040518060600160405280888152602001878152602001868152509050600a6000815480929190610e8b90613dc0565b9190505550600a54600c83604051610ea39190613a9b565b90815260200160405180910390208190555080600d6000600a5481526020019081526020016000206000820151816000019080519060200190610ee7929190612dd9565b506020820151816001019080519060200190610f04929190612dd9565b506040820151816002019080519060200190610f21929190612dd9565b50905050610f2d61150b565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610f72573d6000803e3d6000fd5b50610f7f88600a54611dbc565b5050505050505050565b604051806060016040528060268152602001614d916026913981565b610fb6610fb0611cfb565b82611dda565b610ff5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fec90613e7a565b60405180910390fd5b611000838383611e6f565b505050565b604051806060016040528060268152602001614dea6026913981565b604051806101a001604052806101658152602001614c2c610165913981565b611048612168565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561108e573d6000803e3d6000fd5b50565b6110ac838383604051806020016040528060008152506116e5565b505050565b600d6020528060005260406000206000915090508060000180546110d4906137c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611100906137c8565b801561114d5780601f106111225761010080835404028352916020019161114d565b820191906000526020600020905b81548152906001019060200180831161113057829003601f168201915b505050505090806001018054611162906137c8565b80601f016020809104026020016040519081016040528092919081815260200182805461118e906137c8565b80156111db5780601f106111b0576101008083540402835291602001916111db565b820191906000526020600020905b8154815290600101906020018083116111be57829003601f168201915b5050505050908060020180546111f0906137c8565b80601f016020809104026020016040519081016040528092919081815260200182805461121c906137c8565b80156112695780601f1061123e57610100808354040283529160200191611269565b820191906000526020600020905b81548152906001019060200180831161124c57829003601f168201915b5050505050905083565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806112a5836121e6565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130d90613ee6565b60405180910390fd5b80915050919050565b6040518060a00160405280606b8152602001614b81606b913981565b60078054611348906137c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611374906137c8565b80156113c15780601f10611396576101008083540402835291602001916113c1565b820191906000526020600020905b8154815290600101906020018083116113a457829003601f168201915b505050505081565b6040518060400160405280600c81526020017f4861636b6572204861696b75000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146990613f78565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6114c1612168565b6114cb6000612223565b565b604051806060016040528060338152602001614db76033913981565b6114f1612168565b8060089080519060200190611507929190612dd9565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60088054611542906137c8565b80601f016020809104026020016040519081016040528092919081815260200182805461156e906137c8565b80156115bb5780601f10611590576101008083540402835291602001916115bb565b820191906000526020600020905b81548152906001019060200180831161159e57829003601f168201915b505050505081565b6060600180546115d2906137c8565b80601f01602080910402602001604051908101604052809291908181526020018280546115fe906137c8565b801561164b5780601f106116205761010080835404028352916020019161164b565b820191906000526020600020905b81548152906001019060200180831161162e57829003601f168201915b5050505050905090565b611667611660611cfb565b83836122e9565b5050565b611673612168565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600c818051602081018201805184825260208301602085012081835280955050505050506000915090505481565b6116f66116f0611cfb565b83611dda565b611735576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172c90613e7a565b60405180910390fd5b61174184848484612455565b50505050565b6060611752826124b1565b611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178890613fe4565b60405180910390fd5b6000600d60008481526020019081526020016000206040518060600160405290816000820180546117c1906137c8565b80601f01602080910402602001604051908101604052809291908181526020018280546117ed906137c8565b801561183a5780601f1061180f5761010080835404028352916020019161183a565b820191906000526020600020905b81548152906001019060200180831161181d57829003601f168201915b50505050508152602001600182018054611853906137c8565b80601f016020809104026020016040519081016040528092919081815260200182805461187f906137c8565b80156118cc5780601f106118a1576101008083540402835291602001916118cc565b820191906000526020600020905b8154815290600101906020018083116118af57829003601f168201915b505050505081526020016002820180546118e5906137c8565b80601f0160208091040260200160405190810160405280929190818152602001828054611911906137c8565b801561195e5780601f106119335761010080835404028352916020019161195e565b820191906000526020600020905b81548152906001019060200180831161194157829003601f168201915b5050505050815250509050604051806101a001604052806101658152602001614c2c61016591398160000151604051806060016040528060268152602001614dea602691398360200151604051806060016040528060268152602001614d916026913985604001516040518060a00160405280606b8152602001614b81606b91396040516020016119f59796959493929190614004565b604051602081830303815290604052915050919050565b60606000611a21611a1c84611747565b6124f2565b604051602001611a319190614127565b60405160208183030381529060405290506000611a55611a5085610ac9565b6124f2565b604051602001611a6591906141c6565b60405160208183030381529060405290506000611b036040518060400160405280600c81526020017f4861636b6572204861696b750000000000000000000000000000000000000000815250611aba8761266a565b604051806060016040528060338152602001614db760339139868660076008604051602001611aef979695949392919061448b565b6040516020818303038152906040526124f2565b905080604051602001611b169190614594565b6040516020818303038152906040529350505050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611bcb612168565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3190614628565b60405180910390fd5b611c4381612223565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611cb9816124b1565b611cf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cef90613ee6565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611d7683611299565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611dd6828260405180602001604052806000815250612738565b5050565b600080611de683611299565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611e285750611e278185611b2f565b5b80611e6657508373ffffffffffffffffffffffffffffffffffffffff16611e4e8461096c565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611e8f82611299565b73ffffffffffffffffffffffffffffffffffffffff1614611ee5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edc906146ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611f54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4b9061474c565b60405180910390fd5b611f618383836001612793565b8273ffffffffffffffffffffffffffffffffffffffff16611f8182611299565b73ffffffffffffffffffffffffffffffffffffffff1614611fd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fce906146ba565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461216383838360016128b9565b505050565b612170611cfb565b73ffffffffffffffffffffffffffffffffffffffff1661218e61150b565b73ffffffffffffffffffffffffffffffffffffffff16146121e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121db906147b8565b60405180910390fd5b565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234e90614824565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516124489190612f30565b60405180910390a3505050565b612460848484611e6f565b61246c848484846128bf565b6124ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a2906148b6565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166124d3836121e6565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6060600082510361251457604051806020016040528060008152509050612665565b6000604051806060016040528060408152602001614bec604091399050600060036002855161254391906148d6565b61254d919061495b565b6004612559919061498c565b9050600060208261256a91906148d6565b67ffffffffffffffff811115612583576125826131b2565b5b6040519080825280601f01601f1916602001820160405280156125b55781602001600182028036833780820191505090505b509050818152600183018586518101602084015b81831015612624576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253600182019150506125c9565b60038951066001811461263e576002811461264e57612659565b613d3d60f01b6002830352612659565b603d60f81b60018303525b50505050508093505050505b919050565b60606000600161267984612a46565b01905060008167ffffffffffffffff811115612698576126976131b2565b5b6040519080825280601f01601f1916602001820160405280156126ca5781602001600182028036833780820191505090505b509050600082602001820190505b60011561272d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816127215761272061492c565b5b049450600085036126d8575b819350505050919050565b6127428383612b99565b61274f60008484846128bf565b61278e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612785906148b6565b60405180910390fd5b505050565b60018111156128b357600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146128275780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461281f91906149e6565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146128b25780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128aa91906148d6565b925050819055505b5b50505050565b50505050565b60006128e08473ffffffffffffffffffffffffffffffffffffffff16612db6565b15612a39578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612909611cfb565b8786866040518563ffffffff1660e01b815260040161292b9493929190614a1a565b6020604051808303816000875af192505050801561296757506040513d601f19601f820116820180604052508101906129649190614a7b565b60015b6129e9573d8060008114612997576040519150601f19603f3d011682016040523d82523d6000602084013e61299c565b606091505b5060008151036129e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d8906148b6565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612a3e565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612aa4577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612a9a57612a9961492c565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612ae1576d04ee2d6d415b85acef81000000008381612ad757612ad661492c565b5b0492506020810190505b662386f26fc100008310612b1057662386f26fc100008381612b0657612b0561492c565b5b0492506010810190505b6305f5e1008310612b39576305f5e1008381612b2f57612b2e61492c565b5b0492506008810190505b6127108310612b5e576127108381612b5457612b5361492c565b5b0492506004810190505b60648310612b815760648381612b7757612b7661492c565b5b0492506002810190505b600a8310612b90576001810190505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bff90614af4565b60405180910390fd5b612c11816124b1565b15612c51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c4890614b60565b60405180910390fd5b612c5f600083836001612793565b612c68816124b1565b15612ca8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c9f90614b60565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612db26000838360016128b9565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054612de5906137c8565b90600052602060002090601f016020900481019282612e075760008555612e4e565b82601f10612e2057805160ff1916838001178555612e4e565b82800160010185558215612e4e579182015b82811115612e4d578251825591602001919060010190612e32565b5b509050612e5b9190612e5f565b5090565b5b80821115612e78576000816000905550600101612e60565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ec581612e90565b8114612ed057600080fd5b50565b600081359050612ee281612ebc565b92915050565b600060208284031215612efe57612efd612e86565b5b6000612f0c84828501612ed3565b91505092915050565b60008115159050919050565b612f2a81612f15565b82525050565b6000602082019050612f456000830184612f21565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612f85578082015181840152602081019050612f6a565b83811115612f94576000848401525b50505050565b6000601f19601f8301169050919050565b6000612fb682612f4b565b612fc08185612f56565b9350612fd0818560208601612f67565b612fd981612f9a565b840191505092915050565b60006020820190508181036000830152612ffe8184612fab565b905092915050565b6000819050919050565b61301981613006565b811461302457600080fd5b50565b60008135905061303681613010565b92915050565b60006020828403121561305257613051612e86565b5b600061306084828501613027565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061309482613069565b9050919050565b6130a481613089565b82525050565b60006020820190506130bf600083018461309b565b92915050565b6130ce81613089565b81146130d957600080fd5b50565b6000813590506130eb816130c5565b92915050565b6000806040838503121561310857613107612e86565b5b6000613116858286016130dc565b925050602061312785828601613027565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b600061315882613131565b613162818561313c565b9350613172818560208601612f67565b61317b81612f9a565b840191505092915050565b600060208201905081810360008301526131a0818461314d565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6131ea82612f9a565b810181811067ffffffffffffffff82111715613209576132086131b2565b5b80604052505050565b600061321c612e7c565b905061322882826131e1565b919050565b600067ffffffffffffffff821115613248576132476131b2565b5b61325182612f9a565b9050602081019050919050565b82818337600083830152505050565b600061328061327b8461322d565b613212565b90508281526020810184848401111561329c5761329b6131ad565b5b6132a784828561325e565b509392505050565b600082601f8301126132c4576132c36131a8565b5b81356132d484826020860161326d565b91505092915050565b6000819050919050565b6132f0816132dd565b81146132fb57600080fd5b50565b60008135905061330d816132e7565b92915050565b600067ffffffffffffffff82111561332e5761332d6131b2565b5b61333782612f9a565b9050602081019050919050565b600061335761335284613313565b613212565b905082815260208101848484011115613373576133726131ad565b5b61337e84828561325e565b509392505050565b600082601f83011261339b5761339a6131a8565b5b81356133ab848260208601613344565b91505092915050565b60008060008060008060c087890312156133d1576133d0612e86565b5b60006133df89828a016130dc565b965050602087013567ffffffffffffffff811115613400576133ff612e8b565b5b61340c89828a016132af565b955050604087013567ffffffffffffffff81111561342d5761342c612e8b565b5b61343989828a016132af565b945050606087013567ffffffffffffffff81111561345a57613459612e8b565b5b61346689828a016132af565b935050608061347789828a016132fe565b92505060a087013567ffffffffffffffff81111561349857613497612e8b565b5b6134a489828a01613386565b9150509295509295509295565b6000806000606084860312156134ca576134c9612e86565b5b60006134d8868287016130dc565b93505060206134e9868287016130dc565b92505060406134fa86828701613027565b9150509250925092565b6000606082019050818103600083015261351e8186612fab565b905081810360208301526135328185612fab565b905081810360408301526135468184612fab565b9050949350505050565b6000819050919050565b600061357561357061356b84613069565b613550565b613069565b9050919050565b60006135878261355a565b9050919050565b60006135998261357c565b9050919050565b6135a98161358e565b82525050565b60006020820190506135c460008301846135a0565b92915050565b6000602082840312156135e0576135df612e86565b5b60006135ee848285016130dc565b91505092915050565b61360081613006565b82525050565b600060208201905061361b60008301846135f7565b92915050565b60006020828403121561363757613636612e86565b5b600082013567ffffffffffffffff81111561365557613654612e8b565b5b613661848285016132af565b91505092915050565b61367381612f15565b811461367e57600080fd5b50565b6000813590506136908161366a565b92915050565b600080604083850312156136ad576136ac612e86565b5b60006136bb858286016130dc565b92505060206136cc85828601613681565b9150509250929050565b600080600080608085870312156136f0576136ef612e86565b5b60006136fe878288016130dc565b945050602061370f878288016130dc565b935050604061372087828801613027565b925050606085013567ffffffffffffffff81111561374157613740612e8b565b5b61374d87828801613386565b91505092959194509250565b600080604083850312156137705761376f612e86565b5b600061377e858286016130dc565b925050602061378f858286016130dc565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137e057607f821691505b6020821081036137f3576137f2613799565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000613855602183612f56565b9150613860826137f9565b604082019050919050565b6000602082019050818103600083015261388481613848565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b60006138e7603d83612f56565b91506138f28261388b565b604082019050919050565b60006020820190508181036000830152613916816138da565b9050919050565b600081905092915050565b7f3c21444f43545950452068746d6c3e3c68746d6c3e3c686561643e3c7374796c60008201527f653e2a7b6d617267696e3a303b70616464696e673a307d3c2f7374796c653e3c60208201527f2f686561643e3c626f64793e0000000000000000000000000000000000000000604082015250565b60006139aa604c8361391d565b91506139b582613928565b604c82019050919050565b60006139cb82612f4b565b6139d5818561391d565b93506139e5818560208601612f67565b80840191505092915050565b7f3c2f626f64793e3c2f68746d6c3e000000000000000000000000000000000000600082015250565b6000613a27600e8361391d565b9150613a32826139f1565b600e82019050919050565b6000613a488261399d565b9150613a5482846139c0565b9150613a5f82613a1a565b915081905092915050565b6000613a7682866139c0565b9150613a8282856139c0565b9150613a8e82846139c0565b9150819050949350505050565b6000613aa782846139c0565b915081905092915050565b7f4861696b7520616c726561647920636c61696d65642e00000000000000000000600082015250565b6000613ae8601683612f56565b9150613af382613ab2565b602082019050919050565b60006020820190508181036000830152613b1781613adb565b9050919050565b7f416c6c206f75742e000000000000000000000000000000000000000000000000600082015250565b6000613b54600883612f56565b9150613b5f82613b1e565b602082019050919050565b60006020820190508181036000830152613b8381613b47565b9050919050565b613b93816132dd565b82525050565b6000604082019050613bae6000830185613b8a565b8181036020830152613bc0818461314d565b90509392505050565b600081519050613bd8816130c5565b92915050565b600060208284031215613bf457613bf3612e86565b5b6000613c0284828501613bc9565b91505092915050565b7f496e76616c6964207369676e61747572652e0000000000000000000000000000600082015250565b6000613c41601283612f56565b9150613c4c82613c0b565b602082019050919050565b60006020820190508181036000830152613c7081613c34565b9050919050565b600081519050613c86816132e7565b92915050565b600060208284031215613ca257613ca1612e86565b5b6000613cb084828501613c77565b91505092915050565b7f4861736820616e64206861696b7520646f6e2774206d617463682e0000000000600082015250565b6000613cef601b83612f56565b9150613cfa82613cb9565b602082019050919050565b60006020820190508181036000830152613d1e81613ce2565b9050919050565b7f4e6f7420656e6f756768204554482e0000000000000000000000000000000000600082015250565b6000613d5b600f83612f56565b9150613d6682613d25565b602082019050919050565b60006020820190508181036000830152613d8a81613d4e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613dcb82613006565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613dfd57613dfc613d91565b5b600182019050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000613e64602d83612f56565b9150613e6f82613e08565b604082019050919050565b60006020820190508181036000830152613e9381613e57565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000613ed0601883612f56565b9150613edb82613e9a565b602082019050919050565b60006020820190508181036000830152613eff81613ec3565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000613f62602983612f56565b9150613f6d82613f06565b604082019050919050565b60006020820190508181036000830152613f9181613f55565b9050919050565b7f546f6b656e20646f65736e27742065786973742e000000000000000000000000600082015250565b6000613fce601483612f56565b9150613fd982613f98565b602082019050919050565b60006020820190508181036000830152613ffd81613fc1565b9050919050565b6000614010828a6139c0565b915061401c82896139c0565b915061402882886139c0565b915061403482876139c0565b915061404082866139c0565b915061404c82856139c0565b915061405882846139c0565b915081905098975050505050505050565b7f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62617360008201527f6536342c00000000000000000000000000000000000000000000000000000000602082015250565b60006140c560248361391d565b91506140d082614069565b602482019050919050565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b600061411160028361391d565b915061411c826140db565b600282019050919050565b6000614132826140b8565b915061413e82846139c0565b915061414982614104565b915081905092915050565b7f22616e696d6174696f6e5f75726c223a2022646174613a746578742f68746d6c60008201527f3b6261736536342c000000000000000000000000000000000000000000000000602082015250565b60006141b060288361391d565b91506141bb82614154565b602882019050919050565b60006141d1826141a3565b91506141dd82846139c0565b91506141e882614104565b915081905092915050565b7f7b226e616d65223a202200000000000000000000000000000000000000000000600082015250565b6000614229600a8361391d565b9150614234826141f3565b600a82019050919050565b7f2023000000000000000000000000000000000000000000000000000000000000600082015250565b600061427560028361391d565b91506142808261423f565b600282019050919050565b7f226465736372697074696f6e223a202200000000000000000000000000000000600082015250565b60006142c160108361391d565b91506142cc8261428b565b601082019050919050565b600081905092915050565b60006142ed82613131565b6142f781856142d7565b9350614307818560208601612f67565b80840191505092915050565b7f226c6963656e7365223a20220000000000000000000000000000000000000000600082015250565b6000614349600c8361391d565b915061435482614313565b600c82019050919050565b60008190508160005260206000209050919050565b60008154614381816137c8565b61438b818661391d565b945060018216600081146143a657600181146143b7576143ea565b60ff198316865281860193506143ea565b6143c08561435f565b60005b838110156143e2578154818901526001820191506020810190506143c3565b838801955050505b50505092915050565b7f222c2265787465726e616c5f75726c223a202200000000000000000000000000600082015250565b600061442960138361391d565b9150614434826143f3565b601382019050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b600061447560028361391d565b91506144808261443f565b600282019050919050565b60006144968261421c565b91506144a2828a6139c0565b91506144ad82614268565b91506144b982896139c0565b91506144c482614104565b91506144cf826142b4565b91506144db82886139c0565b91506144e682614104565b91506144f282876142e2565b91506144fe82866142e2565b91506145098261433c565b91506145158285614374565b91506145208261441c565b915061452c8284614374565b915061453782614468565b915081905098975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b600061457e601d8361391d565b915061458982614548565b601d82019050919050565b600061459f82614571565b91506145ab82846139c0565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614612602683612f56565b915061461d826145b6565b604082019050919050565b6000602082019050818103600083015261464181614605565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006146a4602583612f56565b91506146af82614648565b604082019050919050565b600060208201905081810360008301526146d381614697565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614736602483612f56565b9150614741826146da565b604082019050919050565b6000602082019050818103600083015261476581614729565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006147a2602083612f56565b91506147ad8261476c565b602082019050919050565b600060208201905081810360008301526147d181614795565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061480e601983612f56565b9150614819826147d8565b602082019050919050565b6000602082019050818103600083015261483d81614801565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b60006148a0603283612f56565b91506148ab82614844565b604082019050919050565b600060208201905081810360008301526148cf81614893565b9050919050565b60006148e182613006565b91506148ec83613006565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561492157614920613d91565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061496682613006565b915061497183613006565b9250826149815761498061492c565b5b828204905092915050565b600061499782613006565b91506149a283613006565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156149db576149da613d91565b5b828202905092915050565b60006149f182613006565b91506149fc83613006565b925082821015614a0f57614a0e613d91565b5b828203905092915050565b6000608082019050614a2f600083018761309b565b614a3c602083018661309b565b614a4960408301856135f7565b8181036060830152614a5b818461314d565b905095945050505050565b600081519050614a7581612ebc565b92915050565b600060208284031215614a9157614a90612e86565b5b6000614a9f84828501614a66565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614ade602083612f56565b9150614ae982614aa8565b602082019050919050565b60006020820190508181036000830152614b0d81614ad1565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614b4a601c83612f56565b9150614b5582614b14565b602082019050919050565b60006020820190508181036000830152614b7981614b3d565b905091905056fe3c2f746578743e3c7265637420783d2233252220793d223325222077696474683d2239342522206865696768743d22393425222066696c6c3d226e6f6e6522207374726f6b653d222330356632323822207374726f6b652d77696474683d222e3525222f3e3c2f7376673e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076696577426f783d223020302032303020323030223e3c7374796c653e2e687b666f6e742d66616d696c793a436f7572696572204e65773b666f6e742d73697a653a313070783b66696c6c3a233035663232383b616e696d6174696f6e3a20796720347320332e397320696e66696e6974653b7d2e66707b666f6e742d66616d696c793a436f7572696572204e65773b666f6e742d73697a653a3370783b66696c6c3a233035663232383b7d406b65796672616d65732079677b30257b66696c6c3a79656c6c6f773b7d3130257b66696c6c3a23333035663232383b7d7d3c2f7374796c653e3c7265637420783d22302220793d2230222077696474683d2232303022206865696768743d22323030222066696c6c3d22626c61636b222f3e3c7465787420783d2231302220793d2238352220636c6173733d2268223e3c2f746578743e3c7465787420783d2231302220793d223131352220636c6173733d2268223e47656e6572617469766520637962657270756e6b207468656d6564206861696b75206d696e7461626c652076696120534d532e3c2f746578743e3c7465787420783d2231302220793d223130302220636c6173733d2268223ea2646970667358221220c6d25413f6da329dea5448d072ab6d153c34a947a634f8b1ecb059a7157958ec64736f6c634300080d0033

Verified Source Code Partial Match

Compiler: v0.8.13+commit.abaa5c0e EVM: london Optimization: No
HackerHaiku.sol 1945 lines
// File: Base64.sol



pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}
// 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: VerifySignature.sol


pragma solidity ^0.8.13;


/* Signature Verification

How to Sign and Verify
# Signing
1. Create message to sign
2. Hash the message
3. Sign the hash (off chain, keep your private key secret)

# Verify
1. Recreate hash from the original message
2. Recover signer from signature and hash
3. Compare recovered signer to claimed signer
*/

contract VerifySignature {
    /* 1. Unlock MetaMask account
    ethereum.enable()
    */

    /* 2. Get message hash to sign
    getMessageHash(
        0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C,
        123,
        "coffee and donuts",
        1
    )

    hash = "0xcf36ac4f97dc10d91fc2cbb20d718e94a8cbfe0f82eaedc6a4aa38946fb797cd"
    */
    function getMessageHash(
        address _to,
        uint _amount,
        string memory _message,
        uint _nonce
    ) public pure returns (bytes32) {
        return keccak256(abi.encodePacked(_to, _amount, _message, _nonce));
    }

    /* 3. Sign message hash
    # using browser
    account = "copy paste account of signer here"
    ethereum.request({ method: "personal_sign", params: [account, hash]}).then(console.log)

    # using web3
    web3.personal.sign(hash, web3.eth.defaultAccount, console.log)

    Signature will be different for different accounts
    0x993dab3dd91f5c6dc28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063e8f3f781b
    */
    function getEthSignedMessageHash(bytes32 _messageHash)
        public
        pure
        returns (bytes32)
    {
        /*
        Signature is produced by signing a keccak256 hash with the following format:
        "\x19Ethereum Signed Message\n" + len(msg) + msg
        */
        return
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", _messageHash)
            );
    }

    /* 4. Verify signature
    signer = 0xB273216C05A8c0D4F0a4Dd0d7Bae1D2EfFE636dd
    to = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C
    amount = 123
    message = "coffee and donuts"
    nonce = 1
    signature =
        0x993dab3dd91f5c6dc28e17439be475478f5635c92a56e17e82349d3fb2f166196f466c0b4e0c146f285204f0dcb13e5ae67bc33f4b888ec32dfe0a063e8f3f781b
    */
    function verify(
        address _signer,
        address _to,
        uint _amount,
        string memory _message,
        uint _nonce,
        bytes memory signature
    ) public pure returns (bool) {
        bytes32 messageHash = getMessageHash(_to, _amount, _message, _nonce);
        bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash);

        return recoverSigner(ethSignedMessageHash, signature) == _signer;
    }

    function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature)
        public
        pure
        returns (address)
    {
        (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);

        return ecrecover(_ethSignedMessageHash, v, r, s);
    }

    function splitSignature(bytes memory sig)
        public
        pure
        returns (
            bytes32 r,
            bytes32 s,
            uint8 v
        )
    {
        require(sig.length == 65, "invalid signature length");

        assembly {
            /*
            First 32 bytes stores the length of the signature

            add(sig, 32) = pointer of sig + 32
            effectively, skips first 32 bytes of signature

            mload(p) loads next 32 bytes starting at the memory address p into memory
            */

            // first 32 bytes, after the length prefix
            r := mload(add(sig, 32))
            // second 32 bytes
            s := mload(add(sig, 64))
            // final byte (first byte of the next 32 bytes)
            v := byte(0, mload(add(sig, 96)))
        }

        // implicitly return (r, s, v)
    }

    function stringToEthSignedMessageHash(string memory s) public pure returns (bytes32) {
        bytes memory ss = bytes(s);
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(ss.length), ss));
    }
}

// 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: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-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.8.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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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.8.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: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 token owner or appr...

// [truncated — 68180 bytes total]

Read Contract

balanceOf 0x70a08231 → uint256
description 0x7284e416 → string
externalUrl 0x8fc73484 → string
getApproved 0x081812fc → address
getHTML 0x102581d2 → bytes
getSVG 0xbe985ac9 → bytes
haikus 0xb6640091 → uint256
imagePartFour 0x65902b0a → string
imagePartOne 0x2dab1e36 → string
imagePartThree 0x1816ee7e → string
imagePartTwo 0x2653f517 → string
isApprovedForAll 0xe985e9c5 → bool
license 0x6b87d24c → string
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenName 0x6c02a931 → string
tokenURI 0xc87b56dd → string
tokens 0x4f64b2be → string, string, string
verifySignature 0x58cd2513 → address

Write Contract 11 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
mint 0x14e4354a
address _to
string _line1
string _line2
string _line3
bytes32 _ethSignedMessageHash
bytes _signature
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
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateExternalUrl 0x7931b3e4
string _newExternalUrl
updateSigner 0xa7ecd37e
address _newSigner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address