Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x574Ee20BeB697c4870226671b8E1e30B6B64C755
Balance 0.052575 ETH
Nonce 1
Code Size 13767 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

13767 bytes
0x6080604052600436106102b25760003560e01c80636bf24dcd116101755780639e759865116100dc578063c87b56dd11610095578063db2e21bc1161006f578063db2e21bc146107a2578063e985e9c5146107b7578063ed576adf146107d7578063f2fde38b146107ec576102b9565b8063c87b56dd14610758578063d1de084b14610778578063d5abeb011461078d576102b9565b80639e759865146106bd578063a0712d68146106d0578063a22cb465146106e3578063b534a5c414610703578063b88d4fde14610723578063b8a7c78a14610743576102b9565b80637501f7411161012e5780637501f741146106295780637ed6c9261461063e578063841718a61461065e5780638da5cb5b1461067e5780638e52628b1461069357806395d89b41146106a8576102b9565b80636bf24dcd146105975780636c19e783146105ac5780636e9849dd146105cc57806370a08231146105df578063715018a6146105ff578063738f88a514610614576102b9565b80633fe8f0a7116102195780634f6ccce7116101d25780634f6ccce7146104f857806355f804b314610518578063564566a81461053857806363511db61461054d5780636352211e146105625780636817c76c14610582576102b9565b80633fe8f0a71461044157806342842e0e14610456578063438b6300146104765780634a994eef146104a35780634bb278f3146104c35780634d44660c146104d8576102b9565b8063138b40fa1161026b578063138b40fa146103a057806318160ddd146103b557806323b872dd146103d75780632f745c59146103f75780633ccfd60b146104175780633ec2826e1461042c576102b9565b806301ffc9a7146102bb57806306fdde03146102f15780630777962714610313578063081812fc14610333578063095ea7b314610360578063111be31614610380576102b9565b366102b957005b005b3480156102c757600080fd5b506102db6102d6366004612a21565b61080c565b6040516102e89190612c62565b60405180910390f35b3480156102fd57600080fd5b50610306610839565b6040516102e89190612c6d565b34801561031f57600080fd5b506102db61032e36600461271a565b6108cb565b34801561033f57600080fd5b5061035361034e366004612a99565b610934565b6040516102e89190612bcd565b34801561036c57600080fd5b506102b961037b366004612975565b610977565b34801561038c57600080fd5b506102b961039b366004612ab1565b610a0f565b3480156103ac57600080fd5b506102db610aaf565b3480156103c157600080fd5b506103ca610abd565b6040516102e89190613415565b3480156103e357600080fd5b506102b96103f23660046127f4565b610ae1565b34801561040357600080fd5b506103ca610412366004612975565b610b19565b34801561042357600080fd5b506102b9610bb5565b34801561043857600080fd5b506102b9610fb5565b34801561044d57600080fd5b506102b96111cd565b34801561046257600080fd5b506102b96104713660046127f4565b611290565b34801561048257600080fd5b5061049661049136600461271a565b6112ab565b6040516102e89190612c1e565b3480156104af57600080fd5b506102b96104be36600461294c565b611367565b3480156104cf57600080fd5b506102b96113d1565b3480156104e457600080fd5b506102db6104f33660046128fb565b611423565b34801561050457600080fd5b506103ca610513366004612a99565b6114c1565b34801561052457600080fd5b506102b9610533366004612a59565b6114ed565b34801561054457600080fd5b506102db611528565b34801561055957600080fd5b50610353611531565b34801561056e57600080fd5b5061035361057d366004612a99565b611540565b34801561058e57600080fd5b506103ca611598565b3480156105a357600080fd5b5061035361159e565b3480156105b857600080fd5b506102b96105c736600461271a565b6115ad565b6102b96105da36600461299e565b61160e565b3480156105eb57600080fd5b506103ca6105fa36600461271a565b611797565b34801561060b57600080fd5b506102b9611830565b34801561062057600080fd5b5061035361187b565b34801561063557600080fd5b506103ca61188a565b34801561064a57600080fd5b506102b9610659366004612a59565b611890565b34801561066a57600080fd5b506102b9610679366004612a07565b6118db565b34801561068a57600080fd5b50610353611946565b34801561069f57600080fd5b50610353611955565b3480156106b457600080fd5b50610306611964565b6102b96106cb3660046128fb565b611973565b6102b96106de366004612a99565b611a75565b3480156106ef57600080fd5b506102b96106fe36600461294c565b611b4e565b34801561070f57600080fd5b506102b961071e366004612766565b611c1c565b34801561072f57600080fd5b506102b961073e36600461282f565b611c9f565b34801561074f57600080fd5b50610353611cd8565b34801561076457600080fd5b50610306610773366004612a99565b611ce7565b34801561078457600080fd5b50610353611d40565b34801561079957600080fd5b506103ca611d4f565b3480156107ae57600080fd5b506102b9611d55565b3480156107c357600080fd5b506102db6107d2366004612734565b611db2565b3480156107e357600080fd5b50610353611de0565b3480156107f857600080fd5b506102b961080736600461271a565b611def565b60006001600160e01b0319821663780e9d6360e01b1480610831575061083182611e5a565b90505b919050565b606060008054610848906134cf565b80601f0160208091040260200160405190810160405280929190818152602001828054610874906134cf565b80156108c15780601f10610896576101008083540402835291602001916108c1565b820191906000526020600020905b8154815290600101906020018083116108a457829003601f168201915b5050505050905090565b60006108d5611e9a565b6001600160a01b03166108e6611946565b6001600160a01b0316146109155760405162461bcd60e51b815260040161090c9061316d565b60405180910390fd5b506001600160a01b031660009081526009602052604090205460ff1690565b600061093f82611e9e565b61095b5760405162461bcd60e51b815260040161090c90613121565b506000908152600560205260409020546001600160a01b031690565b600061098282611540565b9050806001600160a01b0316836001600160a01b031614156109b65760405162461bcd60e51b815260040161090c90613308565b806001600160a01b03166109c8611e9a565b6001600160a01b031614806109e457506109e4816107d2611e9a565b610a005760405162461bcd60e51b815260040161090c90612fcc565b610a0a8383611ef6565b505050565b3360009081526009602052604090205460ff16610a3e5760405162461bcd60e51b815260040161090c90612c80565b82600c54141580610a51575081600d5414155b80610a5e575080600e5414155b610a7a5760405162461bcd60e51b815260040161090c90612dc4565b610a82610abd565b821015610aa15760405162461bcd60e51b815260040161090c90612e57565b600c92909255600d55600e55565b600f54610100900460ff1681565b6000600254600354610acf919061342a565b600454610adc9190613475565b905090565b610af2610aec611e9a565b82611f64565b610b0e5760405162461bcd60e51b815260040161090c90613349565b610a0a838383611fe9565b60008060005b600454811015610b965760048181548110610b4a57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0386811691161415610b865783821415610b7a579150610baf9050565b610b838261350a565b91505b610b8f8161350a565b9050610b1f565b5060405162461bcd60e51b815260040161090c90612caa565b92915050565b60004711610bd55760405162461bcd60e51b815260040161090c906132d1565b600f5460ff610100909104161515600114610c025760405162461bcd60e51b815260040161090c90612f49565b60115447906000906001600160a01b0316612710610c22846101a9613456565b610c2c9190613442565b604051610c3890612bca565b60006040518083038185875af1925050503d8060008114610c75576040519150601f19603f3d011682016040523d82523d6000602084013e610c7a565b606091505b50506012549091506000906001600160a01b0316612710610c9d856101a9613456565b610ca79190613442565b604051610cb390612bca565b60006040518083038185875af1925050503d8060008114610cf0576040519150601f19603f3d011682016040523d82523d6000602084013e610cf5565b606091505b50506013549091506000906001600160a01b03166103e8610d188661016d613456565b610d229190613442565b604051610d2e90612bca565b60006040518083038185875af1925050503d8060008114610d6b576040519150601f19603f3d011682016040523d82523d6000602084013e610d70565b606091505b50506014549091506000906001600160a01b03166064610d9187600a613456565b610d9b9190613442565b604051610da790612bca565b60006040518083038185875af1925050503d8060008114610de4576040519150601f19603f3d011682016040523d82523d6000602084013e610de9565b606091505b50506015549091506000906001600160a01b03166064610e0a886028613456565b610e149190613442565b604051610e2090612bca565b60006040518083038185875af1925050503d8060008114610e5d576040519150601f19603f3d011682016040523d82523d6000602084013e610e62565b606091505b50506016549091506000906001600160a01b03166064610e83896003613456565b610e8d9190613442565b604051610e9990612bca565b60006040518083038185875af1925050503d8060008114610ed6576040519150601f19603f3d011682016040523d82523d6000602084013e610edb565b606091505b50506017549091506000906001600160a01b03166064610efc8a6002613456565b610f069190613442565b604051610f1290612bca565b60006040518083038185875af1925050503d8060008114610f4f576040519150601f19603f3d011682016040523d82523d6000602084013e610f54565b606091505b50509050868015610f625750855b8015610f6b5750845b8015610f745750835b8015610f7d5750825b8015610f865750815b8015610f8f5750805b610fab5760405162461bcd60e51b815260040161090c906132a8565b5050505050505050565b610fbd611e9a565b6001600160a01b0316610fce611946565b6001600160a01b031614610ff45760405162461bcd60e51b815260040161090c9061316d565b68015d94db89a4170000471161101c5760405162461bcd60e51b815260040161090c906132d1565b600f54610100900460ff16156110445760405162461bcd60e51b815260040161090c906131a2565b6013546040516000916001600160a01b0316906801423e02f9a49200009061106b90612bca565b60006040518083038185875af1925050503d80600081146110a8576040519150601f19603f3d011682016040523d82523d6000602084013e6110ad565b606091505b50506011546040519192506000916001600160a01b0390911690670d99a8cec7e20000906110da90612bca565b60006040518083038185875af1925050503d8060008114611117576040519150601f19603f3d011682016040523d82523d6000602084013e61111c565b606091505b50506012546040519192506000916001600160a01b0390911690670dbd2fc137a300009061114990612bca565b60006040518083038185875af1925050503d8060008114611186576040519150601f19603f3d011682016040523d82523d6000602084013e61118b565b606091505b5050600f805461ff00191661010017905590508280156111a85750815b80156111b15750805b610a0a5760405162461bcd60e51b815260040161090c906130ea565b6111d5611e9a565b6001600160a01b03166111e6611946565b6001600160a01b03161461120c5760405162461bcd60e51b815260040161090c9061316d565b6012546040516000916001600160a01b031690479061122a90612bca565b60006040518083038185875af1925050503d8060008114611267576040519150601f19603f3d011682016040523d82523d6000602084013e61126c565b606091505b505090508061128d5760405162461bcd60e51b815260040161090c90612d47565b50565b610a0a83838360405180602001604052806000815250611c9f565b606060006112b883611797565b905060008167ffffffffffffffff8111156112e357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561130c578160200160208202803683370190505b50905060005b8281101561135f576113248582610b19565b82828151811061134457634e487b7160e01b600052603260045260246000fd5b60209081029190910101526113588161350a565b9050611312565b509392505050565b61136f611e9a565b6001600160a01b0316611380611946565b6001600160a01b0316146113a65760405162461bcd60e51b815260040161090c9061316d565b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b6113d9611e9a565b6001600160a01b03166113ea611946565b6001600160a01b0316146114105760405162461bcd60e51b815260040161090c9061316d565b611418611946565b6001600160a01b0316ff5b6000805b828110156114b457846001600160a01b0316600485858481811061145b57634e487b7160e01b600052603260045260246000fd5b905060200201358154811061148057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316146114a45760009150506114ba565b6114ad8161350a565b9050611427565b50600190505b9392505050565b60006114cb610abd565b82106114e95760405162461bcd60e51b815260040161090c9061339a565b5090565b3360009081526009602052604090205460ff1661151c5760405162461bcd60e51b815260040161090c90612c80565b610a0a601083836125da565b600f5460ff1681565b6011546001600160a01b031681565b6000806004838154811061156457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169050806108315760405162461bcd60e51b815260040161090c90613073565b600e5481565b6015546001600160a01b031681565b6115b5611e9a565b6001600160a01b03166115c6611946565b6001600160a01b0316146115ec5760405162461bcd60e51b815260040161090c9061316d565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526009602052604090205460ff1661163d5760405162461bcd60e51b815260040161090c90612c80565b82811461165c5760405162461bcd60e51b815260040161090c90613271565b600080611667610abd565b905060005b858110156116b85786868281811061169457634e487b7160e01b600052603260045260246000fd5b90506020020135836116a6919061342a565b92506116b18161350a565b905061166c565b50600d546116c6838361342a565b11156116e45760405162461bcd60e51b815260040161090c906130bc565b6000915060005b8381101561178e5760005b87878381811061171657634e487b7160e01b600052603260045260246000fd5b9050602002013581101561177d5761176d86868481811061174757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061175c919061271a565b846117668161350a565b95506120da565b6117768161350a565b90506116f6565b506117878161350a565b90506116eb565b50505050505050565b60006001600160a01b0382166117bf5760405162461bcd60e51b815260040161090c90613029565b6000805b60045481101561182957600481815481106117ee57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0385811691161415611819576118168261350a565b91505b6118228161350a565b90506117c3565b5092915050565b611838611e9a565b6001600160a01b0316611849611946565b6001600160a01b03161461186f5760405162461bcd60e51b815260040161090c9061316d565b6118796000612162565b565b6012546001600160a01b031681565b600c5481565b611898611e9a565b6001600160a01b03166118a9611946565b6001600160a01b0316146118cf5760405162461bcd60e51b815260040161090c9061316d565b610a0a600a83836125da565b3360009081526009602052604090205460ff1661190a5760405162461bcd60e51b815260040161090c90612c80565b600f5460ff16151581151514156119335760405162461bcd60e51b815260040161090c90612dc4565b600f805460ff1916911515919091179055565b6008546001600160a01b031690565b6016546001600160a01b031681565b606060018054610848906134cf565b3360009081526009602052604090205460ff166119a25760405162461bcd60e51b815260040161090c90612c80565b60005b81811015611a6f57836001600160a01b031660048484848181106119d957634e487b7160e01b600052603260045260246000fd5b90506020020135815481106119fe57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614611a305760405162461bcd60e51b815260040161090c90612e9e565b611a5f838383818110611a5357634e487b7160e01b600052603260045260246000fd5b905060200201356121b4565b611a688161350a565b90506119a5565b50505050565b600f5460ff16611a975760405162461bcd60e51b815260040161090c90612e20565b600c54811115611ab95760405162461bcd60e51b815260040161090c90612df2565b80600e54611ac79190613456565b341015611ae65760405162461bcd60e51b815260040161090c906133e6565b6000611af0610abd565b600d54909150611b00838361342a565b1115611b1e5760405162461bcd60e51b815260040161090c906130bc565b60005b82811015610a0a57611b3e3383611b378161350a565b94506120da565b611b478161350a565b9050611b21565b611b56611e9a565b6001600160a01b0316826001600160a01b03161415611b875760405162461bcd60e51b815260040161090c90612f12565b8060066000611b94611e9a565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611bd8611e9a565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611c109190612c62565b60405180910390a35050565b60005b8381101561178e57611c8f8787878785818110611c4c57634e487b7160e01b600052603260045260246000fd5b9050602002013586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c9f92505050565b611c988161350a565b9050611c1f565b611cb0611caa611e9a565b83611f64565b611ccc5760405162461bcd60e51b815260040161090c90613349565b611a6f8484848461226c565b6014546001600160a01b031681565b6060611cf282611e9e565b611d0e5760405162461bcd60e51b815260040161090c90613222565b6010611d198361229f565b604051602001611d2a929190612b24565b6040516020818303038152906040529050919050565b6013546001600160a01b031681565b600d5481565b611d5d611e9a565b6001600160a01b0316611d6e611946565b6001600160a01b031614611d945760405162461bcd60e51b815260040161090c9061316d565b6011546040516000916001600160a01b031690479061122a90612bca565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6017546001600160a01b031681565b611df7611e9a565b6001600160a01b0316611e08611946565b6001600160a01b031614611e2e5760405162461bcd60e51b815260040161090c9061316d565b6001600160a01b0381166000908152600960205260409020805460ff1916600117905561128d816123ba565b60006001600160e01b031982166380ac58cd60e01b1480611e8b57506001600160e01b03198216635b5e139f60e01b145b80610831575061083182612428565b3390565b60045460009082108015610831575060006001600160a01b031660048381548110611ed957634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316141592915050565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f2b82611540565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f6f82611e9e565b611f8b5760405162461bcd60e51b815260040161090c90612f80565b6000611f9683611540565b9050806001600160a01b0316846001600160a01b03161480611fd15750836001600160a01b0316611fc684610934565b6001600160a01b0316145b80611fe15750611fe18185611db2565b949350505050565b826001600160a01b0316611ffc82611540565b6001600160a01b0316146120225760405162461bcd60e51b815260040161090c906131d9565b6001600160a01b0382166120485760405162461bcd60e51b815260040161090c90612ece565b612053838383612441565b61205e600082611ef6565b816004828154811061208057634e487b7160e01b600052603260045260246000fd5b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6120e660008383612441565b6004805460018101825560009182527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006121bf82611540565b90506121d26121cc611946565b83611ef6565b6121de81600084612441565b6002600081546121ed9061350a565b9190508190555060006004838154811061221757634e487b7160e01b600052603260045260246000fd5b6000918252602082200180546001600160a01b0319166001600160a01b0393841617905560405184928416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612277848484611fe9565b612283848484846124b9565b611a6f5760405162461bcd60e51b815260040161090c90612cf5565b6060816122c457506040805180820190915260018152600360fc1b6020820152610834565b8160005b81156122ee57806122d88161350a565b91506122e79050600a83613442565b91506122c8565b60008167ffffffffffffffff81111561231757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612341576020820181803683370190505b5090505b8415611fe157612356600183613475565b9150612363600a86613525565b61236e90603061342a565b60f81b81838151811061239157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506123b3600a86613442565b9450612345565b6123c2611e9a565b6001600160a01b03166123d3611946565b6001600160a01b0316146123f95760405162461bcd60e51b815260040161090c9061316d565b6001600160a01b03811661241f5760405162461bcd60e51b815260040161090c90612d7e565b61128d81612162565b6001600160e01b031981166301ffc9a760e01b14919050565b6001600160a01b0383161561247b576001600160a01b03831660009081526007602052604081208054909190612476906134b8565b909155505b6001600160a01b03821615610a0a576001600160a01b038216600090815260076020526040812080549091906124b09061350a565b90915550505050565b60006124cd846001600160a01b03166125d4565b156125c957836001600160a01b031663150b7a026124e9611e9a565b8786866040518563ffffffff1660e01b815260040161250b9493929190612be1565b602060405180830381600087803b15801561252557600080fd5b505af1925050508015612555575060408051601f3d908101601f1916820190925261255291810190612a3d565b60015b6125af573d808015612583576040519150601f19603f3d011682016040523d82523d6000602084013e612588565b606091505b5080516125a75760405162461bcd60e51b815260040161090c90612cf5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fe1565b506001949350505050565b3b151590565b8280546125e6906134cf565b90600052602060002090601f016020900481019282612608576000855561264e565b82601f106126215782800160ff1982351617855561264e565b8280016001018555821561264e579182015b8281111561264e578235825591602001919060010190612633565b506114e99291505b808211156114e95760008155600101612656565b80356001600160a01b038116811461083457600080fd5b60008083601f840112612692578081fd5b50813567ffffffffffffffff8111156126a9578182fd5b60208301915083602080830285010111156126c357600080fd5b9250929050565b8035801515811461083457600080fd5b60008083601f8401126126eb578182fd5b50813567ffffffffffffffff811115612702578182fd5b6020830191508360208285010111156126c357600080fd5b60006020828403121561272b578081fd5b6114ba8261266a565b60008060408385031215612746578081fd5b61274f8361266a565b915061275d6020840161266a565b90509250929050565b6000806000806000806080878903121561277e578182fd5b6127878761266a565b95506127956020880161266a565b9450604087013567ffffffffffffffff808211156127b1578384fd5b6127bd8a838b01612681565b909650945060608901359150808211156127d5578384fd5b506127e289828a016126da565b979a9699509497509295939492505050565b600080600060608486031215612808578283fd5b6128118461266a565b925061281f6020850161266a565b9150604084013590509250925092565b60008060008060808587031215612844578384fd5b61284d8561266a565b9350602061285c81870161266a565b935060408601359250606086013567ffffffffffffffff8082111561287f578384fd5b818801915088601f830112612892578384fd5b8135818111156128a4576128a4613565565b604051601f8201601f19168101850183811182821017156128c7576128c7613565565b60405281815283820185018b10156128dd578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060006040848603121561290f578283fd5b6129188461266a565b9250602084013567ffffffffffffffff811115612933578283fd5b61293f86828701612681565b9497909650939450505050565b6000806040838503121561295e578182fd5b6129678361266a565b915061275d602084016126ca565b60008060408385031215612987578182fd5b6129908361266a565b946020939093013593505050565b600080600080604085870312156129b3578384fd5b843567ffffffffffffffff808211156129ca578586fd5b6129d688838901612681565b909650945060208701359150808211156129ee578384fd5b506129fb87828801612681565b95989497509550505050565b600060208284031215612a18578081fd5b6114ba826126ca565b600060208284031215612a32578081fd5b81356114ba8161357b565b600060208284031215612a4e578081fd5b81516114ba8161357b565b60008060208385031215612a6b578182fd5b823567ffffffffffffffff811115612a81578283fd5b612a8d858286016126da565b90969095509350505050565b600060208284031215612aaa578081fd5b5035919050565b600080600060608486031215612ac5578081fd5b505081359360208301359350604090920135919050565b60008151808452612af481602086016020860161348c565b601f01601f19169290920160200192915050565b60008151612b1a81856020860161348c565b9290920192915050565b8254600090819060028104600180831680612b4057607f831692505b6020808410821415612b6057634e487b7160e01b87526022600452602487fd5b818015612b745760018114612b8557612bb1565b60ff19861689528489019650612bb1565b612b8e8b61341e565b885b86811015612ba95781548b820152908501908301612b90565b505084890196505b505050505050612bc18185612b08565b95945050505050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612c1490830184612adc565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612c5657835183529284019291840191600101612c3a565b50909695505050505050565b901515815260200190565b6000602082526114ba6020830184612adc565b60208082526010908201526f496e76616c69642064656c656761746560801b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4661696c656420456d657267656e637920576974686472617700000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526014908201527315985b1d595cc8185c99481b9bdd081d985b1a5960621b604082015260600190565b602080825260149082015273537769706120616d6f756e7420746f6f2062696760601b604082015260600190565b60208082526018908201527f53776970612073616c65206973206e6f74206163746976650000000000000000604082015260600190565b60208082526027908201527f4e657720737570706c79206973206c657373207468616e2070726576696f757360408201526620737570706c7960c81b606082015260800190565b60208082526016908201527521b7bab632103737ba103b32b934b33c9037bbb732b960511b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526019908201527f48617665206e6f7420776974686472657720696e697469616c00000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252601490820152734f72646572206578636565647320737570706c7960601b604082015260600190565b60208082526019908201527f4661696c6564207769746864726177696e6720696e6974616c00000000000000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f416c726561647920776974686472657720696e697469616c0000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526018908201527f54686520617272617973206d75737420626520657175616c0000000000000000604082015260600190565b6020808252600f908201526e4661696c656420776974686472617760881b604082015260600190565b6020808252601c908201527f4e6f7420656e6f75676820657468657220746f20776974686472617700000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260159082015274139bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b604082015260600190565b90815260200190565b60009081526020902090565b6000821982111561343d5761343d613539565b500190565b6000826134515761345161354f565b500490565b600081600019048311821515161561347057613470613539565b500290565b60008282101561348757613487613539565b500390565b60005b838110156134a757818101518382015260200161348f565b83811115611a6f5750506000910152565b6000816134c7576134c7613539565b506000190190565b6002810460018216806134e357607f821691505b6020821081141561350457634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561351e5761351e613539565b5060010190565b6000826135345761353461354f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461128d57600080fdfea2646970667358221220db31c4e887df088d0ed994a0cb281c93445c9f2562edbd9c76d9ae1a21528e7664736f6c63430008000033

