Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x947a2e766F5e7A6002F02c08eAbE6f236Cc41C9B
Balance 0.001000 ETH
Nonce 1
Code Size 16606 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16606 bytes
0x6080604052600436106103c25760003560e01c806380feb139116101f2578063c815729d1161010d578063eb857fab116100a0578063ecfc7ecc1161006f578063ecfc7ecc14610ba0578063f2fde38b14610ba8578063f4a0a52814610bc8578063fb7cf4a414610be857600080fd5b8063eb857fab14610b26578063eb8d244414610b46578063ebc3388214610b60578063ecad059714610b8057600080fd5b8063ce9ec0a6116100dc578063ce9ec0a614610abb578063d0d703d314610ad1578063d5abeb0114610af0578063e985e9c514610b0657600080fd5b8063c815729d14610a1c578063c87b56dd14610a3c578063ca03452714610a5c578063cafa8dfe14610aa557600080fd5b8063a0712d6811610185578063b88d4fde11610154578063b88d4fde14610964578063bd64ace514610984578063c4e41b22146109f1578063c7b0dcbc14610a0657600080fd5b8063a0712d68146108e4578063a22cb465146108f7578063a93fef3b14610917578063ab2fdb0c1461093757600080fd5b80639466d206116101c15780639466d2061461087957806395d89b4114610899578063977b055b146108ae5780639923b86a146108c457600080fd5b806380feb139146107fb5780638610f0451461081b5780638da5cb5b1461083b5780638e25d8b31461085957600080fd5b80632e8e02d4116102e2578063627fdeab11610275578063701e508411610244578063701e50841461079157806370a08231146107a657806371189742146107c6578063715018a6146107e657600080fd5b8063627fdeab146107255780636352211e146107455780636817c76c146107655780636af42d861461077b57600080fd5b80634423c5f1116102b15780634423c5f114610662578063484b973c146106d05780634b6bcbed146106f057806355f804b31461070557600080fd5b80632e8e02d4146105dd57806338cc6a311461060d578063393d9eab1461062d57806342842e0e1461064257600080fd5b806318160ddd1161035a57806323b872dd1161032957806323b872dd146105825780632474659a146105a2578063294bc0e7146105b55780632d296bf1146105ca57600080fd5b806318160ddd146104f35780631e0ba315146105165780631e47ebe2146105365780632336296a1461056c57600080fd5b806306fdde031161039657806306fdde0314610459578063081812fc1461047b578063095ea7b3146104b35780630eaaf4c8146104d357600080fd5b80623beca0146103c757806301ffc9a7146103f257806302e9d5e414610422578063049c5c4914610444575b600080fd5b3480156103d357600080fd5b506103dc610c08565b6040516103e9919061378c565b60405180910390f35b3480156103fe57600080fd5b5061041261040d3660046137e6565b610d1e565b60405190151581526020016103e9565b34801561042e57600080fd5b5061044261043d366004613803565b610d70565b005b34801561045057600080fd5b50610442610fac565b34801561046557600080fd5b5061046e611024565b6040516103e99190613875565b34801561048757600080fd5b5061049b610496366004613888565b6110b6565b6040516001600160a01b0390911681526020016103e9565b3480156104bf57600080fd5b506104426104ce3660046138b6565b6110fa565b3480156104df57600080fd5b506104426104ee366004613888565b611187565b3480156104ff57600080fd5b50600154600054035b6040519081526020016103e9565b34801561052257600080fd5b5061044261053136600461392d565b611299565b34801561054257600080fd5b50610412610551366004613888565b60009081526018602052604090205460ff1615156001141590565b34801561057857600080fd5b50610508600f5481565b34801561058e57600080fd5b5061044261059d366004613978565b61158e565b6104426105b0366004613888565b611599565b3480156105c157600080fd5b506103dc61176c565b6104426105d8366004613888565b611871565b3480156105e957600080fd5b506104126105f8366004613888565b60186020526000908152604090205460ff1681565b34801561061957600080fd5b506103dc6106283660046139b9565b611aa3565b34801561063957600080fd5b50610442611be4565b34801561064e57600080fd5b5061044261065d366004613978565b611c8f565b34801561066e57600080fd5b506106ab61067d366004613888565b601360205260009081526040902080546001909101546001600160a01b03811690600160a01b900460ff1683565b604080519384526001600160a01b0390921660208401521515908201526060016103e9565b3480156106dc57600080fd5b506104426106eb3660046138b6565b611caa565b3480156106fc57600080fd5b50610442611d1b565b34801561071157600080fd5b50610442610720366004613a73565b611d9d565b34801561073157600080fd5b506103dc6107403660046139b9565b611dd3565b34801561075157600080fd5b5061049b610760366004613888565b611efb565b34801561077157600080fd5b50610508600a5481565b34801561078757600080fd5b5061050860105481565b34801561079d57600080fd5b506103dc611f0d565b3480156107b257600080fd5b506105086107c13660046139b9565b612006565b3480156107d257600080fd5b506104426107e1366004613888565b612054565b3480156107f257600080fd5b50610442612083565b34801561080757600080fd5b50600d5461049b906001600160a01b031681565b34801561082757600080fd5b50610442610836366004613888565b6120b9565b34801561084757600080fd5b506009546001600160a01b031661049b565b34801561086557600080fd5b506103dc6108743660046139b9565b6121b5565b34801561088557600080fd5b50610442610894366004613888565b6122fc565b3480156108a557600080fd5b5061046e61237c565b3480156108ba57600080fd5b50610508600b5481565b3480156108d057600080fd5b506104426108df366004613abb565b61238b565b6104426108f2366004613888565b612403565b34801561090357600080fd5b50610442610912366004613afc565b61262a565b34801561092357600080fd5b50610442610932366004613888565b6126bf565b34801561094357600080fd5b506105086109523660046139b9565b60196020526000908152604090205481565b34801561097057600080fd5b5061044261097f366004613b3a565b6126ee565b34801561099057600080fd5b506109cc61099f366004613888565b6012602052600090815260409020805460019091015460ff82169161010090046001600160a01b03169083565b6040805193151584526001600160a01b039092166020840152908201526060016103e9565b3480156109fd57600080fd5b5061050861273f565b348015610a1257600080fd5b50610508600e5481565b348015610a2857600080fd5b50610442610a37366004613888565b612753565b348015610a4857600080fd5b5061046e610a57366004613888565b612914565b348015610a6857600080fd5b506106ab610a77366004613888565b601560205260009081526040902080546001909101546001600160a01b03811690600160a01b900460ff1683565b348015610ab157600080fd5b5061050860115481565b348015610ac757600080fd5b5061050860145481565b348015610add57600080fd5b5060175461041290610100900460ff1681565b348015610afc57600080fd5b50610508600c5481565b348015610b1257600080fd5b50610412610b21366004613bb9565b612945565b348015610b3257600080fd5b50610508610b413660046138b6565b612973565b348015610b5257600080fd5b506017546104129060ff1681565b348015610b6c57600080fd5b506103dc610b7b3660046139b9565b6129a4565b348015610b8c57600080fd5b50610442610b9b366004613c66565b612ae3565b610442612bd6565b348015610bb457600080fd5b50610442610bc33660046139b9565b612cca565b348015610bd457600080fd5b50610442610be3366004613888565b612d65565b348015610bf457600080fd5b50610442610c03366004613c9a565b612d94565b60606000805b60015460005403811015610c5d57600081815260156020526040902060010154600160a01b900460ff1615610c4b5781610c4781613d13565b9250505b80610c5581613d13565b915050610c0e565b506000816001600160401b03811115610c7857610c786139d6565b604051908082528060200260200182016040528015610ca1578160200160208202803683370190505b5090506000805b60015460005403811015610d1557600081815260156020526040902060010154600160a01b900460ff1615610d035780838381518110610cea57610cea613d2c565b602090810291909101015281610cff81613d13565b9250505b80610d0d81613d13565b915050610ca8565b50909392505050565b60006001600160e01b031982166380ac58cd60e01b1480610d4f57506001600160e01b03198216635b5e139f60e01b145b80610d6a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600260085403610d9b5760405162461bcd60e51b8152600401610d9290613d42565b60405180910390fd5b6002600855601454811115610de65760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840c4d2c840d2dcc8caf607b1b6044820152606401610d92565b60008181526013602052604090206001810154600160a01b900460ff16610e405760405162461bcd60e51b815260206004820152600e60248201526d426964206e6f742061637469766560901b6044820152606401610d92565b610e4983611efb565b6001600160a01b0316336001600160a01b031614610ea95760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e206e6f74206f776e656420627920616363657074657200000000006044820152606401610d92565b600060646011548360000154610ebf9190613d79565b610ec99190613da6565b90506000818360000154610edd9190613dba565b60018401805460ff60a01b1916905560008681526012602052604090205490915060ff1615610f1d576000858152601260205260409020805460ff191690555b6001830154610f379033906001600160a01b031687611c8f565b604051339082156108fc029083906000818181858888f19350505050158015610f64573d6000803e3d6000fd5b506009546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015610f9f573d6000803e3d6000fd5b5050600160085550505050565b6009546001600160a01b03163314610fd65760405162461bcd60e51b8152600401610d9290613dcd565b6017805460ff8082161560ff1990921682179092556040519116151581527f58655b75d3df612fe99ead00dbf0812d415d35078fe06217a94c0818bb13967f906020015b60405180910390a1565b60606002805461103390613e02565b80601f016020809104026020016040519081016040528092919081815260200182805461105f90613e02565b80156110ac5780601f10611081576101008083540402835291602001916110ac565b820191906000526020600020905b81548152906001019060200180831161108f57829003601f168201915b5050505050905090565b60006110c182612f34565b6110de576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061110582611efb565b9050806001600160a01b0316836001600160a01b0316036111395760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061115957506111578133612945565b155b15611177576040516367d9dca160e11b815260040160405180910390fd5b611182838383612f5f565b505050565b6002600854036111a95760405162461bcd60e51b8152600401610d9290613d42565b6002600855600081815260136020526040902060018101546001600160a01b031633146112075760405162461bcd60e51b815260206004820152600c60248201526b139bdd081e5bdd5c88189a5960a21b6044820152606401610d92565b6001810154600160a01b900460ff166112535760405162461bcd60e51b815260206004820152600e60248201526d426964206e6f742061637469766560901b6044820152606401610d92565b60018101805460ff60a01b191690558054604051339180156108fc02916000818181858888f1935050505015801561128f573d6000803e3d6000fd5b5050600160085550565b6002600854036112bb5760405162461bcd60e51b8152600401610d9290613d42565b6002600855601754610100900460ff166112d457600080fd5b80821461131c5760405162461bcd60e51b8152602060048201526016602482015275494e53554646494349454e545f4f475f544f4b454e5360501b6044820152606401610d92565b600c548161132d6001546000540390565b6113379190613e3c565b11156113555760405162461bcd60e51b8152600401610d9290613e4f565b600d546040516370a0823160e01b81523360048201526001600160a01b039091169060009082906370a0823190602401602060405180830381865afa1580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c69190613e71565b116113d057600080fd5b60005b83811015611578576114128585838181106113f0576113f0613d2c565b9050602002013560009081526018602052604090205460ff1615156001141590565b6114535760405162461bcd60e51b815260206004820152601260248201527113d1d7d053149150511657d0d3105253515160721b6044820152606401610d92565b336001600160a01b038316636352211e87878581811061147557611475613d2c565b905060200201356040518263ffffffff1660e01b815260040161149a91815260200190565b602060405180830381865afa1580156114b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114db9190613e8a565b6001600160a01b0316146115215760405162461bcd60e51b815260206004820152600d60248201526c2727aa2fa9a82cafa7aba722a960991b6044820152606401610d92565b60016018600087878581811061153957611539613d2c565b90506020020135815260200190815260200160002060006101000a81548160ff021916908315150217905550808061157090613d13565b9150506113d3565b506115833383612fbb565b505060016008555050565b611182838383612fd5565b6002600854036115bb5760405162461bcd60e51b8152600401610d9290613d42565b60026008556115c981612f34565b6115e55760405162461bcd60e51b8152600401610d9290613ea7565b600034116116415760405162461bcd60e51b815260206004820152602360248201527f4f6666657220616d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b6064820152608401610d92565b60008181526015602052604090206001810154600160a01b900460ff161561170357805434116116c45760405162461bcd60e51b815260206004820152602860248201527f4f66666572206d75737420626520686967686572207468616e2065786973746960448201526737339037b33332b960c11b6064820152608401610d92565b600181015481546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015611701573d6000803e3d6000fd5b505b5060408051606081018252348152336020808301918252600183850181815260009687526015909252939094209151825551908201805493511515600160a01b026001600160a81b03199094166001600160a01b03929092169190911792909217909155600855565b6060600060015b60145481116117bd57600081815260136020526040902060010154600160a01b900460ff16156117ab57816117a781613d13565b9250505b806117b581613d13565b915050611773565b506000816001600160401b038111156117d8576117d86139d6565b604051908082528060200260200182016040528015611801578160200160208202803683370190505b509050600060015b6014548111610d1557600081815260136020526040902060010154600160a01b900460ff161561185f578083838151811061184657611846613d2c565b60209081029190910101528161185b81613d13565b9250505b8061186981613d13565b915050611809565b6002600854036118935760405162461bcd60e51b8152600401610d9290613d42565b60026008556000818152601260205260409020805460ff166118ea5760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881b9bdd081b1a5cdd195960821b6044820152606401610d92565b80600101543410156119355760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610d92565b805461010090046001600160a01b031661194e83611efb565b6001600160a01b0316146119a45760405162461bcd60e51b815260206004820152601960248201527f546f6b656e206e6f74206f776e65642062792073656c6c6572000000000000006044820152606401610d92565b60006064601154346119b69190613d79565b6119c09190613da6565b905060006119ce8234613dba565b6000858152601260205260409020805460ff191690558354909150611a04903390869061010090046001600160a01b0316612f5f565b8254611a1f9061010090046001600160a01b03163386611c8f565b82546040516101009091046001600160a01b0316906108fc8315029083906000818181858888f19350505050158015611a5c573d6000803e3d6000fd5b506009546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611a97573d6000803e3d6000fd5b50506001600855505050565b60606000805b60015460005403811015611b0d576000818152601260205260409020805460ff168015611ae7575080546001600160a01b0386811661010090920416145b15611afa5782611af681613d13565b9350505b5080611b0581613d13565b915050611aa9565b506000816001600160401b03811115611b2857611b286139d6565b604051908082528060200260200182016040528015611b51578160200160208202803683370190505b5090506000805b60015460005403811015611bda576000818152601260205260409020805460ff168015611b96575080546001600160a01b0388811661010090920416145b15611bc75781848481518110611bae57611bae613d2c565b602090810291909101015282611bc381613d13565b9350505b5080611bd281613d13565b915050611b58565b5090949350505050565b6009546001600160a01b03163314611c0e5760405162461bcd60e51b8152600401610d9290613dcd565b600260085403611c305760405162461bcd60e51b8152600401610d9290613d42565b60026008556009546010546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015611c71573d6000803e3d6000fd5b5060108054906000611c838380613dba565b90915550506001600855565b611182838383604051806020016040528060008152506126ee565b6009546001600160a01b03163314611cd45760405162461bcd60e51b8152600401610d9290613dcd565b600c5481611ce56001546000540390565b611cef9190613e3c565b1115611d0d5760405162461bcd60e51b8152600401610d9290613e4f565b611d178282612fbb565b5050565b6009546001600160a01b03163314611d455760405162461bcd60e51b8152600401610d9290613dcd565b6017805460ff610100808304821615810261ff001990931692909217928390556040517fbc5b3e222a18d52c6bd2bc19880c605e9a1b50b11689f0315d149d12a26230fa9361101a9390049091161515815260200190565b6009546001600160a01b03163314611dc75760405162461bcd60e51b8152600401610d9290613dcd565b601a611d178282613f23565b60606000611de083612006565b6001600160401b03811115611df757611df76139d6565b604051908082528060200260200182016040528015611e20578160200160208202803683370190505b506000805491925080805b83811015611ef057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290611e925750611ee8565b80516001600160a01b031615611ea757805192505b876001600160a01b0316836001600160a01b031603611ee65781868580600101965081518110611ed957611ed9613d2c565b6020026020010181815250505b505b600101611e2b565b509295945050505050565b6000611f06826131c3565b5192915050565b60606000805b60015460005403811015611f585760008181526012602052604090205460ff1615611f465781611f4281613d13565b9250505b80611f5081613d13565b915050611f13565b506000816001600160401b03811115611f7357611f736139d6565b604051908082528060200260200182016040528015611f9c578160200160208202803683370190505b5090506000805b60015460005403811015610d155760008181526012602052604090205460ff1615611ff45780838381518110611fdb57611fdb613d2c565b602090810291909101015281611ff081613d13565b9250505b80611ffe81613d13565b915050611fa3565b60006001600160a01b03821661202f576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6009546001600160a01b0316331461207e5760405162461bcd60e51b8152600401610d9290613dcd565b600b55565b6009546001600160a01b031633146120ad5760405162461bcd60e51b8152600401610d9290613dcd565b6120b760006132dd565b565b6002600854036120db5760405162461bcd60e51b8152600401610d9290613d42565b60026008556120e981612f34565b6121055760405162461bcd60e51b8152600401610d9290613ea7565b600081815260156020526040902060018101546001600160a01b031633146121675760405162461bcd60e51b81526020600482015260156024820152742737ba103a34329037b33332b91031b932b0ba37b960591b6044820152606401610d92565b6001810154600160a01b900460ff166112535760405162461bcd60e51b815260206004820152601060248201526f4f66666572206e6f742061637469766560801b6044820152606401610d92565b60606000805b600154600054038110156122275760008181526015602052604090206001810154600160a01b900460ff168015612201575060018101546001600160a01b038681169116145b15612214578261221081613d13565b9350505b508061221f81613d13565b9150506121bb565b506000816001600160401b03811115612242576122426139d6565b60405190808252806020026020018201604052801561226b578160200160208202803683370190505b5090506000805b60015460005403811015611bda5760008181526015602052604090206001810154600160a01b900460ff1680156122b8575060018101546001600160a01b038881169116145b156122e957818484815181106122d0576122d0613d2c565b6020908102919091010152826122e581613d13565b9350505b50806122f481613d13565b915050612272565b6009546001600160a01b031633146123265760405162461bcd60e51b8152600401610d9290613dcd565b600a8111156123775760405162461bcd60e51b815260206004820152601c60248201527f496e76616c696420726f79616c746965732070657263656e74616765000000006044820152606401610d92565b601155565b60606003805461103390613e02565b6009546001600160a01b031633146123b55760405162461bcd60e51b8152600401610d9290613dcd565b60005b81811015611182576123f18383838181106123d5576123d5613d2c565b90506020020160208101906123ea91906139b9565b6001612fbb565b806123fb81613d13565b9150506123b8565b6002600854036124255760405162461bcd60e51b8152600401610d9290613d42565b600260085560175460ff1661246c5760405162461bcd60e51b815260206004820152600d60248201526c53414c455f494e41435449564560981b6044820152606401610d92565b600b543360009081526019602052604090205461248a908390613e3c565b11156124e45760405162461bcd60e51b8152602060048201526024808201527f7468697320776f756c6420657863656564206d696e74206d617820616c6c6f77604482015263616e636560e01b6064820152608401610d92565b600c54816124f56001546000540390565b6124ff9190613e3c565b111561251d5760405162461bcd60e51b8152600401610d9290613e4f565b600e5481600f5461252e9190613e3c565b111561256e5760405162461bcd60e51b815260206004820152600f60248201526e141550931250d7d4d3d31117d3d555608a1b6044820152606401610d92565b3481600a5461257d9190613d79565b11156125c35760405162461bcd60e51b8152602060048201526015602482015274494e434f52524543545f45544845525f56414c554560581b6044820152606401610d92565b80600f60008282546125d59190613e3c565b9250508190555034601060008282546125ee9190613e3c565b909155506125fe90503382612fbb565b336000908152601960205260408120805483929061261d908490613e3c565b9091555050600160085550565b336001600160a01b038316036126535760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6009546001600160a01b031633146126e95760405162461bcd60e51b8152600401610d9290613dcd565b600e55565b6126f9848484612fd5565b6001600160a01b0383163b1515801561271b57506127198484848461332f565b155b15612739576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600061274e6001546000540390565b905090565b6002600854036127755760405162461bcd60e51b8152600401610d9290613d42565b600260085561278381612f34565b61279f5760405162461bcd60e51b8152600401610d9290613ea7565b60008181526015602052604090206001810154600160a01b900460ff166127fa5760405162461bcd60e51b815260206004820152600f60248201526e27379030b1ba34bb329037b33332b960891b6044820152606401610d92565b3361280483611efb565b6001600160a01b03161461285a5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e206e6f74206f776e656420627920616363657074657200000000006044820152606401610d92565b60018101805460ff60a01b19169055601154815460009160649161287e9190613d79565b6128889190613da6565b9050600081836000015461289c9190613dba565b60008581526012602052604090205490915060ff16156128cd576000848152601260205260409020805460ff191690555b60018301546128e79033906001600160a01b031686611c8f565b604051339082156108fc029083906000818181858888f19350505050158015611a5c573d6000803e3d6000fd5b606061291f8261341b565b60405160200161292f9190613fe2565b6040516020818303038152906040529050919050565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6016602052816000526040600020818154811061298f57600080fd5b90600052602060002001600091509150505481565b6060600060015b6014548111612a125760008181526013602052604090206001810154600160a01b900460ff1680156129ec575060018101546001600160a01b038681169116145b156129ff57826129fb81613d13565b9350505b5080612a0a81613d13565b9150506129ab565b506000816001600160401b03811115612a2d57612a2d6139d6565b604051908082528060200260200182016040528015612a56578160200160208202803683370190505b509050600060015b6014548111611bda5760008181526013602052604090206001810154600160a01b900460ff168015612a9f575060018101546001600160a01b038881169116145b15612ad05781848481518110612ab757612ab7613d2c565b602090810291909101015282612acc81613d13565b9350505b5080612adb81613d13565b915050612a5e565b60005b8151811015611d175760126000838381518110612b0557612b05613d2c565b6020026020010151815260200190815260200160002060000160019054906101000a90046001600160a01b03166001600160a01b0316336001600160a01b031614612b835760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329039b2b63632b960911b6044820152606401610d92565b600060126000848481518110612b9b57612b9b613d2c565b6020908102919091018101518252810191909152604001600020805460ff191691151591909117905580612bce81613d13565b915050612ae6565b60003411612c305760405162461bcd60e51b815260206004820152602160248201527f42696420616d6f756e74206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610d92565b60148054906000612c4083613d13565b909155505060408051606081018252348152336020808301828152600184860181815260148054600090815260138652888120975188559351968301805492511515600160a01b026001600160a81b03199093166001600160a01b039890981697909717919091179095559281526016825293842092548354928301845592845290922090910155565b6009546001600160a01b03163314612cf45760405162461bcd60e51b8152600401610d9290613dcd565b6001600160a01b038116612d595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d92565b612d62816132dd565b50565b6009546001600160a01b03163314612d8f5760405162461bcd60e51b8152600401610d9290613dcd565b600a55565b8051825114612de55760405162461bcd60e51b815260206004820152601860248201527f4172726179206c656e67746873206d757374206d6174636800000000000000006044820152606401610d92565b60005b825181101561118257336001600160a01b0316612e1d848381518110612e1057612e10613d2c565b6020026020010151611efb565b6001600160a01b031614612e695760405162461bcd60e51b81526020600482015260136024820152722737ba103a3432903a37b5b2b71037bbb732b960691b6044820152606401610d92565b6040518060600160405280600115158152602001336001600160a01b03168152602001838381518110612e9e57612e9e613d2c565b602002602001015181525060126000858481518110612ebf57612ebf613d2c565b602090810291909101810151825281810192909252604090810160002083518154938501516001600160a81b0319909416901515610100600160a81b031916176101006001600160a01b0390941693909302929092178255919091015160019091015580612f2c81613d13565b915050612de8565b6000805482108015610d6a575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b611d1782826040518060200160405280600081525061349f565b6000612fe0826131c3565b9050836001600160a01b031681600001516001600160a01b0316146130175760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061303557506130358533612945565b80613050575033613045846110b6565b6001600160a01b0316145b90508061307057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661309757604051633a954ecd60e21b815260040160405180910390fd5b6130a360008487612f5f565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661317757600054821461317757805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b6040805160608101825260008082526020820181905291810191909152816000548110156132c457600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906132c25780516001600160a01b031615613259579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156132bd579392505050565b613259565b505b604051636f96cda160e11b815260040160405180910390fd5b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061336490339089908890889060040161400b565b6020604051808303816000875af192505050801561339f575060408051601f3d908101601f1916820190925261339c91810190614048565b60015b6133fd573d8080156133cd576040519150601f19603f3d011682016040523d82523d6000602084013e6133d2565b606091505b5080516000036133f5576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606061342682612f34565b61344357604051630a14c4b560e41b815260040160405180910390fd5b600061344d6134ac565b9050805160000361346d5760405180602001604052806000815250613498565b80613477846134bb565b604051602001613488929190614065565b6040516020818303038152906040525b9392505050565b61118283838360016135bb565b6060601a805461103390613e02565b6060816000036134e25750506040805180820190915260018152600360fc1b602082015290565b8160005b811561350c57806134f681613d13565b91506135059050600a83613da6565b91506134e6565b6000816001600160401b03811115613526576135266139d6565b6040519080825280601f01601f191660200182016040528015613550576020820181803683370190505b5090505b841561341357613565600183613dba565b9150613572600a86614094565b61357d906030613e3c565b60f81b81838151811061359257613592613d2c565b60200101906001600160f81b031916908160001a9053506135b4600a86613da6565b9450613554565b6000546001600160a01b0385166135e457604051622e076360e81b815260040160405180910390fd5b836000036136055760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156136b657506001600160a01b0387163b15155b1561373e575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4613707600088848060010195508861332f565b613724576040516368d2bf6b60e11b815260040160405180910390fd5b8082036136bc57826000541461373957600080fd5b613783565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480820361373f575b506000556131bc565b6020808252825182820181905260009190848201906040850190845b818110156137c4578351835292840192918401916001016137a8565b50909695505050505050565b6001600160e01b031981168114612d6257600080fd5b6000602082840312156137f857600080fd5b8135613498816137d0565b6000806040838503121561381657600080fd5b50508035926020909101359150565b60005b83811015613840578181015183820152602001613828565b50506000910152565b60008151808452613861816020860160208601613825565b601f01601f19169290920160200192915050565b6020815260006134986020830184613849565b60006020828403121561389a57600080fd5b5035919050565b6001600160a01b0381168114612d6257600080fd5b600080604083850312156138c957600080fd5b82356138d4816138a1565b946020939093013593505050565b60008083601f8401126138f457600080fd5b5081356001600160401b0381111561390b57600080fd5b6020830191508360208260051b850101111561392657600080fd5b9250929050565b60008060006040848603121561394257600080fd5b83356001600160401b0381111561395857600080fd5b613964868287016138e2565b909790965060209590950135949350505050565b60008060006060848603121561398d57600080fd5b8335613998816138a1565b925060208401356139a8816138a1565b929592945050506040919091013590565b6000602082840312156139cb57600080fd5b8135613498816138a1565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613a1457613a146139d6565b604052919050565b60006001600160401b03831115613a3557613a356139d6565b613a48601f8401601f19166020016139ec565b9050828152838383011115613a5c57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613a8557600080fd5b81356001600160401b03811115613a9b57600080fd5b8201601f81018413613aac57600080fd5b61341384823560208401613a1c565b60008060208385031215613ace57600080fd5b82356001600160401b03811115613ae457600080fd5b613af0858286016138e2565b90969095509350505050565b60008060408385031215613b0f57600080fd5b8235613b1a816138a1565b915060208301358015158114613b2f57600080fd5b809150509250929050565b60008060008060808587031215613b5057600080fd5b8435613b5b816138a1565b93506020850135613b6b816138a1565b92506040850135915060608501356001600160401b03811115613b8d57600080fd5b8501601f81018713613b9e57600080fd5b613bad87823560208401613a1c565b91505092959194509250565b60008060408385031215613bcc57600080fd5b8235613bd7816138a1565b91506020830135613b2f816138a1565b600082601f830112613bf857600080fd5b813560206001600160401b03821115613c1357613c136139d6565b8160051b613c228282016139ec565b9283528481018201928281019087851115613c3c57600080fd5b83870192505b84831015613c5b57823582529183019190830190613c42565b979650505050505050565b600060208284031215613c7857600080fd5b81356001600160401b03811115613c8e57600080fd5b61341384828501613be7565b60008060408385031215613cad57600080fd5b82356001600160401b0380821115613cc457600080fd5b613cd086838701613be7565b93506020850135915080821115613ce657600080fd5b50613cf385828601613be7565b9150509250929050565b634e487b7160e01b600052601160045260246000fd5b600060018201613d2557613d25613cfd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b8082028115828204841417610d6a57610d6a613cfd565b634e487b7160e01b600052601260045260246000fd5b600082613db557613db5613d90565b500490565b81810381811115610d6a57610d6a613cfd565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c90821680613e1657607f821691505b602082108103613e3657634e487b7160e01b600052602260045260246000fd5b50919050565b80820180821115610d6a57610d6a613cfd565b60208082526008908201526714d3d31117d3d55560c21b604082015260600190565b600060208284031215613e8357600080fd5b5051919050565b600060208284031215613e9c57600080fd5b8151613498816138a1565b602080825260149082015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604082015260600190565b601f82111561118257600081815260208120601f850160051c81016020861015613efc5750805b601f850160051c820191505b81811015613f1b57828155600101613f08565b505050505050565b81516001600160401b03811115613f3c57613f3c6139d6565b613f5081613f4a8454613e02565b84613ed5565b602080601f831160018114613f855760008415613f6d5750858301515b600019600386901b1c1916600185901b178555613f1b565b600085815260208120601f198616915b82811015613fb457888601518255948401946001909101908401613f95565b5085821015613fd25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251613ff4818460208701613825565b64173539b7b760d91b920191825250600501919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061403e90830184613849565b9695505050505050565b60006020828403121561405a57600080fd5b8151613498816137d0565b60008351614077818460208801613825565b83519083019061408b818360208801613825565b01949350505050565b6000826140a3576140a3613d90565b50069056fea2646970667358221220b3f299bebe369f5dbe40975b0cd50c25b722583c00144eee651f9d27b50addea64736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
QuantumCreatures.sol 3321 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)



pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}


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);
}

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

pragma solidity ^0.8.0;

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

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);
}

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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;
    }
}

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);
    }
}

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;
    }
}

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 overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _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 || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @dev 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 {}
}





pragma solidity ^0.8.0;



/**
 * @dev Contract m...

// [truncated — 116451 bytes total]

Read Contract

addressesThatMinted 0xab2fdb0c → uint256
balanceOf 0x70a08231 → uint256
bidderToBids 0xeb857fab → uint256
bids 0x4423c5f1 → uint256, address, bool
claimedSpys 0x2e8e02d4 → bool
getActiveBidsForWallet 0xebc33882 → uint256[]
getActiveListingsForWallet 0x38cc6a31 → uint256[]
getActiveOffersForWallet 0x8e25d8b3 → uint256[]
getAllActiveBids 0x294bc0e7 → uint256[]
getAllActiveListings 0x701e5084 → uint256[]
getAllActiveOffers 0x003beca0 → uint256[]
getApproved 0x081812fc → address
getTotalSupply 0xc4e41b22 → uint256
getWalletOfOwner 0x627fdeab → uint256[]
holderSaleIsActive 0xd0d703d3 → bool
isApprovedForAll 0xe985e9c5 → bool
isSpyAvailable 0x1e47ebe2 → bool
maxPublicMints 0xc7b0dcbc → uint256
maxPurchase 0x977b055b → uint256
maxSupply 0xd5abeb01 → uint256
mintPrice 0x6817c76c → uint256
mintProceeds 0x6af42d86 → uint256
name 0x06fdde03 → string
numBids 0xce9ec0a6 → uint256
ogAddress 0x80feb139 → address
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
publicMints 0x2336296a → uint256
royaltiesPercentage 0xcafa8dfe → uint256
saleIsActive 0xeb8d2444 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenListings 0xbd64ace5 → bool, address, uint256
tokenOffers 0xca034527 → uint256, address, bool
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 28 functions

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

acceptBid 0x02e9d5e4
uint256 _tokenId
uint256 _bidIndex
acceptOffer 0xc815729d
uint256 _tokenId
airdopMint 0x9923b86a
address[] _to
approve 0x095ea7b3
address to
uint256 tokenId
buyToken 0x2d296bf1
uint256 _tokenId
holderFreeMint 0x1e0ba315
uint256[] _spyIds
uint256 _count
listTokens 0xfb7cf4a4
uint256[] _tokenIds
uint256[] _prices
mint 0xa0712d68
uint256 _count
ownerMint 0x484b973c
address _to
uint256 _count
placeBid 0xecfc7ecc
No parameters
placeOffer 0x2474659a
uint256 _tokenId
removeTokenListings 0xecad0597
uint256[] _tokenIds
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
setBaseURI 0x55f804b3
string baseURI
setMaxPublicMints 0xa93fef3b
uint256 _maxPublicMints
setMaxPurchase 0x71189742
uint256 _maxPurchase
setMintPrice 0xf4a0a528
uint256 _mintPrice
setRoyaltiesPercentage 0x9466d206
uint256 _newRoyaltiesPercentage
toggleHolderSaleStatus 0x4b6bcbed
No parameters
toggleSaleStatus 0x049c5c49
No parameters
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawBid 0x0eaaf4c8
uint256 _bidIndex
withdrawMintProceeds 0x393d9eab
No parameters
withdrawOffer 0x8610f045
uint256 _tokenId

Recent Transactions

No transactions found for this address