Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xa0938fF8cA4B1B081d9386180f2f38cD8FCB9b9f
Balance 0 ETH
Nonce 1
Code Size 16123 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16123 bytes
0x6080604052600436106103ea575f3560e01c80637bd4f0711161020a578063c87b56dd1161011e578063e8656fcc116100a8578063f2fde38b11610078578063f2fde38b14610bfd578063f30874ea14610c1c578063f34657ec14610c31578063f72171f114610c5e578063fea414b614610c7d575f80fd5b8063e8656fcc14610b98578063e985e9c514610bac578063ebf39a4114610bcb578063efe8232814610bde575f80fd5b8063e213b5f6116100ee578063e213b5f614610aeb578063e5fd114514610afe578063e6087db014610b29578063e690f9eb14610b54578063e6a72acf14610b6d575f80fd5b8063c87b56dd14610a75578063ce55c66a14610a94578063d5abeb0114610aa8578063db0dbb7114610abd575f80fd5b8063a22cb4651161019f578063ae4e49421161016f578063ae4e4942146109e6578063b3978a8614610a05578063b80f8fb414610a24578063b88d4fde14610a43578063c82e474b14610a56575f80fd5b8063a22cb46514610975578063a75c3ad914610994578063a8ddf8f6146109a8578063a9fc664e146109c7575f80fd5b806393a24841116101da57806393a248411461090657806395d89b41146109235780639ad4d529146109375780639e05d24014610956575f80fd5b80637bd4f0711461089757806380348242146108b65780638da5cb5b146108d5578063905d7b33146108f2575f80fd5b806324a663c311610301578063581636dd1161029657806363691c931161026657806363691c93146107fd5780636c0360eb1461081c5780636e75e2e21461083057806370a0823114610864578063715018a614610883575f80fd5b8063581636dd146107805780635944c7531461079f5780636221d13c146107be5780636352211e146107de575f80fd5b806342842e0e116102d157806342842e0e14610710578063483f0a82146107235780634a5bd2fd1461074257806355f804b314610761575f80fd5b806324a663c3146106695780632a55205a1461069457806331f72d77146106d257806341275358146106f1575f80fd5b80630d705df61161038257806317d791d01161035257806317d791d0146105b157806318160ddd146105e45780631f466342146105f857806322536c031461061757806323b872dd14610656575f80fd5b80630d705df61461052d5780630ed64eff1461055457806311f7acb91461056757806316da3bc614610586575f80fd5b806306fdde03116103bd57806306fdde03146104c6578063081812fc146104e7578063095ea7b314610506578063098144d414610519575f80fd5b806301463546146103ee57806301d2718e1461043257806301ffc9a71461047657806304634d8d146104a5575b5f80fd5b3480156103f9575f80fd5b5061041573721c008fdff27bf06e7e123956e2fe03b63342e381565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561043d575f80fd5b5061046861044c3660046135c5565b601a60209081525f928352604080842090915290825290205481565b604051908152602001610429565b348015610481575f80fd5b50610495610490366004613608565b610c9d565b6040519015158152602001610429565b3480156104b0575f80fd5b506104c46104bf36600461363e565b610cbc565b005b3480156104d1575f80fd5b506104da610cd2565b60405161042991906136be565b3480156104f2575f80fd5b506104156105013660046136d0565b610d62565b6104c46105143660046136e7565b610da4565b348015610524575f80fd5b50610415610e42565b348015610538575f80fd5b506040805163657711f560e11b81526001602082015201610429565b610468610562366004613711565b610e7c565b348015610572575f80fd5b506104c4610581366004613711565b610f86565b348015610591575f80fd5b506104686105a03660046136d0565b60156020525f908152604090205481565b3480156105bc575f80fd5b506104687f000000000000000000000000000000000000000000000000000000000000012c81565b3480156105ef575f80fd5b506104686110a5565b348015610603575f80fd5b506104c4610612366004613731565b6110b1565b348015610622575f80fd5b50610636610631366004613711565b61115a565b604080519485526020850193909352918301526060820152608001610429565b6104c461066436600461374c565b6111be565b348015610674575f80fd5b506104686106833660046136d0565b60176020525f908152604090205481565b34801561069f575f80fd5b506106b36106ae366004613711565b611367565b604080516001600160a01b039093168352602083019190915201610429565b3480156106dd575f80fd5b506104c46106ec3660046136d0565b611411565b3480156106fc575f80fd5b50601154610415906001600160a01b031681565b6104c461071e36600461374c565b61141e565b34801561072e575f80fd5b5061046861073d3660046136d0565b61143d565b34801561074d575f80fd5b5061049561075c3660046136d0565b61145c565b34801561076c575f80fd5b506104c461077b366004613824565b6114ac565b34801561078b575f80fd5b506104c461079a36600461395d565b6114f2565b3480156107aa575f80fd5b506104c46107b93660046139c5565b61158a565b3480156107c9575f80fd5b5060085461049590600160a81b900460ff1681565b3480156107e9575f80fd5b506104156107f83660046136d0565b61159d565b348015610808575f80fd5b50601354610415906001600160a01b031681565b348015610827575f80fd5b506104da6115a7565b34801561083b575f80fd5b5061046861084a366004613731565b6001600160a01b03165f908152600c602052604090205490565b34801561086f575f80fd5b5061046861087e366004613731565b611633565b34801561088e575f80fd5b506104c4611680565b3480156108a2575f80fd5b506104c46108b1366004613711565b611693565b3480156108c1575f80fd5b506104c46108d0366004613711565b6116ea565b3480156108e0575f80fd5b50600b546001600160a01b0316610415565b3480156108fd575f80fd5b506104c4611762565b348015610911575f80fd5b506014546001600160a01b0316610415565b34801561092e575f80fd5b506104da611790565b348015610942575f80fd5b506104c4610951366004613731565b61179f565b348015610961575f80fd5b506104c4610970366004613a0d565b6117c9565b348015610980575f80fd5b506104c461098f366004613a28565b61181e565b34801561099f575f80fd5b506104c4611896565b3480156109b3575f80fd5b506104c46109c2366004613a0d565b6118ab565b3480156109d2575f80fd5b506104c46109e1366004613731565b611942565b3480156109f1575f80fd5b50601254610415906001600160a01b031681565b348015610a10575f80fd5b506104c4610a1f366004613a54565b6119fb565b348015610a2f575f80fd5b50610468610a3e3660046136d0565b611a95565b6104c4610a51366004613a70565b611ac0565b348015610a61575f80fd5b506104c4610a70366004613711565b611b04565b348015610a80575f80fd5b506104da610a8f3660046136d0565b611b72565b348015610a9f575f80fd5b50610468611bf3565b348015610ab3575f80fd5b50610468600d5481565b348015610ac8575f80fd5b50610495610ad73660046136d0565b601b6020525f908152604090205460ff1681565b610468610af9366004613aeb565b611c38565b348015610b09575f80fd5b50610468610b183660046136d0565b60186020525f908152604090205481565b348015610b34575f80fd5b50610468610b433660046136d0565b601c6020525f908152604090205481565b348015610b5f575f80fd5b50600e546104959060ff1681565b348015610b78575f80fd5b50610468610b873660046136d0565b60166020525f908152604090205481565b348015610ba3575f80fd5b50610495611e49565b348015610bb7575f80fd5b50610495610bc6366004613b4b565b611e76565b610468610bd9366004613b77565b611ed9565b348015610be9575f80fd5b50601454610415906001600160a01b031681565b348015610c08575f80fd5b506104c4610c17366004613731565b612093565b348015610c27575f80fd5b50610468600f5481565b348015610c3c575f80fd5b50610c50610c4b366004613b77565b612109565b604051610429929190613bad565b348015610c69575f80fd5b50610c50610c78366004613bc7565b6123dd565b348015610c88575f80fd5b50335f908152600c6020526040902054610468565b5f610ca78261276c565b80610cb65750610cb6826127ab565b92915050565b610cc46127df565b610cce8282612839565b5050565b606060028054610ce190613c0e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0d90613c0e565b8015610d585780601f10610d2f57610100808354040283529160200191610d58565b820191905f5260205f20905b815481529060010190602001808311610d3b57829003601f168201915b5050505050905090565b5f610d6c826128f3565b610d89576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610dae8261159d565b9050336001600160a01b03821614610de757610dca8133611e76565b610de7576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60085461010090046001600160a01b031680610e795760085460ff16610e79575073721c008fdff27bf06e7e123956e2fe03b63342e35b90565b5f8181526015602090815260408083205433845260198352818420858552909252822054610eaa9085613c54565b1115610f0557335f9081526019602090815260408083208584528252808320546015909252909120548491610ede91613c67565b6040516303e635fb60e11b8152600481019290925260248201526044015b60405180910390fd5b335f90815260196020908152604080832085845290915281208054859290610f2e908490613c54565b90915550610f3f9050338484612925565b604080518581526020810185905291925033917f2e8ac5177a616f2aec08c3048f5021e4e9743ece034e8d83ba5caf76688bb475910160405180910390a2610cb681612caf565b610f8e6127df565b610f9782612d37565b610fa457610fa482612d7f565b5f805b601d548110156110275783601d8281548110610fc557610fc5613c7a565b905f5260205f20015403610fe457610fdd8383613c54565b915061101f565b60175f601d8381548110610ffa57610ffa613c7a565b905f5260205f20015481526020019081526020015f20548261101c9190613c54565b91505b600101610fa7565b50600d548111156110935760405163e066a8d760e01b815260206004820152602f60248201527f4e657720737570706c7920706572206d696e742067726f75702065786365656460448201526e39903a37ba30b61039bab838363c9760891b6064820152608401610efc565b505f9182526017602052604090912055565b6001545f54035f190190565b6013546001600160a01b031633146110de5760405163472511eb60e11b8152336004820152602401610efc565b6001600160a01b0381166111055760405163547e168960e01b815260040160405180910390fd5b601480546001600160a01b0319166001600160a01b0383169081179091556040519081527f65b193217dd691927510cfa45296799f4dc5a6b0d113a7f1863661cd57b1587f906020015b60405180910390a150565b5f82815260166020526040812054819081908190611179908690613c8e565b925084611184611bf3565b61118e9190613c8e565b9150606461119d846003613c8e565b6111a79190613ca5565b90506111b38284613c54565b935092959194509250565b5f6111c882612de1565b9050836001600160a01b0316816001600160a01b0316146111fb5760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054338082146001600160a01b038816909114176112475761122a8633611e76565b61124757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661126e57604051633a954ecd60e21b815260040160405180910390fd5b61127b8686866001612e4a565b8015611285575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b8416900361131157600184015f81815260046020526040812054900361130f575f54811461130f575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461135f8686866001612e77565b505050505050565b5f828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916113db5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f90612710906113f9906001600160601b031687613c8e565b6114039190613ca5565b915196919550909350505050565b6114196127df565b600f55565b61143883838360405180602001604052805f815250611ac0565b505050565b601d818154811061144c575f80fd5b5f91825260209091200154905081565b5f818152601b602052604081205460ff166114a4575f828152601c6020526040902054158061149857505f828152601c60205260409020544211155b156114a457505f919050565b506001919050565b6114b46127df565b60106114c08282613d08565b506040515f19906001907f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c905f90a350565b6114fa6127df565b61150382612d37565b6115105761151082612d7f565b5f5b83518110156115845781818151811061152d5761152d613c7a565b6020026020010151601a5f8581526020019081526020015f205f86848151811061155957611559613c7a565b6020908102919091018101516001600160a01b031682528101919091526040015f2055600101611512565b50505050565b6115926127df565b611438838383612e9d565b5f610cb682612de1565b601080546115b490613c0e565b80601f01602080910402602001604051908101604052809291908181526020018280546115e090613c0e565b801561162b5780601f106116025761010080835404028352916020019161162b565b820191905f5260205f20905b81548152906001019060200180831161160e57829003601f168201915b505050505081565b5f6001600160a01b03821661165b576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f9081526005602052604090205467ffffffffffffffff1690565b6116886127df565b6116915f612f67565b565b61169b6127df565b5f8181526015602090815260409182902084905581518481529081018390527fd6255c9c7b77c2a54f193e4634719645ef0fbdc4816638350b099b15a4ebca7f91015b60405180910390a15050565b6116f26127df565b6116fb81612d37565b61171b57604051635831017d60e01b815260048101829052602401610efc565b5f818152601c602090815260409182902084905581518481529081018390527fb024af7f651e94348c4e66cfe71f68a3f246eff857f95f105766bc15f4ea84fc91016116de565b601254611777906001600160a01b0316612fb8565b5060115461178d906001600160a01b0316612fb8565b50565b606060038054610ce190613c0e565b6117a76127df565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6117d1613070565b60088054821515600160a81b0260ff60a81b199091161790556040517f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc9061114f90831515815260200190565b335f8181526007602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161188a911515815260200190565b60405180910390a35050565b60115461178d906001600160a01b0316612fb8565b6118b36127df565b600e5481151560ff9091161515036119215760405163e066a8d760e01b815260206004820152602a60248201527f4d696e742073746174757320697320616c726561647920746865206f6e6520796044820152691bdd48195b9d195c995960b21b6064820152608401610efc565b8015155f0361192f575f600f555b600e805460ff1916911515919091179055565b61194a613070565b6001600160a01b038116803b15159015801590611965575080155b15611983576040516332483afb60e01b815260040160405180910390fd5b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6119ac610e42565b604080516001600160a01b03928316815291851660208301520160405180910390a1600880546001600160a01b038416610100026001600160a81b0319909116176001179055610cce82613078565b611a036127df565b611a0c81612d37565b611a2c57604051635831017d60e01b815260048101829052602401610efc565b5f818152601b60205260408120805460ff19168415159081179091559003611a5d575f818152601c60205260408120555b604080518315158152602081018390527fd88af4ad8d3188d34ada8f4e850b4b6b3b2610392d5c8ffffa63b28ae831da5491016116de565b5f606482611aa1611bf3565b611aab9190613c8e565b611ab690600b613c8e565b610cb69190613ca5565b611acb8484846111be565b6001600160a01b0383163b1561158457611ae7848484846130f6565b611584576040516368d2bf6b60e11b815260040160405180910390fd5b611b0c6127df565b611b1581612d37565b611b2257611b2281612d7f565b5f81815260166020526040908190208390555181907fa7e52343431f792020e7cb8411a08014688ca11782fd5709fa2531b3d74ba45790611b669085815260200190565b60405180910390a25050565b6060611b7d826128f3565b611b9a57604051630a14c4b560e41b815260040160405180910390fd5b5f611ba36131de565b905080515f03611bc15760405180602001604052805f815250611bec565b80611bcb846131ed565b604051602001611bdc929190613dc4565b6040516020818303038152906040525b9392505050565b5f60647f000000000000000000000000000000000000000000000000000000000000012c611c1f613230565b611c299190613c8e565b611c339190613ca5565b905090565b5f611c416127df565b8151835114611ca35760405163e066a8d760e01b815260206004820152602760248201527f4d69736d61746368206265747765656e20726563697069656e747320616e6420604482015266616d6f756e747360c81b6064820152608401610efc565b5f805b8351811015611cde57838181518110611cc157611cc1613c7a565b602002602001015182611cd49190613c54565b9150600101611ca6565b50611ce881611a95565b915081341015611d505760405163e066a8d760e01b815260206004820152602c60248201527f4e6f7420656e6f7567682045746865722073656e7420666f722074686520616960448201526b7264726f702063686172676560a01b6064820152608401610efc565b6011546001600160a01b03165f908152600c602052604081208054849290611d79908490613c54565b909155505f90505b8451811015611e38575f848281518110611d9d57611d9d613c7a565b60200260200101519050600d5481611db36110a5565b611dbd9190613c54565b1115611e0c5760405163e066a8d760e01b815260206004820152601a60248201527f41697264726f702065786365656473206d617820737570706c790000000000006044820152606401610efc565b611e2f868381518110611e2157611e21613c7a565b60200260200101518261329b565b50600101611d81565b50611e4282612caf565b5092915050565b600e545f9060ff16611e7057600f541580611e665750600f544211155b15611e7057505f90565b50600190565b6001600160a01b038281165f9081526007602090815260408083209385168352929052205460ff1680610cb657600854600160a81b900460ff1615610cb657611ebd610e42565b6001600160a01b0316826001600160a01b031614905092915050565b604051638988eea960e01b81523360048201526001600160a01b03821660248201523060448201525f60648201819052906c447e69651d841bd8d104bed49390638988eea990608401602060405180830381865afa158015611f3d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f619190613df2565b611f895760405163472511eb60e11b81526001600160a01b0383166004820152602401610efc565b5f838152601560209081526040808320546001600160a01b03861684526019835281842087855290925290912054611fc19086613c54565b1115611ffe576001600160a01b0382165f9081526019602090815260408083208684528252808320546015909252909120548591610ede91613c67565b6001600160a01b0382165f90815260196020908152604080832086845290915281208054869290612030908490613c54565b909155506120419050828585612925565b604080518681526020810186905291925033916001600160a01b038516917fce55cbb6a167cf85969795eda1f8d0a2e0152274849017210ca560bd3c963f7f910160405180910390a3611bec81612caf565b61209b6127df565b6001600160a01b0381166121005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610efc565b61178d81612f67565b5f828152601560209081526040808320546001600160a01b038516845260198352818420868552909252822054606091906121449087613c54565b111561217d575050604080518082019091526013815272115e18d959591cd3585e14195c95d85b1b195d606a1b60208201525f906123d5565b845f036121b457505060408051808201909152601081526f24b73b30b634b227b832b930ba34b7b760811b60208201525f906123d5565b6121bc611e49565b6121ec57505060408051808201909152600c81526b4d696e74496e61637469766560a01b60208201525f906123d5565b5f848152601b602052604090205460ff1661225e575f848152601c6020526040902054158061222857505f848152601c60205260409020544211155b1561225e5750506040805180820190915260118152704d696e7447726f7570496e61637469766560781b60208201525f906123d5565b8315612311575f848152601a602090815260408083206001600160a01b038716845290915281205490036122b857505060408051808201909152600c81526b4e6f74496e50726573616c6560a01b60208201525f906123d5565b5f848152601a602090815260408083206001600160a01b038716845290915290205485111561231157505060408051808201909152601081526f457863656564734d696e7451756f746160801b60208201525f906123d5565b5f84815260176020908152604080832054601890925290912054612336908790613c54565b1115612375575050604080518082019091526019815278457863656564734d61784d696e7447726f7570537570706c7960381b60208201525f906123d5565b600d54856123816110a5565b61238b9190613c54565b11156123c157505060408051808201909152601081526f457863656564734d6178537570706c7960801b60208201525f906123d5565b505060408051602081019091525f81526001905b935093915050565b604051638988eea960e01b81526001600160a01b038083166004830152831660248201523060448201525f60648201819052906060906c447e69651d841bd8d104bed49390638988eea990608401602060405180830381865afa158015612446573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061246a9190613df2565b61249a57505060408051808201909152600c81526b155b985d5d1a1bdc9a5e995960a21b60208201525f90612763565b5f858152601560209081526040808320546001600160a01b038816845260198352818420898552909252909120546124d29088613c54565b111561250b575050604080518082019091526013815272115e18d959591cd3585e14195c95d85b1b195d606a1b60208201525f90612763565b855f0361254257505060408051808201909152601081526f24b73b30b634b227b832b930ba34b7b760811b60208201525f90612763565b61254a611e49565b61257a57505060408051808201909152600c81526b4d696e74496e61637469766560a01b60208201525f90612763565b5f858152601b602052604090205460ff166125ec575f858152601c602052604090205415806125b657505f858152601c60205260409020544211155b156125ec5750506040805180820190915260118152704d696e7447726f7570496e61637469766560781b60208201525f90612763565b841561269f575f858152601a602090815260408083206001600160a01b0388168452909152812054900361264657505060408051808201909152600c81526b4e6f74496e50726573616c6560a01b60208201525f90612763565b5f858152601a602090815260408083206001600160a01b038816845290915290205486111561269f57505060408051808201909152601081526f457863656564734d696e7451756f746160801b60208201525f90612763565b5f858152601760209081526040808320546018909252909120546126c4908890613c54565b1115612703575050604080518082019091526019815278457863656564734d61784d696e7447726f7570537570706c7960381b60208201525f90612763565b600d548661270f6110a5565b6127199190613c54565b111561274f57505060408051808201909152601081526f457863656564734d6178537570706c7960801b60208201525f90612763565b505060408051602081019091525f81526001905b94509492505050565b5f6001600160e01b03198216632b435fdb60e21b148061279c57506001600160e01b0319821663503e914d60e11b145b80610cb65750610cb6826132b4565b5f6001600160e01b0319821663152a902d60e11b1480610cb657506301ffc9a760e01b6001600160e01b0319831614610cb6565b600b546001600160a01b031633146116915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610efc565b6127106001600160601b03821611156128645760405162461bcd60e51b8152600401610efc90613e0d565b6001600160a01b0382166128ba5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610efc565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b5f8160011115801561290557505f5482105b8015610cb65750505f90815260046020526040902054600160e01b161590565b5f825f036129765760405163e066a8d760e01b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610efc565b61297e611e49565b61299b57604051630d0ca57160e21b815260040160405180910390fd5b5f828152601b602052604090205460ff166129f8575f828152601c602052604090205415806129d757505f828152601c60205260409020544211155b156129f857604051632bf6312360e01b815260048101839052602401610efc565b8115612af8575f828152601a602090815260408083206001600160a01b03881684529091528120549003612a515760405163043374df60e21b81526001600160a01b038516600482015260248101839052604401610efc565b5f828152601a602090815260408083206001600160a01b0388168452909152902054831115612ac1575f828152601a602090815260408083206001600160a01b03881684529091529081902054905163ed0fcc5760e01b8152610efc918591600401918252602082015260400190565b5f828152601a602090815260408083206001600160a01b038816845290915281208054859290612af2908490613c67565b90915550505b5f82815260176020908152604080832054601890925290912054612b1d908590613c54565b1115612b6a575f828152601860209081526040808320546017909252909120548491612b4891613c67565b60405163cc3f2f1b60e01b815260048101929092526024820152604401610efc565b600d5483612b766110a5565b612b809190613c54565b1115612bbe5782612b8f6110a5565b600d54612b9c9190613c67565b60405163adc3cee560e01b815260048101929092526024820152604401610efc565b5f805f80612bcc868861115a565b935093509350935083341015612bfe5760405163c108422360e01b815260048101859052346024820152604401610efc565b5f612c098284613c54565b6011546001600160a01b03165f908152600c6020526040812080549293508392909190612c37908490613c54565b90915550612c4790508285613c67565b6012546001600160a01b03165f908152600c602052604081208054909190612c70908490613c54565b90915550505f87815260186020526040812080548a9290612c92908490613c54565b90915550612ca29050338961329b565b5092979650505050505050565b5f612cba8234613c67565b90508015610cce576040515f90339083908381818185875af1925050503d805f8114612d01576040519150601f19603f3d011682016040523d82523d5f602084013e612d06565b606091505b505090508061143857335f908152600c602052604081208054849290612d2d908490613c54565b9091555050505050565b5f805b601d54811015612d775782601d8281548110612d5857612d58613c7a565b905f5260205f20015403612d6f5750600192915050565b600101612d3a565b505f92915050565b5f818152601660209081526040808320839055601582528083208390556017825280832083905560189091528120819055601d805460018101825591527f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f0155565b5f8180600111612e31575f54811015612e31575f8181526004602052604081205490600160e01b82169003612e2f575b805f03611bec57505f19015f81815260046020526040902054612e11565b505b604051636f96cda160e11b815260040160405180910390fd5b5f5b81811015612e7057612e688585612e638487613c54565b613301565b600101612e4c565b5050505050565b5f5b81811015612e7057612e958585612e908487613c54565b613357565b600101612e79565b6127106001600160601b0382161115612ec85760405162461bcd60e51b8152600401610efc90613e0d565b6001600160a01b038216612f1e5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610efc565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182525f968752600a90529190942093519051909116600160a01b029116179055565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0381165f818152600c6020526040808220805490839055905190929083908381818185875af1925050503d805f8114613013576040519150601f19603f3d011682016040523d82523d5f602084013e613018565b606091505b505090508061306a5760405163e066a8d760e01b815260206004820152601860248201527f5769746864726177205472616e73666572204661696c656400000000000000006044820152606401610efc565b50919050565b6116916127df565b6001600160a01b0381161561178d57803b8015610cce576040805163fb2de5d760e01b81523060048201526102d1602482015290516001600160a01b0384169163fb2de5d7916044808301925f92919082900301818387803b1580156130dc575f80fd5b505af19250505080156130ed575060015b15610cce575050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a029061312a903390899088908890600401613e57565b6020604051808303815f875af1925050508015613164575060408051601f3d908101601f1916820190925261316191810190613e93565b60015b6131c0573d808015613191576040519150601f19603f3d011682016040523d82523d5f602084013e613196565b606091505b5080515f036131b8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060108054610ce190613c0e565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806132065750819003601f19909101908152919050565b60145460408051635a04434360e11b815290515f926001600160a01b03169163b40886869160048083019260209291908290030181865afa158015613277573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c339190613eae565b610cce828260405180602001604052805f81525061339e565b5f6301ffc9a760e01b6001600160e01b0319831614806132e457506380ac58cd60e01b6001600160e01b03198316145b80610cb65750506001600160e01b031916635b5e139f60e01b1490565b6001600160a01b03838116159083161581801561331b5750805b1561333957604051635cbd944160e01b815260040160405180910390fd5b8115613345575b612e70565b8061334057612e703386868634613400565b6001600160a01b0383811615908316158180156133715750805b1561338f57604051635cbd944160e01b815260040160405180910390fd5b81613340578061334057612e70565b6133a883836134a4565b6001600160a01b0383163b15611438575f548281035b6133d05f8683806001019450866130f6565b6133ed576040516368d2bf6b60e11b815260040160405180910390fd5b8181106133be57815f5414612e70575f80fd5b5f613409610e42565b90506001600160a01b0381161561135f576001600160a01b03811633036134305750612e70565b60405163657711f560e11b81526001600160a01b038781166004830152868116602483015285811660448301526064820185905282169063caee23ea906084015f6040518083038186803b158015613486575f80fd5b505afa158015613498573d5f803e3d5ffd5b50505050505050505050565b5f8054908290036134c85760405163b562e8dd60e01b815260040160405180910390fd5b6134d45f848385612e4a565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146135805780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a460010161354a565b50815f036135a057604051622e076360e81b815260040160405180910390fd5b5f9081556114389150848385612e77565b6001600160a01b038116811461178d575f80fd5b5f80604083850312156135d6575f80fd5b8235915060208301356135e8816135b1565b809150509250929050565b6001600160e01b03198116811461178d575f80fd5b5f60208284031215613618575f80fd5b8135611bec816135f3565b80356001600160601b0381168114613639575f80fd5b919050565b5f806040838503121561364f575f80fd5b823561365a816135b1565b915061366860208401613623565b90509250929050565b5f5b8381101561368b578181015183820152602001613673565b50505f910152565b5f81518084526136aa816020860160208601613671565b601f01601f19169290920160200192915050565b602081525f611bec6020830184613693565b5f602082840312156136e0575f80fd5b5035919050565b5f80604083850312156136f8575f80fd5b8235613703816135b1565b946020939093013593505050565b5f8060408385031215613722575f80fd5b50508035926020909101359150565b5f60208284031215613741575f80fd5b8135611bec816135b1565b5f805f6060848603121561375e575f80fd5b8335613769816135b1565b92506020840135613779816135b1565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156137c7576137c761378a565b604052919050565b5f67ffffffffffffffff8311156137e8576137e861378a565b6137fb601f8401601f191660200161379e565b905082815283838301111561380e575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215613834575f80fd5b813567ffffffffffffffff81111561384a575f80fd5b8201601f8101841361385a575f80fd5b6131d6848235602084016137cf565b5f67ffffffffffffffff8211156138825761388261378a565b5060051b60200190565b5f82601f83011261389b575f80fd5b813560206138b06138ab83613869565b61379e565b8083825260208201915060208460051b8701019350868411156138d1575f80fd5b602086015b848110156138f65780356138e9816135b1565b83529183019183016138d6565b509695505050505050565b5f82601f830112613910575f80fd5b813560206139206138ab83613869565b8083825260208201915060208460051b870101935086841115613941575f80fd5b602086015b848110156138f65780358352918301918301613946565b5f805f6060848603121561396f575f80fd5b833567ffffffffffffffff80821115613986575f80fd5b6139928783880161388c565b94506020860135935060408601359150808211156139ae575f80fd5b506139bb86828701613901565b9150509250925092565b5f805f606084860312156139d7575f80fd5b8335925060208401356139e9816135b1565b91506139f760408501613623565b90509250925092565b801515811461178d575f80fd5b5f60208284031215613a1d575f80fd5b8135611bec81613a00565b5f8060408385031215613a39575f80fd5b8235613a44816135b1565b915060208301356135e881613a00565b5f8060408385031215613a65575f80fd5b823561370381613a00565b5f805f8060808587031215613a83575f80fd5b8435613a8e816135b1565b93506020850135613a9e816135b1565b925060408501359150606085013567ffffffffffffffff811115613ac0575f80fd5b8501601f81018713613ad0575f80fd5b613adf878235602084016137cf565b91505092959194509250565b5f8060408385031215613afc575f80fd5b823567ffffffffffffffff80821115613b13575f80fd5b613b1f8683870161388c565b93506020850135915080821115613b34575f80fd5b50613b4185828601613901565b9150509250929050565b5f8060408385031215613b5c575f80fd5b8235613b67816135b1565b915060208301356135e8816135b1565b5f805f60608486031215613b89575f80fd5b83359250602084013591506040840135613ba2816135b1565b809150509250925092565b8215158152604060208201525f6131d66040830184613693565b5f805f8060808587031215613bda575f80fd5b84359350602085013592506040850135613bf3816135b1565b91506060850135613c03816135b1565b939692955090935050565b600181811c90821680613c2257607f821691505b60208210810361306a57634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610cb657610cb6613c40565b81810381811115610cb657610cb6613c40565b634e487b7160e01b5f52603260045260245ffd5b8082028115828204841417610cb657610cb6613c40565b5f82613cbf57634e487b7160e01b5f52601260045260245ffd5b500490565b601f82111561143857805f5260205f20601f840160051c81016020851015613ce95750805b601f840160051c820191505b81811015612e70575f8155600101613cf5565b815167ffffffffffffffff811115613d2257613d2261378a565b613d3681613d308454613c0e565b84613cc4565b602080601f831160018114613d69575f8415613d525750858301515b5f19600386901b1c1916600185901b17855561135f565b5f85815260208120601f198616915b82811015613d9757888601518255948401946001909101908401613d78565b5085821015613db457878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f8351613dd5818460208801613671565b835190830190613de9818360208801613671565b01949350505050565b5f60208284031215613e02575f80fd5b8151611bec81613a00565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90613e8990830184613693565b9695505050505050565b5f60208284031215613ea3575f80fd5b8151611bec816135f3565b5f60208284031215613ebe575f80fd5b505191905056fea2646970667358221220a66b26440d30e9a27315f0072b6c55055f1c6d2b4c63f9003c233600463503d664736f6c63430008180033