Verified Source Code Partial Match

Compiler: v0.8.0+commit.c7dfd78e EVM: istanbul Optimization: Yes (200 runs)
ECDSA.sol 219 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}
ERC165.sol 28 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @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;
    }
}
Signed.sol 43 lines
// SPDX-License-Identifier: BSD-3

pragma solidity ^0.8.0;

import './Delegated.sol';
import "./Strings.sol";
import "./ECDSA.sol";

contract Signed is Delegated{
  using Strings for uint256;
  using ECDSA for bytes32;

  string private _secret;
  address private _signer;

  function setSecret( string calldata secret ) external onlyOwner{
    _secret = secret;
  }

  function setSigner( address signer ) external onlyOwner{
    _signer = signer;
  }


  function createHash( string memory data ) internal view returns ( bytes32 ){
    return keccak256( abi.encodePacked( address(this), msg.sender, data, _secret ) );
  }

  function getSigner( bytes32 hash, bytes memory signature ) internal pure returns( address ){
    return hash.toEthSignedMessageHash().recover( signature );
  }

  function isAuthorizedSigner( address extracted ) internal view virtual returns( bool ){
    return extracted == _signer;
  }

  function verifySignature( string memory data, bytes calldata signature ) internal view {
    address extracted = getSigner( createHash( data ), signature );
    require( isAuthorizedSigner( extracted ), "Signature verification failed" );
  }


}
Address.sol 216 lines
// SPDX-License-Identifier: MIT

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);
            }
        }
    }
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT

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;
    }
}
ERC721B.sol 249 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/****************************************
 * @author: squeebo_nft                 *
 * @team:   GoldenX                     *
 ****************************************
 *   Blimpie-ERC721 provides low-gas    *
 *           mints + transfers          *
 ****************************************/

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./IERC721Metadata.sol";
import "./Address.sol";
import "./Context.sol";
import "./ERC165.sol";

