@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
|
@@ -10,12 +10,13 @@ import {IGenArt721CoreContractV3_ProjectFinance} from "../../interfaces/v0.8.x/I
|
|
|
10
10
|
import "../../interfaces/v0.8.x/IGenArt721CoreContractExposesHashSeed.sol";
|
|
11
11
|
import "../../interfaces/v0.8.x/IDependencyRegistryCompatibleV0.sol";
|
|
12
12
|
import {ISplitProviderV0} from "../../interfaces/v0.8.x/ISplitProviderV0.sol";
|
|
13
|
+
import {IBytecodeStorageReader_Base} from "../../interfaces/v0.8.x/IBytecodeStorageReader_Base.sol";
|
|
13
14
|
|
|
14
15
|
import "@openzeppelin-5.0/contracts/utils/Strings.sol";
|
|
15
16
|
import "@openzeppelin-5.0/contracts/access/Ownable.sol";
|
|
16
17
|
import {IERC2981} from "@openzeppelin-5.0/contracts/interfaces/IERC2981.sol";
|
|
17
18
|
import "../../libs/v0.8.x/ERC721_PackedHashSeedV1.sol";
|
|
18
|
-
import "../../libs/v0.8.x/BytecodeStorageV2.sol";
|
|
19
|
+
import {BytecodeStorageWriter, BytecodeStorageReader} from "../../libs/v0.8.x/BytecodeStorageV2.sol";
|
|
19
20
|
import {V3FlexLib} from "../../libs/v0.8.x/V3FlexLib.sol";
|
|
20
21
|
import "../../libs/v0.8.x/Bytes32Strings.sol";
|
|
21
22
|
|
|
@@ -49,6 +50,7 @@ import "../../libs/v0.8.x/Bytes32Strings.sol";
|
|
|
49
50
|
* - forbidNewProjects (forever forbidding new projects)
|
|
50
51
|
* - updateDefaultBaseURI (used to initialize new project base URIs)
|
|
51
52
|
* - updateSplitProvider
|
|
53
|
+
* - updateBytecodeStorageReaderContract
|
|
52
54
|
* - updateIPFSGateway
|
|
53
55
|
* - updateArweaveGateway
|
|
54
56
|
* ----------------------------------------------------------------------------
|
|
@@ -279,9 +281,9 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
279
281
|
bool public allowArtistProjectActivation;
|
|
280
282
|
|
|
281
283
|
/// version & type of this core contract
|
|
282
|
-
bytes32 constant CORE_VERSION = "v3.2.
|
|
284
|
+
bytes32 constant CORE_VERSION = "v3.2.5";
|
|
283
285
|
|
|
284
|
-
function coreVersion() external pure returns (string memory) {
|
|
286
|
+
function coreVersion() external pure virtual returns (string memory) {
|
|
285
287
|
return CORE_VERSION.toString();
|
|
286
288
|
}
|
|
287
289
|
|
|
@@ -301,6 +303,9 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
301
303
|
// royalty split provider
|
|
302
304
|
ISplitProviderV0 public splitProvider;
|
|
303
305
|
|
|
306
|
+
// bytecode storage reader contract; may be universal or specific version reader contract
|
|
307
|
+
IBytecodeStorageReader_Base public bytecodeStorageReaderContract;
|
|
308
|
+
|
|
304
309
|
/**
|
|
305
310
|
* @dev This constructor sets the owner to a non-functional address as a formality.
|
|
306
311
|
* It is only ever ran on the implementation contract. The `Ownable` constructor is
|
|
@@ -409,77 +414,25 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
409
414
|
* function will be called atomically by the factory contract that deploys this
|
|
410
415
|
* contract, after which it will be initialized and uncallable.
|
|
411
416
|
* @param engineConfiguration EngineConfiguration to configure the contract with.
|
|
417
|
+
* note: parameter `engineConfiguration.newSuperAdminAddress` is not used or operated on in this contract.
|
|
412
418
|
* @param adminACLContract_ Address of admin access control contract, to be
|
|
413
419
|
* set as contract owner.
|
|
414
420
|
* @param defaultBaseURIHost Base URI prefix to initialize default base URI with.
|
|
421
|
+
* @param bytecodeStorageReaderContract_ Address of the bytecode storage reader contract.
|
|
415
422
|
*/
|
|
416
423
|
function initialize(
|
|
417
|
-
EngineConfiguration
|
|
424
|
+
EngineConfiguration memory engineConfiguration,
|
|
418
425
|
address adminACLContract_,
|
|
419
|
-
string memory defaultBaseURIHost
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
// initialize default sales revenue percentages and basis points
|
|
430
|
-
_renderProviderPrimarySalesPercentage = 10;
|
|
431
|
-
defaultRenderProviderSecondarySalesBPS = 250;
|
|
432
|
-
_platformProviderPrimarySalesPercentage = engineConfiguration
|
|
433
|
-
.nullPlatformProvider
|
|
434
|
-
? 0
|
|
435
|
-
: 10;
|
|
436
|
-
defaultPlatformProviderSecondarySalesBPS = engineConfiguration
|
|
437
|
-
.nullPlatformProvider
|
|
438
|
-
? 0
|
|
439
|
-
: 250;
|
|
440
|
-
|
|
441
|
-
// set token name and token symbol
|
|
442
|
-
ERC721_PackedHashSeedV1.initialize(
|
|
443
|
-
engineConfiguration.tokenName,
|
|
444
|
-
engineConfiguration.tokenSymbol
|
|
445
|
-
);
|
|
446
|
-
// update minter if populated
|
|
447
|
-
if (engineConfiguration.minterFilterAddress != address(0)) {
|
|
448
|
-
_updateMinterContract(engineConfiguration.minterFilterAddress);
|
|
449
|
-
}
|
|
450
|
-
_updateSplitProvider(engineConfiguration.splitProviderAddress);
|
|
451
|
-
// setup immutable `autoApproveArtistSplitProposals` config
|
|
452
|
-
autoApproveArtistSplitProposals = engineConfiguration
|
|
453
|
-
.autoApproveArtistSplitProposals;
|
|
454
|
-
// setup immutable `nullPlatformProvider` config
|
|
455
|
-
nullPlatformProvider = engineConfiguration.nullPlatformProvider;
|
|
456
|
-
// setup immutable `allowArtistProjectActivation` config
|
|
457
|
-
allowArtistProjectActivation = engineConfiguration
|
|
458
|
-
.allowArtistProjectActivation;
|
|
459
|
-
// record contracts starting project ID
|
|
460
|
-
// casting-up is safe
|
|
461
|
-
startingProjectId = uint256(engineConfiguration.startingProjectId);
|
|
462
|
-
// @dev nullPlatformProvider must be set before calling _updateProviderSalesAddresses
|
|
463
|
-
_updateProviderSalesAddresses(
|
|
464
|
-
engineConfiguration.renderProviderAddress,
|
|
465
|
-
engineConfiguration.renderProviderAddress,
|
|
466
|
-
engineConfiguration.platformProviderAddress,
|
|
467
|
-
engineConfiguration.platformProviderAddress
|
|
468
|
-
);
|
|
469
|
-
_updateRandomizerAddress(engineConfiguration.randomizerContract);
|
|
470
|
-
// set AdminACL management contract as owner
|
|
471
|
-
_transferOwnership(adminACLContract_);
|
|
472
|
-
// initialize default base URI
|
|
473
|
-
_updateDefaultBaseURI(
|
|
474
|
-
string.concat(defaultBaseURIHost, address(this).toHexString(), "/")
|
|
475
|
-
);
|
|
476
|
-
// initialize next project ID
|
|
477
|
-
_nextProjectId = engineConfiguration.startingProjectId;
|
|
478
|
-
emit PlatformUpdated(
|
|
479
|
-
bytes32(uint256(PlatformUpdatedFields.FIELD_NEXT_PROJECT_ID))
|
|
480
|
-
);
|
|
481
|
-
// @dev This contract is registered on the core registry in a
|
|
482
|
-
// subsequent call by the factory.
|
|
426
|
+
string memory defaultBaseURIHost,
|
|
427
|
+
address bytecodeStorageReaderContract_
|
|
428
|
+
) external virtual {
|
|
429
|
+
// @dev internal function call so derived contracts have access to initialization logic
|
|
430
|
+
_initialize({
|
|
431
|
+
engineConfiguration: engineConfiguration,
|
|
432
|
+
adminACLContract_: adminACLContract_,
|
|
433
|
+
defaultBaseURIHost: defaultBaseURIHost,
|
|
434
|
+
bytecodeStorageReaderContract_: bytecodeStorageReaderContract_
|
|
435
|
+
});
|
|
483
436
|
}
|
|
484
437
|
|
|
485
438
|
/**
|
|
@@ -1034,6 +987,22 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
1034
987
|
_updateSplitProvider(_splitProviderAddress);
|
|
1035
988
|
}
|
|
1036
989
|
|
|
990
|
+
/**
|
|
991
|
+
* @notice Updates bytecode storage reader contract to `_bytecodeStorageReaderContract`.
|
|
992
|
+
* Reverts if `_bytecodeStorageReaderContract` is zero address.
|
|
993
|
+
* Updating the active Bytecode Storage Reader contract may affect the ability to read
|
|
994
|
+
* data related to existing projects. Care should be taken to ensure that the new
|
|
995
|
+
* contract is compatible with the existing project data.
|
|
996
|
+
* @param _bytecodeStorageReaderContract New bytecode storage reader contract address.
|
|
997
|
+
*/
|
|
998
|
+
function updateBytecodeStorageReaderContract(
|
|
999
|
+
address _bytecodeStorageReaderContract
|
|
1000
|
+
) external {
|
|
1001
|
+
_onlyAdminACL(this.updateBytecodeStorageReaderContract.selector);
|
|
1002
|
+
_onlyNonZeroAddress(_bytecodeStorageReaderContract);
|
|
1003
|
+
_updateBytecodeStorageReaderContract(_bytecodeStorageReaderContract);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1037
1006
|
/**
|
|
1038
1007
|
* @notice Toggles project `_projectId` as active/inactive.
|
|
1039
1008
|
* @param _projectId Project ID to be toggled.
|
|
@@ -2122,6 +2091,7 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
2122
2091
|
string memory _script
|
|
2123
2092
|
) external pure returns (bytes memory) {
|
|
2124
2093
|
_onlyNonEmptyString(_script);
|
|
2094
|
+
// @dev want a potentially version-specific compression algorithm, so use version-specific library here
|
|
2125
2095
|
return BytecodeStorageReader.getCompressed(_script);
|
|
2126
2096
|
}
|
|
2127
2097
|
|
|
@@ -2336,7 +2306,8 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
2336
2306
|
return
|
|
2337
2307
|
V3FlexLib.projectExternalAssetDependencyByIndex({
|
|
2338
2308
|
_projectId: _projectId,
|
|
2339
|
-
_index: _index
|
|
2309
|
+
_index: _index,
|
|
2310
|
+
_bytecodeStorageReaderContract: bytecodeStorageReaderContract
|
|
2340
2311
|
});
|
|
2341
2312
|
}
|
|
2342
2313
|
|
|
@@ -2593,6 +2564,23 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
2593
2564
|
);
|
|
2594
2565
|
}
|
|
2595
2566
|
|
|
2567
|
+
/**
|
|
2568
|
+
* @notice Update the bytecode storage reader contract address, and emit corresponding event.
|
|
2569
|
+
* @param _bytecodeStorageReaderContract New bytecode storage reader contract address.
|
|
2570
|
+
*/
|
|
2571
|
+
function _updateBytecodeStorageReaderContract(
|
|
2572
|
+
address _bytecodeStorageReaderContract
|
|
2573
|
+
) internal {
|
|
2574
|
+
bytecodeStorageReaderContract = IBytecodeStorageReader_Base(
|
|
2575
|
+
_bytecodeStorageReaderContract
|
|
2576
|
+
);
|
|
2577
|
+
emit PlatformUpdated(
|
|
2578
|
+
bytes32(
|
|
2579
|
+
uint256(PlatformUpdatedFields.FIELD_BYTECODE_STORAGE_READER)
|
|
2580
|
+
)
|
|
2581
|
+
);
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2596
2584
|
/**
|
|
2597
2585
|
* @notice internal function to update a splitter contract for a project,
|
|
2598
2586
|
* based on the project's financials in this contract's storage.
|
|
@@ -2663,6 +2651,88 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
2663
2651
|
);
|
|
2664
2652
|
}
|
|
2665
2653
|
|
|
2654
|
+
/**
|
|
2655
|
+
* @notice Initializes the contract with the provided `engineConfiguration`.
|
|
2656
|
+
* This function should be called atomically, immediately after deployment.
|
|
2657
|
+
* Only callable once. Validation on `engineConfiguration` is performed by caller.
|
|
2658
|
+
* @param engineConfiguration EngineConfiguration to configure the contract with.
|
|
2659
|
+
* note: parameter `engineConfiguration.newSuperAdminAddress` is not used or operated on in this contract.
|
|
2660
|
+
* @param adminACLContract_ Address of admin access control contract, to be
|
|
2661
|
+
* set as contract owner.
|
|
2662
|
+
* @param defaultBaseURIHost Base URI prefix to initialize default base URI with.
|
|
2663
|
+
* @param bytecodeStorageReaderContract_ Address of bytecode storage reader contract.
|
|
2664
|
+
*/
|
|
2665
|
+
function _initialize(
|
|
2666
|
+
EngineConfiguration memory engineConfiguration,
|
|
2667
|
+
address adminACLContract_,
|
|
2668
|
+
string memory defaultBaseURIHost,
|
|
2669
|
+
address bytecodeStorageReaderContract_
|
|
2670
|
+
) internal {
|
|
2671
|
+
// can only be initialized once
|
|
2672
|
+
if (_initialized) {
|
|
2673
|
+
revert GenArt721Error(ErrorCodes.ContractInitialized);
|
|
2674
|
+
}
|
|
2675
|
+
// immediately mark as initialized
|
|
2676
|
+
_initialized = true;
|
|
2677
|
+
// @dev assume renderProviderAddress, randomizer, and AdminACL non-zero
|
|
2678
|
+
// checks on platform provider addresses performed in _updateProviderSalesAddresses
|
|
2679
|
+
// initialize default sales revenue percentages and basis points
|
|
2680
|
+
_renderProviderPrimarySalesPercentage = 10;
|
|
2681
|
+
defaultRenderProviderSecondarySalesBPS = 250;
|
|
2682
|
+
_platformProviderPrimarySalesPercentage = engineConfiguration
|
|
2683
|
+
.nullPlatformProvider
|
|
2684
|
+
? 0
|
|
2685
|
+
: 10;
|
|
2686
|
+
defaultPlatformProviderSecondarySalesBPS = engineConfiguration
|
|
2687
|
+
.nullPlatformProvider
|
|
2688
|
+
? 0
|
|
2689
|
+
: 250;
|
|
2690
|
+
|
|
2691
|
+
// set token name and token symbol
|
|
2692
|
+
ERC721_PackedHashSeedV1.initialize(
|
|
2693
|
+
engineConfiguration.tokenName,
|
|
2694
|
+
engineConfiguration.tokenSymbol
|
|
2695
|
+
);
|
|
2696
|
+
// update minter if populated
|
|
2697
|
+
if (engineConfiguration.minterFilterAddress != address(0)) {
|
|
2698
|
+
_updateMinterContract(engineConfiguration.minterFilterAddress);
|
|
2699
|
+
}
|
|
2700
|
+
_updateSplitProvider(engineConfiguration.splitProviderAddress);
|
|
2701
|
+
_updateBytecodeStorageReaderContract(bytecodeStorageReaderContract_);
|
|
2702
|
+
// setup immutable `autoApproveArtistSplitProposals` config
|
|
2703
|
+
autoApproveArtistSplitProposals = engineConfiguration
|
|
2704
|
+
.autoApproveArtistSplitProposals;
|
|
2705
|
+
// setup immutable `nullPlatformProvider` config
|
|
2706
|
+
nullPlatformProvider = engineConfiguration.nullPlatformProvider;
|
|
2707
|
+
// setup immutable `allowArtistProjectActivation` config
|
|
2708
|
+
allowArtistProjectActivation = engineConfiguration
|
|
2709
|
+
.allowArtistProjectActivation;
|
|
2710
|
+
// record contracts starting project ID
|
|
2711
|
+
// casting-up is safe
|
|
2712
|
+
startingProjectId = uint256(engineConfiguration.startingProjectId);
|
|
2713
|
+
// @dev nullPlatformProvider must be set before calling _updateProviderSalesAddresses
|
|
2714
|
+
_updateProviderSalesAddresses(
|
|
2715
|
+
engineConfiguration.renderProviderAddress,
|
|
2716
|
+
engineConfiguration.renderProviderAddress,
|
|
2717
|
+
engineConfiguration.platformProviderAddress,
|
|
2718
|
+
engineConfiguration.platformProviderAddress
|
|
2719
|
+
);
|
|
2720
|
+
_updateRandomizerAddress(engineConfiguration.randomizerContract);
|
|
2721
|
+
// set AdminACL management contract as owner
|
|
2722
|
+
_transferOwnership(adminACLContract_);
|
|
2723
|
+
// initialize default base URI
|
|
2724
|
+
_updateDefaultBaseURI(
|
|
2725
|
+
string.concat(defaultBaseURIHost, address(this).toHexString(), "/")
|
|
2726
|
+
);
|
|
2727
|
+
// initialize next project ID
|
|
2728
|
+
_nextProjectId = engineConfiguration.startingProjectId;
|
|
2729
|
+
emit PlatformUpdated(
|
|
2730
|
+
bytes32(uint256(PlatformUpdatedFields.FIELD_NEXT_PROJECT_ID))
|
|
2731
|
+
);
|
|
2732
|
+
// @dev This contract is registered on the core registry in a
|
|
2733
|
+
// subsequent call by the factory.
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2666
2736
|
/**
|
|
2667
2737
|
* @notice Internal function that returns whether a project is unlocked.
|
|
2668
2738
|
* Projects automatically lock four weeks after they are completed.
|
|
@@ -2685,12 +2755,12 @@ contract GenArt721CoreV3_Engine_Flex is
|
|
|
2685
2755
|
}
|
|
2686
2756
|
|
|
2687
2757
|
/**
|
|
2688
|
-
* Helper for calling
|
|
2758
|
+
* @notice Helper for calling bytecodeStorageReaderContract reader method;
|
|
2689
2759
|
* added for bytecode size reduction purposes.
|
|
2690
2760
|
*/
|
|
2691
2761
|
function _readFromBytecode(
|
|
2692
2762
|
address _address
|
|
2693
2763
|
) internal view returns (string memory) {
|
|
2694
|
-
return
|
|
2764
|
+
return bytecodeStorageReaderContract.readFromBytecode(_address);
|
|
2695
2765
|
}
|
|
2696
2766
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Forked from https://github.com/intartnft/scripty.sol/blob/28cc612d7dc3a709f35c534c981bfc6bbfce4209/contracts/scripty/utils/AddressChunks.sol
|
|
2
|
+
// with adjustment to data offset for compatibility with Art Blocks BytecodeStorage.sol
|
|
3
|
+
// SPDX-License-Identifier: MIT
|
|
4
|
+
pragma solidity ^0.8.17;
|
|
5
|
+
|
|
6
|
+
library AddressChunks {
|
|
7
|
+
/**
|
|
8
|
+
* @notice Merge multiple chunks of contract code into a single bytes array.
|
|
9
|
+
* Offloads details of reading contract code to UniversalBytecodeStorageReader contract, but efficiently
|
|
10
|
+
* merges staticcall responses into a single bytes array using assembly.
|
|
11
|
+
* @dev This could become more gas efficient by implementing logic in the bytecode storage reader contracts
|
|
12
|
+
* here instead of moving large amounts of data through return data, but this implementation is much simpler
|
|
13
|
+
* and maintainable.
|
|
14
|
+
* @param chunks Array of contract addresses to merge
|
|
15
|
+
* @param universalReaderContract Address of the UniversalBytecodeStorageReader contract to use for reading
|
|
16
|
+
* stored bytecode (Art Blocks BytecodeStorage library)
|
|
17
|
+
* @return o_code Merged contract code
|
|
18
|
+
*/
|
|
19
|
+
function mergeChunks(
|
|
20
|
+
address[] memory chunks,
|
|
21
|
+
address universalReaderContract
|
|
22
|
+
) internal view returns (bytes memory o_code) {
|
|
23
|
+
unchecked {
|
|
24
|
+
assembly ("memory-safe") {
|
|
25
|
+
// part 1: provision memory for calldata to universal reader's readFromBytecode function
|
|
26
|
+
// 4 bytes for function selector, 32 bytes for address
|
|
27
|
+
let readerCalldata := mload(0x40)
|
|
28
|
+
mstore(readerCalldata, 0x75662f38) // function selector for readFromBytecode(address)
|
|
29
|
+
// calldata in memory will look like:
|
|
30
|
+
// 0000000000000000000000000000000000000000000000000000000075662f38
|
|
31
|
+
// 000000000000000000000000<-------------chunk-address------------>
|
|
32
|
+
// @dev do not populate address yet - do in call loop
|
|
33
|
+
// update free memory pointer two words ahead, past end reserved for calldata
|
|
34
|
+
mstore(0x40, add(readerCalldata, 0x40))
|
|
35
|
+
// update calldata to point to the start of the function selector
|
|
36
|
+
readerCalldata := add(readerCalldata, 28)
|
|
37
|
+
|
|
38
|
+
// part 2: reserve space 0x20 bytes representing the returned string length data for each call in loop
|
|
39
|
+
let returnDataStringLength := mload(0x40)
|
|
40
|
+
// update free memory pointer one word ahead, past end of returnDataStringLength
|
|
41
|
+
mstore(0x40, add(returnDataStringLength, 0x20))
|
|
42
|
+
|
|
43
|
+
// part 3: build o_code while looping through chunks
|
|
44
|
+
let len := mload(chunks)
|
|
45
|
+
let totalSize := 0x20
|
|
46
|
+
o_code := mload(0x40)
|
|
47
|
+
|
|
48
|
+
// loop through all chunk addresses
|
|
49
|
+
// - get address
|
|
50
|
+
// - get data size
|
|
51
|
+
// - get code and add to o_code
|
|
52
|
+
// - update total size
|
|
53
|
+
let targetChunk := 0
|
|
54
|
+
for {
|
|
55
|
+
let i := 0
|
|
56
|
+
} lt(i, len) {
|
|
57
|
+
i := add(i, 1)
|
|
58
|
+
} {
|
|
59
|
+
targetChunk := mload(add(chunks, add(0x20, mul(i, 0x20))))
|
|
60
|
+
// update calldata with targetChunk address
|
|
61
|
+
mstore(add(readerCalldata, 0x04), targetChunk) // offset by 4-byte function selector
|
|
62
|
+
// call the readFromBytecode(address) function of contract targetChunk and don't store the result
|
|
63
|
+
if iszero(
|
|
64
|
+
staticcall(
|
|
65
|
+
gas(), // forward all gas
|
|
66
|
+
universalReaderContract, // target address with the data stored as bytecode
|
|
67
|
+
readerCalldata, // start of calldata
|
|
68
|
+
0x24, // calldata size is 0x04 (function selector) + 0x20 (abi-encoded address)
|
|
69
|
+
0x00, // 0x00 (do not store return data)
|
|
70
|
+
0x00 // 0x00 (do not store return data)
|
|
71
|
+
)
|
|
72
|
+
) {
|
|
73
|
+
revert(0, 0) // call failed, revert
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// store return data string length
|
|
77
|
+
returndatacopy(
|
|
78
|
+
returnDataStringLength,
|
|
79
|
+
0x20, // start of return data's string length (ABI spec)
|
|
80
|
+
0x20 // size of length data (ABI spec)
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
// store the return string data in memory starting at o_code + totalSize
|
|
84
|
+
// first 0x20 bytes of return data points to the location of the string data (ABI spec)
|
|
85
|
+
// second 0x20 bytes of return data is the length of the data (ABI spec)
|
|
86
|
+
// the actual string data contents begin at returndata + 0x40
|
|
87
|
+
let storedReturnSize := mload(returnDataStringLength)
|
|
88
|
+
returndatacopy(
|
|
89
|
+
add(o_code, totalSize), // offset by totalSize
|
|
90
|
+
0x40, // skip the 0x40 bytes of length data at the start of the expected return data
|
|
91
|
+
storedReturnSize // return data size, as gathered above
|
|
92
|
+
)
|
|
93
|
+
totalSize := add(totalSize, storedReturnSize) // update total size
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// update o_code length in memory
|
|
97
|
+
mstore(o_code, sub(totalSize, 0x20))
|
|
98
|
+
// new "memory end" including padding
|
|
99
|
+
mstore(
|
|
100
|
+
0x40,
|
|
101
|
+
add(o_code, and(add(add(totalSize, 0x20), 0x1f), not(0x1f)))
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|