Verified Source Code Partial Match

Compiler: v0.8.24+commit.e11b9ed9 EVM: cancun Optimization: Yes (200 runs)
megafknwizards.sol 3706 lines
// Sources flattened with hardhat v2.24.1 https://hardhat.org

// SPDX-License-Identifier: Apache-2.0 AND CC0-1.0 AND MIT AND UNLICENSED

// File @openzeppelin/contracts/utils/[email protected]

// Original license: 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;
    }
}


// File @limitbreak/creator-token-standards/src/access/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

abstract contract OwnablePermissions is Context {
    function _requireCallerIsContractOwner() internal view virtual;
}


// File @limitbreak/creator-token-standards/src/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @title AutomaticValidatorTransferApproval
 * @author Limit Break, Inc.
 * @notice Base contract mix-in that provides boilerplate code giving the contract owner the
 *         option to automatically approve a 721-C transfer validator implementation for transfers.
 */
abstract contract AutomaticValidatorTransferApproval is OwnablePermissions {

    /// @dev Emitted when the automatic approval flag is modified by the creator.
    event AutomaticApprovalOfTransferValidatorSet(bool autoApproved);

    /// @dev If true, the collection's transfer validator is automatically approved to transfer holder's tokens.
    bool public autoApproveTransfersFromValidator;

    /**
     * @notice Sets if the transfer validator is automatically approved as an operator for all token owners.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * 
     * @param autoApprove If true, the collection's transfer validator will be automatically approved to
     *                    transfer holder's tokens.
     */
    function setAutomaticApprovalOfTransfersFromValidator(bool autoApprove) external {
        _requireCallerIsContractOwner();
        autoApproveTransfersFromValidator = autoApprove;
        emit AutomaticApprovalOfTransferValidatorSet(autoApprove);
    }
}


