@artblocks/contracts 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/AdminACLV0RoyaltyRegistry.json +193 -0
- package/artifacts/contracts/AdminACLV0RoyaltyRegistry.sol/IRoyaltyRegistry.json +35 -0
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +2 -2
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +2 -2
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +210 -2
- package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +235 -20
- package/artifacts/contracts/GenArt721CoreV3_Curated_Flex.sol/GenArt721CoreV3_Curated_Flex.json +3197 -0
- package/artifacts/contracts/GenArt721CoreV3_Explorations_Flex.sol/GenArt721CoreV3_Explorations_Flex.json +3192 -0
- package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +2 -2
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +27 -2
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +27 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV4.sol/MinterDALinV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV4.sol/MinterHolderV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +25 -0
- package/artifacts/contracts/archive/minter-suite/Minters/MinterPolyptych/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSEA/MinterSEAV0.sol/MinterSEAV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +28 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +239 -20
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +267 -48
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +27 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +27 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +25 -0
- package/artifacts/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol/AbstractTransferHook.json +79 -0
- package/artifacts/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol/OwnerHistoryTransferHook.json +315 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +2 -2
- package/artifacts/contracts/interfaces/v0.8.x/IClaimMinter.sol/IClaimMinter.json +189 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +149 -0
- package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +26 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +123 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +123 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +25 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol/IOwnerHistoryTransferHook.json +299 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISRHooks.sol/ISRHooks.json +432 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +0 -13
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol/ISharedMinterTieredAllowV0.json +94 -0
- package/artifacts/contracts/interfaces/v0.8.x/ITransferHook.sol/ITransferHook.json +63 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/ENSLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ENSLib.sol/IUniversalResolver.json +45 -0
- package/artifacts/contracts/libs/v0.8.x/EnumerableSetUint16.sol/EnumerableSetUint16.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/FeistelWalkLib.sol/FeistelWalkLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ImmutableUint16Array.sol/ImmutableUint16Array.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/V3EngineLib.sol/V3EngineLib.json +163 -0
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/V3TransferHookLib.sol/V3TransferHookLib.json +79 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol/OnChainAllowlistLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceOnChainAllowV0.sol/MinterSetPriceOnChainAllowV0.json +522 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceTieredAllowV1.sol/MinterSetPriceTieredAllowV1.json +715 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol/MinterSlidingScaleV0.json +431 -0
- package/artifacts/contracts/minter-suite/Minters/one-off/ClaimMinter.sol/ClaimMinter.json +502 -0
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol/MinterSetPriceTieredOnChainAllowV0.json +673 -0
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +6 -19
- package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ENSLibMock.sol/ENSLibMock.json +30 -0
- package/artifacts/contracts/mock/EnumerableSetUint16Mock.sol/EnumerableSetUint16Mock.json +146 -0
- package/artifacts/contracts/mock/FeistelWalkLibMock.sol/FeistelWalkLibMock.json +142 -0
- package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +2 -2
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
- package/artifacts/contracts/mock/ImmutableUint16ArrayMock.sol/ImmutableUint16ArrayMock.json +89 -0
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockGenArt721V3Core.sol/MockGenArt721V3Core.json +490 -0
- package/artifacts/contracts/mock/MockPMP.sol/MockPMP.json +523 -0
- package/artifacts/contracts/mock/MockTransferHook.sol/MockTransferHook.json +453 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockBatchTransferrer.json +39 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockForwardingERC721Receiver.json +71 -0
- package/artifacts/contracts/mock/MockTransferHookTestHelpers.sol/MockSpoofingCore.json +94 -0
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/IBatchMinter.json +64 -0
- package/artifacts/contracts/mock/ReentrancyBatchMockShared.sol/ReentrancyBatchMockShared.json +113 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/MockTarget.json +74 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorPartialRevertsTestHelper.json +138 -0
- package/artifacts/contracts/mock/RelayExecutorTestHelper.sol/RelayExecutorTestHelper.json +119 -0
- package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
- package/artifacts/contracts/relay/RelayExecutor.sol/RelayExecutor.json +101 -0
- package/artifacts/contracts/relay/RelayExecutorPartialReverts.sol/RelayExecutorPartialReverts.json +120 -0
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol/GenArt721RoyaltyOverrideSplits.json +263 -0
- package/artifacts/contracts/utils/MintMulticallUtil.sol/IMinterSetPriceV5.json +40 -0
- package/artifacts/contracts/utils/MintMulticallUtil.sol/MintMulticallUtil.json +163 -0
- package/artifacts/contracts/web3call/PMPV0.sol/PMPV0.json +2 -2
- package/artifacts/contracts/web3call/PMPV1.sol/PMPV1.json +648 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeight.sol/InjectBlockHeight.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol/InjectBlockHeightAndArtistProjectOverrides.json +226 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol/InjectBlockHeightAndNumOwnedProjectTokens.json +182 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.json +226 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol/InjectBlockTimestamp.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBytesPerToken.sol/InjectBytesPerToken.json +358 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +2 -2
- package/artifacts/contracts/web3call/augment-hooks/SRHooks.sol/SRHooks.json +899 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IGenArt721V0_Minimal.json +30 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/IRelic.json +35 -0
- package/artifacts/contracts/web3call/combined-hooks/LiftHooks.sol/LiftHooks.json +256 -0
- package/artifacts/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol}/AbstractPMPConfigureHook.json +1 -1
- package/artifacts/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol/PMPConfigureLockHook.json +195 -0
- package/contracts/AdminACLV0RoyaltyRegistry.sol +142 -0
- package/contracts/DependencyRegistryV0.sol +143 -13
- package/contracts/GenArt721CoreV3_Curated.sol +1 -1
- package/contracts/GenArt721CoreV3_Curated_Flex.sol +173 -0
- package/contracts/GenArt721CoreV3_Explorations_Flex.sol +159 -0
- package/contracts/engine/V3/EngineFactoryV0.sol +20 -1
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +286 -299
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +292 -301
- package/contracts/engine/V3/transfer-hooks/AbstractTransferHook.sol +101 -0
- package/contracts/engine/V3/transfer-hooks/OwnerHistoryTransferHook.sol +291 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +145 -47
- package/contracts/helpers/ERC1967ProxyImport.sol +5 -0
- package/contracts/interfaces/v0.8.x/IArtblocksRoyaltyOverride.sol +1 -1
- package/contracts/interfaces/v0.8.x/IClaimMinter.sol +70 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +95 -0
- package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +15 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +21 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +72 -0
- package/contracts/interfaces/v0.8.x/IOwnerHistoryTransferHook.sol +119 -0
- package/contracts/interfaces/v0.8.x/ISRHooks.sol +229 -0
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +0 -6
- package/contracts/interfaces/v0.8.x/ISharedMinterTieredAllowV0.sol +69 -0
- package/contracts/interfaces/v0.8.x/ITransferHook.sol +48 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +12 -0
- package/contracts/libs/v0.8.x/ENSLib.sol +85 -0
- package/contracts/libs/v0.8.x/EnumerableSetUint16.sol +429 -0
- package/contracts/libs/v0.8.x/FeistelWalkLib.sol +221 -0
- package/contracts/libs/v0.8.x/ImmutableUint16Array.sol +201 -0
- package/contracts/libs/v0.8.x/V3EngineLib.sol +490 -0
- package/contracts/libs/v0.8.x/V3TransferHookLib.sol +251 -0
- package/contracts/libs/v0.8.x/minter-libs/OnChainAllowlistLib.sol +165 -0
- package/contracts/minter-suite/Minters/MinterSetPriceOnChainAllowV0.sol +632 -0
- package/contracts/minter-suite/Minters/MinterSetPriceTieredAllowV1.sol +871 -0
- package/contracts/minter-suite/Minters/MinterSlidingScaleV0.sol +493 -0
- package/contracts/minter-suite/Minters/one-off/ClaimMinter.sol +595 -0
- package/contracts/minter-suite/Minters/one-off/MinterSetPriceTieredOnChainAllowV0.sol +894 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +59 -41
- package/contracts/mock/ENSLibMock.sol +25 -0
- package/contracts/mock/EnumerableSetUint16Mock.sol +88 -0
- package/contracts/mock/FeistelWalkLibMock.sol +81 -0
- package/contracts/mock/ImmutableUint16ArrayMock.sol +62 -0
- package/contracts/mock/MockGenArt721V3Core.sol +416 -0
- package/contracts/mock/MockPMP.sol +287 -0
- package/contracts/mock/MockTransferHook.sol +160 -0
- package/contracts/mock/MockTransferHookTestHelpers.sol +96 -0
- package/contracts/mock/ReentrancyBatchMockShared.sol +53 -0
- package/contracts/mock/RelayExecutorTestHelper.sol +44 -0
- package/contracts/relay/RelayExecutor.sol +61 -0
- package/contracts/relay/RelayExecutorPartialReverts.sol +79 -0
- package/contracts/royalty-registry/GenArt721RoyaltyOverrideSplits.sol +130 -0
- package/contracts/utils/MintMulticallUtil.sol +103 -0
- package/contracts/web3call/PMPV1.sol +1204 -0
- package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectBlockHeight.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightAndArtistProjectOverrides.sol +310 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightAndNumOwnedProjectTokens.sol +141 -0
- package/contracts/web3call/augment-hooks/InjectBlockHeightProjectInvocationsAndArtistProjectOverrides.sol +326 -0
- package/contracts/web3call/augment-hooks/InjectBlockTimestamp.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectBytesPerToken.sol +279 -0
- package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +1 -1
- package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +1 -1
- package/contracts/web3call/augment-hooks/SRHooks.sol +1722 -0
- package/contracts/web3call/combined-hooks/LiftHooks.sol +304 -0
- package/contracts/web3call/configure-hooks/{abstractPMPConfigureHook.sol → AbstractPMPConfigureHook.sol} +1 -1
- package/contracts/web3call/configure-hooks/PMPConfigureLockHook.sol +107 -0
- package/package.json +39 -24
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {ITransferHook} from "../../interfaces/v0.8.x/ITransferHook.sol";
|
|
7
|
+
import {IGenArt721CoreContractV3_Base} from "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
8
|
+
import {IGenArt721CoreContractV3_Engine} from "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @title Shared transfer-hook helpers for V3 Engine and Engine Flex cores.
|
|
12
|
+
* @author Art Blocks Inc.
|
|
13
|
+
* @notice External library (DELEGATECALL) used by both `GenArt721CoreV3_Engine`
|
|
14
|
+
* and `GenArt721CoreV3_Engine_Flex`. Offloading this logic keeps the two cores
|
|
15
|
+
* consistent while both remain under the 24KB bytecode size limit.
|
|
16
|
+
* Cores should SLOAD the hook address themselves and only call `callHook`
|
|
17
|
+
* when it is non-zero, so unconfigured transfers do not pay a DELEGATECALL.
|
|
18
|
+
* @dev Storage is reached through a `Layout` storage pointer supplied by the
|
|
19
|
+
* calling core, rather than through the diamond storage pattern used by
|
|
20
|
+
* `V3FlexLib`. This is intentional: the layout appears in the core's own
|
|
21
|
+
* storage layout, which keeps it auditable with standard tooling.
|
|
22
|
+
* @dev Reverts use the core's `GenArt721Error` so callers see a single error
|
|
23
|
+
* type. A reverting hook call is intentionally not caught — latent failure
|
|
24
|
+
* would leave ownership updated while hook side effects did not run.
|
|
25
|
+
*/
|
|
26
|
+
library V3TransferHookLib {
|
|
27
|
+
/**
|
|
28
|
+
* @notice Per-project transfer hook configuration.
|
|
29
|
+
* @dev Packed into one slot: 20-byte address + 1-byte locked flag.
|
|
30
|
+
*/
|
|
31
|
+
struct ProjectTransferHookConfig {
|
|
32
|
+
ITransferHook hook;
|
|
33
|
+
bool locked;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @notice Core-owned transfer hook storage.
|
|
38
|
+
* @dev `executing` is a dedicated slot (not packed with other flags) so
|
|
39
|
+
* setting it around a hook call does not dirty unrelated config storage.
|
|
40
|
+
*/
|
|
41
|
+
struct Layout {
|
|
42
|
+
mapping(uint256 projectId => ProjectTransferHookConfig) configs;
|
|
43
|
+
bool executing;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @notice Set or clear a project's transfer hook.
|
|
48
|
+
* Reverts if the hook configuration is locked, or if a non-zero `hook`
|
|
49
|
+
* does not ERC-165-advertise `ITransferHook`.
|
|
50
|
+
* Once the project is locked (four-week project metadata lock), a hook may
|
|
51
|
+
* only be changed if one is already set. If the hook is `address(0)` when
|
|
52
|
+
* that auto-lock happens, it can never be assigned.
|
|
53
|
+
* @param layout Core-owned transfer hook storage.
|
|
54
|
+
* @param projectId Project ID.
|
|
55
|
+
* @param hook New hook, or `address(0)` to clear.
|
|
56
|
+
* @param projectUnlocked Core's `_projectUnlocked(projectId)`. Passed in
|
|
57
|
+
* so the four-week auto-lock-at-zero rule is evaluated by exactly the same
|
|
58
|
+
* logic as every other lock on the core.
|
|
59
|
+
*/
|
|
60
|
+
function configure(
|
|
61
|
+
Layout storage layout,
|
|
62
|
+
uint256 projectId,
|
|
63
|
+
ITransferHook hook,
|
|
64
|
+
bool projectUnlocked
|
|
65
|
+
) external {
|
|
66
|
+
_onlyNotExecuting(layout);
|
|
67
|
+
ProjectTransferHookConfig storage config = layout.configs[projectId];
|
|
68
|
+
if (_isLocked({config: config, projectUnlocked: projectUnlocked})) {
|
|
69
|
+
revert IGenArt721CoreContractV3_Base.GenArt721Error(
|
|
70
|
+
IGenArt721CoreContractV3_Base.ErrorCodes.TransferHookLocked
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
if (address(hook) != address(0)) {
|
|
74
|
+
_requireSupportsTransferHook(address(hook));
|
|
75
|
+
}
|
|
76
|
+
config.hook = hook;
|
|
77
|
+
emit IGenArt721CoreContractV3_Base.ProjectUpdated(
|
|
78
|
+
projectId,
|
|
79
|
+
bytes32(
|
|
80
|
+
uint256(
|
|
81
|
+
IGenArt721CoreContractV3_Base
|
|
82
|
+
.ProjectUpdatedFields
|
|
83
|
+
.FIELD_PROJECT_TRANSFER_HOOK
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
emit IGenArt721CoreContractV3_Engine.ProjectTransferHookUpdated(
|
|
88
|
+
projectId,
|
|
89
|
+
address(hook)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @notice One-way lock of the current hook value, including `address(0)`.
|
|
95
|
+
* Reverts if already locked, including when the four-week project metadata
|
|
96
|
+
* lock has already frozen an unset hook.
|
|
97
|
+
* @dev `expectedHook` makes the caller's intent explicit and is checked
|
|
98
|
+
* before locking, because locking is permanent and the hook may be changed
|
|
99
|
+
* by either the artist or the Admin ACL. Without it, a `configure` call
|
|
100
|
+
* landing first would cause this call to permanently freeze a hook the
|
|
101
|
+
* caller never intended to lock.
|
|
102
|
+
* @param layout Core-owned transfer hook storage.
|
|
103
|
+
* @param projectId Project ID.
|
|
104
|
+
* @dev Locking freezes the hook address, not the hook's behavior — locking
|
|
105
|
+
* at an upgradeable proxy is not a behavioral guarantee.
|
|
106
|
+
* @param expectedHook Hook the caller expects to be locking in. Must equal
|
|
107
|
+
* the project's currently configured hook, which may be `address(0)`.
|
|
108
|
+
* @param projectUnlocked Core's `_projectUnlocked(projectId)`.
|
|
109
|
+
*/
|
|
110
|
+
function lock(
|
|
111
|
+
Layout storage layout,
|
|
112
|
+
uint256 projectId,
|
|
113
|
+
address expectedHook,
|
|
114
|
+
bool projectUnlocked
|
|
115
|
+
) external {
|
|
116
|
+
_onlyNotExecuting(layout);
|
|
117
|
+
ProjectTransferHookConfig storage config = layout.configs[projectId];
|
|
118
|
+
if (_isLocked({config: config, projectUnlocked: projectUnlocked})) {
|
|
119
|
+
revert IGenArt721CoreContractV3_Base.GenArt721Error(
|
|
120
|
+
IGenArt721CoreContractV3_Base.ErrorCodes.TransferHookLocked
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
address currentHook = address(config.hook);
|
|
124
|
+
if (currentHook != expectedHook) {
|
|
125
|
+
revert IGenArt721CoreContractV3_Base.GenArt721Error(
|
|
126
|
+
IGenArt721CoreContractV3_Base
|
|
127
|
+
.ErrorCodes
|
|
128
|
+
.TransferHookUnexpectedHook
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
config.locked = true;
|
|
132
|
+
emit IGenArt721CoreContractV3_Base.ProjectUpdated(
|
|
133
|
+
projectId,
|
|
134
|
+
bytes32(
|
|
135
|
+
uint256(
|
|
136
|
+
IGenArt721CoreContractV3_Base
|
|
137
|
+
.ProjectUpdatedFields
|
|
138
|
+
.FIELD_PROJECT_TRANSFER_HOOK_LOCKED
|
|
139
|
+
)
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
emit IGenArt721CoreContractV3_Engine.ProjectTransferHookLocked(
|
|
143
|
+
projectId,
|
|
144
|
+
currentHook
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @notice Call `hook.onTokenTransfer`, setting `layout.executing` around
|
|
150
|
+
* the external call so `_update` and hook configuration cannot be
|
|
151
|
+
* reentered from the hook.
|
|
152
|
+
* @dev Caller MUST have already verified `hook` is non-zero. Reverts if
|
|
153
|
+
* `layout.executing` is already true (nested mint/transfer dispatch).
|
|
154
|
+
* @param layout Core-owned transfer hook storage.
|
|
155
|
+
* @param hook Hook to call.
|
|
156
|
+
* @param tokenId Token whose ownership just changed.
|
|
157
|
+
* @param from Previous owner; `address(0)` on mint.
|
|
158
|
+
* @param to New owner.
|
|
159
|
+
* @param operator Transfer operator or mint `_by` address.
|
|
160
|
+
*/
|
|
161
|
+
function callHook(
|
|
162
|
+
Layout storage layout,
|
|
163
|
+
ITransferHook hook,
|
|
164
|
+
uint256 tokenId,
|
|
165
|
+
address from,
|
|
166
|
+
address to,
|
|
167
|
+
address operator
|
|
168
|
+
) external {
|
|
169
|
+
_onlyNotExecuting(layout);
|
|
170
|
+
layout.executing = true;
|
|
171
|
+
hook.onTokenTransfer({
|
|
172
|
+
coreContract: address(this),
|
|
173
|
+
tokenId: tokenId,
|
|
174
|
+
from: from,
|
|
175
|
+
to: to,
|
|
176
|
+
operator: operator
|
|
177
|
+
});
|
|
178
|
+
layout.executing = false;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @notice Effective lock state of a project's transfer hook config.
|
|
183
|
+
* True if the artist called `lockProjectTransferHook`, or if the project's
|
|
184
|
+
* four-week metadata lock has elapsed while the hook is `address(0)`.
|
|
185
|
+
* @dev Shared by `configure`, `lock`, and the cores' public view, so all
|
|
186
|
+
* three can never disagree.
|
|
187
|
+
* @param config Project's transfer hook config.
|
|
188
|
+
* @param projectUnlocked Core's `_projectUnlocked(projectId)`.
|
|
189
|
+
*/
|
|
190
|
+
function isLocked(
|
|
191
|
+
ProjectTransferHookConfig storage config,
|
|
192
|
+
bool projectUnlocked
|
|
193
|
+
) external view returns (bool) {
|
|
194
|
+
return _isLocked({config: config, projectUnlocked: projectUnlocked});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @notice Revert if a transfer hook is currently executing.
|
|
199
|
+
* @param layout Core-owned transfer hook storage.
|
|
200
|
+
*/
|
|
201
|
+
function _onlyNotExecuting(Layout storage layout) private view {
|
|
202
|
+
if (layout.executing) {
|
|
203
|
+
revert IGenArt721CoreContractV3_Base.GenArt721Error(
|
|
204
|
+
IGenArt721CoreContractV3_Base.ErrorCodes.TransferHookReentrancy
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @notice Effective lock: explicit `lockProjectTransferHook`, or the
|
|
211
|
+
* four-week project metadata auto-lock while the hook is unset.
|
|
212
|
+
* @dev A hook that is already set at auto-lock intentionally remains
|
|
213
|
+
* configurable, so that auto-lock can never permanently freeze a hook that
|
|
214
|
+
* later breaks. Freezing a set hook requires an explicit artist call.
|
|
215
|
+
*/
|
|
216
|
+
function _isLocked(
|
|
217
|
+
ProjectTransferHookConfig storage config,
|
|
218
|
+
bool projectUnlocked
|
|
219
|
+
) private view returns (bool) {
|
|
220
|
+
if (config.locked) {
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
if (address(config.hook) != address(0)) {
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
return !projectUnlocked;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @notice Minimal ERC-165 check for `ITransferHook`. Intentionally not
|
|
231
|
+
* OpenZeppelin's ERC165Checker, which is too large to inline into the
|
|
232
|
+
* size-constrained Engine Flex core.
|
|
233
|
+
* @dev A codeless address (EOA) returns success with zero-length
|
|
234
|
+
* returndata, which the length check below rejects.
|
|
235
|
+
*/
|
|
236
|
+
function _requireSupportsTransferHook(address hook) private view {
|
|
237
|
+
(bool success, bytes memory result) = hook.staticcall(
|
|
238
|
+
abi.encodeWithSelector(
|
|
239
|
+
bytes4(0x01ffc9a7), // IERC165.supportsInterface.selector
|
|
240
|
+
type(ITransferHook).interfaceId // 0x6344b0e2
|
|
241
|
+
)
|
|
242
|
+
);
|
|
243
|
+
if (!success || result.length < 32 || !abi.decode(result, (bool))) {
|
|
244
|
+
revert IGenArt721CoreContractV3_Base.GenArt721Error(
|
|
245
|
+
IGenArt721CoreContractV3_Base
|
|
246
|
+
.ErrorCodes
|
|
247
|
+
.TransferHookInvalidInterface
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {GenericMinterEventsLib} from "./GenericMinterEventsLib.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Art Blocks On-Chain Allowlist Library
|
|
10
|
+
* @notice This library is designed to manage on-chain address allowlists for
|
|
11
|
+
* Art Blocks projects. It provides functionalities such as adding and removing
|
|
12
|
+
* addresses from a project's allowlist, and verifying if an address is on the
|
|
13
|
+
* allowlist.
|
|
14
|
+
* @author Art Blocks Inc.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
library OnChainAllowlistLib {
|
|
18
|
+
// position of On-Chain Allowlist Lib storage, using a diamond storage
|
|
19
|
+
// pattern for this library
|
|
20
|
+
bytes32 constant ON_CHAIN_ALLOWLIST_LIB_STORAGE_POSITION =
|
|
21
|
+
keccak256("onchainallowlistlib.storage");
|
|
22
|
+
|
|
23
|
+
bytes32 internal constant CONFIG_ALLOWLIST = "allowlist";
|
|
24
|
+
|
|
25
|
+
struct OnChainAllowlistProjectConfig {
|
|
26
|
+
mapping(address wallet => bool isAllowlisted) allowlist;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Diamond storage pattern is used in this library
|
|
30
|
+
struct OnChainAllowlistLibStorage {
|
|
31
|
+
mapping(address coreContract => mapping(uint256 projectId => OnChainAllowlistProjectConfig)) onChainAllowlistProjectConfigs;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @notice Adds addresses to the allowlist for a project.
|
|
36
|
+
* @param projectId Project ID to add addresses to the allowlist for.
|
|
37
|
+
* @param coreContract Core contract address for the given project.
|
|
38
|
+
* @param addresses Array of addresses to add to the allowlist.
|
|
39
|
+
*/
|
|
40
|
+
function addAddressesToAllowlist(
|
|
41
|
+
uint256 projectId,
|
|
42
|
+
address coreContract,
|
|
43
|
+
address[] calldata addresses
|
|
44
|
+
) internal {
|
|
45
|
+
OnChainAllowlistProjectConfig
|
|
46
|
+
storage config = getOnChainAllowlistProjectConfig({
|
|
47
|
+
projectId: projectId,
|
|
48
|
+
coreContract: coreContract
|
|
49
|
+
});
|
|
50
|
+
uint256 length = addresses.length;
|
|
51
|
+
for (uint256 i; i < length; ) {
|
|
52
|
+
config.allowlist[addresses[i]] = true;
|
|
53
|
+
emit GenericMinterEventsLib.ConfigValueAddedToSet({
|
|
54
|
+
projectId: projectId,
|
|
55
|
+
coreContract: coreContract,
|
|
56
|
+
key: CONFIG_ALLOWLIST,
|
|
57
|
+
value: addresses[i]
|
|
58
|
+
});
|
|
59
|
+
unchecked {
|
|
60
|
+
++i;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @notice Removes addresses from the allowlist for a project.
|
|
67
|
+
* @param projectId Project ID to remove addresses from the allowlist for.
|
|
68
|
+
* @param coreContract Core contract address for the given project.
|
|
69
|
+
* @param addresses Array of addresses to remove from the allowlist.
|
|
70
|
+
*/
|
|
71
|
+
function removeAddressesFromAllowlist(
|
|
72
|
+
uint256 projectId,
|
|
73
|
+
address coreContract,
|
|
74
|
+
address[] calldata addresses
|
|
75
|
+
) internal {
|
|
76
|
+
OnChainAllowlistProjectConfig
|
|
77
|
+
storage config = getOnChainAllowlistProjectConfig({
|
|
78
|
+
projectId: projectId,
|
|
79
|
+
coreContract: coreContract
|
|
80
|
+
});
|
|
81
|
+
uint256 length = addresses.length;
|
|
82
|
+
for (uint256 i; i < length; ) {
|
|
83
|
+
config.allowlist[addresses[i]] = false;
|
|
84
|
+
emit GenericMinterEventsLib.ConfigValueRemovedFromSet({
|
|
85
|
+
projectId: projectId,
|
|
86
|
+
coreContract: coreContract,
|
|
87
|
+
key: CONFIG_ALLOWLIST,
|
|
88
|
+
value: addresses[i]
|
|
89
|
+
});
|
|
90
|
+
unchecked {
|
|
91
|
+
++i;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @notice Checks that a given address is on the allowlist for a project.
|
|
98
|
+
* @dev Reverts if the address is not on the allowlist.
|
|
99
|
+
* @param projectId Project ID to check the allowlist for.
|
|
100
|
+
* @param coreContract Core contract address for the given project.
|
|
101
|
+
* @param sender Address to check against the allowlist.
|
|
102
|
+
*/
|
|
103
|
+
function preMintChecks(
|
|
104
|
+
uint256 projectId,
|
|
105
|
+
address coreContract,
|
|
106
|
+
address sender
|
|
107
|
+
) internal view {
|
|
108
|
+
require(
|
|
109
|
+
isAllowlisted({
|
|
110
|
+
projectId: projectId,
|
|
111
|
+
coreContract: coreContract,
|
|
112
|
+
wallet: sender
|
|
113
|
+
}),
|
|
114
|
+
"Only allowlisted addresses"
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @notice Returns whether an address is on the allowlist for a project.
|
|
120
|
+
* @param projectId Project ID to check the allowlist for.
|
|
121
|
+
* @param coreContract Core contract address for the given project.
|
|
122
|
+
* @param wallet Address to check.
|
|
123
|
+
* @return bool True if the address is on the allowlist, false otherwise.
|
|
124
|
+
*/
|
|
125
|
+
function isAllowlisted(
|
|
126
|
+
uint256 projectId,
|
|
127
|
+
address coreContract,
|
|
128
|
+
address wallet
|
|
129
|
+
) internal view returns (bool) {
|
|
130
|
+
return
|
|
131
|
+
getOnChainAllowlistProjectConfig({
|
|
132
|
+
projectId: projectId,
|
|
133
|
+
coreContract: coreContract
|
|
134
|
+
}).allowlist[wallet];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Loads the OnChainAllowlistProjectConfig for a given project and core
|
|
139
|
+
* contract.
|
|
140
|
+
* @param projectId Project Id to get config for
|
|
141
|
+
* @param coreContract Core contract address to get config for
|
|
142
|
+
*/
|
|
143
|
+
function getOnChainAllowlistProjectConfig(
|
|
144
|
+
uint256 projectId,
|
|
145
|
+
address coreContract
|
|
146
|
+
) internal view returns (OnChainAllowlistProjectConfig storage) {
|
|
147
|
+
return s().onChainAllowlistProjectConfigs[coreContract][projectId];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @notice Return the storage struct for reading and writing. This library
|
|
152
|
+
* uses a diamond storage pattern when managing storage.
|
|
153
|
+
* @return storageStruct The OnChainAllowlistLibStorage struct.
|
|
154
|
+
*/
|
|
155
|
+
function s()
|
|
156
|
+
internal
|
|
157
|
+
pure
|
|
158
|
+
returns (OnChainAllowlistLibStorage storage storageStruct)
|
|
159
|
+
{
|
|
160
|
+
bytes32 position = ON_CHAIN_ALLOWLIST_LIB_STORAGE_POSITION;
|
|
161
|
+
assembly ("memory-safe") {
|
|
162
|
+
storageStruct.slot := position
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|