@artblocks/contracts 1.2.0 → 1.3.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 +22 -38
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +201 -0
- package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol/BytecodeStorageReaderContractV2_Web3Call.json +201 -0
- package/artifacts/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +174 -55
- package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +2493 -0
- package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +311 -0
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +15 -2
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +15 -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 +37 -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 +20 -2
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +48 -12
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +76 -40
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +15 -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 +15 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +37 -0
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
- package/artifacts/contracts/generator/AddressChunks.sol/AddressChunks.json +10 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +333 -0
- package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/ILegacyGenArt721CoreV2_PBAB_Flex.json +47 -0
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +7 -7
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol/IBytecodeStorageReader_Base.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +13 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDelegateRegistry.sol/IDelegateRegistry.json +820 -0
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +183 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +42 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol/IGenArt721CoreProjectScriptV0.json +59 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol/IGenArt721CoreProjectScriptV1.json +64 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol/IGenArt721CoreTokenHashProviderV0.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol/IGenArt721CoreTokenHashProviderV1.json +30 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol/IGenArt721GeneratorV0.json +63 -0
- package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol/IPMPAugmentHook.json +83 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol/IPMPConfigureHook.json +80 -0
- package/artifacts/contracts/interfaces/v0.8.x/IPMPV0.sol/IPMPV0.json +402 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol/IUniversalBytecodeStorageReader.json +69 -0
- package/artifacts/contracts/interfaces/v0.8.x/IWeb3Call.sol/IWeb3Call.json +47 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol/ERC721SeaDropStructsErrorsAndEvents.json +43 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol/INonFungibleSeaDropToken.json +715 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol/ISeaDrop.json +1571 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol/ISeaDropTokenContractMetadata.json +345 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol/SeaDropErrorsAndEvents.json +717 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol/DelegateRegistry.json +846 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol/RegistryHashes.json +10 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol/RegistryOps.json +10 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol/RegistryStorage.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ImmutableStringArray.sol/ImmutableStringArray.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +9 -22
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol/MinPriceLib.json +24 -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 +664 -0
- package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +387 -0
- 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/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
- 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 +1206 -0
- package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -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/ImmutableStringArrayMock.sol/ImmutableStringArrayMock.json +69 -0
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -0
- package/artifacts/contracts/mock/MockPMPAugmentHook.sol/MockPMPAugmentHook.json +214 -0
- package/artifacts/contracts/mock/MockPMPConfigureHook.sol/MockPMPConfigureHook.json +236 -0
- package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- 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/web3call/PMPV0.sol/PMPV0.json +629 -0
- package/artifacts/contracts/web3call/Web3Call.sol/Web3Call.json +66 -0
- package/artifacts/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol/AbstractPMPAugmentHook.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectBaseGasFee.sol/InjectBaseGasFee.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/IUniswapV2Pair.json +60 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol/InjectChromieSquiggleFloorPrice.json +107 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol/InjectIsNounsDaoMember.json +96 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol/InjectIsProjectFullyMinted.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol/InjectPolyptychTokenHash.json +141 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol/InjectTokenHashSeed.json +99 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwner.sol/InjectTokenOwner.json +99 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol/InjectTokenOwnerEthBalance.json +83 -0
- package/artifacts/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol/InjectUSDCTotalSupply.json +107 -0
- package/artifacts/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol/AbstractPMPConfigureHook.json +80 -0
- package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
- package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2_Web3Call.sol +128 -0
- package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
- package/contracts/BytecodeStorageV2Writer.sol +69 -0
- package/contracts/DependencyRegistryV0.sol +296 -88
- package/contracts/GenArt721CoreV3_Curated.sol +133 -0
- package/contracts/OwnedCreate2FactoryV0.sol +173 -0
- package/contracts/engine/V3/EngineFactoryV0.sol +10 -2
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +139 -70
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +148 -72
- package/contracts/generator/AddressChunks.sol +106 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +1163 -0
- package/contracts/generator/scripty-support/Scripty.sol +5 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +5 -3
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol +20 -0
- package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +5 -0
- package/contracts/interfaces/v0.8.x/IDelegateRegistry.sol +318 -0
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +96 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +13 -2
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +3 -1
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol +23 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol +11 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol +9 -0
- package/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol +14 -0
- package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
- package/contracts/interfaces/v0.8.x/IPMPAugmentHook.sol +31 -0
- package/contracts/interfaces/v0.8.x/IPMPConfigureHook.sol +25 -0
- package/contracts/interfaces/v0.8.x/IPMPV0.sol +224 -0
- package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +10 -4
- package/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol +33 -0
- package/contracts/interfaces/v0.8.x/IWeb3Call.sol +28 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol +58 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol +186 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol +337 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol +152 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol +320 -0
- package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol +146 -0
- package/contracts/libs/integration-refs/delegation-registry/DelegateRegistry.sol +753 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryHashes.sol +359 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryOps.sol +31 -0
- package/contracts/libs/integration-refs/delegation-registry/libraries/RegistryStorage.sol +87 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +14 -3
- package/contracts/libs/v0.8.x/ImmutableStringArray.sol +289 -0
- package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +16 -4
- package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +107 -0
- package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
- package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
- package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
- package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
- package/contracts/mock/ImmutableStringArrayMock.sol +47 -0
- package/contracts/mock/MockFileStore.sol +22 -0
- package/contracts/mock/MockPMPAugmentHook.sol +170 -0
- package/contracts/mock/MockPMPConfigureHook.sol +78 -0
- package/contracts/web3call/PMPV0.sol +1125 -0
- package/contracts/web3call/Web3Call.sol +25 -0
- package/contracts/web3call/augment-hooks/AbstractPMPAugmentHook.sol +46 -0
- package/contracts/web3call/augment-hooks/InjectBaseGasFee.sol +57 -0
- package/contracts/web3call/augment-hooks/InjectChromieSquiggleFloorPrice.sol +103 -0
- package/contracts/web3call/augment-hooks/InjectIsNounsDaoMember.sol +66 -0
- package/contracts/web3call/augment-hooks/InjectIsProjectFullyMinted.sol +73 -0
- package/contracts/web3call/augment-hooks/InjectPolyptychTokenHash.sol +88 -0
- package/contracts/web3call/augment-hooks/InjectTokenHashSeed.sol +62 -0
- package/contracts/web3call/augment-hooks/InjectTokenOwner.sol +60 -0
- package/contracts/web3call/augment-hooks/InjectTokenOwnerEthBalance.sol +61 -0
- package/contracts/web3call/augment-hooks/InjectUSDCTotalSupply.sol +69 -0
- package/contracts/web3call/configure-hooks/abstractPMPConfigureHook.sol +41 -0
- package/package.json +23 -21
|
@@ -6,6 +6,9 @@ pragma solidity 0.8.19;
|
|
|
6
6
|
import "./interfaces/v0.8.x/IAdminACLV0.sol";
|
|
7
7
|
import "./interfaces/v0.8.x/IDependencyRegistryCompatibleV0.sol";
|
|
8
8
|
import "./interfaces/v0.8.x/IDependencyRegistryV0.sol";
|
|
9
|
+
import "./interfaces/v0.8.x/ICoreRegistryV1.sol";
|
|
10
|
+
import "./interfaces/v0.8.x/IBytecodeStorageReaderV2.sol";
|
|
11
|
+
import "./interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol";
|
|
9
12
|
|
|
10
13
|
import "@openzeppelin-4.7/contracts/utils/Strings.sol";
|
|
11
14
|
import "@openzeppelin-4.7/contracts/utils/structs/EnumerableSet.sol";
|
|
@@ -14,7 +17,7 @@ import "@openzeppelin-4.8/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
|
14
17
|
import "@openzeppelin-4.5/contracts/utils/math/SafeCast.sol";
|
|
15
18
|
|
|
16
19
|
import "./libs/v0.8.x/DependencyRegistryStorageLib.sol";
|
|
17
|
-
import "./libs/v0.8.x/
|
|
20
|
+
import "./libs/v0.8.x/BytecodeStorageV2.sol";
|
|
18
21
|
import "./libs/v0.8.x/Bytes32Strings.sol";
|
|
19
22
|
|
|
20
23
|
/**
|
|
@@ -36,6 +39,7 @@ contract DependencyRegistryV0 is
|
|
|
36
39
|
{
|
|
37
40
|
using BytecodeStorageWriter for string;
|
|
38
41
|
using Bytes32Strings for bytes32;
|
|
42
|
+
using Bytes32Strings for string;
|
|
39
43
|
using Strings for uint256;
|
|
40
44
|
using EnumerableSet for EnumerableSet.Bytes32Set;
|
|
41
45
|
using EnumerableSet for EnumerableSet.AddressSet;
|
|
@@ -65,10 +69,9 @@ contract DependencyRegistryV0 is
|
|
|
65
69
|
function _onlySupportedCoreContract(
|
|
66
70
|
address coreContractAddress
|
|
67
71
|
) internal view {
|
|
72
|
+
// defer to public function logic
|
|
68
73
|
require(
|
|
69
|
-
|
|
70
|
-
coreContractAddress
|
|
71
|
-
),
|
|
74
|
+
isSupportedCoreContract(coreContractAddress),
|
|
72
75
|
"Core contract not supported"
|
|
73
76
|
);
|
|
74
77
|
}
|
|
@@ -95,6 +98,10 @@ contract DependencyRegistryV0 is
|
|
|
95
98
|
);
|
|
96
99
|
}
|
|
97
100
|
|
|
101
|
+
function _onlyBytes32String(string memory input) internal pure {
|
|
102
|
+
require(bytes(input).length <= 32, "String too long");
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
/**
|
|
99
106
|
* @notice Initializes contract.
|
|
100
107
|
* @param adminACLContract_ Address of admin access control contract, to be
|
|
@@ -107,6 +114,30 @@ contract DependencyRegistryV0 is
|
|
|
107
114
|
_transferOwnership(adminACLContract_);
|
|
108
115
|
}
|
|
109
116
|
|
|
117
|
+
function updateUniversalBytecodeStorageReader(address newReader) external {
|
|
118
|
+
_onlyAdminACL(this.updateUniversalBytecodeStorageReader.selector);
|
|
119
|
+
_onlyNonZeroAddress(newReader);
|
|
120
|
+
DependencyRegistryStorageLib
|
|
121
|
+
.s()
|
|
122
|
+
.universalReader = IUniversalBytecodeStorageReader(newReader);
|
|
123
|
+
emit UniversalBytecodeStorageReaderUpdated(newReader);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @notice Updates the core registry address.
|
|
128
|
+
* @param _coreRegistryAddress Address of core registry contract.
|
|
129
|
+
*/
|
|
130
|
+
function updateCoreRegistryAddress(address _coreRegistryAddress) external {
|
|
131
|
+
_onlyAdminACL(this.updateCoreRegistryAddress.selector);
|
|
132
|
+
_onlyNonZeroAddress(_coreRegistryAddress);
|
|
133
|
+
DependencyRegistryStorageLib.s().coreRegistryContract = ICoreRegistryV1(
|
|
134
|
+
_coreRegistryAddress
|
|
135
|
+
);
|
|
136
|
+
emit CoreRegistryAddressUpdated({
|
|
137
|
+
coreRegistryAddress: _coreRegistryAddress
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
110
141
|
/**
|
|
111
142
|
* @notice Adds a new license type that can be used by dependencies.
|
|
112
143
|
* @param licenseType License type to be added.
|
|
@@ -612,37 +643,85 @@ contract DependencyRegistryV0 is
|
|
|
612
643
|
}
|
|
613
644
|
|
|
614
645
|
/**
|
|
615
|
-
* @notice
|
|
616
|
-
*
|
|
646
|
+
* @notice These functions were removed in an upgrade, registering and unregistering
|
|
647
|
+
* contracts are handled by the core registry.
|
|
617
648
|
*/
|
|
618
|
-
|
|
619
|
-
|
|
649
|
+
// /**
|
|
650
|
+
// * @notice Adds a new core contract to the list of supported core contracts.
|
|
651
|
+
// * @param contractAddress Address of the core contract to be added.
|
|
652
|
+
// */
|
|
653
|
+
// function addSupportedCoreContract(address contractAddress) external {
|
|
654
|
+
// _onlyAdminACL(this.addSupportedCoreContract.selector);
|
|
655
|
+
// _onlyNonZeroAddress(contractAddress);
|
|
656
|
+
|
|
657
|
+
// require(
|
|
658
|
+
// // @dev the add function returns false if set already contains value
|
|
659
|
+
// DependencyRegistryStorageLib.s().supportedCoreContracts.add(
|
|
660
|
+
// contractAddress
|
|
661
|
+
// ),
|
|
662
|
+
// "Contract already supported"
|
|
663
|
+
// );
|
|
664
|
+
// emit SupportedCoreContractAdded(contractAddress);
|
|
665
|
+
// }
|
|
666
|
+
|
|
667
|
+
// /**
|
|
668
|
+
// * @notice Removes a core contract from the list of supported core contracts.
|
|
669
|
+
// * @param contractAddress Address of the core contract to be removed.
|
|
670
|
+
// */
|
|
671
|
+
// function removeSupportedCoreContract(address contractAddress) external {
|
|
672
|
+
// _onlyAdminACL(this.removeSupportedCoreContract.selector);
|
|
673
|
+
// require(
|
|
674
|
+
// // @dev the remove function returns false if set does not contain value
|
|
675
|
+
// DependencyRegistryStorageLib.s().supportedCoreContracts.remove(
|
|
676
|
+
// contractAddress
|
|
677
|
+
// ),
|
|
678
|
+
// "Core contract already removed or not in set"
|
|
679
|
+
// );
|
|
680
|
+
// emit SupportedCoreContractRemoved(contractAddress);
|
|
681
|
+
// }
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @notice Adds a new core contract to be supported by the dependency registry.
|
|
685
|
+
* This is in addition to the set of contracts specified as supported by the core registry.
|
|
686
|
+
* @dev use case is a contract not allowed to mint on minter filter, but still needs to be
|
|
687
|
+
* supported by dependency registry.
|
|
688
|
+
* @param contractAddress Address of the core contract.
|
|
689
|
+
*/
|
|
690
|
+
function addSupportedCoreContractOverride(
|
|
691
|
+
address contractAddress
|
|
692
|
+
) external {
|
|
693
|
+
_onlyAdminACL(this.addSupportedCoreContractOverride.selector);
|
|
620
694
|
_onlyNonZeroAddress(contractAddress);
|
|
621
695
|
|
|
622
696
|
require(
|
|
623
697
|
// @dev the add function returns false if set already contains value
|
|
624
|
-
DependencyRegistryStorageLib.s().
|
|
698
|
+
DependencyRegistryStorageLib.s().supportedCoreContractsOverride.add(
|
|
625
699
|
contractAddress
|
|
626
700
|
),
|
|
627
701
|
"Contract already supported"
|
|
628
702
|
);
|
|
629
|
-
emit
|
|
703
|
+
emit SupportedCoreContractOverrideAdded(contractAddress);
|
|
630
704
|
}
|
|
631
705
|
|
|
632
706
|
/**
|
|
633
|
-
* @notice Removes a core contract
|
|
634
|
-
*
|
|
707
|
+
* @notice Removes a core contract previously listed as override supported by the dependency registry.
|
|
708
|
+
* This removes from the set of core contracts that are suppported by the dependency in addition to
|
|
709
|
+
* the set of contracts specified as supported by the core registry.
|
|
710
|
+
* @param contractAddress Address of the core contract.
|
|
635
711
|
*/
|
|
636
|
-
function
|
|
637
|
-
|
|
712
|
+
function removeSupportedCoreContractOverride(
|
|
713
|
+
address contractAddress
|
|
714
|
+
) external {
|
|
715
|
+
_onlyAdminACL(this.removeSupportedCoreContractOverride.selector);
|
|
638
716
|
require(
|
|
639
717
|
// @dev the remove function returns false if set does not contain value
|
|
640
|
-
DependencyRegistryStorageLib
|
|
641
|
-
|
|
642
|
-
|
|
718
|
+
DependencyRegistryStorageLib
|
|
719
|
+
.s()
|
|
720
|
+
.supportedCoreContractsOverride
|
|
721
|
+
.remove(contractAddress),
|
|
643
722
|
"Core contract already removed or not in set"
|
|
644
723
|
);
|
|
645
|
-
emit
|
|
724
|
+
emit SupportedCoreContractOverrideRemoved(contractAddress);
|
|
646
725
|
}
|
|
647
726
|
|
|
648
727
|
/**
|
|
@@ -901,18 +980,7 @@ contract DependencyRegistryV0 is
|
|
|
901
980
|
});
|
|
902
981
|
|
|
903
982
|
address licenseAddress = licenseEntry.licenseBytecodeAddresses[index];
|
|
904
|
-
|
|
905
|
-
.getLibraryVersionForBytecode(licenseAddress);
|
|
906
|
-
if (storageVersion == BytecodeStorageReader.UNKNOWN_VERSION_STRING) {
|
|
907
|
-
return
|
|
908
|
-
string(
|
|
909
|
-
BytecodeStorageReader.readBytesFromSSTORE2Bytecode(
|
|
910
|
-
licenseAddress
|
|
911
|
-
)
|
|
912
|
-
);
|
|
913
|
-
} else {
|
|
914
|
-
return BytecodeStorageReader.readFromBytecode(licenseAddress);
|
|
915
|
-
}
|
|
983
|
+
return _readFromBytecodeWithSSTORE2Fallback(licenseAddress);
|
|
916
984
|
}
|
|
917
985
|
|
|
918
986
|
/**
|
|
@@ -930,7 +998,8 @@ contract DependencyRegistryV0 is
|
|
|
930
998
|
}
|
|
931
999
|
|
|
932
1000
|
/**
|
|
933
|
-
* @notice Returns details for a given dependency type `dependencyNameAndVersion
|
|
1001
|
+
* @notice Returns details for a given dependency type `dependencyNameAndVersion` input as string.
|
|
1002
|
+
* Reverts if input string does not fit within 32 bytes.
|
|
934
1003
|
* @param dependencyNameAndVersion Name and version of dependency (i.e. "name@version") used to identify dependency.
|
|
935
1004
|
* @return nameAndVersion String representation of `dependencyNameAndVersion`.
|
|
936
1005
|
* (e.g. "p5js(atSymbol)1.0.0")
|
|
@@ -943,8 +1012,8 @@ contract DependencyRegistryV0 is
|
|
|
943
1012
|
* @return availableOnChain Whether dependency is available on chain
|
|
944
1013
|
* @return scriptCount Count of on-chain scripts for dependency
|
|
945
1014
|
*/
|
|
946
|
-
function
|
|
947
|
-
|
|
1015
|
+
function getDependencyDetailsFromString(
|
|
1016
|
+
string memory dependencyNameAndVersion
|
|
948
1017
|
)
|
|
949
1018
|
external
|
|
950
1019
|
view
|
|
@@ -960,64 +1029,86 @@ contract DependencyRegistryV0 is
|
|
|
960
1029
|
uint24 scriptCount
|
|
961
1030
|
)
|
|
962
1031
|
{
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
.s()
|
|
966
|
-
.dependencyRecords[dependencyNameAndVersion];
|
|
967
|
-
|
|
968
|
-
return (
|
|
969
|
-
dependencyNameAndVersion.toString(),
|
|
970
|
-
dependency.licenseType.toString(),
|
|
971
|
-
dependency.preferredCDN,
|
|
972
|
-
dependency.additionalCDNCount,
|
|
973
|
-
dependency.preferredRepository,
|
|
974
|
-
dependency.additionalRepositoryCount,
|
|
975
|
-
dependency.website,
|
|
976
|
-
dependency.scriptCount > 0,
|
|
977
|
-
dependency.scriptCount
|
|
978
|
-
);
|
|
1032
|
+
_onlyBytes32String(dependencyNameAndVersion);
|
|
1033
|
+
return getDependencyDetails(dependencyNameAndVersion.stringToBytes32());
|
|
979
1034
|
}
|
|
980
1035
|
|
|
981
1036
|
/**
|
|
982
1037
|
* @notice Returns the count of supported core contracts
|
|
1038
|
+
* @dev This concatenates the core contracts from the core registry with the
|
|
1039
|
+
* core contracts that are overridden as supported by the dependency registry.
|
|
1040
|
+
* Some duplicate entries may exist between the two sets, although this is not
|
|
1041
|
+
* intended to be the case.
|
|
983
1042
|
* @return Number of supported core contracts.
|
|
984
1043
|
*/
|
|
985
1044
|
function getSupportedCoreContractCount() external view returns (uint256) {
|
|
986
|
-
|
|
1045
|
+
uint256 coreRegistryCount = ICoreRegistryV1(
|
|
1046
|
+
DependencyRegistryStorageLib.s().coreRegistryContract
|
|
1047
|
+
).getNumRegisteredContracts();
|
|
1048
|
+
uint256 overrideCount = DependencyRegistryStorageLib
|
|
1049
|
+
.s()
|
|
1050
|
+
.supportedCoreContractsOverride
|
|
1051
|
+
.length();
|
|
1052
|
+
return coreRegistryCount + overrideCount;
|
|
987
1053
|
}
|
|
988
1054
|
|
|
989
1055
|
/**
|
|
990
1056
|
* @notice Returns the address of the supported core contract at index `index`.
|
|
1057
|
+
* @dev This concatenates the core contracts from the core registry with the
|
|
1058
|
+
* core contracts that are overridden as supported by the dependency registry, and
|
|
1059
|
+
* consistent with the length returned by `getSupportedCoreContractCount`.
|
|
991
1060
|
* @param index Index of the core contract to be returned, relative to the overall
|
|
992
|
-
*
|
|
1061
|
+
* list of supported core contracts.
|
|
993
1062
|
* @return address of the core contract.
|
|
994
1063
|
*/
|
|
995
1064
|
function getSupportedCoreContract(
|
|
996
1065
|
uint256 index
|
|
997
1066
|
) external view returns (address) {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1067
|
+
uint256 coreRegistryCount = ICoreRegistryV1(
|
|
1068
|
+
DependencyRegistryStorageLib.s().coreRegistryContract
|
|
1069
|
+
).getNumRegisteredContracts();
|
|
1070
|
+
if (index < coreRegistryCount) {
|
|
1071
|
+
return
|
|
1072
|
+
ICoreRegistryV1(
|
|
1073
|
+
DependencyRegistryStorageLib.s().coreRegistryContract
|
|
1074
|
+
).getRegisteredContractAt(index);
|
|
1075
|
+
}
|
|
1076
|
+
uint256 overrideCount = DependencyRegistryStorageLib
|
|
1077
|
+
.s()
|
|
1078
|
+
.supportedCoreContractsOverride
|
|
1079
|
+
.length();
|
|
1080
|
+
require(
|
|
1081
|
+
index < coreRegistryCount + overrideCount,
|
|
1082
|
+
"Index out of range"
|
|
1083
|
+
);
|
|
1005
1084
|
|
|
1006
|
-
|
|
1085
|
+
unchecked {
|
|
1086
|
+
return
|
|
1087
|
+
DependencyRegistryStorageLib
|
|
1088
|
+
.s()
|
|
1089
|
+
.supportedCoreContractsOverride
|
|
1090
|
+
.at(index - coreRegistryCount);
|
|
1091
|
+
}
|
|
1007
1092
|
}
|
|
1008
1093
|
|
|
1009
1094
|
/**
|
|
1010
1095
|
* @notice Returns whether the given contract address is a supported core contract.
|
|
1096
|
+
* @dev This checks if the given contract address is registered in the core registry
|
|
1097
|
+
* or if it is overridden as supported by the dependency registry.
|
|
1011
1098
|
* @param coreContractAddress Address of the core contract to be queried.
|
|
1012
1099
|
* @return True if the given contract address is a supported core contract.
|
|
1013
1100
|
*/
|
|
1014
1101
|
function isSupportedCoreContract(
|
|
1015
1102
|
address coreContractAddress
|
|
1016
|
-
)
|
|
1103
|
+
) public view returns (bool) {
|
|
1017
1104
|
return
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
)
|
|
1105
|
+
ICoreRegistryV1(
|
|
1106
|
+
DependencyRegistryStorageLib.s().coreRegistryContract
|
|
1107
|
+
).isRegisteredContract(coreContractAddress) ||
|
|
1108
|
+
DependencyRegistryStorageLib
|
|
1109
|
+
.s()
|
|
1110
|
+
.supportedCoreContractsOverride
|
|
1111
|
+
.contains(coreContractAddress);
|
|
1021
1112
|
}
|
|
1022
1113
|
|
|
1023
1114
|
/**
|
|
@@ -1031,21 +1122,36 @@ contract DependencyRegistryV0 is
|
|
|
1031
1122
|
view
|
|
1032
1123
|
returns (address[] memory)
|
|
1033
1124
|
{
|
|
1034
|
-
|
|
1035
|
-
|
|
1125
|
+
// get all registered contracts on the core registry
|
|
1126
|
+
address[] memory coreRegistryRegisteredContracts = ICoreRegistryV1(
|
|
1127
|
+
DependencyRegistryStorageLib.s().coreRegistryContract
|
|
1128
|
+
).getAllRegisteredContracts();
|
|
1129
|
+
// @dev memoize for efficiency
|
|
1130
|
+
uint256 coreRegistryRegisteredContractsLength = coreRegistryRegisteredContracts
|
|
1131
|
+
.length;
|
|
1132
|
+
// get all overridden contracts in the supportedCoreContractsOverride set
|
|
1133
|
+
address[]
|
|
1134
|
+
memory supportedCoreContractsOverride = DependencyRegistryStorageLib
|
|
1135
|
+
.s()
|
|
1136
|
+
.supportedCoreContractsOverride
|
|
1137
|
+
.values();
|
|
1036
1138
|
|
|
1037
|
-
|
|
1139
|
+
// concat the two address arrays and return the result
|
|
1038
1140
|
address[] memory supportedCoreContracts = new address[](
|
|
1039
|
-
|
|
1141
|
+
coreRegistryRegisteredContracts.length +
|
|
1142
|
+
supportedCoreContractsOverride.length
|
|
1040
1143
|
);
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1144
|
+
// @dev memoize for efficiency
|
|
1145
|
+
uint256 supportedCoreContractsLength = supportedCoreContracts.length;
|
|
1146
|
+
for (uint i = 0; i < supportedCoreContractsLength; i++) {
|
|
1147
|
+
if (i < coreRegistryRegisteredContractsLength) {
|
|
1148
|
+
supportedCoreContracts[i] = coreRegistryRegisteredContracts[i];
|
|
1149
|
+
} else {
|
|
1150
|
+
supportedCoreContracts[i] = supportedCoreContractsOverride[
|
|
1151
|
+
i - coreRegistryRegisteredContractsLength
|
|
1152
|
+
];
|
|
1046
1153
|
}
|
|
1047
1154
|
}
|
|
1048
|
-
|
|
1049
1155
|
return supportedCoreContracts;
|
|
1050
1156
|
}
|
|
1051
1157
|
|
|
@@ -1144,9 +1250,10 @@ contract DependencyRegistryV0 is
|
|
|
1144
1250
|
.dependencyRecords[dependencyNameAndVersion];
|
|
1145
1251
|
_onlyInRangeIndex({index: index, length: dependency.scriptCount});
|
|
1146
1252
|
return
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1253
|
+
_getActiveBytecodeStorageReaderContract()
|
|
1254
|
+
.getLibraryVersionForBytecode(
|
|
1255
|
+
dependency.scriptBytecodeAddresses[index]
|
|
1256
|
+
);
|
|
1150
1257
|
}
|
|
1151
1258
|
|
|
1152
1259
|
/**
|
|
@@ -1173,19 +1280,8 @@ contract DependencyRegistryV0 is
|
|
|
1173
1280
|
_onlyInRangeIndex({index: index, length: dependency.scriptCount});
|
|
1174
1281
|
|
|
1175
1282
|
address scriptAddress = dependency.scriptBytecodeAddresses[index];
|
|
1176
|
-
bytes32 storageVersion = BytecodeStorageReader
|
|
1177
|
-
.getLibraryVersionForBytecode(scriptAddress);
|
|
1178
1283
|
|
|
1179
|
-
|
|
1180
|
-
return
|
|
1181
|
-
string(
|
|
1182
|
-
BytecodeStorageReader.readBytesFromSSTORE2Bytecode(
|
|
1183
|
-
scriptAddress
|
|
1184
|
-
)
|
|
1185
|
-
);
|
|
1186
|
-
} else {
|
|
1187
|
-
return BytecodeStorageReader.readFromBytecode(scriptAddress);
|
|
1188
|
-
}
|
|
1284
|
+
return _readFromBytecodeWithSSTORE2Fallback(scriptAddress);
|
|
1189
1285
|
}
|
|
1190
1286
|
|
|
1191
1287
|
/**
|
|
@@ -1223,6 +1319,28 @@ contract DependencyRegistryV0 is
|
|
|
1223
1319
|
}
|
|
1224
1320
|
}
|
|
1225
1321
|
|
|
1322
|
+
/**
|
|
1323
|
+
* @notice returns the address of the core registry currently being used by the dependency registry.
|
|
1324
|
+
* @return address Address of the core registry contract.
|
|
1325
|
+
*/
|
|
1326
|
+
function currentCoreRegistry() external view returns (address) {
|
|
1327
|
+
return address(DependencyRegistryStorageLib.s().coreRegistryContract);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* @notice utility function to convert from string to bytes32.
|
|
1332
|
+
* Useful when a human is calling functions that take bytes32 as input.
|
|
1333
|
+
* Reverts if input string does not fit within 32 bytes.
|
|
1334
|
+
* @param input String to convert to bytes32.
|
|
1335
|
+
* @return bytes32 representation of input.
|
|
1336
|
+
*/
|
|
1337
|
+
function stringToBytes32(
|
|
1338
|
+
string memory input
|
|
1339
|
+
) external pure returns (bytes32) {
|
|
1340
|
+
_onlyBytes32String(input);
|
|
1341
|
+
return input.stringToBytes32();
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1226
1344
|
/**
|
|
1227
1345
|
* @notice Convenience function that returns whether `_sender` is allowed
|
|
1228
1346
|
* to call function with selector `_selector` on contract `_contract`, as
|
|
@@ -1256,6 +1374,55 @@ contract DependencyRegistryV0 is
|
|
|
1256
1374
|
);
|
|
1257
1375
|
}
|
|
1258
1376
|
|
|
1377
|
+
/**
|
|
1378
|
+
* @notice Returns details for a given dependency type `dependencyNameAndVersion`.
|
|
1379
|
+
* @param dependencyNameAndVersion Name and version of dependency (i.e. "name@version") used to identify dependency.
|
|
1380
|
+
* @return nameAndVersion String representation of `dependencyNameAndVersion`.
|
|
1381
|
+
* (e.g. "p5js(atSymbol)1.0.0")
|
|
1382
|
+
* @return licenseType License type for dependency
|
|
1383
|
+
* @return preferredCDN Preferred CDN URL for dependency
|
|
1384
|
+
* @return additionalCDNCount Count of additional CDN URLs for dependency
|
|
1385
|
+
* @return preferredRepository Preferred repository URL for dependency
|
|
1386
|
+
* @return additionalRepositoryCount Count of additional repository URLs for dependency
|
|
1387
|
+
* @return dependencyWebsite Project website URL for dependency
|
|
1388
|
+
* @return availableOnChain Whether dependency is available on chain
|
|
1389
|
+
* @return scriptCount Count of on-chain scripts for dependency
|
|
1390
|
+
*/
|
|
1391
|
+
function getDependencyDetails(
|
|
1392
|
+
bytes32 dependencyNameAndVersion
|
|
1393
|
+
)
|
|
1394
|
+
public
|
|
1395
|
+
view
|
|
1396
|
+
returns (
|
|
1397
|
+
string memory nameAndVersion,
|
|
1398
|
+
string memory licenseType,
|
|
1399
|
+
string memory preferredCDN,
|
|
1400
|
+
uint24 additionalCDNCount,
|
|
1401
|
+
string memory preferredRepository,
|
|
1402
|
+
uint24 additionalRepositoryCount,
|
|
1403
|
+
string memory dependencyWebsite,
|
|
1404
|
+
bool availableOnChain,
|
|
1405
|
+
uint24 scriptCount
|
|
1406
|
+
)
|
|
1407
|
+
{
|
|
1408
|
+
DependencyRegistryStorageLib.Dependency
|
|
1409
|
+
storage dependency = DependencyRegistryStorageLib
|
|
1410
|
+
.s()
|
|
1411
|
+
.dependencyRecords[dependencyNameAndVersion];
|
|
1412
|
+
|
|
1413
|
+
return (
|
|
1414
|
+
dependencyNameAndVersion.toString(),
|
|
1415
|
+
dependency.licenseType.toString(),
|
|
1416
|
+
dependency.preferredCDN,
|
|
1417
|
+
dependency.additionalCDNCount,
|
|
1418
|
+
dependency.preferredRepository,
|
|
1419
|
+
dependency.additionalRepositoryCount,
|
|
1420
|
+
dependency.website,
|
|
1421
|
+
dependency.scriptCount > 0,
|
|
1422
|
+
dependency.scriptCount
|
|
1423
|
+
);
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1259
1426
|
/**
|
|
1260
1427
|
* @notice Returns contract owner. Set to deployer's address by default on
|
|
1261
1428
|
* contract deployment.
|
|
@@ -1294,4 +1461,45 @@ contract DependencyRegistryV0 is
|
|
|
1294
1461
|
newOwner
|
|
1295
1462
|
);
|
|
1296
1463
|
}
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* @notice Reads data from bytecode with SSTORE2 fallback.
|
|
1467
|
+
* @param dataAddress Address of the data to read.
|
|
1468
|
+
* @return data String representation of the data.
|
|
1469
|
+
*/
|
|
1470
|
+
function _readFromBytecodeWithSSTORE2Fallback(
|
|
1471
|
+
address dataAddress
|
|
1472
|
+
) internal view returns (string memory) {
|
|
1473
|
+
IBytecodeStorageReaderV2 activeReader = _getActiveBytecodeStorageReaderContract();
|
|
1474
|
+
bytes32 storageVersion = activeReader.getLibraryVersionForBytecode(
|
|
1475
|
+
dataAddress
|
|
1476
|
+
);
|
|
1477
|
+
if (storageVersion == BytecodeStorageReader.UNKNOWN_VERSION_STRING) {
|
|
1478
|
+
return
|
|
1479
|
+
string(activeReader.readBytesFromSSTORE2Bytecode(dataAddress));
|
|
1480
|
+
} else {
|
|
1481
|
+
return activeReader.readFromBytecode(dataAddress);
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* @notice Returns the active bytecode storage reader contract, being used by the universal reader contract.
|
|
1487
|
+
* @dev assumes the versioned reader is IBytecodeStorageReaderV2 or higher.
|
|
1488
|
+
* @return IBytecodeStorageReaderV2 The active bytecode storage reader contract.
|
|
1489
|
+
*/
|
|
1490
|
+
function _getActiveBytecodeStorageReaderContract()
|
|
1491
|
+
internal
|
|
1492
|
+
view
|
|
1493
|
+
returns (IBytecodeStorageReaderV2)
|
|
1494
|
+
{
|
|
1495
|
+
return
|
|
1496
|
+
IBytecodeStorageReaderV2(
|
|
1497
|
+
address(
|
|
1498
|
+
DependencyRegistryStorageLib
|
|
1499
|
+
.s()
|
|
1500
|
+
.universalReader
|
|
1501
|
+
.activeBytecodeStorageReaderContract()
|
|
1502
|
+
)
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1297
1505
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.22;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import {GenArt721CoreV3_Engine} from "./engine/V3/GenArt721CoreV3_Engine.sol";
|
|
7
|
+
import {EngineConfiguration} from "./interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol";
|
|
8
|
+
|
|
9
|
+
import "./libs/v0.8.x/Bytes32Strings.sol";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @title Art Blocks Curated ERC-721 core contract, V3.2
|
|
13
|
+
* @author Art Blocks Inc.
|
|
14
|
+
* @notice This contract derives from the Art Blocks Engine contract and adds
|
|
15
|
+
* some functionality to support curation of projects by Art Blocks.
|
|
16
|
+
* It also performs initialization of the contract in the constructor, because
|
|
17
|
+
* the contract is not intended to use a clone proxy pattern, and is intended
|
|
18
|
+
* to be deployed without any required follow-on calls to initialize.
|
|
19
|
+
* ----------------------------------------------------------------------------
|
|
20
|
+
* See the Art Blocks Engine contract for additional applicable documentation.
|
|
21
|
+
*/
|
|
22
|
+
contract GenArt721CoreV3_Curated is GenArt721CoreV3_Engine {
|
|
23
|
+
using Bytes32Strings for bytes32;
|
|
24
|
+
|
|
25
|
+
/// override patch version of this core contract
|
|
26
|
+
// @dev this is a constant value that is used to override the inherited core version CORE_VERSION
|
|
27
|
+
bytes32 private constant _CORE_VERSION_OVERRIDE = "v3.2.6";
|
|
28
|
+
|
|
29
|
+
// @dev overridden core version is returned instead of the inherited core version
|
|
30
|
+
function coreVersion() external pure override returns (string memory) {
|
|
31
|
+
return _CORE_VERSION_OVERRIDE.toString();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/// metadata pointer to the previous associated Flagship Artblocks core contracts
|
|
35
|
+
// @dev not defined as constant because constant address arrays are not yet implemented in Solidity
|
|
36
|
+
address[] public PREVIOUS_ART_BLOCKS_CONTRACTS = [
|
|
37
|
+
0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a,
|
|
38
|
+
0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270,
|
|
39
|
+
0x99a9B7c1116f9ceEB1652de04d5969CcE509B069
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
/// Curation registry for Flagship projects, managed by Art Blocks
|
|
43
|
+
address public artblocksCurationRegistryAddress;
|
|
44
|
+
|
|
45
|
+
bool public constant IS_FLAGSHIP = true;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @notice Construct a new curated Art Blocks ERC-721 core contract.
|
|
49
|
+
* Performs all contract initialization in the constructor.
|
|
50
|
+
* @param engineConfiguration Configuration for the engine contract.
|
|
51
|
+
* note: parameter `engineConfiguration.newSuperAdminAddress` is not used or operated on in this contract.
|
|
52
|
+
* @param adminACLContract_ Address of the admin ACL contract.
|
|
53
|
+
* @param defaultBaseURIHost Default base URI host for token URIs, e.g. "https://token.artblocks.io/" for mainnet
|
|
54
|
+
* @param bytecodeStorageReaderContract_ Address of the bytecode storage reader contract to be used by this
|
|
55
|
+
* contract.
|
|
56
|
+
*/
|
|
57
|
+
constructor(
|
|
58
|
+
EngineConfiguration memory engineConfiguration,
|
|
59
|
+
address adminACLContract_,
|
|
60
|
+
string memory defaultBaseURIHost,
|
|
61
|
+
address bytecodeStorageReaderContract_
|
|
62
|
+
) GenArt721CoreV3_Engine() {
|
|
63
|
+
// input validation generally performed by the engine factory
|
|
64
|
+
_onlyNonZeroAddress(engineConfiguration.renderProviderAddress);
|
|
65
|
+
_onlyNonZeroAddress(engineConfiguration.randomizerContract);
|
|
66
|
+
_onlyNonZeroAddress(adminACLContract_);
|
|
67
|
+
_onlyNonZeroAddress(bytecodeStorageReaderContract_);
|
|
68
|
+
require(
|
|
69
|
+
bytes(defaultBaseURIHost).length > 0,
|
|
70
|
+
"GenArt721CoreV3_Curated: defaultBaseURIHost must be non-empty"
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
// input validation specific to the curated contract
|
|
74
|
+
require(
|
|
75
|
+
!engineConfiguration.autoApproveArtistSplitProposals,
|
|
76
|
+
"GenArt721CoreV3_Curated: autoApproveArtistSplitProposals must be false"
|
|
77
|
+
);
|
|
78
|
+
// @dev artblocks is listed as render provider, no party should be platform provider
|
|
79
|
+
require(
|
|
80
|
+
engineConfiguration.nullPlatformProvider,
|
|
81
|
+
"GenArt721CoreV3_Curated: nullPlatformProvider must be true"
|
|
82
|
+
);
|
|
83
|
+
require(
|
|
84
|
+
!engineConfiguration.allowArtistProjectActivation,
|
|
85
|
+
"GenArt721CoreV3_Curated: allowArtistProjectActivation must be false"
|
|
86
|
+
);
|
|
87
|
+
// @dev previous artblocks contracts exists, so only starting project ID > 0
|
|
88
|
+
require(
|
|
89
|
+
engineConfiguration.startingProjectId > 0,
|
|
90
|
+
"GenArt721CoreV3_Curated: startingProjectId must be greater than 0"
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
// initialize the contract
|
|
94
|
+
_initialize({
|
|
95
|
+
engineConfiguration: engineConfiguration,
|
|
96
|
+
adminACLContract_: adminACLContract_,
|
|
97
|
+
defaultBaseURIHost: defaultBaseURIHost,
|
|
98
|
+
bytecodeStorageReaderContract_: bytecodeStorageReaderContract_
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// override default base URI to be curated format instead of Engine (no address required for curated)
|
|
102
|
+
_updateDefaultBaseURI(defaultBaseURIHost);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @notice Override of the Engine contract's initialize function.
|
|
107
|
+
* Immediately reverts, as initialization of this Curated contract is performed in the constructor.
|
|
108
|
+
*/
|
|
109
|
+
function initialize(
|
|
110
|
+
EngineConfiguration memory /*engineConfiguration*/,
|
|
111
|
+
address /*adminACLContract_*/,
|
|
112
|
+
string memory /*defaultBaseURIHost*/,
|
|
113
|
+
address /*bytecodeStorageReaderContract_*/
|
|
114
|
+
) external pure override {
|
|
115
|
+
// revert - initialization for this contract is performed in the constructor
|
|
116
|
+
// @dev note that the initialize function would revert without this override, but it is included for clarity
|
|
117
|
+
revert("GenArt721CoreV3_Curated: contract initialized in constructor");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @notice Updates reference to Art Blocks Curation Registry contract.
|
|
122
|
+
* @param _artblocksCurationRegistryAddress Address of Art Blocks Curation Registry contract.
|
|
123
|
+
*/
|
|
124
|
+
function updateArtblocksCurationRegistryAddress(
|
|
125
|
+
address _artblocksCurationRegistryAddress
|
|
126
|
+
) external {
|
|
127
|
+
_onlyAdminACL(this.updateArtblocksCurationRegistryAddress.selector);
|
|
128
|
+
artblocksCurationRegistryAddress = _artblocksCurationRegistryAddress;
|
|
129
|
+
emit ArtBlocksCurationRegistryContractUpdated(
|
|
130
|
+
_artblocksCurationRegistryAddress
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|