// File @limitbreak/creator-token-standards/src/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

interface ICreatorToken {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
    function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);
}


// File @limitbreak/creator-token-standards/src/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

interface ICreatorTokenLegacy {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
}


// File @limitbreak/creator-token-standards/src/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

interface ITransferValidator {
    function applyCollectionTransferPolicy(address caller, address from, address to) external view;
    function validateTransfer(address caller, address from, address to) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external;

    function beforeAuthorizedTransfer(address operator, address token, uint256 tokenId) external;
    function afterAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransfer(address operator, address token) external;
    function afterAuthorizedTransfer(address token) external;
    function beforeAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransferWithAmount(address token, uint256 tokenId, uint256 amount) external;
    function afterAuthorizedTransferWithAmount(address token, uint256 tokenId) external;
}


// File @limitbreak/creator-token-standards/src/interfaces/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

interface ITransferValidatorSetTokenType {
    function setTokenTypeOfCollection(address collection, uint16 tokenType) external;
}


// File @limitbreak/creator-token-standards/src/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @title TransferValidation
 * @author Limit Break, Inc.
 * @notice A mix-in that can be combined with ERC-721 contracts to provide more granular hooks.
 * Openzeppelin's ERC721 contract only provides hooks for before and after transfer.  This allows
 * developers to validate or customize transfers within the context of a mint, a burn, or a transfer.
 */