abstract contract ERC721B is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;

    string private _name;
    string private _symbol;

    uint internal _burned;
    uint internal _offset;
    address[] internal _owners;

    mapping(uint => address) internal _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_, uint offset) {
        _name = name_;
        _symbol = symbol_;
        _offset = offset;
        for(uint i; i < _offset; ++i ){
            _owners.push(address(0));
        }
    }

    //public
    function balanceOf(address owner) public view virtual override returns (uint) {
        require(owner != address(0), "ERC721: balance query for the zero address");

        uint count;
        for( uint i; i < _owners.length; ++i ){
          if( owner == _owners[i] )
            ++count;
        }
        return count;
    }

    function name() external view virtual override returns (string memory) {
        return _name;
    }

    function ownerOf(uint tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

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

    function symbol() external view virtual override returns (string memory) {
        return _symbol;
    }

    function totalSupply() public view virtual returns (uint) {
        return _owners.length - (_offset + _burned);
    }


    function approve(address to, uint tokenId) external virtual override {
        address owner = ERC721B.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);
    }

    function getApproved(uint tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");
        return _tokenApprovals[tokenId];
    }

    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    function setApprovalForAll(address operator, bool approved) external virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");
        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    function transferFrom(
        address from,
        address to,
        uint 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);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint tokenId
    ) external virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    function safeTransferFrom(
        address from,
        address to,
        uint tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }


    //internal
    function _approve(address to, uint tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721B.ownerOf(tokenId), to, tokenId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint tokenId
    ) internal virtual {}

    function _burn(uint tokenId) internal virtual {
        address owner = ERC721B.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

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

    function _checkOnERC721Received(
        address from,
        address to,
        uint 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;
        }
    }

    function _exists(uint tokenId) internal view virtual returns (bool) {
        return tokenId < _owners.length && _owners[tokenId] != address(0);
    }

    function _isApprovedOrOwner(address spender, uint tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721B.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    function _mint(address to, uint 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);
        _owners.push(to);

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

    function _next() internal view virtual returns( uint ){
        return _owners.length;
    }

    function _safeMint(address to, uint tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    function _safeMint(
        address to,
        uint tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    function _safeTransfer(
        address from,
        address to,
        uint tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    function _transfer(
        address from,
        address to,
        uint tokenId
    ) internal virtual {
        require(ERC721B.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);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }
}
IERC165.sol 24 lines
// SPDX-License-Identifier: MIT

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);
}
IERC721.sol 142 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @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;
}
Ownable.sol 71 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./Context.sol";

