Address Contract Verified
Address
0x7Eaa96D48380802A75ED6d74b91E2B30c3d474C1
Balance
0 ETH
Nonce
2
Code Size
14060 bytes
Creator
0x391Fd74D...d057 at tx 0x59dcf303...1ae4e8
Indexed Transactions
0
Contract Bytecode
14060 bytes
0x6080604052600436106103a25760003560e01c806371c79a23116101e7578063bcee41061161010d578063e0ad790c116100a0578063e985e9c51161006f578063e985e9c514610a7f578063eb8d244414610ac8578063f2fde38b14610ae9578063f6fa26ab14610b0957600080fd5b8063e0ad790c146105fb578063e202e3ec14610a1f578063e268e4d314610a3f578063e2e784d514610a5f57600080fd5b8063d52c57e0116100dc578063d52c57e0146109be578063d547cfb7146109de578063db1354d2146109f3578063dfe0ce1814610a0957600080fd5b8063bcee41061461094b578063bece913b1461095e578063c87b56dd1461097e578063d30d5e4b1461099e57600080fd5b80639e852f7511610185578063b3feb36d11610154578063b3feb36d146108be578063b85f3fb8146108f5578063b88d4fde1461090b578063bb660c0a1461092b57600080fd5b80639e852f7514610858578063a0712d681461086b578063a22cb4651461087e578063a3e511581461089e57600080fd5b80638da5cb5b116101c15780638da5cb5b146107ef57806391b7f5ed1461080d57806395d89b411461082d5780639c79e5271461084257600080fd5b806371c79a23146107a457806386d1a69f146107c45780638d859f3e146107d957600080fd5b806334918dfd116102cc5780636301dccf1161026a5780636d4a450a116102395780636d4a450a146107445780636d60e6c11461075a57806370a082311461076f578063715018a61461078f57600080fd5b80636301dccf146106a75780636352211e146106db578063674d13c8146106fb5780636b0509b11461071057600080fd5b8063517e01e3116102a6578063517e01e31461061b57806355f804b31461063157806361f3646214610651578063624601b61461067157600080fd5b806334918dfd146105c657806342842e0e146105db5780634d5fa2f7146105fb57600080fd5b806318160ddd116103445780632a47f799116103135780632a47f7991461053b5780632a55205a1461055157806331beb6051461059057806332cb6b0c146105b057600080fd5b806318160ddd146104a95780631fe70d6f146104c6578063212e9a0f146104e757806323b872dd1461051b57600080fd5b8063081812fc11610380578063081812fc14610418578063095ea7b3146104505780630f2cdd6c1461047257806314d8bbf11461049657600080fd5b806301ffc9a7146103a757806306fdde03146103dc57806307cf3a77146103fe575b600080fd5b3480156103b357600080fd5b506103c76103c23660046130d5565b610b1e565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610bbb565b6040516103d3919061314a565b34801561040a57600080fd5b506010546103c79060ff1681565b34801561042457600080fd5b5061043861043336600461315d565b610c4d565b6040516001600160a01b0390911681526020016103d3565b34801561045c57600080fd5b5061047061046b36600461318b565b610caa565b005b34801561047e57600080fd5b5061048860145481565b6040519081526020016103d3565b6104706104a43660046131f9565b610d62565b3480156104b557600080fd5b506001546000540360001901610488565b3480156104d257600080fd5b50600a546103c790600160a81b900460ff1681565b3480156104f357600080fd5b506104887f2744a6917094ca2ea2ac15d34cf9febe9c2a504b2370fa0f60e99090ad07d83e81565b34801561052757600080fd5b50610470610536366004613245565b61103e565b34801561054757600080fd5b5061048860135481565b34801561055d57600080fd5b5061057161056c366004613286565b611049565b604080516001600160a01b0390931683526020830191909152016103d3565b34801561059c57600080fd5b506104706105ab3660046132a8565b61107e565b3480156105bc57600080fd5b5061048860115481565b3480156105d257600080fd5b506104706110fa565b3480156105e757600080fd5b506104706105f6366004613245565b61117e565b34801561060757600080fd5b506103c76106163660046132c5565b611199565b34801561062757600080fd5b5061048860155481565b34801561063d57600080fd5b5061047061064c366004613393565b6112dc565b34801561065d57600080fd5b5061047061066c36600461315d565b61133b565b34801561067d57600080fd5b5061048861068c3660046132a8565b6001600160a01b03166000908152600f602052604090205490565b3480156106b357600080fd5b506104887f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b3480156106e757600080fd5b506104386106f636600461315d565b611388565b34801561070757600080fd5b5061048861139a565b34801561071c57600080fd5b506104887f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca81565b34801561075057600080fd5b50610488600c5481565b34801561076657600080fd5b506104706113aa565b34801561077b57600080fd5b5061048861078a3660046132a8565b611406565b34801561079b57600080fd5b5061047061146e565b3480156107b057600080fd5b506104886107bf3660046132a8565b6114c2565b3480156107d057600080fd5b50610470611518565b3480156107e557600080fd5b5061048860165481565b3480156107fb57600080fd5b50600a546001600160a01b0316610438565b34801561081957600080fd5b5061047061082836600461315d565b61157f565b34801561083957600080fd5b506103f16115cc565b34801561084e57600080fd5b50610488600e5481565b6104706108663660046131f9565b6115db565b61047061087936600461315d565b611826565b34801561088a57600080fd5b506104706108993660046133dc565b61195c565b3480156108aa57600080fd5b506104706108b93660046132a8565b611a0a565b3480156108ca57600080fd5b506103c76108d93660046132a8565b6001600160a01b03166000908152600f60205260409020541590565b34801561090157600080fd5b5061048860175481565b34801561091757600080fd5b5061047061092636600461341a565b611acd565b34801561093757600080fd5b506104886109463660046132a8565b611b17565b6104706109593660046131f9565b611b53565b34801561096a57600080fd5b506103c76109793660046131f9565b611db8565b34801561098a57600080fd5b506103f161099936600461315d565b611f07565b3480156109aa57600080fd5b506103c76109b93660046131f9565b611fa4565b3480156109ca57600080fd5b506104706109d936600461349a565b61201e565b3480156109ea57600080fd5b506103f16120df565b3480156109ff57600080fd5b50610488600d5481565b348015610a1557600080fd5b5061048860125481565b348015610a2b57600080fd5b50610470610a3a36600461315d565b6120ee565b348015610a4b57600080fd5b50610470610a5a36600461315d565b61213b565b348015610a6b57600080fd5b50610470610a7a36600461318b565b612188565b348015610a8b57600080fd5b506103c7610a9a3660046134bf565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610ad457600080fd5b50600a546103c790600160a01b900460ff1681565b348015610af557600080fd5b50610470610b043660046132a8565b612201565b348015610b1557600080fd5b506104706122ce565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480610b8157506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610bb557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060028054610bca906134ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf6906134ed565b8015610c435780601f10610c1857610100808354040283529160200191610c43565b820191906000526020600020905b815481529060010190602001808311610c2657829003601f168201915b5050505050905090565b6000610c5882612352565b610c8e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610cb582611388565b9050806001600160a01b0316836001600160a01b031603610d02576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614610d5257610d1c8133610a9a565b610d52576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d5d83838361238b565b505050565b60105460ff16610d9e576040517f43e287e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b548290829085906001600160a01b0316610dcd57604051637560f33160e11b815260040160405180910390fd5b600c54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca60208201523391810191909152606081018390526000919060800160405160208183030381529060405280519060200120604051602001610e4d92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506000610ea985858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506123f49050565b600b549091506001600160a01b03808316911614610eda57604051638baa579f60e01b815260040160405180910390fd5b333214610efa5760405163d9d552c960e01b815260040160405180910390fd5b601354600189610f0861139a565b60005460001901610f19919061353d565b610f239190613554565b610f2d919061353d565b1115610f65576040517f2d1257cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125488610f7161139a565b610f7b9190613554565b1115610fb3576040517f810d079700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600f6020526040902054610fd657610fd13389612418565b611008565b6040517fa4f8192900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8881101561102957611021601980546001019055565b60010161100b565b506110343389612449565b5050505050505050565b610d5d8383836125be565b6008546009546001600160a01b039091169060009060649061106b908561356c565b61107591906135a1565b90509250929050565b600a546001600160a01b031633146110cb5760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064015b60405180910390fd5b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600a546001600160a01b031633146111425760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b610d5d83838360405180602001604052806000815250611acd565b600b54600090839083906001600160a01b03166111c957604051637560f33160e11b815260040160405180910390fd5b600d54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c960208201523391810191909152600091906060016040516020818303038152906040528051906020012060405160200161124292919061190160f01b81526002810192909252602282015260420190565b604051602081830303815290604052805190602001209050600061129e84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506123f49050565b600b549091506001600160a01b038083169116146112cf57604051638baa579f60e01b815260040160405180910390fd5b5060019695505050505050565b600a546001600160a01b031633146113245760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b805161133790601a906020840190613026565b5050565b600a546001600160a01b031633146113835760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b601755565b6000611393826127f7565b5192915050565b60006113a560195490565b905090565b600a546001600160a01b031633146113f25760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6010805460ff19811660ff90911615179055565b60006001600160a01b038216611448576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b600a546001600160a01b031633146114b65760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6114c06000612934565b565b336000908152600f60205260408120546001600160a01b03831660009081526005602052604090205468010000000000000000900467ffffffffffffffff1660155461150e919061353d565b610bb59190613554565b600a546001600160a01b031633146115605760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b4761157c611576600a546001600160a01b031690565b82612993565b50565b600a546001600160a01b031633146115c75760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b601655565b606060038054610bca906134ed565b600b548290829085906001600160a01b031661160a57604051637560f33160e11b815260040160405180910390fd5b600e54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca6020820152339181019190915260608101839052600091906080016040516020818303038152906040528051906020012060405160200161168a92919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905060006116e685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506123f49050565b600b549091506001600160a01b0380831691161461171757604051638baa579f60e01b815260040160405180910390fd5b3332146117375760405163d9d552c960e01b815260040160405180910390fd5b600a54600160a81b900460ff16611761576040516302664e7160e11b815260040160405180910390fd5b60135461176c61139a565b6000546000190161177d919061353d565b611788906001613554565b11156117a75760405163c30436e960e01b815260040160405180910390fd5b873410156117c85760405163cd1c886760e01b815260040160405180910390fd5b6014543360009081526005602052604090205468010000000000000000900467ffffffffffffffff166117fc906001613554565b111561181b5760405163c0e54d7360e01b815260040160405180910390fd5b611034336001612449565b3332146118465760405163d9d552c960e01b815260040160405180910390fd5b600a54600160a01b900460ff16611889576040517fb7b2409700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013548161189561139a565b600054600019016118a6919061353d565b6118b09190613554565b11156118cf5760405163c30436e960e01b815260040160405180910390fd5b806016546118dd919061356c565b3410156118fd5760405163cd1c886760e01b815260040160405180910390fd5b3360009081526005602052604081205468010000000000000000900467ffffffffffffffff166014549091506119338383613554565b11156119525760405163c0e54d7360e01b815260040160405180910390fd5b6113373383612449565b336001600160a01b0383160361199e576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b03163314611a525760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6018546040517f191655870000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015611ab257600080fd5b505af1158015611ac6573d6000803e3d6000fd5b5050505050565b611ad88484846125be565b6001600160a01b0383163b15611b1157611af484848484612aac565b611b11576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6001600160a01b03811660009081526005602052604081205468010000000000000000900467ffffffffffffffff16601454610bb5919061353d565b600b54829082906001600160a01b0316611b8057604051637560f33160e11b815260040160405180910390fd5b600d54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000919060600160405160208183030381529060405280519060200120604051602001611bf992919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506000611c5584848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506123f49050565b600b549091506001600160a01b03808316911614611c8657604051638baa579f60e01b815260040160405180910390fd5b333214611ca65760405163d9d552c960e01b815260040160405180910390fd5b600a54600160a81b900460ff16611cd0576040516302664e7160e11b815260040160405180910390fd5b60135487611cdc61139a565b60005460001901611ced919061353d565b611cf79190613554565b1115611d165760405163c30436e960e01b815260040160405180910390fd5b86601754611d24919061356c565b341015611d445760405163cd1c886760e01b815260040160405180910390fd5b336000908152600f60209081526040808320546005909252822054611d7f919068010000000000000000900467ffffffffffffffff1661353d565b601554909150611d8f8983613554565b1115611dae5760405163c0e54d7360e01b815260040160405180910390fd5b6110343389612449565b600b546000908390839086906001600160a01b0316611dea57604051637560f33160e11b815260040160405180910390fd5b600c54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca6020820152339181019190915260608101839052600091906080015b60405160208183030381529060405280519060200120604051602001611e6b92919061190160f01b81526002810192909252602282015260420190565b6040516020818303038152906040528051906020012090506000611ec785858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506123f49050565b600b549091506001600160a01b03808316911614611ef857604051638baa579f60e01b815260040160405180910390fd5b50600198975050505050505050565b6060611f1282612352565b611f48576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611f526120df565b90508051600003611f725760405180602001604052806000815250611f9d565b80611f7c84612b98565b604051602001611f8d9291906135b5565b6040516020818303038152906040525b9392505050565b600b546000908390839086906001600160a01b0316611fd657604051637560f33160e11b815260040160405180910390fd5b600e54604080517f77eb6d3bbe7602208cc36937114029465cec3988228851754080f2c59c06cdca602082015233918101919091526060810183905260009190608001611e2e565b600a546001600160a01b031633146120665760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6012548261207261139a565b61207c9190613554565b11156120b4576040517fb319788900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6120be8183612449565b60005b82811015610d5d576120d7601980546001019055565b6001016120c1565b6060601a8054610bca906134ed565b600a546001600160a01b031633146121365760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b601555565b600a546001600160a01b031633146121835760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b601455565b600a546001600160a01b031633146121d05760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617905560098190555050565b600a546001600160a01b031633146122495760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b6001600160a01b0381166122c55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016110c2565b61157c81612934565b600a546001600160a01b031633146123165760405162461bcd60e51b8152602060048201819052602482015260008051602061369783398151915260448201526064016110c2565b600a80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b600081600111158015612366575060005482105b8015610bb5575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008060006124038585612ccd565b9150915061241081612d3b565b509392505050565b6001600160a01b0382166000908152600f602052604081208054839290612440908490613554565b90915550505050565b6000546001600160a01b03831661248c576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036124c6576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168a0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168a01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106125725750600055505050565b60006125c9826127f7565b9050836001600160a01b031681600001516001600160a01b03161461261a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b038616148061263857506126388533610a9a565b8061265357503361264884610c4d565b6001600160a01b0316145b90508061268c576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166126cc576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126d86000848761238b565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166127ae5760005482146127ae578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611ac6565b604080516060810182526000808252602082018190529181019190915281806001116129025760005481101561290257600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff161515918101829052906129005780516001600160a01b031615612896579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff16151592810192909252156128fb579392505050565b612896565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b804710156129e35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016110c2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612a30576040519150601f19603f3d011682016040523d82523d6000602084013e612a35565b606091505b5050905080610d5d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016110c2565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ae19033908990889088906004016135e4565b6020604051808303816000875af1925050508015612b1c575060408051601f3d908101601f19168201909252612b1991810190613620565b60015b612b7a573d808015612b4a576040519150601f19603f3d011682016040523d82523d6000602084013e612b4f565b606091505b508051600003612b72576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606081600003612bdb57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612c055780612bef8161363d565b9150612bfe9050600a836135a1565b9150612bdf565b60008167ffffffffffffffff811115612c2057612c20613307565b6040519080825280601f01601f191660200182016040528015612c4a576020820181803683370190505b5090505b8415612b9057612c5f60018361353d565b9150612c6c600a86613656565b612c77906030613554565b60f81b818381518110612c8c57612c8c61366a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612cc6600a866135a1565b9450612c4e565b6000808251604103612d035760208301516040840151606085015160001a612cf787828585612ef1565b94509450505050612d34565b8251604003612d2c5760208301516040840151612d21868383612fde565b935093505050612d34565b506000905060025b9250929050565b6000816004811115612d4f57612d4f613680565b03612d575750565b6001816004811115612d6b57612d6b613680565b03612db85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016110c2565b6002816004811115612dcc57612dcc613680565b03612e195760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016110c2565b6003816004811115612e2d57612e2d613680565b03612e855760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016110c2565b6004816004811115612e9957612e99613680565b0361157c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016110c2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612f285750600090506003612fd5565b8460ff16601b14158015612f4057508460ff16601c14155b15612f515750600090506004612fd5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612fa5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612fce57600060019250925050612fd5565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161301887828885612ef1565b935093505050935093915050565b828054613032906134ed565b90600052602060002090601f016020900481019282613054576000855561309a565b82601f1061306d57805160ff191683800117855561309a565b8280016001018555821561309a579182015b8281111561309a57825182559160200191906001019061307f565b506130a69291506130aa565b5090565b5b808211156130a657600081556001016130ab565b6001600160e01b03198116811461157c57600080fd5b6000602082840312156130e757600080fd5b8135611f9d816130bf565b60005b8381101561310d5781810151838201526020016130f5565b83811115611b115750506000910152565b600081518084526131368160208601602086016130f2565b601f01601f19169290920160200192915050565b602081526000611f9d602083018461311e565b60006020828403121561316f57600080fd5b5035919050565b6001600160a01b038116811461157c57600080fd5b6000806040838503121561319e57600080fd5b82356131a981613176565b946020939093013593505050565b60008083601f8401126131c957600080fd5b50813567ffffffffffffffff8111156131e157600080fd5b602083019150836020828501011115612d3457600080fd5b60008060006040848603121561320e57600080fd5b83359250602084013567ffffffffffffffff81111561322c57600080fd5b613238868287016131b7565b9497909650939450505050565b60008060006060848603121561325a57600080fd5b833561326581613176565b9250602084013561327581613176565b929592945050506040919091013590565b6000806040838503121561329957600080fd5b50508035926020909101359150565b6000602082840312156132ba57600080fd5b8135611f9d81613176565b600080602083850312156132d857600080fd5b823567ffffffffffffffff8111156132ef57600080fd5b6132fb858286016131b7565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561333857613338613307565b604051601f8501601f19908116603f0116810190828211818310171561336057613360613307565b8160405280935085815286868601111561337957600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156133a557600080fd5b813567ffffffffffffffff8111156133bc57600080fd5b8201601f810184136133cd57600080fd5b612b908482356020840161331d565b600080604083850312156133ef57600080fd5b82356133fa81613176565b91506020830135801515811461340f57600080fd5b809150509250929050565b6000806000806080858703121561343057600080fd5b843561343b81613176565b9350602085013561344b81613176565b925060408501359150606085013567ffffffffffffffff81111561346e57600080fd5b8501601f8101871361347f57600080fd5b61348e8782356020840161331d565b91505092959194509250565b600080604083850312156134ad57600080fd5b82359150602083013561340f81613176565b600080604083850312156134d257600080fd5b82356134dd81613176565b9150602083013561340f81613176565b600181811c9082168061350157607f821691505b60208210810361352157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561354f5761354f613527565b500390565b6000821982111561356757613567613527565b500190565b600081600019048311821515161561358657613586613527565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135b0576135b061358b565b500490565b600083516135c78184602088016130f2565b8351908301906135db8183602088016130f2565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613616608083018461311e565b9695505050505050565b60006020828403121561363257600080fd5b8151611f9d816130bf565b60006001820161364f5761364f613527565b5060010190565b6000826136655761366561358b565b500690565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122098647e9dbb34778c95ebeb7ced64f2632ca55e53955fef89b07a602c0c4daf5a64736f6c634300080d0033
Verified Source Code Full Match
Compiler: v0.8.13+commit.abaa5c0e
EVM: london
Optimization: Yes (1000 runs)
cpgpop.sol 329 lines
// SPDX-License-Identifier: UNLICENSED
// .'..,;,,cocc:::::::::::::::ccl:,,:,..
// .';:;coc::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:c:,c;.
// .',:cl::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:c::;.
// ..';co:;;;;;;;;;;;;:clloddxxxxxxdc;;;;;;;;;;;;;;;;;;;;:cc,.
// ..'cc:;;;;;;;;;;:codkO0KXNWWWWWWWWWNOc;;;;;;;;;;;;;;;;;;;;;;ll'
// .,ll:;;;;;;;;;:ldk0XNWWWWWWWWWWWWWWNX0d:;;;;;;;;;;;;;;;;;;;;;;;::;.
// .'':c;;;;;;;;;:lx0XWWWWWWWWWWWWWWNXKOxoc:;;;;;;;;;;;;;;;;;;;;;;;;;;;ll.
// .:do:;;;;;;;::lx0NWWWWWWWWWWNXK0Oxdoc:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:d;
// 'do:;;;;;;;:oOKXWWWWWWWWNX0kdoc::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:l
// .'::;;;;;;;cd0NWWWWWWWNKOxoc:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l
// .,c:;;;;;;;cdKNWWWWWWN0xoc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:
// .:lc;;;;;;;:d0NWWWWNX0xl:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:
// .co:;;;;;;:oONWWWNKklc:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
// 'lc;;;;;;;ckXWWWN0dc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
// .,::;;;;;;:dKWWWXOo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
// .;c;;;;;;;ckNWWXkl:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
// .c:;;;;;;:o0NWXkl;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:
// .;::;;;;;;ckXWNOo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:
// .:l:;;;;;;l0NNKd:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c
// 'oc;;;;;;:dKNXkc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l
// 'lc;;;;;;;oKXOo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:d
// .c:;;;;;;;;col:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::
// .;c:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;o,
// .ld:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:o,
// .lo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l,
// .co:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c:.
// .lo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:d:
// .co:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;lc.
// .lo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// .lo:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:c.
// .od:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:o;
// ;d:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;lc.
// 'l:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c:.
// 'oc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c:.
// .:c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// ;o:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// 'l:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cl'
// .:c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// ;o:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// .::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// ;o;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l:.
// .::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l:.
// :d:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:oc.
// ,l;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:c;.
// 'c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cc.
// .::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// lk:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:oc.
// ck:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:oxd:;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;.
// ck:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cdk0NNOc;;;;;;;;;;;;;;;;;;;;;;;;;;;co'
// .::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cldOXWWWWXd:;;;;;;;;;;;;;;;;;;;;;;;;;::,.
// 'c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cdOKNWWWWWNKd:;;;;;;;;;;;;;;;;;;;;;;;;;cl.
// ,l;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ckKXXXK0kxoc;;;;;;;;;;;;;;;;;;;;;;;;;:c,.
// :x:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:ccc::;;;;;;;;;;;;;;;;;;;;;;;;;;;:oc.
// .cl;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:lo:.
// 'oc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:ll;.
// 'lc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:oo;.
// 'lc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::.
// .,::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:ll,.
// 'do:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:lc'..
// .''cc:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:ol'..
// ..'loc:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:c:,:;'.
// .'.';,:lc;;;;;;;;;;;;;;;;;;;;;;:::codc,;,..
// .':oc:;;;:;,,,'''cc''',,,,;c,..',.
// .',cl:;;;;;;l, ..
// .,lo:;;;;;;;;;o;
// .',;::;;;;;;;;;;;;o;
// ,o:,':ddkkkkkkxc'';.
// .lKWWWWWWWWWl
// .xWWWWWWWWWWK,
// lWWWWMWWWWMWl
// .xWWWWWWWWWWx.
// lWWWWWMWWWKl.
// .xWWWWWWWKl.
// .lKWWWWWWKl.
// .lKWWWWWWWK,
// .lKWWWWWWWWWl
// .lKWWWWWWWWWWWl
// ,xKWWWWWKlxWMWWWl
// .lKWWWWWKl. lWWWWWl
// ,KWWWWWKl. lWWWWWl
// .lKWWWWKl. lWWWWWl
// .xWWWWWK, ,KWWWWK,
// .xWWWWWx. lWWWWWl
// .xWWMWWx. .xWWWWK,
// xWWWWWx. lWWWWWl
// WWWWWx. ,KWWWWx.
// MWWWK, ,KWWWWK,
// WWWWl ,KWWWWK,
// WWWWl .lKWWWWK,
// WWWWl .xWWWWWK,
// WWWWl .lKWWWWWx.
// WWWWl.,lKWWWWWKl.
// WWWWKKWWWWWWKl.
// WWWWMWWMWKxl.
// OWWWWWWWO.
//
//
// ███╗ ███╗ █████╗ ██████╗ ███████╗ ██╗ ██╗██╗████████╗██╗ ██╗ ███╗ ███╗ █████╗ ███████╗ ██████╗ ███╗ ██╗
// ████╗ ████║██╔══██╗██╔══██╗██╔════╝ ██║ ██║██║╚══██╔══╝██║ ██║ ████╗ ████║██╔══██╗██╔════╝██╔═══██╗████╗ ██║
// ██╔████╔██║███████║██║ ██║█████╗ ██║ █╗ ██║██║ ██║ ███████║ ██╔████╔██║███████║███████╗██║ ██║██╔██╗ ██║
// ██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ██║███╗██║██║ ██║ ██╔══██║ ██║╚██╔╝██║██╔══██║╚════██║██║ ██║██║╚██╗██║
// ██║ ╚═╝ ██║██║ ██║██████╔╝███████╗ ╚███╔███╔╝██║ ██║ ██║ ██║ ██║ ╚═╝ ██║██║ ██║███████║╚██████╔╝██║ ╚████║
// ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝
pragma solidity ^0.8.13;
import "./eip/2981/ERC2981Collection.sol";
import "./mason/utils/EIP712Common.sol";
import "./mason/utils/AccessControl.sol";
import "./mason/utils/Toggleable.sol";
import "./mason/utils/Claimable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "erc721a/contracts/ERC721A.sol";
error ClaimExceedsMaxReservedSupply();
error ClaimExceedsMaxSupply();
error ExceedsMaxPerWallet();
error ExceedsMaxReservedSupply();
error ExceedsMaxSupply();
error InsufficientPayment();
error TokensAlreadyClaimed();
contract CPGPOP is ERC721A, ERC2981Collection, Ownable, AccessControl, Toggleable, EIP712Common, Claimable {
using Counters for Counters.Counter;
uint256 public MAX_SUPPLY;
uint256 public MAX_RESERVED_SUPPLY;
uint256 public MAX_PUBLIC_SUPPLY;
uint256 public MAX_PER_WALLET;
uint256 public GENESIS_MAX_PER_WALLET;
uint256 public PRICE;
uint256 public GENESIS_PRICE;
PaymentSplitter private _splitter;
constructor (
string memory _tokenName,
string memory _tokenSymbol,
string memory _customBaseURI,
address[] memory _payees,
uint256[] memory _shares,
uint256 _tokenPrice,
uint256 _tokensForSale,
uint256 _tokensReserved
) ERC721A(_tokenName, _tokenSymbol) {
customBaseURI = _customBaseURI;
MAX_SUPPLY = _tokensForSale;
MAX_RESERVED_SUPPLY = _tokensReserved;
MAX_PUBLIC_SUPPLY = MAX_SUPPLY - MAX_RESERVED_SUPPLY;
MAX_PER_WALLET = 1;
GENESIS_MAX_PER_WALLET = 2;
PRICE = _tokenPrice;
GENESIS_PRICE = _tokenPrice;
// For Secondary Royalties
_splitter = new PaymentSplitter(_payees, _shares);
_setRoyalties(address(_splitter), 10);
}
/** ==================== Mint Functions ==================== **/
// @dev Public mint function for use in the event that we decide to open the floodgates after genesis and
// allowlist users have had the opportunity to mint
function mint(uint256 _count) external payable noContracts requireActiveSale{
if(_totalMinted() - totalReservedSupply() + _count > MAX_PUBLIC_SUPPLY) revert ExceedsMaxSupply();
if(msg.value < PRICE * _count) revert InsufficientPayment();
uint256 numberMinted = _numberMinted(msg.sender);
if(numberMinted + _count > MAX_PER_WALLET) revert ExceedsMaxPerWallet();
_mint(msg.sender, _count);
}
// @dev Mint function for Community/Public Allowlist. Token price is discountable and must be validated with an
// EIP712 signature.
function whitelistMint(uint256 _discountedPrice, bytes calldata _signature) external payable requiresDiscount(_signature, _discountedPrice) noContracts requireActiveWhitelist {
if(_totalMinted() - totalReservedSupply() + 1 > MAX_PUBLIC_SUPPLY) revert ExceedsMaxSupply();
if(msg.value < _discountedPrice) revert InsufficientPayment();
if(_numberMinted(msg.sender) + 1 > MAX_PER_WALLET) revert ExceedsMaxPerWallet();
_mint(msg.sender, 1);
}
// @dev Mint function for Genesis Holders. Mints are at a fixed price, and subject to a separare minting limit.
// Eligibility is validated using EIP712,
function genesisMint(uint256 _count, bytes calldata _signature) external payable requiresWhitelist(_signature) noContracts requireActiveWhitelist {
if(_totalMinted() - totalReservedSupply() + _count > MAX_PUBLIC_SUPPLY) revert ExceedsMaxSupply();
if(msg.value < GENESIS_PRICE * _count) revert InsufficientPayment();
uint256 numberMinted = _numberMinted(msg.sender) - tokensClaimed(msg.sender);
if(numberMinted + _count > GENESIS_MAX_PER_WALLET) revert ExceedsMaxPerWallet();
_mint(msg.sender, _count);
}
// @dev Mints a number of tokens to the given address. As there are no restrictions on
// the number of tokens which can be owner-issued, we need to keep count and exclude
// the them from the publicly available supply.
function ownerMint(uint256 _count, address _recipient) external onlyOwner() {
if(totalReservedSupply() + _count > MAX_RESERVED_SUPPLY) revert ExceedsMaxReservedSupply();
_mint(_recipient, _count);
for (uint256 i = 0; i < _count;) {
reservedSupplyCounter.increment();
unchecked { ++i; }
}
}
/** ==================== Pricing ==================== **/
function checkPrice(uint256 discountedPrice, bytes calldata signature) public view requiresDiscount(signature, discountedPrice) returns (bool) {
return true;
}
function checkGenesisPrice(bytes calldata signature) public view requiresWhitelist(signature) returns (bool) {
return true;
}
/** ==================== Allowances ==================== **/
function allowedMintCount(address minter) public view returns (uint256) {
return MAX_PER_WALLET - _numberMinted(minter);
}
function genesisAllowedMintCount(address minter) public view returns (uint256) {
return GENESIS_MAX_PER_WALLET - _numberMinted(minter) + tokensClaimed(msg.sender);
}
/** ==================== Claiming ==================== **/
// @dev Supports claims of free tokens from Genesis holders. These come from the reserved allocation, allowing
// us to be flexible around the timing of the claim. Elibility is validated using EIP712.
function claimTokens(uint256 _count, bytes calldata signature) public payable requireActiveClaiming requiresClaim(signature, _count) noContracts {
if(_totalMinted() - totalReservedSupply() + _count - 1 > MAX_PUBLIC_SUPPLY) revert ClaimExceedsMaxSupply();
if(totalReservedSupply() + _count > MAX_RESERVED_SUPPLY) revert ClaimExceedsMaxReservedSupply();
if (hasUnclaimedTokens(msg.sender)) {
updateClaimCount(msg.sender, _count);
} else {
revert TokensAlreadyClaimed();
}
for (uint256 i = 0; i < _count;) {
reservedSupplyCounter.increment();
unchecked { ++i; }
}
_mint(msg.sender, _count);
}
/** ==================== Counters ==================== **/
Counters.Counter private reservedSupplyCounter;
function totalReservedSupply() public view returns (uint256) {
return reservedSupplyCounter.current();
}
/** ==================== Admin Functions ==================== **/
function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
MAX_PER_WALLET = _maxPerWallet;
}
function setGenesisMaxPerWallet(uint256 _genesisMaxPerWallet) external onlyOwner {
GENESIS_MAX_PER_WALLET = _genesisMaxPerWallet;
}
function setPrice(uint256 _tokenPrice) external onlyOwner {
PRICE = _tokenPrice;
}
function setGenesisPrice(uint256 _genesisPrice) external onlyOwner {
GENESIS_PRICE = _genesisPrice;
}
/** ==================== Whitelist ==================== **/
function checkWhitelist(bytes calldata _signature) public view requiresWhitelist(_signature) returns (bool) {
return true;
}
/** ==================== URI Handling ==================== **/
string private customBaseURI;
function baseTokenURI() public view returns (string memory) {
return customBaseURI;
}
function setBaseURI(string memory _customBaseURI) external onlyOwner {
customBaseURI = _customBaseURI;
}
function _baseURI() internal view virtual override returns (string memory) {
return customBaseURI;
}
function _startTokenId() internal view virtual override returns (uint256) {
return 1;
}
/** ==================== Payouts ==================== **/
function release() external onlyOwner {
uint256 balance = address(this).balance;
Address.sendValue(payable(owner()), balance);
}
function setRoyaltyInfo(address _royaltyAddress, uint256 _percentage) external onlyOwner {
_setRoyalties(_royaltyAddress, _percentage);
}
function releaseSplit(address payable _account) public virtual onlyOwner {
_splitter.release(_account);
}
}
ERC721A.sol 612 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// 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;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than _currentIndex - _startTokenId() times
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
// Counter underflow is impossible as _currentIndex does not decrement,
// and it is initialized to _startTokenId()
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @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 override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return uint256(_addressData[owner].balance);
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberMinted);
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberBurned);
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return _addressData[owner].aux;
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
_addressData[owner].aux = aux;
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr) if (curr < _currentIndex) {
TokenOwnership memory ownership = _ownerships[curr];
if (!ownership.burned) {
if (ownership.addr != address(0)) {
return ownership;
}
// Invariant:
// There will always be an ownership that has an address and is not burned
// before an ownership that does not have an address and is not burned.
// Hence, curr will not underflow.
while (true) {
curr--;
ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
return _ownershipOf(tokenId).addr;
}
/**
* @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) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
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 override {
address owner = ERC721A.ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_approve(to, tokenId, owner);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSender()) revert ApproveToCaller();
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_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 {
_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 {
_transfer(from, to, tokenId);
if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @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`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, '');
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
// updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
if (to.isContract()) {
do {
emit Transfer(address(0), to, updatedIndex);
if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (updatedIndex < end);
// Reentrancy protection
if (_currentIndex != startTokenId) revert();
} else {
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
}
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
// updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) private {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, from);
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
unchecked {
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = to;
currSlot.startTimestamp = uint64(block.timestamp);
// If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
// Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
// This will suffice for checking _exists(nextTokenId),
// as a burned slot cannot contain the zero address.
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
address from = prevOwnership.addr;
if (approvalCheck) {
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner
_approve(address(0), tokenId, from);
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
unchecked {
AddressData storage addressData = _addressData[from];
addressData.balance -= 1;
addressData.numberBurned += 1;
// Keep track of who burned the token, and the timestamp of burning.
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = from;
currSlot.startTimestamp = uint64(block.timestamp);
currSlot.burned = true;
// If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
// Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
// This will suffice for checking _exists(nextTokenId),
// as a burned slot cannot contain the zero address.
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* 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, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
IERC721A.sol 109 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
/**
* @dev Interface of an ERC721A compliant contract.
*/
interface IERC721A is IERC721, IERC721Metadata {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* The caller cannot approve to their own address.
*/
error ApproveToCaller();
/**
* The caller cannot approve to the current owner.
*/
error ApprovalToCurrentOwner();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
// Compiler will pack this into a single 256bit word.
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
}
// Compiler will pack this into a single 256bit word.
struct AddressData {
// Realistically, 2**64-1 is more than enough.
uint64 balance;
// Keeps track of mint count with minimal overhead for tokenomics.
uint64 numberMinted;
// Keeps track of burn count with minimal overhead for tokenomics.
uint64 numberBurned;
// For miscellaneous variable(s) pertaining to the address
// (e.g. number of whitelist mint slots used).
// If there are multiple variables, please pack them into a uint64.
uint64 aux;
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
*/
function totalSupply() external view returns (uint256);
}
IERC2981.sol 20 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
///
/// @dev Interface for the NFT Royalty Standard
///
interface IERC2981 is IERC165 {
// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
// @param _tokenId - the NFT asset queried for royalty information
// @param _salePrice - the sale price of the NFT asset specified by _tokenId
// @return receiver - address of who should be sent the royalty payment
// @return royaltyAmount - the royalty payment amount for _salePrice
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount);
}
Claimable.sol 39 lines
pragma solidity ^0.8.13;
import "./EIP712Common.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
error ClaimingNotActive();
abstract contract Claimable is Ownable, EIP712Common{
mapping(address => uint256) private claimCounts;
bool public claimingIsActive = false;
function flipClaimState() external onlyOwner {
claimingIsActive = !claimingIsActive;
}
function tokensClaimed(address minter) public view returns (uint256) {
return claimCounts[minter];
}
function checkClaimlist(uint256 count, bytes calldata signature) public view requiresClaim(signature, count) returns (bool) {
return true;
}
function hasUnclaimedTokens(address minter) public view returns (bool) {
return claimCounts[minter] == 0;
}
function updateClaimCount(address minter, uint256 count) internal {
claimCounts[minter] += count;
}
modifier requireActiveClaiming {
if(!claimingIsActive) revert ClaimingNotActive();
_;
}
}
Toggleable.sol 32 lines
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/access/Ownable.sol";
error SaleNotActive();
error WhitelistNotActive();
abstract contract Toggleable is Ownable {
bool public saleIsActive = false;
bool public whitelistIsActive = false;
function flipWhitelistState() external onlyOwner {
whitelistIsActive = !whitelistIsActive;
}
function flipSaleState() external onlyOwner {
saleIsActive = !saleIsActive;
}
modifier requireActiveSale {
if(!saleIsActive) revert SaleNotActive();
_;
}
modifier requireActiveWhitelist {
if(!whitelistIsActive) revert WhitelistNotActive();
_;
}
}
EIP712Common.sol 136 lines
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
error InvalidSignature();
error NoSigningKey();
contract EIP712Common is Ownable {
using ECDSA for bytes32;
// The key used to sign whitelist signatures.
address signingKey = address(0);
// Domain Separator is the EIP-712 defined structure that defines what contract
// and chain these signatures can be used for. This ensures people can't take
// a signature used to mint on one contract and use it for another, or a signature
// from testnet to replay on mainnet.
// It has to be created in the constructor so we can dynamically grab the chainId.
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
bytes32 public CLAIM_DOMAIN_SEPARATOR;
bytes32 public WHITELIST_DOMAIN_SEPARATOR;
bytes32 public DISCOUNT_DOMAIN_SEPARATOR;
// The typehash for the data type specified in the structured data
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash
// This should match whats in the client side whitelist signing code
// https://github.com/msfeldstein/EIP712-whitelisting/blob/main/test/signWhitelist.ts#L22
bytes32 public constant CLAIM_TYPEHASH =
keccak256("Minter(address wallet,uint256 count)");
bytes32 public constant WHITELIST_TYPEHASH =
keccak256("Minter(address wallet)");
bytes32 public constant DISCOUNT_TYPEHASH =
keccak256("Minter(address wallet, uint256 count)");
constructor() {
CLAIM_DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
),
keccak256(bytes("ClaimToken")),
keccak256(bytes("1")),
block.chainid,
address(this)
)
);
WHITELIST_DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
),
keccak256(bytes("WhitelistToken")),
keccak256(bytes("1")),
block.chainid,
address(this)
)
);
DISCOUNT_DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
),
keccak256(bytes("DiscountToken")),
keccak256(bytes("1")),
block.chainid,
address(this)
)
);
}
function setSigningAddress(address newSigningKey) public onlyOwner {
signingKey = newSigningKey;
}
modifier requiresClaim(bytes calldata signature, uint256 count) {
if(signingKey == address(0)) revert NoSigningKey();
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
CLAIM_DOMAIN_SEPARATOR,
keccak256(abi.encode(
CLAIM_TYPEHASH,
msg.sender,
count))
)
);
address recoveredAddress = digest.recover(signature);
if(recoveredAddress != signingKey) revert InvalidSignature();
_;
}
modifier requiresDiscount(bytes calldata signature, uint256 value) {
if(signingKey == address(0)) revert NoSigningKey();
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
DISCOUNT_DOMAIN_SEPARATOR,
keccak256(abi.encode(
CLAIM_TYPEHASH,
msg.sender,
value))
)
);
address recoveredAddress = digest.recover(signature);
if(recoveredAddress != signingKey) revert InvalidSignature();
_;
}
modifier requiresWhitelist(bytes calldata signature) {
if(signingKey == address(0)) revert NoSigningKey();
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
WHITELIST_DOMAIN_SEPARATOR,
keccak256(abi.encode(WHITELIST_TYPEHASH, msg.sender))
)
);
address recoveredAddress = digest.recover(signature);
if(recoveredAddress != signingKey) revert InvalidSignature();
_;
}
}
AccessControl.sol 12 lines
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.13;
error ContractsCannotMint();
abstract contract AccessControl {
modifier noContracts {
if(msg.sender != tx.origin) revert ContractsCannotMint();
_;
}
}
ERC2981Collection.sol 28 lines
pragma solidity >=0.8.0 <0.9.0;
import "./IERC2981.sol";
abstract contract ERC2981Collection is IERC2981 {
address private royaltyAddress;
uint256 private royaltyPercent;
function _setRoyalties(address _receiver, uint256 _percentage) internal {
royaltyAddress = _receiver;
royaltyPercent = _percentage;
}
// Override for royaltyInfo(uint256, uint256)
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view override(IERC2981) returns (
address receiver,
uint256 royaltyAmount
) {
receiver = royaltyAddress;
// This sets percentages by price * percentage / 100
royaltyAmount = _salePrice * royaltyPercent / 100;
}
}
Address.sol 217 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
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 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Strings.sol 67 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/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() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Counters.sol 43 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/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;
}
PaymentSplitter.sol 189 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
require(payees.length > 0, "PaymentSplitter: no payees");
for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares_[i]);
}
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable virtual {
emit PaymentReceived(_msgSender(), msg.value);
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
return _totalShares;
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
return _totalReleased;
}
/**
* @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
return _erc20TotalReleased[token];
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
return _shares[account];
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
return _released[account];
}
/**
* @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
return _erc20Released[token][account];
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
return _payees[index];
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = address(this).balance + totalReleased();
uint256 payment = _pendingPayment(account, totalReceived, released(account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_released[account] += payment;
_totalReleased += payment;
Address.sendValue(account, payment);
emit PaymentReleased(account, payment);
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
uint256 payment = _pendingPayment(account, totalReceived, released(token, account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_erc20Released[token][account] += payment;
_erc20TotalReleased[token] += payment;
SafeERC20.safeTransfer(token, account, payment);
emit ERC20PaymentReleased(token, account, payment);
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
require(account != address(0), "PaymentSplitter: account is the zero address");
require(shares_ > 0, "PaymentSplitter: shares are 0");
require(_shares[account] == 0, "PaymentSplitter: account already has shares");
_payees.push(account);
_shares[account] = shares_;
_totalShares = _totalShares + shares_;
emit PayeeAdded(account, shares_);
}
}
ECDSA.sol 234 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @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 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
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;
}
}
SafeERC20.sol 99 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
IERC721Metadata.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
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);
}
Read Contract
CLAIM_DOMAIN_SEPARATOR 0x6d4a450a → bytes32
CLAIM_TYPEHASH 0x6b0509b1 → bytes32
DISCOUNT_DOMAIN_SEPARATOR 0x9c79e527 → bytes32
DISCOUNT_TYPEHASH 0x212e9a0f → bytes32
GENESIS_MAX_PER_WALLET 0x517e01e3 → uint256
GENESIS_PRICE 0xb85f3fb8 → uint256
MAX_PER_WALLET 0x0f2cdd6c → uint256
MAX_PUBLIC_SUPPLY 0x2a47f799 → uint256
MAX_RESERVED_SUPPLY 0xdfe0ce18 → uint256
MAX_SUPPLY 0x32cb6b0c → uint256
PRICE 0x8d859f3e → uint256
WHITELIST_DOMAIN_SEPARATOR 0xdb1354d2 → bytes32
WHITELIST_TYPEHASH 0x6301dccf → bytes32
allowedMintCount 0xbb660c0a → uint256
balanceOf 0x70a08231 → uint256
baseTokenURI 0xd547cfb7 → string
checkClaimlist 0xbece913b → bool
checkGenesisPrice 0x4d5fa2f7 → bool
checkPrice 0xd30d5e4b → bool
checkWhitelist 0xe0ad790c → bool
claimingIsActive 0x07cf3a77 → bool
genesisAllowedMintCount 0x71c79a23 → uint256
getApproved 0x081812fc → address
hasUnclaimedTokens 0xb3feb36d → bool
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
royaltyInfo 0x2a55205a → address, uint256
saleIsActive 0xeb8d2444 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
tokensClaimed 0x624601b6 → uint256
totalReservedSupply 0x674d13c8 → uint256
totalSupply 0x18160ddd → uint256
whitelistIsActive 0x1fe70d6f → bool
Write Contract 24 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
claimTokens 0x14d8bbf1
uint256 _count
bytes signature
flipClaimState 0x6d60e6c1
No parameters
flipSaleState 0x34918dfd
No parameters
flipWhitelistState 0xf6fa26ab
No parameters
genesisMint 0xbcee4106
uint256 _count
bytes _signature
mint 0xa0712d68
uint256 _count
ownerMint 0xd52c57e0
uint256 _count
address _recipient
release 0x86d1a69f
No parameters
releaseSplit 0xa3e51158
address _account
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 _customBaseURI
setGenesisMaxPerWallet 0xe202e3ec
uint256 _genesisMaxPerWallet
setGenesisPrice 0x61f36462
uint256 _genesisPrice
setMaxPerWallet 0xe268e4d3
uint256 _maxPerWallet
setPrice 0x91b7f5ed
uint256 _tokenPrice
setRoyaltyInfo 0xe2e784d5
address _royaltyAddress
uint256 _percentage
setSigningAddress 0x31beb605
address newSigningKey
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistMint 0x9e852f75
uint256 _discountedPrice
bytes _signature
Recent Transactions
No transactions found for this address