abstract contract TransferValidation is Context {
    
    /// @dev Thrown when the from and to address are both the zero address.
    error ShouldNotMintToBurnAddress();

    /*************************************************************************/
    /*                      Transfers Without Amounts                        */
    /*************************************************************************/

    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.
    function _validateBeforeTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.
    function _validateAfterTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _postValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _postValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _postValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Optional validation hook that fires before a mint
    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a mint
    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a burn
    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a burn
    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a transfer
    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a transfer
    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}

    /*************************************************************************/
    /*                         Transfers With Amounts                        */
    /*************************************************************************/

    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.
    function _validateBeforeTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, amount, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, amount, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);
        }
    }

    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.
    function _validateAfterTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _postValidateMint(_msgSender(), to, tokenId, amount, msg.value);
        } else if(toZeroAddress) {
            _postValidateBurn(_msgSender(), from, tokenId, amount, msg.value);
        } else {
            _postValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);
        }
    }

    /// @dev Optional validation hook that fires before a mint
    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a mint
    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a burn
    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a burn
    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a transfer
    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a transfer
    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}
}


// File @limitbreak/creator-token-standards/src/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;






/**
 * @title CreatorTokenBase
 * @author Limit Break, Inc.
 * @notice CreatorTokenBaseV3 is an abstract contract that provides basic functionality for managing token 
 * transfer policies through an implementation of ICreatorTokenTransferValidator/ICreatorTokenTransferValidatorV2/ICreatorTokenTransferValidatorV3. 
 * This contract is intended to be used as a base for creator-specific token contracts, enabling customizable transfer 
 * restrictions and security policies.
 *
 * <h4>Features:</h4>
 * <ul>Ownable: This contract can have an owner who can set and update the transfer validator.</ul>
 * <ul>TransferValidation: Implements the basic token transfer validation interface.</ul>
 *
 * <h4>Benefits:</h4>
 * <ul>Provides a flexible and modular way to implement custom token transfer restrictions and security policies.</ul>
 * <ul>Allows creators to enforce policies such as account and codehash blacklists, whitelists, and graylists.</ul>
 * <ul>Can be easily integrated into other token contracts as a base contract.</ul>
 *
 * <h4>Intended Usage:</h4>
 * <ul>Use as a base contract for creator token implementations that require advanced transfer restrictions and 
 *   security policies.</ul>
 * <ul>Set and update the ICreatorTokenTransferValidator implementation contract to enforce desired policies for the 
 *   creator token.</ul>
 *
 * <h4>Compatibility:</h4>
 * <ul>Backward and Forward Compatible - V1/V2/V3 Creator Token Base will work with V1/V2/V3 Transfer Validators.</ul>
 */
