@artblocks/contracts 1.2.0 → 1.2.1
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/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
- package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +144 -14
- 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/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +170 -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/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 +56 -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/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/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/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +2 -2
- package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -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/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
- package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
- package/contracts/BytecodeStorageV2Writer.sol +69 -0
- package/contracts/DependencyRegistryV0.sol +229 -60
- 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 +141 -71
- package/contracts/generator/AddressChunks.sol +106 -0
- package/contracts/generator/GenArt721GeneratorV0.sol +1094 -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/IDependencyRegistryV0.sol +94 -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/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 +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/v0.8.x/Bytes32Strings.sol +20 -0
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +11 -3
- package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +9 -3
- 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/MockFileStore.sol +22 -0
- package/package.json +20 -18
|
@@ -6,6 +6,7 @@ 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";
|
|
9
10
|
|
|
10
11
|
import "@openzeppelin-4.7/contracts/utils/Strings.sol";
|
|
11
12
|
import "@openzeppelin-4.7/contracts/utils/structs/EnumerableSet.sol";
|
|
@@ -36,6 +37,7 @@ contract DependencyRegistryV0 is
|
|
|
36
37
|
{
|
|
37
38
|
using BytecodeStorageWriter for string;
|
|
38
39
|
using Bytes32Strings for bytes32;
|
|
40
|
+
using Bytes32Strings for string;
|
|
39
41
|
using Strings for uint256;
|
|
40
42
|
using EnumerableSet for EnumerableSet.Bytes32Set;
|
|
41
43
|
using EnumerableSet for EnumerableSet.AddressSet;
|
|
@@ -65,10 +67,9 @@ contract DependencyRegistryV0 is
|
|
|
65
67
|
function _onlySupportedCoreContract(
|
|
66
68
|
address coreContractAddress
|
|
67
69
|
) internal view {
|
|
70
|
+
// defer to public function logic
|
|
68
71
|
require(
|
|
69
|
-
|
|
70
|
-
coreContractAddress
|
|
71
|
-
),
|
|
72
|
+
isSupportedCoreContract(coreContractAddress),
|
|
72
73
|
"Core contract not supported"
|
|
73
74
|
);
|
|
74
75
|
}
|
|
@@ -95,6 +96,10 @@ contract DependencyRegistryV0 is
|
|
|
95
96
|
);
|
|
96
97
|
}
|
|
97
98
|
|
|
99
|
+
function _onlyBytes32String(string memory input) internal pure {
|
|
100
|
+
require(bytes(input).length <= 32, "String too long");
|
|
101
|
+
}
|
|
102
|
+
|
|
98
103
|
/**
|
|
99
104
|
* @notice Initializes contract.
|
|
100
105
|
* @param adminACLContract_ Address of admin access control contract, to be
|
|
@@ -107,6 +112,21 @@ contract DependencyRegistryV0 is
|
|
|
107
112
|
_transferOwnership(adminACLContract_);
|
|
108
113
|
}
|
|
109
114
|
|
|
115
|
+
/**
|
|
116
|
+
* @notice Updates the core registry address.
|
|
117
|
+
* @param _coreRegistryAddress Address of core registry contract.
|
|
118
|
+
*/
|
|
119
|
+
function updateCoreRegistryAddress(address _coreRegistryAddress) external {
|
|
120
|
+
_onlyAdminACL(this.updateCoreRegistryAddress.selector);
|
|
121
|
+
_onlyNonZeroAddress(_coreRegistryAddress);
|
|
122
|
+
DependencyRegistryStorageLib.s().coreRegistryContract = ICoreRegistryV1(
|
|
123
|
+
_coreRegistryAddress
|
|
124
|
+
);
|
|
125
|
+
emit CoreRegistryAddressUpdated({
|
|
126
|
+
coreRegistryAddress: _coreRegistryAddress
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
110
130
|
/**
|
|
111
131
|
* @notice Adds a new license type that can be used by dependencies.
|
|
112
132
|
* @param licenseType License type to be added.
|
|
@@ -612,37 +632,85 @@ contract DependencyRegistryV0 is
|
|
|
612
632
|
}
|
|
613
633
|
|
|
614
634
|
/**
|
|
615
|
-
* @notice
|
|
616
|
-
*
|
|
635
|
+
* @notice These functions were removed in an upgrade, registering and unregistering
|
|
636
|
+
* contracts are handled by the core registry.
|
|
637
|
+
*/
|
|
638
|
+
// /**
|
|
639
|
+
// * @notice Adds a new core contract to the list of supported core contracts.
|
|
640
|
+
// * @param contractAddress Address of the core contract to be added.
|
|
641
|
+
// */
|
|
642
|
+
// function addSupportedCoreContract(address contractAddress) external {
|
|
643
|
+
// _onlyAdminACL(this.addSupportedCoreContract.selector);
|
|
644
|
+
// _onlyNonZeroAddress(contractAddress);
|
|
645
|
+
|
|
646
|
+
// require(
|
|
647
|
+
// // @dev the add function returns false if set already contains value
|
|
648
|
+
// DependencyRegistryStorageLib.s().supportedCoreContracts.add(
|
|
649
|
+
// contractAddress
|
|
650
|
+
// ),
|
|
651
|
+
// "Contract already supported"
|
|
652
|
+
// );
|
|
653
|
+
// emit SupportedCoreContractAdded(contractAddress);
|
|
654
|
+
// }
|
|
655
|
+
|
|
656
|
+
// /**
|
|
657
|
+
// * @notice Removes a core contract from the list of supported core contracts.
|
|
658
|
+
// * @param contractAddress Address of the core contract to be removed.
|
|
659
|
+
// */
|
|
660
|
+
// function removeSupportedCoreContract(address contractAddress) external {
|
|
661
|
+
// _onlyAdminACL(this.removeSupportedCoreContract.selector);
|
|
662
|
+
// require(
|
|
663
|
+
// // @dev the remove function returns false if set does not contain value
|
|
664
|
+
// DependencyRegistryStorageLib.s().supportedCoreContracts.remove(
|
|
665
|
+
// contractAddress
|
|
666
|
+
// ),
|
|
667
|
+
// "Core contract already removed or not in set"
|
|
668
|
+
// );
|
|
669
|
+
// emit SupportedCoreContractRemoved(contractAddress);
|
|
670
|
+
// }
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* @notice Adds a new core contract to be supported by the dependency registry.
|
|
674
|
+
* This is in addition to the set of contracts specified as supported by the core registry.
|
|
675
|
+
* @dev use case is a contract not allowed to mint on minter filter, but still needs to be
|
|
676
|
+
* supported by dependency registry.
|
|
677
|
+
* @param contractAddress Address of the core contract.
|
|
617
678
|
*/
|
|
618
|
-
function
|
|
619
|
-
|
|
679
|
+
function addSupportedCoreContractOverride(
|
|
680
|
+
address contractAddress
|
|
681
|
+
) external {
|
|
682
|
+
_onlyAdminACL(this.addSupportedCoreContractOverride.selector);
|
|
620
683
|
_onlyNonZeroAddress(contractAddress);
|
|
621
684
|
|
|
622
685
|
require(
|
|
623
686
|
// @dev the add function returns false if set already contains value
|
|
624
|
-
DependencyRegistryStorageLib.s().
|
|
687
|
+
DependencyRegistryStorageLib.s().supportedCoreContractsOverride.add(
|
|
625
688
|
contractAddress
|
|
626
689
|
),
|
|
627
690
|
"Contract already supported"
|
|
628
691
|
);
|
|
629
|
-
emit
|
|
692
|
+
emit SupportedCoreContractOverrideAdded(contractAddress);
|
|
630
693
|
}
|
|
631
694
|
|
|
632
695
|
/**
|
|
633
|
-
* @notice Removes a core contract
|
|
634
|
-
*
|
|
696
|
+
* @notice Removes a core contract previously listed as override supported by the dependency registry.
|
|
697
|
+
* This removes from the set of core contracts that are suppported by the dependency in addition to
|
|
698
|
+
* the set of contracts specified as supported by the core registry.
|
|
699
|
+
* @param contractAddress Address of the core contract.
|
|
635
700
|
*/
|
|
636
|
-
function
|
|
637
|
-
|
|
701
|
+
function removeSupportedCoreContractOverride(
|
|
702
|
+
address contractAddress
|
|
703
|
+
) external {
|
|
704
|
+
_onlyAdminACL(this.removeSupportedCoreContractOverride.selector);
|
|
638
705
|
require(
|
|
639
706
|
// @dev the remove function returns false if set does not contain value
|
|
640
|
-
DependencyRegistryStorageLib
|
|
641
|
-
|
|
642
|
-
|
|
707
|
+
DependencyRegistryStorageLib
|
|
708
|
+
.s()
|
|
709
|
+
.supportedCoreContractsOverride
|
|
710
|
+
.remove(contractAddress),
|
|
643
711
|
"Core contract already removed or not in set"
|
|
644
712
|
);
|
|
645
|
-
emit
|
|
713
|
+
emit SupportedCoreContractOverrideRemoved(contractAddress);
|
|
646
714
|
}
|
|
647
715
|
|
|
648
716
|
/**
|
|
@@ -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
|
|
|
@@ -1223,6 +1329,20 @@ contract DependencyRegistryV0 is
|
|
|
1223
1329
|
}
|
|
1224
1330
|
}
|
|
1225
1331
|
|
|
1332
|
+
/**
|
|
1333
|
+
* @notice utility function to convert from string to bytes32.
|
|
1334
|
+
* Useful when a human is calling functions that take bytes32 as input.
|
|
1335
|
+
* Reverts if input string does not fit within 32 bytes.
|
|
1336
|
+
* @param input String to convert to bytes32.
|
|
1337
|
+
* @return bytes32 representation of input.
|
|
1338
|
+
*/
|
|
1339
|
+
function stringToBytes32(
|
|
1340
|
+
string memory input
|
|
1341
|
+
) external pure returns (bytes32) {
|
|
1342
|
+
_onlyBytes32String(input);
|
|
1343
|
+
return input.stringToBytes32();
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1226
1346
|
/**
|
|
1227
1347
|
* @notice Convenience function that returns whether `_sender` is allowed
|
|
1228
1348
|
* to call function with selector `_selector` on contract `_contract`, as
|
|
@@ -1256,6 +1376,55 @@ contract DependencyRegistryV0 is
|
|
|
1256
1376
|
);
|
|
1257
1377
|
}
|
|
1258
1378
|
|
|
1379
|
+
/**
|
|
1380
|
+
* @notice Returns details for a given dependency type `dependencyNameAndVersion`.
|
|
1381
|
+
* @param dependencyNameAndVersion Name and version of dependency (i.e. "name@version") used to identify dependency.
|
|
1382
|
+
* @return nameAndVersion String representation of `dependencyNameAndVersion`.
|
|
1383
|
+
* (e.g. "p5js(atSymbol)1.0.0")
|
|
1384
|
+
* @return licenseType License type for dependency
|
|
1385
|
+
* @return preferredCDN Preferred CDN URL for dependency
|
|
1386
|
+
* @return additionalCDNCount Count of additional CDN URLs for dependency
|
|
1387
|
+
* @return preferredRepository Preferred repository URL for dependency
|
|
1388
|
+
* @return additionalRepositoryCount Count of additional repository URLs for dependency
|
|
1389
|
+
* @return dependencyWebsite Project website URL for dependency
|
|
1390
|
+
* @return availableOnChain Whether dependency is available on chain
|
|
1391
|
+
* @return scriptCount Count of on-chain scripts for dependency
|
|
1392
|
+
*/
|
|
1393
|
+
function getDependencyDetails(
|
|
1394
|
+
bytes32 dependencyNameAndVersion
|
|
1395
|
+
)
|
|
1396
|
+
public
|
|
1397
|
+
view
|
|
1398
|
+
returns (
|
|
1399
|
+
string memory nameAndVersion,
|
|
1400
|
+
string memory licenseType,
|
|
1401
|
+
string memory preferredCDN,
|
|
1402
|
+
uint24 additionalCDNCount,
|
|
1403
|
+
string memory preferredRepository,
|
|
1404
|
+
uint24 additionalRepositoryCount,
|
|
1405
|
+
string memory dependencyWebsite,
|
|
1406
|
+
bool availableOnChain,
|
|
1407
|
+
uint24 scriptCount
|
|
1408
|
+
)
|
|
1409
|
+
{
|
|
1410
|
+
DependencyRegistryStorageLib.Dependency
|
|
1411
|
+
storage dependency = DependencyRegistryStorageLib
|
|
1412
|
+
.s()
|
|
1413
|
+
.dependencyRecords[dependencyNameAndVersion];
|
|
1414
|
+
|
|
1415
|
+
return (
|
|
1416
|
+
dependencyNameAndVersion.toString(),
|
|
1417
|
+
dependency.licenseType.toString(),
|
|
1418
|
+
dependency.preferredCDN,
|
|
1419
|
+
dependency.additionalCDNCount,
|
|
1420
|
+
dependency.preferredRepository,
|
|
1421
|
+
dependency.additionalRepositoryCount,
|
|
1422
|
+
dependency.website,
|
|
1423
|
+
dependency.scriptCount > 0,
|
|
1424
|
+
dependency.scriptCount
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1259
1428
|
/**
|
|
1260
1429
|
* @notice Returns contract owner. Set to deployer's address by default on
|
|
1261
1430
|
* contract deployment.
|
|
@@ -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
|
+
}
|