@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {IWeb3Call} from "../interfaces/v0.8.x/IWeb3Call.sol";
|
|
7
|
+
|
|
8
|
+
import {ERC165} from "@openzeppelin-5.0/contracts/utils/introspection/ERC165.sol";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @title Abstract Web3Call contract
|
|
12
|
+
* @author Art Blocks Inc.
|
|
13
|
+
* @notice This abstract can be inherited by any contract that wants to implement the Web3Call interface.
|
|
14
|
+
* It indicates support for the IWeb3Call interface via ERC165 interface detection, and ensures that all
|
|
15
|
+
* child contracts implement the required IWeb3Call functions.
|
|
16
|
+
*/
|
|
17
|
+
abstract contract Web3Call is IWeb3Call, ERC165 {
|
|
18
|
+
function supportsInterface(
|
|
19
|
+
bytes4 interfaceId
|
|
20
|
+
) public view override returns (bool) {
|
|
21
|
+
return
|
|
22
|
+
interfaceId == type(IWeb3Call).interfaceId ||
|
|
23
|
+
super.supportsInterface(interfaceId);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {IPMPAugmentHook} from "../../interfaces/v0.8.x/IPMPAugmentHook.sol";
|
|
7
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
8
|
+
|
|
9
|
+
import {ERC165} from "@openzeppelin-5.0/contracts/utils/introspection/ERC165.sol";
|
|
10
|
+
import {IERC165} from "@openzeppelin-5.0/contracts/interfaces/IERC165.sol";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title Abstract Web3Call contract
|
|
14
|
+
* @author Art Blocks Inc.
|
|
15
|
+
* @notice This abstract can be inherited by any contract that wants to implement the Web3Call interface.
|
|
16
|
+
* It indicates support for the IWeb3Call interface via ERC165 interface detection, and ensures that all
|
|
17
|
+
* child contracts implement the required IWeb3Call functions.
|
|
18
|
+
*/
|
|
19
|
+
abstract contract AbstractPMPAugmentHook is IPMPAugmentHook, ERC165 {
|
|
20
|
+
/**
|
|
21
|
+
* @notice Augment the token parameters for a given token.
|
|
22
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
23
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
24
|
+
* @param coreContract The address of the core contract to call.
|
|
25
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
26
|
+
* @param tokenParams The token parameters for the queried token.
|
|
27
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
28
|
+
*/
|
|
29
|
+
function onTokenPMPReadAugmentation(
|
|
30
|
+
address coreContract,
|
|
31
|
+
uint256 tokenId,
|
|
32
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
33
|
+
)
|
|
34
|
+
external
|
|
35
|
+
view
|
|
36
|
+
virtual
|
|
37
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams);
|
|
38
|
+
|
|
39
|
+
function supportsInterface(
|
|
40
|
+
bytes4 interfaceId
|
|
41
|
+
) public view override(ERC165, IERC165) returns (bool) {
|
|
42
|
+
return
|
|
43
|
+
interfaceId == type(IPMPAugmentHook).interfaceId ||
|
|
44
|
+
super.supportsInterface(interfaceId);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @title InjectBaseGasFee
|
|
13
|
+
* @author Art Blocks Inc.
|
|
14
|
+
* @notice This hook injects the base gas fee into a tokens PMPs.
|
|
15
|
+
*/
|
|
16
|
+
contract InjectBaseGasFee is AbstractPMPAugmentHook {
|
|
17
|
+
using Strings for uint256;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @notice Augment the token parameters for a given token.
|
|
21
|
+
* Appends the base gas fee into a tokens PMPs.
|
|
22
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
23
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
24
|
+
* @param tokenParams The token parameters for the queried token.
|
|
25
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
26
|
+
*/
|
|
27
|
+
function onTokenPMPReadAugmentation(
|
|
28
|
+
address /* coreContract */,
|
|
29
|
+
uint256 /* tokenId */,
|
|
30
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
31
|
+
)
|
|
32
|
+
external
|
|
33
|
+
view
|
|
34
|
+
override
|
|
35
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
36
|
+
{
|
|
37
|
+
// create a new tokenParam array with one extra element
|
|
38
|
+
uint256 originalLength = tokenParams.length;
|
|
39
|
+
uint256 newLength = originalLength + 1;
|
|
40
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
41
|
+
|
|
42
|
+
// copy the original tokenParams into the new array
|
|
43
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
44
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// get + inject the base gas fee into the new array
|
|
48
|
+
uint256 blockBaseFee = block.basefee;
|
|
49
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
50
|
+
key: "baseGasFee",
|
|
51
|
+
value: blockBaseFee.toString()
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// return the augmented tokenParams
|
|
55
|
+
return augmentedTokenParams;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
10
|
+
|
|
11
|
+
// @dev This is a simplified interface for the Uniswap V2 Pair contract.
|
|
12
|
+
interface IUniswapV2Pair {
|
|
13
|
+
function getReserves()
|
|
14
|
+
external
|
|
15
|
+
view
|
|
16
|
+
returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
|
|
17
|
+
|
|
18
|
+
function token0() external view returns (address);
|
|
19
|
+
|
|
20
|
+
function token1() external view returns (address);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @title InjectChromieSquiggleFloorPrice
|
|
25
|
+
* @author Art Blocks Inc.
|
|
26
|
+
* @notice This hook appends the floor price of Chromie Squiggle, in wei, to a tokens PMPs.
|
|
27
|
+
*/
|
|
28
|
+
contract InjectChromieSquiggleFloorPrice is AbstractPMPAugmentHook {
|
|
29
|
+
using Strings for uint256;
|
|
30
|
+
|
|
31
|
+
address public immutable nftxVaultPoolSquiggleWeth;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @notice Constructor.
|
|
35
|
+
* @param _nftxVaultPoolSquiggleWeth The address of the NFTX vault for Chromie Squiggle.
|
|
36
|
+
* For mainnet, this is 0x698AbbBC986C59D02941E18BC96fe2396493339B
|
|
37
|
+
*/
|
|
38
|
+
constructor(address _nftxVaultPoolSquiggleWeth) {
|
|
39
|
+
nftxVaultPoolSquiggleWeth = _nftxVaultPoolSquiggleWeth;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @notice Augment the token parameters for a given token.
|
|
44
|
+
* Appends the spot price of Chromie Squiggle in WETH, based on the NFTX vault pool.
|
|
45
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
46
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
47
|
+
* @param tokenParams The token parameters for the queried token.
|
|
48
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
49
|
+
*/
|
|
50
|
+
function onTokenPMPReadAugmentation(
|
|
51
|
+
address /* coreContract */,
|
|
52
|
+
uint256 /* tokenId */,
|
|
53
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
54
|
+
)
|
|
55
|
+
external
|
|
56
|
+
view
|
|
57
|
+
override
|
|
58
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
59
|
+
{
|
|
60
|
+
// create a new tokenParam array with one extra element
|
|
61
|
+
uint256 originalLength = tokenParams.length;
|
|
62
|
+
uint256 newLength = originalLength + 1;
|
|
63
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
64
|
+
|
|
65
|
+
// copy the original tokenParams into the new array
|
|
66
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
67
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// get + inject the floor price of Chromie Squiggle
|
|
71
|
+
uint256 floorPriceChromieSquiggle = _getSquiggleFloorPriceInWETH();
|
|
72
|
+
|
|
73
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
74
|
+
key: "floorPriceChromieSquiggle",
|
|
75
|
+
value: floorPriceChromieSquiggle.toString()
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// return the augmented tokenParams
|
|
79
|
+
return augmentedTokenParams;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function _getSquiggleFloorPriceInWETH()
|
|
83
|
+
internal
|
|
84
|
+
view
|
|
85
|
+
returns (uint256 priceInWei)
|
|
86
|
+
{
|
|
87
|
+
IUniswapV2Pair pair = IUniswapV2Pair(nftxVaultPoolSquiggleWeth);
|
|
88
|
+
|
|
89
|
+
(uint112 reserve0, uint112 reserve1, ) = pair.getReserves();
|
|
90
|
+
address token0 = pair.token0(); // expected to be SQGL
|
|
91
|
+
|
|
92
|
+
// Price of 1 SquiggleVault token in WETH = reserve1 / reserve0
|
|
93
|
+
// We'll scale result to return value in wei (1e18)
|
|
94
|
+
|
|
95
|
+
if (token0 == 0x8d137e3337eb1B58A222Fef2B2Cc7C423903d9cf) {
|
|
96
|
+
// token0 is SQGL, token1 is WETH
|
|
97
|
+
priceInWei = (uint256(reserve1) * 1e18) / reserve0;
|
|
98
|
+
} else {
|
|
99
|
+
// token1 is SQGL, token0 is WETH
|
|
100
|
+
priceInWei = (uint256(reserve0) * 1e18) / reserve1;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {IERC721} from "@openzeppelin-5.0/contracts/interfaces/IERC721.sol";
|
|
10
|
+
import {IERC20} from "@openzeppelin-5.0/contracts/interfaces/IERC20.sol";
|
|
11
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @title InjectIsNounsDaoMember
|
|
15
|
+
* @author Art Blocks Inc.
|
|
16
|
+
* @notice This hook injects if the token's owner is a member of the Nouns DAO.
|
|
17
|
+
*/
|
|
18
|
+
contract InjectIsNounsDaoMember is AbstractPMPAugmentHook {
|
|
19
|
+
address public constant nounsTokenAddress =
|
|
20
|
+
0x9C8fF314C9Bc7F6e59A9d9225Fb22946427eDC03;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @notice Augment the token parameters for a given token.
|
|
24
|
+
* Appends if the token's owner is a member of the Nouns DAO into a tokens PMPs,
|
|
25
|
+
* i.e. if the token's owner has a Noun in their wallet.
|
|
26
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
27
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
28
|
+
* @param coreContract The address of the core contract to call.
|
|
29
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
30
|
+
* @param tokenParams The token parameters for the queried token.
|
|
31
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
32
|
+
*/
|
|
33
|
+
function onTokenPMPReadAugmentation(
|
|
34
|
+
address coreContract,
|
|
35
|
+
uint256 tokenId,
|
|
36
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
37
|
+
)
|
|
38
|
+
external
|
|
39
|
+
view
|
|
40
|
+
override
|
|
41
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
42
|
+
{
|
|
43
|
+
// create a new tokenParam array with one extra element
|
|
44
|
+
uint256 originalLength = tokenParams.length;
|
|
45
|
+
uint256 newLength = originalLength + 1;
|
|
46
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
47
|
+
|
|
48
|
+
// copy the original tokenParams into the new array
|
|
49
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
50
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// get + inject the token owner's nouns dao membership status
|
|
54
|
+
address tokenOwner = IERC721(coreContract).ownerOf(tokenId);
|
|
55
|
+
bool isNounsDaoMember = IERC20(nounsTokenAddress).balanceOf(
|
|
56
|
+
tokenOwner
|
|
57
|
+
) > 0;
|
|
58
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
59
|
+
key: "isNounsDaoMember",
|
|
60
|
+
value: isNounsDaoMember ? "true" : "false"
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// return the augmented tokenParams
|
|
64
|
+
return augmentedTokenParams;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {ABHelpers} from "../../libs/v0.8.x/ABHelpers.sol";
|
|
9
|
+
|
|
10
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
11
|
+
import {IERC721} from "@openzeppelin-5.0/contracts/interfaces/IERC721.sol";
|
|
12
|
+
import {IGenArt721CoreContractV3_Base} from "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
13
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @title InjectIsProjectFullyMinted
|
|
17
|
+
* @author Art Blocks Inc.
|
|
18
|
+
* @notice This hook injects if a project is fully minted.
|
|
19
|
+
*/
|
|
20
|
+
contract InjectIsProjectFullyMinted is AbstractPMPAugmentHook {
|
|
21
|
+
using Strings for address;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @notice Augment the token parameters for a given token.
|
|
25
|
+
* Appends if a project is fully minted into a tokens PMPs.
|
|
26
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
27
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
28
|
+
* @param coreContract The address of the core contract to call.
|
|
29
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
30
|
+
* @param tokenParams The token parameters for the queried token.
|
|
31
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
32
|
+
*/
|
|
33
|
+
function onTokenPMPReadAugmentation(
|
|
34
|
+
address coreContract,
|
|
35
|
+
uint256 tokenId,
|
|
36
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
37
|
+
)
|
|
38
|
+
external
|
|
39
|
+
view
|
|
40
|
+
override
|
|
41
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
42
|
+
{
|
|
43
|
+
// create a new tokenParam array with one extra element
|
|
44
|
+
uint256 originalLength = tokenParams.length;
|
|
45
|
+
uint256 newLength = originalLength + 1;
|
|
46
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
47
|
+
|
|
48
|
+
// copy the original tokenParams into the new array
|
|
49
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
50
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// get + inject the token owner into the new array
|
|
54
|
+
uint256 projectId = ABHelpers.tokenIdToProjectId(tokenId);
|
|
55
|
+
(
|
|
56
|
+
uint256 invocations,
|
|
57
|
+
uint256 maxInvocations,
|
|
58
|
+
,
|
|
59
|
+
,
|
|
60
|
+
,
|
|
61
|
+
|
|
62
|
+
) = IGenArt721CoreContractV3_Base(coreContract).projectStateData(
|
|
63
|
+
projectId
|
|
64
|
+
);
|
|
65
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
66
|
+
key: "isProjectFullyMinted",
|
|
67
|
+
value: invocations == maxInvocations ? "true" : "false"
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// return the augmented tokenParams
|
|
71
|
+
return augmentedTokenParams;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
import {ABHelpers} from "../../libs/v0.8.x/ABHelpers.sol";
|
|
8
|
+
|
|
9
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
10
|
+
import {IGenArt721CoreContractV3_Base} from "../../interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
11
|
+
|
|
12
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @title InjectPolyptychTokenHash
|
|
16
|
+
* @author Art Blocks Inc.
|
|
17
|
+
* @notice This hook injects the hash of a token on a different project into a tokens PMPs.
|
|
18
|
+
*/
|
|
19
|
+
contract InjectPolyptychTokenHash is AbstractPMPAugmentHook {
|
|
20
|
+
using Strings for uint256;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @notice The projectId of the project to inject the hash from.
|
|
24
|
+
*/
|
|
25
|
+
uint256 public immutable sourceProjectId;
|
|
26
|
+
/**
|
|
27
|
+
* @notice the core contract address of the project to inject the hash from.
|
|
28
|
+
*/
|
|
29
|
+
address public immutable sourceCoreContract;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @notice Constructor.
|
|
33
|
+
* @param _sourceCoreContract The address of the core contract to inject the hash from.
|
|
34
|
+
* @param _sourceProjectId The projectId of the project to inject the hash from.
|
|
35
|
+
*/
|
|
36
|
+
constructor(address _sourceCoreContract, uint256 _sourceProjectId) {
|
|
37
|
+
sourceCoreContract = _sourceCoreContract;
|
|
38
|
+
sourceProjectId = _sourceProjectId;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @notice Augment the token parameters for a given token.
|
|
43
|
+
* Appends the hash of a token on a different project into a tokens PMPs.
|
|
44
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
45
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
46
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
47
|
+
* @param tokenParams The token parameters for the queried token.
|
|
48
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
49
|
+
*/
|
|
50
|
+
function onTokenPMPReadAugmentation(
|
|
51
|
+
address /* coreContract */,
|
|
52
|
+
uint256 tokenId,
|
|
53
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
54
|
+
)
|
|
55
|
+
external
|
|
56
|
+
view
|
|
57
|
+
override
|
|
58
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
59
|
+
{
|
|
60
|
+
// create a new tokenParam array with one extra element
|
|
61
|
+
uint256 originalLength = tokenParams.length;
|
|
62
|
+
uint256 newLength = originalLength + 1;
|
|
63
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
64
|
+
|
|
65
|
+
// copy the original tokenParams into the new array
|
|
66
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
67
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// get + inject the source token hash into the new array
|
|
71
|
+
uint256 tokenNumber = ABHelpers.tokenIdToTokenNumber(tokenId);
|
|
72
|
+
uint256 sourceTokenId = ABHelpers.tokenIdFromProjectIdAndTokenNumber({
|
|
73
|
+
projectId: sourceProjectId,
|
|
74
|
+
tokenNumber: tokenNumber
|
|
75
|
+
});
|
|
76
|
+
bytes32 sourceTokenHash = IGenArt721CoreContractV3_Base(
|
|
77
|
+
sourceCoreContract
|
|
78
|
+
).tokenIdToHash(sourceTokenId);
|
|
79
|
+
|
|
80
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
81
|
+
key: "sourceTokenHash",
|
|
82
|
+
value: uint256(sourceTokenHash).toHexString()
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// return the augmented tokenParams
|
|
86
|
+
return augmentedTokenParams;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {IGenArt721CoreContractExposesHashSeed} from "../../interfaces/v0.8.x/IGenArt721CoreContractExposesHashSeed.sol";
|
|
10
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title InjectTokenHashSeed
|
|
14
|
+
* @author Art Blocks Inc.
|
|
15
|
+
* @notice This hook injects the token hash seed into a tokens PMPs.
|
|
16
|
+
*/
|
|
17
|
+
contract InjectTokenHashSeed is AbstractPMPAugmentHook {
|
|
18
|
+
using Strings for uint256;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @notice Augment the token parameters for a given token.
|
|
22
|
+
* Appends a token's hash seed into a tokens PMPs.
|
|
23
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
24
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
25
|
+
* @param coreContract The address of the core contract to call.
|
|
26
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
27
|
+
* @param tokenParams The token parameters for the queried token.
|
|
28
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
29
|
+
*/
|
|
30
|
+
function onTokenPMPReadAugmentation(
|
|
31
|
+
address coreContract,
|
|
32
|
+
uint256 tokenId,
|
|
33
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
34
|
+
)
|
|
35
|
+
external
|
|
36
|
+
view
|
|
37
|
+
override
|
|
38
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
39
|
+
{
|
|
40
|
+
// create a new tokenParam array with one extra element
|
|
41
|
+
uint256 originalLength = tokenParams.length;
|
|
42
|
+
uint256 newLength = originalLength + 1;
|
|
43
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
44
|
+
|
|
45
|
+
// copy the original tokenParams into the new array
|
|
46
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
47
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// get + inject the token hash seed into the new array
|
|
51
|
+
bytes12 tokenHashSeed = IGenArt721CoreContractExposesHashSeed(
|
|
52
|
+
coreContract
|
|
53
|
+
).tokenIdToHashSeed(tokenId);
|
|
54
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
55
|
+
key: "tokenHashSeed",
|
|
56
|
+
value: uint256(bytes32(tokenHashSeed)).toHexString()
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// return the augmented tokenParams
|
|
60
|
+
return augmentedTokenParams;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {IERC721} from "@openzeppelin-5.0/contracts/interfaces/IERC721.sol";
|
|
10
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title InjectTokenOwner
|
|
14
|
+
* @author Art Blocks Inc.
|
|
15
|
+
* @notice This hook injects the token owner's address into a tokens PMPs.
|
|
16
|
+
*/
|
|
17
|
+
contract InjectTokenOwner is AbstractPMPAugmentHook {
|
|
18
|
+
using Strings for address;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @notice Augment the token parameters for a given token.
|
|
22
|
+
* Appends the token owner's address into a tokens PMPs.
|
|
23
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
24
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
25
|
+
* @param coreContract The address of the core contract to call.
|
|
26
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
27
|
+
* @param tokenParams The token parameters for the queried token.
|
|
28
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
29
|
+
*/
|
|
30
|
+
function onTokenPMPReadAugmentation(
|
|
31
|
+
address coreContract,
|
|
32
|
+
uint256 tokenId,
|
|
33
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
34
|
+
)
|
|
35
|
+
external
|
|
36
|
+
view
|
|
37
|
+
override
|
|
38
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
39
|
+
{
|
|
40
|
+
// create a new tokenParam array with one extra element
|
|
41
|
+
uint256 originalLength = tokenParams.length;
|
|
42
|
+
uint256 newLength = originalLength + 1;
|
|
43
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
44
|
+
|
|
45
|
+
// copy the original tokenParams into the new array
|
|
46
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
47
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// get + inject the token owner into the new array
|
|
51
|
+
address tokenOwner = IERC721(coreContract).ownerOf(tokenId);
|
|
52
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
53
|
+
key: "tokenOwner",
|
|
54
|
+
value: tokenOwner.toHexString()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// return the augmented tokenParams
|
|
58
|
+
return augmentedTokenParams;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import {AbstractPMPAugmentHook} from "./AbstractPMPAugmentHook.sol";
|
|
7
|
+
|
|
8
|
+
import {IWeb3Call} from "../../interfaces/v0.8.x/IWeb3Call.sol";
|
|
9
|
+
import {IERC721} from "@openzeppelin-5.0/contracts/interfaces/IERC721.sol";
|
|
10
|
+
import {Strings} from "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @title InjectTokenOwnerEthBalance
|
|
14
|
+
* @author Art Blocks Inc.
|
|
15
|
+
* @notice This hook appends the token owner's ETH balance, in wei, to a tokens PMPs.
|
|
16
|
+
*/
|
|
17
|
+
contract InjectTokenOwnerEthBalance is AbstractPMPAugmentHook {
|
|
18
|
+
using Strings for uint256;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @notice Augment the token parameters for a given token.
|
|
22
|
+
* Appends the token owner's ETH balance into a tokens PMPs.
|
|
23
|
+
* @dev This hook is called when a token's PMPs are read.
|
|
24
|
+
* @dev This must return all desired tokenParams, not just additional data.
|
|
25
|
+
* @param coreContract The address of the core contract to call.
|
|
26
|
+
* @param tokenId The tokenId of the token to get data for.
|
|
27
|
+
* @param tokenParams The token parameters for the queried token.
|
|
28
|
+
* @return augmentedTokenParams The augmented token parameters.
|
|
29
|
+
*/
|
|
30
|
+
function onTokenPMPReadAugmentation(
|
|
31
|
+
address coreContract,
|
|
32
|
+
uint256 tokenId,
|
|
33
|
+
IWeb3Call.TokenParam[] calldata tokenParams
|
|
34
|
+
)
|
|
35
|
+
external
|
|
36
|
+
view
|
|
37
|
+
override
|
|
38
|
+
returns (IWeb3Call.TokenParam[] memory augmentedTokenParams)
|
|
39
|
+
{
|
|
40
|
+
// create a new tokenParam array with one extra element
|
|
41
|
+
uint256 originalLength = tokenParams.length;
|
|
42
|
+
uint256 newLength = originalLength + 1;
|
|
43
|
+
augmentedTokenParams = new IWeb3Call.TokenParam[](newLength);
|
|
44
|
+
|
|
45
|
+
// copy the original tokenParams into the new array
|
|
46
|
+
for (uint256 i = 0; i < originalLength; i++) {
|
|
47
|
+
augmentedTokenParams[i] = tokenParams[i];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// get + inject the token owner into the new array
|
|
51
|
+
address tokenOwner = IERC721(coreContract).ownerOf(tokenId);
|
|
52
|
+
uint256 tokenOwnerEthBalanceInWei = address(tokenOwner).balance;
|
|
53
|
+
augmentedTokenParams[originalLength] = IWeb3Call.TokenParam({
|
|
54
|
+
key: "tokenOwnerEthBalance",
|
|
55
|
+
value: tokenOwnerEthBalanceInWei.toString()
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// return the augmented tokenParams
|
|
59
|
+
return augmentedTokenParams;
|
|
60
|
+
}
|
|
61
|
+
}
|