abstract contract CreatorTokenBase is OwnablePermissions, TransferValidation, ICreatorToken {

    /// @dev Thrown when setting a transfer validator address that has no deployed code.
    error CreatorTokenBase__InvalidTransferValidatorContract();

    /// @dev The default transfer validator that will be used if no transfer validator has been set by the creator.
    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x721C008fdff27BF06E7E123956E2Fe03B63342e3);

    /// @dev Used to determine if the default transfer validator is applied.
    /// @dev Set to true when the creator sets a transfer validator address.
    bool private isValidatorInitialized;
    /// @dev Address of the transfer validator to apply to transactions.
    address private transferValidator;

    constructor() {
        _emitDefaultTransferValidator();
        _registerTokenType(DEFAULT_TRANSFER_VALIDATOR);
    }

    /**
     * @notice Sets the transfer validator for the token contract.
     *
     * @dev    Throws when provided validator contract is not the zero address and does not have code.
     * @dev    Throws when the caller is not the contract owner.
     *
     * @dev    <h4>Postconditions:</h4>
     *         1. The transferValidator address is updated.
     *         2. The "TransferValidatorUpdated" event is emitted.
     *
     * @param transferValidator_ The address of the transfer validator contract.
     */
    function setTransferValidator(address transferValidator_) public {
        _requireCallerIsContractOwner();

        bool isValidTransferValidator = transferValidator_.code.length > 0;

        if(transferValidator_ != address(0) && !isValidTransferValidator) {
            revert CreatorTokenBase__InvalidTransferValidatorContract();
        }

        emit TransferValidatorUpdated(address(getTransferValidator()), transferValidator_);

        isValidatorInitialized = true;
        transferValidator = transferValidator_;

        _registerTokenType(transferValidator_);
    }

    /**
     * @notice Returns the transfer validator contract address for this token contract.
     */
    function getTransferValidator() public view override returns (address validator) {
        validator = transferValidator;

        if (validator == address(0)) {
            if (!isValidatorInitialized) {
                validator = DEFAULT_TRANSFER_VALIDATOR;
            }
        }
    }

    /**
     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.
     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent
     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.
     *
     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     *
     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is
     *      set to a non-zero address.
     *
     * @param caller  The address of the caller.
     * @param from    The address of the sender.
     * @param to      The address of the receiver.
     * @param tokenId The token id being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId);
        }
    }

    /**
     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.
     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent
     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.
     *
     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     * 
     * @dev Used for ERC20 and ERC1155 token transfers which have an amount value to validate in the transfer validator.
     * @dev The "tokenId" for ERC20 tokens should be set to "0".
     *
     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is
     *      set to a non-zero address.
     *
     * @param caller  The address of the caller.
     * @param from    The address of the sender.
     * @param to      The address of the receiver.
     * @param tokenId The token id being transferred.
     * @param amount  The amount of token being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 amount,
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId, amount);
        }
    }

    function _tokenType() internal virtual pure returns(uint16);

    function _registerTokenType(address validator) internal {
        if (validator != address(0)) {
            uint256 validatorCodeSize;
            assembly {
                validatorCodeSize := extcodesize(validator)
            }
            if(validatorCodeSize > 0) {
                try ITransferValidatorSetTokenType(validator).setTokenTypeOfCollection(address(this), _tokenType()) {
                } catch { }
            }
        }
    }

    /**
     * @dev  Used during contract deployment for constructable and cloneable creator tokens
     * @dev  to emit the "TransferValidatorUpdated" event signaling the validator for the contract
     * @dev  is the default transfer validator.
     */
    function _emitDefaultTransferValidator() internal {
        emit TransferValidatorUpdated(address(0), DEFAULT_TRANSFER_VALIDATOR);
    }
}