/**
 * @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() {
        _setOwner(_msgSender());
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
Strings.sol 66 lines
// SPDX-License-Identifier: MIT

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);
    }
}
Delegated.sol 36 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/***********************
* @author: squeebo_nft *
************************/

import "./Ownable.sol";

contract Delegated is Ownable{
  mapping(address => bool) internal _delegates;

  constructor(){
    _delegates[owner()] = true;
  }

  modifier onlyDelegates {
    require(_delegates[msg.sender], "Invalid delegate" );
    _;
  }

  //onlyOwner
  function isDelegate( address addr ) external view onlyOwner returns ( bool ){
    return _delegates[addr];
  }

  function setDelegate( address addr, bool isDelegate_ ) external onlyOwner{
    _delegates[addr] = isDelegate_;
  }

  function transferOwnership(address newOwner) public virtual override onlyOwner {
    _delegates[newOwner] = true;
    super.transferOwnership( newOwner );
  }
}
SwipaTheFox.sol 166 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import './ERC721EnumerableLite.sol';
import './Signed.sol';
import "./Strings.sol";

contract SwipaTheFox is ERC721EnumerableLite, Signed {
  using Strings for uint;

  uint public maxMint = 5;
  uint public maxSupply = 2255; //presale amount change to 10005 for mainsale
  uint public mintPrice = 0.07 ether;
  bool public isSaleActive = false;
  bool public withdrew_initial = false;
  string private _tokenURI_Prefix = '';

  address public devAddress1 = 0x2Dd146bcf2Dae32851fCeE09e5F3a4E886eFe076;
  address public devAddress2 = 0x3e81D9B5E4fD4C7C3f69bb4396A857d41D1A3471;
  address public NFTA_Address = 0x855A67D331a52C8701306B7bfa62EaBa68F25F44;
  address public CommunityAddress = 0x266Db4743755109a5926D6fDeD5ED6F6a284aB98;
  address public oAddress = 0x6662DF22aE83a8cCfc9c99C641aA54dE8E120407;
  address public pop1Address = 0x39fF53cEAA56f6761bB938500a1449Eee67d9399;
  address public pop2Address = 0x8e90fd7C6642B653965c8B65013711C53c847bd7;

  constructor()
    Delegated()
    ERC721B("Swipa The Fox", "SWIPA", 0){
  }

  fallback() external payable {}

  receive() external payable {}

  function tokenURI(uint tokenId) external view virtual override returns (string memory) {
    require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
    return string(abi.encodePacked(_tokenURI_Prefix, tokenId.toString() ));
  }

  function mint( uint quantity ) external payable {
    require( isSaleActive, "Swipa sale is not active" );
    require( quantity <= maxMint, "Swipa amount too big" );
    require( msg.value >= mintPrice * quantity, "Not enough ether sent" );

    uint supply = totalSupply();
    require( supply + quantity <= maxSupply, "Order exceeds supply" );

    for(uint i; i < quantity; ++i){
      _mint( msg.sender, supply++ );
    }
  }

  function burnTokens(address account, uint[] calldata tokenIds) external payable onlyDelegates {
    for(uint i; i < tokenIds.length; ++i ){
      require( _owners[ tokenIds[i] ] == account, "Could not verify owner" );
      _burn( tokenIds[i] );
    }
  }

  //Giveaway nfts, etc.
  function ownerMint(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates {
    require(quantity.length == recipient.length, "The arrays must be equal" );

    uint totalQuantity;
    uint supply = totalSupply();
    for(uint i; i < quantity.length; ++i){
      totalQuantity += quantity[i];
    }
    require( supply + totalQuantity <= maxSupply, "Order exceeds supply" );
    delete totalQuantity;

    for(uint i; i < recipient.length; ++i){
      for(uint j; j < quantity[i]; ++j){
        _mint( recipient[i], supply++ );
      }
    }
  }

  function setSaleActive(bool isSaleActive_ ) external onlyDelegates{
    require( isSaleActive != isSaleActive_ , "Values are not valid" );
    isSaleActive = isSaleActive_;
  }


  function setBaseURI( string calldata baseURI ) external onlyDelegates {
    _tokenURI_Prefix = baseURI;
  }

  function setValues(uint _maxMint, uint _maxSupply, uint _price ) external onlyDelegates {
    require( maxMint != _maxMint || maxSupply != _maxSupply || mintPrice != _price, "Values are not valid" );
    require(_maxSupply >= totalSupply(), "New supply is less than previous supply" );

    maxMint = _maxMint;
    maxSupply = _maxSupply;
    mintPrice = _price;
  }

  function finalize() external onlyOwner {
    selfdestruct(payable(owner()));
  }

  function withdraw_initial() external onlyOwner {
        require(address(this).balance > 25.19 ether, "Not enough ether to withdraw");
        require(withdrew_initial == false, "Already withdrew initial");
        (bool initial1WithdrawStatus,) = NFTA_Address.call{value: 23.22 ether}("");
        (bool initial2WithdrawStatus,) = devAddress1.call{value: 0.98 ether}("");
        (bool initial3WithdrawStatus,) = devAddress2.call{value: 0.99 ether}("");

        withdrew_initial = true;
        require(initial1WithdrawStatus && initial2WithdrawStatus && initial3WithdrawStatus, "Failed withdrawing inital");
  }

  function emergencyWithdraw() external onlyOwner {
      (bool emergencyWithdrawStatus,) = devAddress1.call{value: address(this).balance}("");
      require(emergencyWithdrawStatus, "Failed Emergency Withdraw");
  }

  function emergencyWithdraw2() external onlyOwner {
      (bool emergencyWithdrawStatus2,) = devAddress2.call{value: address(this).balance}("");
      require(emergencyWithdrawStatus2, "Failed Emergency Withdraw");
  }

  function withdraw() external {
    require(address(this).balance > 0, "Not enough ether to withdraw");
    require(withdrew_initial == true, "Have not withdrew initial");
    uint256 walletBalance = address(this).balance;
        
    (bool withdraw_1,) = devAddress1.call{value: walletBalance * 425 / 10000}(""); //4.25 
    (bool withdraw_2,) = devAddress2.call{value: walletBalance * 425 / 10000}(""); //4.25
    (bool withdraw_3,) = NFTA_Address.call{value: walletBalance * 365 / 1000}(""); //36.5
    (bool withdraw_4,) = CommunityAddress.call{value: walletBalance * 10 / 100}(""); //10
    (bool withdraw_5,) = oAddress.call{value: walletBalance * 40 / 100}(""); //40
    (bool withdraw_6,) = pop1Address.call{value: walletBalance * 3 / 100}(""); //3
    (bool withdraw_7,) = pop2Address.call{value: walletBalance * 2 / 100}(""); //2

    require(withdraw_1 && withdraw_2 && withdraw_3 && withdraw_4 && withdraw_5 && withdraw_6 && withdraw_7, "Failed withdraw");
  }

  function _beforeTokenTransfer(address from, address to, uint tokenId) internal override {
    if( from != address(0) )
      --_balances[from];

    if( to != address(0) )
      ++_balances[to];
  }

  function _burn(uint tokenId) internal override {
    //failsafe
    address from = ownerOf(tokenId);
    _approve(owner(), tokenId);
    _beforeTokenTransfer( from, address(0), tokenId );

    ++_burned;
    _owners[tokenId] = address(0);
    emit Transfer(from, address(0), tokenId);
  }

  function _mint(address to, uint tokenId) internal override {
    _beforeTokenTransfer( address(0), to, tokenId );

    _owners.push(to);
    emit Transfer(address(0), to, tokenId);
  }

}
IERC721Batch.sol 9 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

interface IERC721Batch {
  function isOwnerOf( address account, uint[] calldata tokenIds ) external view returns( bool );
  function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external;
  function walletOfOwner( address account ) external view returns( uint[] memory );
}
IERC721Metadata.sol 26 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";

/**
 * @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);
}
IERC721Receiver.sol 26 lines
// SPDX-License-Identifier: MIT

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);
}
IERC721Enumerable.sol 28 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";

/**
 * @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);
}
ERC721EnumerableLite.sol 69 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/****************************************
 * @author: squeebo_nft                 *
 ****************************************
 *   Blimpie-ERC721 provides low-gas    *
 *           mints + transfers          *
 ****************************************/

import "./ERC721B.sol";
import "./IERC721Batch.sol";
import "./IERC721Enumerable.sol";

abstract contract ERC721EnumerableLite is ERC721B, IERC721Batch, IERC721Enumerable {
    mapping(address => uint) internal _balances;

    function isOwnerOf( address account, uint[] calldata tokenIds ) external view virtual override returns( bool ){
        for(uint i; i < tokenIds.length; ++i ){
            if( _owners[ tokenIds[i] ] != account )
                return false;
        }

        return true;
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721B) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    function tokenOfOwnerByIndex(address owner, uint index) public view override returns (uint tokenId) {
        uint count;
        for( uint i; i < _owners.length; ++i ){
            if( owner == _owners[i] ){
                if( count == index )
                    return i;
                else
                    ++count;
            }
        }

        revert("ERC721Enumerable: owner index out of bounds");
    }

    function tokenByIndex(uint index) external view virtual override returns (uint) {
        require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
        return index;
    }

    function totalSupply() public view virtual override( ERC721B, IERC721Enumerable ) returns (uint) {
        return _owners.length - (_offset + _burned);
    }

    function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external override{
        for(uint i; i < tokenIds.length; ++i ){
            safeTransferFrom( from, to, tokenIds[i], data );
        }
    }

    function walletOfOwner( address account ) external view virtual override returns( uint[] memory ){
        uint quantity = balanceOf( account );
        uint[] memory wallet = new uint[]( quantity );
        for( uint i; i < quantity; ++i ){
            wallet[i] = tokenOfOwnerByIndex( account, i );
        }
        return wallet;
    }
}

Read Contract

CommunityAddress 0xb8a7c78a → address
NFTA_Address 0xd1de084b → address
balanceOf 0x70a08231 → uint256
devAddress1 0x63511db6 → address
devAddress2 0x738f88a5 → address
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isDelegate 0x07779627 → bool
isOwnerOf 0x4d44660c → bool
isSaleActive 0x564566a8 → bool
maxMint 0x7501f741 → uint256
maxSupply 0xd5abeb01 → uint256
mintPrice 0x6817c76c → uint256
name 0x06fdde03 → string
oAddress 0x6bf24dcd → address
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
pop1Address 0x8e52628b → address
pop2Address 0xed576adf → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]
withdrew_initial 0x138b40fa → bool

Write Contract 22 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
burnTokens 0x9e759865
address account
uint256[] tokenIds
emergencyWithdraw 0xdb2e21bc
No parameters
emergencyWithdraw2 0x3fe8f0a7
No parameters
finalize 0x4bb278f3
No parameters
mint 0xa0712d68
uint256 quantity
ownerMint 0x6e9849dd
uint256[] quantity
address[] recipient
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
setDelegate 0x4a994eef
address addr
bool isDelegate_
setSaleActive 0x841718a6
bool isSaleActive_
setSecret 0x7ed6c926
string secret
setSigner 0x6c19e783
address signer
setValues 0x111be316
uint256 _maxMint
uint256 _maxSupply
uint256 _price
transferBatch 0xb534a5c4
address from
address to
uint256[] tokenIds
bytes data
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters
withdraw_initial 0x3ec2826e
No parameters

Recent Transactions

No transactions found for this address