// File @limitbreak/permit-c/src/[email protected]

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.4;

/// @dev Constant bytes32 value of 0x000...000
bytes32 constant ZERO_BYTES32 = bytes32(0);

/// @dev Constant value of 0
uint256 constant ZERO = 0;
/// @dev Constant value of 1
uint256 constant ONE = 1;

/// @dev Constant value representing an open order in storage
uint8 constant ORDER_STATE_OPEN = 0;
/// @dev Constant value representing a filled order in storage
uint8 constant ORDER_STATE_FILLED = 1;
/// @dev Constant value representing a cancelled order in storage
uint8 constant ORDER_STATE_CANCELLED = 2;

/// @dev Constant value representing the ERC721 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC721 = 721;
/// @dev Constant value representing the ERC1155 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC1155 = 1155;
/// @dev Constant value representing the ERC20 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC20 = 20;

/// @dev Constant value to mask the upper bits of a signature that uses a packed "vs" value to extract "s"
bytes32 constant UPPER_BIT_MASK = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

/// @dev EIP-712 typehash used for validating signature based stored approvals
bytes32 constant UPDATE_APPROVAL_TYPEHASH =
    keccak256("UpdateApprovalBySignature(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 approvalExpiration,uint256 sigDeadline,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit without additional data
bytes32 constant SINGLE_USE_PERMIT_TYPEHASH =
    keccak256("PermitTransferFrom(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit with additional data
string constant SINGLE_USE_PERMIT_TRANSFER_ADVANCED_TYPEHASH_STUB =
    "PermitTransferFromWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev EIP-712 typehash used for validating an order permit that updates storage as it fills
string constant PERMIT_ORDER_ADVANCED_TYPEHASH_STUB =
    "PermitOrderWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 salt,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev Pausable flag for stored approval transfers of ERC721 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC721 = 1 << 0;
/// @dev Pausable flag for stored approval transfers of ERC1155 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC1155 = 1 << 1;
/// @dev Pausable flag for stored approval transfers of ERC20 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC20 = 1 << 2;

/// @dev Pausable flag for single use permit transfers of ERC721 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC721 = 1 << 3;
/// @dev Pausable flag for single use permit transfers of ERC1155 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC1155 = 1 << 4;
/// @dev Pausable flag for single use permit transfers of ERC20 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC20 = 1 << 5;

/// @dev Pausable flag for order fill transfers of ERC1155 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC1155 = 1 << 6;
/// @dev Pausable flag for order fill transfers of ERC20 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC20 = 1 << 7;


// File erc721a/contracts/[email protected]

// Original license: SPDX_License_Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * 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();

    /**
     * The "quantity" minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The "extraData" cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to "startTimestamp" that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * "interfaceId". See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @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,
        bytes calldata data
    ) external payable;

    /**
     * @dev Equivalent to "safeTransferFrom(from, to, tokenId, '')".
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers "tokenId" 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 payable;

    /**
     * @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 payable;

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @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);

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in "fromTokenId" to "toTokenId"
     * (inclusive) is transferred from "from" to "to", as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}


// File erc721a/contracts/[email protected]

// Original license: SPDX_License_Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from "_startTokenId()".
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a "--via-ir" bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of "numberMinted" in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of "numberBurned" in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of "aux" in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for "aux".
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of "startTimestamp" in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the "burned" bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the "nextInitialized" bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the "nextInitialized" bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of "extraData" in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for "extraData".
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum "quantity" that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The "Transfer" event signature is given by:
    // "keccak256(bytes("Transfer(address,address,uint256)"))".
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _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 {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   "addr"
    // - [160..223] "startTimestamp"
    // - [224]      "burned"
    // - [225]      "nextInitialized"
    // - [232..255] "extraData"
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    "balance"
    // - [64..127]  "numberMinted"
    // - [128..191] "numberBurned"
    // - [192..255] "aux"
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than "_currentIndex - _startTokenId()" times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as "_currentIndex" does not decrement,
        // and it is initialized to "_startTokenId()".
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in "owner"'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by "owner".
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of "owner".
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for "owner". (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary 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 virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast "aux" with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * "interfaceId". See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. "bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)")
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for "tokenId" token.
     */
    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, _toString(tokenId))) : '';
    }

    /**
     * @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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the "tokenId" token.
     *
     * Requirements:
     *
     * - "tokenId" must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked "TokenOwnership" struct at "index".
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at "index" for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of "tokenId".
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. "ownership.addr != address(0) && ownership.burned == false")
                        // before an unintialized ownership slot
                        // (i.e. "ownership.addr == address(0) && ownership.burned == false")
                        // Hence, "curr" will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked "TokenOwnership" struct from "packed".
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask "owner" to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // "owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags".
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the "nextInitialized" flag set if "quantity" equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the "nextInitialized" flag.
        assembly {
            // "(quantity == 1) << _BITPOS_NEXT_INITIALIZED".
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @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) public payable virtual override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for "tokenId" token.
     *
     * Requirements:
     *
     * - "tokenId" must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {...

// [truncated — 146851 bytes total]

Read Contract

DEFAULT_TRANSFER_VALIDATOR 0x01463546 → address
activeMintGroups 0x483f0a82 → uint256
autoApproveTransfersFromValidator 0x6221d13c → bool
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
canDelegateMintCheck 0xf72171f1 → bool, string
canMintCheck 0xf34657ec → bool, string
checkPendingBalance 0xfea414b6 → uint256
checkPendingBalanceFor 0x6e75e2e2 → uint256
contractMintLive 0xe690f9eb → bool
contractPresaleActive 0xdb0dbb71 → bool
feeAddress 0x41275358 → address
getApproved 0x081812fc → address
getKingdomlyFeeContract 0x93a24841 → address
getTransferValidationFunction 0x0d705df6 → bytes4, bool
getTransferValidator 0x098144d4 → address
isApprovedForAll 0xe985e9c5 → bool
kingdomlyAdmin 0x63691c93 → address
kingdomlyFeeContract 0xefe82328 → address
maxMintPerWallet 0x16da3bc6 → uint256
maxSupply 0xd5abeb01 → uint256
maxSupplyPerMintGroup 0x24a663c3 → uint256
mintGroupMints 0xe5fd1145 → uint256
mintLive 0xe8656fcc → bool
mintPrice 0xe6a72acf → uint256
mintQuotas 0x01d2718e → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
ownerPayoutAddress 0xae4e4942 → address
presaleActive 0x4a5bd2fd → bool
presaleScheduledStartTimestamp 0xe6087db0 → uint256
quoteAirdropFees 0xb80f8fb4 → uint256
quoteBatchMint 0x22536c03 → uint256, uint256, uint256, uint256
royaltyInfo 0x2a55205a → address, uint256
scheduledMintLiveTimestamp 0xf30874ea → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
threeDollarsEth 0xce55c66a → uint256
threeDollarsInCents 0x17d791d0 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 27 functions

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

airdropNFTs 0xe213b5f6
address[] recipients
uint256[] amounts
returns: uint256
approve 0x095ea7b3
address to
uint256 tokenId
batchMint 0x0ed64eff
uint256 amount
uint256 mintId
returns: uint256
changeMintStatus 0xa8ddf8f6
bool status
changeSalePrice 0xc82e474b
uint256 newmintPrice
uint256 mintId
delegatedMint 0xebf39a41
uint256 amount
uint256 mintId
address vault
returns: uint256
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
schedulePresaleMintStart 0x80348242
uint256 startTimestamp
uint256 mintId
setApprovalForAll 0xa22cb465
address operator
bool approved
setAutomaticApprovalOfTransfersFromValidator 0x9e05d240
bool autoApprove
setBaseURI 0x55f804b3
string newBaseURI
setDefaultRoyalty 0x04634d8d
address receiver
uint96 feeNumerator
setMaxMintPerWallet 0x7bd4f071
uint256 newMaxMintPerWallet
uint256 mintGroupId
setMintLiveTimestamp 0x31f72d77
uint256 timestamp
setMintQuota 0x581636dd
address[] addressToAdd
uint256 mintId
uint256[] _mintQuotas
setNewKingdomlyFeeContract 0x1f466342
address _kingdomlyFeeContract
setNewMaxPerMintGroup 0x11f7acb9
uint256 mintId
uint256 newMax
setOwnerPayoutAddress 0x9ad4d529
address _ownerPayoutAddress
setTokenRoyalty 0x5944c753
uint256 tokenId
address receiver
uint96 feeNumerator
setTransferValidator 0xa9fc664e
address transferValidator_
stopOrStartpresaleMint 0xb3978a86
bool presaleStatus
uint256 mintId
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawFeeFunds 0xa75c3ad9
No parameters
withdrawMintFunds 0x905d7b33
No parameters

Recent Transactions

No transactions found for this address