@artblocks/contracts 1.0.1 → 1.0.3
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 +67 -154
- package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +22 -4
- package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +42 -5
- 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/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/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/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/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/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/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
- package/artifacts/contracts/engine/{GenArt721CoreV2_ENGINE_FLEX.sol → V2/GenArt721CoreV2_ENGINE_FLEX.sol}/GenArt721CoreV2_ENGINE_FLEX.json +3 -3
- package/artifacts/contracts/engine/{GenArt721CoreV2_PBAB.sol → V2/GenArt721CoreV2_PBAB.sol}/GenArt721CoreV2_PBAB.json +3 -3
- package/artifacts/contracts/engine/{GenArt721CoreV2_PRTNR.sol → V2/GenArt721CoreV2_PRTNR.sol}/GenArt721CoreV2_PRTNR.json +3 -3
- package/artifacts/contracts/engine/{GenArt721MinterBurner_PBAB.sol → V2/GenArt721MinterBurner_PBAB.sol}/GenArt721MinterBurner_PBAB.json +3 -3
- package/artifacts/contracts/engine/{GenArt721MinterDAExp_PBAB.sol → V2/GenArt721MinterDAExp_PBAB.sol}/GenArt721MinterDAExp_PBAB.json +3 -3
- package/artifacts/contracts/engine/{GenArt721Minter_PBAB.sol → V2/GenArt721Minter_PBAB.sol}/GenArt721Minter_PBAB.json +3 -3
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +1960 -0
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +2247 -0
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +2247 -0
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +401 -0
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +2281 -0
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IAdminACLV0_PROHIBITION.sol/IAdminACLV0_PROHIBITION.json +359 -0
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +1094 -0
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +242 -0
- package/artifacts/contracts/engine-registry/EngineRegistryV0.sol/EngineRegistryV0.json +2 -2
- package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +41 -4
- package/artifacts/contracts/interfaces/0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +111 -0
- package/artifacts/contracts/interfaces/0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +172 -0
- package/artifacts/contracts/interfaces/0.8.x/IFilteredMinterSEAV0.sol/IFilteredMinterSEAV0.json +1034 -0
- package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractExposesHashSeed.sol/IGenArt721CoreContractExposesHashSeed.json +30 -0
- package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +162 -0
- package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +162 -0
- package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +137 -13
- package/artifacts/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +1060 -0
- package/artifacts/contracts/interfaces/0.8.x/IMinterFilterV1.sol/IMinterFilterV1.json +429 -0
- package/artifacts/contracts/interfaces/0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +30 -0
- package/artifacts/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol/IRandomizer_V3CoreBase.json +24 -0
- package/artifacts/contracts/interfaces/0.8.x/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +207 -0
- package/artifacts/contracts/interfaces/0.8.x/IWETH.sol/IWETH.json +55 -0
- package/artifacts/contracts/libs/0.8.x/{BytecodeStorage.sol → BytecodeStorageV0.sol}/BytecodeStorage.json +3 -3
- package/artifacts/contracts/libs/0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +163 -0
- package/artifacts/contracts/libs/0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +10 -0
- package/artifacts/contracts/libs/0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
- package/artifacts/contracts/libs/0.8.x/SSTORE2.sol/SSTORE2.json +10 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +295 -0
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +692 -0
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV4.sol/MinterDAExpV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV4.sol/MinterDALinV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterHolderV4.sol/MinterHolderV4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterMerkleV5.sol/MinterMerkleV5.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +104 -124
- package/artifacts/contracts/minter-suite/Minters/MinterPolyptychV0.sol/MinterPolyptychV0.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV0.sol/MinterSEAV0.json +1289 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +2 -2
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV4.sol/MinterSetPriceV4.json +2 -2
- package/artifacts/contracts/mock/{BytecodeTextCR_DMock.sol/BytecodeTextCR_DMock.json → BytecodeV0TextCR_DMock.sol/BytecodeV0TextCR_DMock.json} +4 -4
- package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +135 -0
- package/artifacts/contracts/mock/BytecodeV1TextCR_DMock.sol/BytecodeV1TextCR_DMock.json +301 -0
- package/artifacts/contracts/mock/DeadReceiverBidderMock.sol/DeadReceiverBidderMock.json +33 -0
- package/artifacts/contracts/mock/DeadReceiverMock.sol/DeadReceiverMock.json +2 -2
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +114 -0
- package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
- package/artifacts/contracts/mock/GasLimitReceiverBidderMock.sol/GasLimitReceiverBidderMock.json +46 -0
- package/artifacts/contracts/mock/GasLimitReceiverMock.sol/GasLimitReceiverMock.json +28 -0
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +22 -4
- package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +2 -2
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +440 -0
- package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +39 -0
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +51 -0
- package/artifacts/contracts/mock/SSTORE2Mock.sol/SSTORE2Mock.json +118 -0
- package/artifacts/contracts/{BasicRandomizer.sol → randomizer/deprecated/BasicRandomizer.sol}/BasicRandomizer.json +3 -3
- package/artifacts/contracts/randomizer/deprecated/BasicRandomizerBase_v0_0_0.sol/RandomizerBase.json +10 -0
- package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +229 -0
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +102 -0
- package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +30 -0
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +231 -0
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +2 -2
- package/contracts/AdminACLV0.sol +1 -1
- package/contracts/AdminACLV1.sol +1 -1
- package/contracts/DependencyRegistryV0.sol +89 -141
- package/contracts/GenArt721CoreV3.sol +160 -204
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol +1 -1
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol +1 -1
- package/contracts/engine/{GenArt721CoreV2_ENGINE_FLEX.sol → V2/GenArt721CoreV2_ENGINE_FLEX.sol} +2 -2
- package/contracts/engine/{GenArt721CoreV2_PBAB.sol → V2/GenArt721CoreV2_PBAB.sol} +2 -2
- package/contracts/engine/{GenArt721CoreV2_PRTNR.sol → V2/GenArt721CoreV2_PRTNR.sol} +3 -3
- package/contracts/engine/{GenArt721MinterBurner_PBAB.sol → V2/GenArt721MinterBurner_PBAB.sol} +2 -2
- package/contracts/engine/{GenArt721MinterDAExp_PBAB.sol → V2/GenArt721MinterDAExp_PBAB.sol} +2 -2
- package/contracts/engine/{GenArt721Minter_PBAB.sol → V2/GenArt721Minter_PBAB.sol} +2 -2
- package/contracts/{GenArt721CoreV3_Engine.sol → engine/V3/GenArt721CoreV3_Engine.sol} +163 -216
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +2283 -0
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +2293 -0
- package/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol +281 -0
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +2354 -0
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IAdminACLV0_PROHIBITION.sol +123 -0
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +29 -0
- package/contracts/engine-registry/CoreRegistryV1.sol +254 -0
- package/contracts/engine-registry/EngineRegistryV0.sol +1 -1
- package/contracts/explorations/GenArt721CoreV3_Explorations.sol +164 -190
- package/contracts/interfaces/0.8.x/IBytecodeStorageReader.sol +62 -0
- package/contracts/interfaces/0.8.x/ICoreRegistryV1.sol +27 -0
- package/contracts/interfaces/0.8.x/IDelegationRegistry.sol +1 -1
- package/contracts/interfaces/0.8.x/IDependencyRegistryCompatibleV0.sol +1 -1
- package/contracts/interfaces/0.8.x/IDependencyRegistryV0.sol +1 -1
- package/contracts/interfaces/0.8.x/IEngineRegistryV0.sol +1 -1
- package/contracts/interfaces/0.8.x/IFilteredMinterSEAV0.sol +164 -0
- package/contracts/interfaces/0.8.x/IGenArt721CoreContractExposesHashSeed.sol +11 -0
- package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol +42 -0
- package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine.sol +0 -8
- package/contracts/interfaces/0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +132 -0
- package/contracts/interfaces/0.8.x/IMinterFilterV1.sol +158 -0
- package/contracts/interfaces/0.8.x/IPseudorandomAtomic.sol +16 -0
- package/contracts/interfaces/0.8.x/IRandomizerPolyptychV0.sol +1 -1
- package/contracts/interfaces/0.8.x/IRandomizerV2.sol +2 -5
- package/contracts/interfaces/0.8.x/IRandomizer_V3CoreBase.sol +10 -0
- package/contracts/interfaces/0.8.x/ISharedRandomizerV0.sol +105 -0
- package/contracts/interfaces/0.8.x/IWETH.sol +11 -0
- package/contracts/libs/0.8.x/BytecodeStorageV1.sol +399 -0
- package/contracts/libs/0.8.x/SSTORE2.sol +109 -0
- package/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol +1 -1
- package/contracts/libs/integration-refs/weth9/weth9.sol +765 -0
- package/contracts/minter-suite/MinterFilter/MinterFilterV1.sol +36 -48
- package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +756 -0
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol +27 -35
- package/contracts/minter-suite/Minters/MinterDAExpV4.sol +17 -22
- package/contracts/minter-suite/Minters/MinterDALinV4.sol +16 -18
- package/contracts/minter-suite/Minters/MinterHolderV4.sol +20 -20
- package/contracts/minter-suite/Minters/MinterMerkleV5.sol +14 -16
- package/contracts/minter-suite/Minters/MinterPolyptychV0.sol +37 -36
- package/contracts/minter-suite/Minters/MinterSEAV0.sol +1273 -0
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol +12 -12
- package/contracts/minter-suite/Minters/MinterSetPriceV4.sol +10 -11
- package/contracts/mock/{BytecodeTextCR_DMock.sol → BytecodeV0TextCR_DMock.sol} +5 -5
- package/contracts/mock/BytecodeV1LibCallsMock.sol +114 -0
- package/contracts/mock/BytecodeV1TextCR_DMock.sol +233 -0
- package/contracts/mock/DeadReceiverBidderMock.sol +23 -0
- package/contracts/mock/DeadReceiverMock.sol +1 -1
- package/contracts/mock/DummySharedMinter.sol +75 -0
- package/contracts/mock/GasLimitReceiverBidderMock.sol +23 -0
- package/contracts/mock/GasLimitReceiverMock.sol +19 -0
- package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +14 -27
- package/contracts/mock/MockAdminACLV0.sol +1 -1
- package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +207 -0
- package/contracts/mock/OriginRegisterMock.sol +27 -0
- package/contracts/mock/RandomizerV2_NoAssignMock.sol +3 -12
- package/contracts/mock/ReentrancySEAMock.sol +36 -0
- package/contracts/mock/SSTORE2Mock.sol +93 -0
- package/contracts/{BasicRandomizer.sol → randomizer/deprecated/BasicRandomizer.sol} +1 -1
- package/contracts/randomizer/deprecated/BasicRandomizerBase_v0_0_0.sol +23 -0
- package/contracts/{BasicPolyptychRandomizerV0.sol → randomizer/deprecated/PolyptychRandomizerV0.sol} +20 -29
- package/contracts/{BasicRandomizerV2.sol → randomizer/deprecated/RandomizerV2.sol} +6 -14
- package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +30 -0
- package/contracts/randomizer/shared/SharedRandomizerV0.sol +245 -0
- package/package.json +36 -30
- package/.env.example +0 -10
- package/artifacts/contracts/BasicPolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +0 -229
- package/artifacts/contracts/BasicRandomizerV2.sol/BasicRandomizerV2.json +0 -102
- package/artifacts/contracts/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +0 -1942
- package/artifacts/contracts/engine-registry/future/EngineRegistryV1.sol/EngineRegistryV1.json +0 -109
- package/contracts/engine-registry/future/EngineRegistryV1.sol +0 -86
- /package/contracts/libs/0.8.x/{BytecodeStorage.sol → BytecodeStorageV0.sol} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.19;
|
|
3
3
|
|
|
4
4
|
// Created By: Art Blocks Inc.
|
|
5
5
|
|
|
6
6
|
import "../interfaces/0.8.x/IRandomizerV2.sol";
|
|
7
7
|
import "../interfaces/0.8.x/IAdminACLV0.sol";
|
|
8
8
|
import "../interfaces/0.8.x/IGenArt721CoreContractV3.sol";
|
|
9
|
+
import "../interfaces/0.8.x/IGenArt721CoreContractExposesHashSeed.sol";
|
|
9
10
|
import "../interfaces/0.8.x/IManifold.sol";
|
|
10
11
|
|
|
11
12
|
import "@openzeppelin-4.7/contracts/utils/Strings.sol";
|
|
12
13
|
import "@openzeppelin-4.7/contracts/access/Ownable.sol";
|
|
13
14
|
import "../libs/0.8.x/ERC721_PackedHashSeed.sol";
|
|
14
|
-
import "../libs/0.8.x/
|
|
15
|
+
import "../libs/0.8.x/BytecodeStorageV1.sol";
|
|
15
16
|
import "../libs/0.8.x/Bytes32Strings.sol";
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -88,10 +89,10 @@ import "../libs/0.8.x/Bytes32Strings.sol";
|
|
|
88
89
|
contract GenArt721CoreV3_Explorations is
|
|
89
90
|
ERC721_PackedHashSeed,
|
|
90
91
|
Ownable,
|
|
91
|
-
IGenArt721CoreContractV3
|
|
92
|
+
IGenArt721CoreContractV3,
|
|
93
|
+
IGenArt721CoreContractExposesHashSeed
|
|
92
94
|
{
|
|
93
|
-
using
|
|
94
|
-
using BytecodeStorage for address;
|
|
95
|
+
using BytecodeStorageWriter for string;
|
|
95
96
|
using Bytes32Strings for bytes32;
|
|
96
97
|
using Strings for uint256;
|
|
97
98
|
using Strings for address;
|
|
@@ -237,7 +238,7 @@ contract GenArt721CoreV3_Explorations is
|
|
|
237
238
|
/// version & type of this core contract
|
|
238
239
|
/// coreVersion is updated from Flagship V3 core due to minor changes
|
|
239
240
|
/// implemented in the Explorations version of the contract.
|
|
240
|
-
string public constant coreVersion = "v3.
|
|
241
|
+
string public constant coreVersion = "v3.2.1";
|
|
241
242
|
/// coreType remains consistent with flagship V3 core because external &
|
|
242
243
|
/// public functions used for indexing are unchanged.
|
|
243
244
|
string public constant coreType = "GenArt721CoreV3";
|
|
@@ -245,71 +246,66 @@ contract GenArt721CoreV3_Explorations is
|
|
|
245
246
|
/// default base URI to initialize all new project projectBaseURI values to
|
|
246
247
|
string public defaultBaseURI;
|
|
247
248
|
|
|
248
|
-
|
|
249
|
+
function _onlyNonZeroAddress(address _address) internal pure {
|
|
249
250
|
require(_address != address(0), "Must input non-zero address");
|
|
250
|
-
_;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
|
|
253
|
+
function _onlyNonEmptyString(string memory _string) internal pure {
|
|
254
254
|
require(bytes(_string).length != 0, "Must input non-empty string");
|
|
255
|
-
_;
|
|
256
255
|
}
|
|
257
256
|
|
|
258
|
-
|
|
257
|
+
function _onlyValidTokenId(uint256 _tokenId) internal view {
|
|
259
258
|
require(_exists(_tokenId), "Token ID does not exist");
|
|
260
|
-
_;
|
|
261
259
|
}
|
|
262
260
|
|
|
263
|
-
|
|
261
|
+
function _onlyValidProjectId(uint256 _projectId) internal view {
|
|
264
262
|
require(
|
|
265
263
|
(_projectId >= startingProjectId) && (_projectId < _nextProjectId),
|
|
266
264
|
"Project ID does not exist"
|
|
267
265
|
);
|
|
268
|
-
_;
|
|
269
266
|
}
|
|
270
267
|
|
|
271
|
-
|
|
268
|
+
function _onlyUnlocked(uint256 _projectId) internal view {
|
|
272
269
|
// Note: calling `_projectUnlocked` enforces that the `_projectId`
|
|
273
270
|
// passed in is valid.`
|
|
274
271
|
require(_projectUnlocked(_projectId), "Only if unlocked");
|
|
275
|
-
_;
|
|
276
272
|
}
|
|
277
273
|
|
|
278
|
-
|
|
274
|
+
function _onlyAdminACL(bytes4 _selector) internal {
|
|
279
275
|
require(
|
|
280
276
|
adminACLAllowed(msg.sender, address(this), _selector),
|
|
281
277
|
"Only Admin ACL allowed"
|
|
282
278
|
);
|
|
283
|
-
_;
|
|
284
279
|
}
|
|
285
280
|
|
|
286
|
-
|
|
281
|
+
function _onlyArtist(uint256 _projectId) internal view {
|
|
287
282
|
require(
|
|
288
283
|
msg.sender == projectIdToFinancials[_projectId].artistAddress,
|
|
289
284
|
"Only artist"
|
|
290
285
|
);
|
|
291
|
-
_;
|
|
292
286
|
}
|
|
293
287
|
|
|
294
|
-
|
|
288
|
+
function _onlyArtistOrAdminACL(
|
|
289
|
+
uint256 _projectId,
|
|
290
|
+
bytes4 _selector
|
|
291
|
+
) internal {
|
|
295
292
|
require(
|
|
296
293
|
msg.sender == projectIdToFinancials[_projectId].artistAddress ||
|
|
297
294
|
adminACLAllowed(msg.sender, address(this), _selector),
|
|
298
295
|
"Only artist or Admin ACL allowed"
|
|
299
296
|
);
|
|
300
|
-
_;
|
|
301
297
|
}
|
|
302
298
|
|
|
303
299
|
/**
|
|
304
|
-
* This
|
|
300
|
+
* This function allows the artist of a project to call a function if the
|
|
305
301
|
* owner of the contract has renounced ownership. This is to allow the
|
|
306
302
|
* contract to continue to function if the owner decides to renounce
|
|
307
303
|
* ownership.
|
|
308
304
|
*/
|
|
309
|
-
|
|
305
|
+
function _onlyAdminACLOrRenouncedArtist(
|
|
310
306
|
uint256 _projectId,
|
|
311
307
|
bytes4 _selector
|
|
312
|
-
) {
|
|
308
|
+
) internal {
|
|
313
309
|
require(
|
|
314
310
|
adminACLAllowed(msg.sender, address(this), _selector) ||
|
|
315
311
|
(owner() == address(0) &&
|
|
@@ -317,7 +313,6 @@ contract GenArt721CoreV3_Explorations is
|
|
|
317
313
|
projectIdToFinancials[_projectId].artistAddress),
|
|
318
314
|
"Only Admin ACL allowed, or artist if owner has renounced"
|
|
319
315
|
);
|
|
320
|
-
_;
|
|
321
316
|
}
|
|
322
317
|
|
|
323
318
|
/**
|
|
@@ -339,10 +334,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
339
334
|
address _randomizerContract,
|
|
340
335
|
address _adminACLContract,
|
|
341
336
|
uint248 _startingProjectId
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
onlyNonZeroAddress(_randomizerContract)
|
|
345
|
-
{
|
|
337
|
+
) ERC721_PackedHashSeed(_tokenName, _tokenSymbol) {
|
|
338
|
+
_onlyNonZeroAddress(_randomizerContract);
|
|
346
339
|
// record contracts starting project ID
|
|
347
340
|
// casting-up is safe
|
|
348
341
|
startingProjectId = uint256(_startingProjectId);
|
|
@@ -452,10 +445,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
452
445
|
* for indexing purposes, it must be emitted by the randomizer. This is to
|
|
453
446
|
* minimize gas when minting.
|
|
454
447
|
*/
|
|
455
|
-
function setTokenHash_8PT(
|
|
456
|
-
|
|
457
|
-
bytes32 _hashSeed
|
|
458
|
-
) external onlyValidTokenId(_tokenId) {
|
|
448
|
+
function setTokenHash_8PT(uint256 _tokenId, bytes32 _hashSeed) external {
|
|
449
|
+
_onlyValidTokenId(_tokenId);
|
|
459
450
|
OwnerAndHashSeed storage ownerAndHashSeed = _ownersAndHashSeeds[
|
|
460
451
|
_tokenId
|
|
461
452
|
];
|
|
@@ -481,8 +472,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
481
472
|
* that also integrate with the owner/AdminACL contract (e.g. potentially
|
|
482
473
|
* minter suite contracts, registry contracts, etc.).
|
|
483
474
|
* After renouncing ownership, artists will be in control of updates to
|
|
484
|
-
* their payment addresses and splits (see
|
|
485
|
-
*
|
|
475
|
+
* their payment addresses and splits (see function
|
|
476
|
+
* _onlyAdminACLOrRenouncedArtist`).
|
|
486
477
|
* While there is no currently intended reason to call this method based on
|
|
487
478
|
* defined Art Blocks business practices, this method exists to allow
|
|
488
479
|
* artists to continue to maintain the limited set of contract
|
|
@@ -507,11 +498,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
507
498
|
*/
|
|
508
499
|
function updateArtblocksCurationRegistryAddress(
|
|
509
500
|
address _artblocksCurationRegistryAddress
|
|
510
|
-
)
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
onlyNonZeroAddress(_artblocksCurationRegistryAddress)
|
|
514
|
-
{
|
|
501
|
+
) external {
|
|
502
|
+
_onlyAdminACL(this.updateArtblocksCurationRegistryAddress.selector);
|
|
503
|
+
_onlyNonZeroAddress(_artblocksCurationRegistryAddress);
|
|
515
504
|
revert("Action not supported");
|
|
516
505
|
}
|
|
517
506
|
|
|
@@ -522,11 +511,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
522
511
|
*/
|
|
523
512
|
function updateArtblocksDependencyRegistryAddress(
|
|
524
513
|
address _artblocksDependencyRegistryAddress
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
onlyNonZeroAddress(_artblocksDependencyRegistryAddress)
|
|
529
|
-
{
|
|
514
|
+
) external {
|
|
515
|
+
_onlyAdminACL(this.updateArtblocksDependencyRegistryAddress.selector);
|
|
516
|
+
_onlyNonZeroAddress(_artblocksDependencyRegistryAddress);
|
|
530
517
|
artblocksDependencyRegistryAddress = _artblocksDependencyRegistryAddress;
|
|
531
518
|
emit PlatformUpdated(FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS);
|
|
532
519
|
}
|
|
@@ -539,11 +526,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
539
526
|
*/
|
|
540
527
|
function updateArtblocksPrimarySalesAddress(
|
|
541
528
|
address payable _artblocksPrimarySalesAddress
|
|
542
|
-
)
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
onlyNonZeroAddress(_artblocksPrimarySalesAddress)
|
|
546
|
-
{
|
|
529
|
+
) external {
|
|
530
|
+
_onlyAdminACL(this.updateArtblocksPrimarySalesAddress.selector);
|
|
531
|
+
_onlyNonZeroAddress(_artblocksPrimarySalesAddress);
|
|
547
532
|
_updateArtblocksPrimarySalesAddress(_artblocksPrimarySalesAddress);
|
|
548
533
|
}
|
|
549
534
|
|
|
@@ -555,11 +540,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
555
540
|
*/
|
|
556
541
|
function updateArtblocksSecondarySalesAddress(
|
|
557
542
|
address payable _artblocksSecondarySalesAddress
|
|
558
|
-
)
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
onlyNonZeroAddress(_artblocksSecondarySalesAddress)
|
|
562
|
-
{
|
|
543
|
+
) external {
|
|
544
|
+
_onlyAdminACL(this.updateArtblocksSecondarySalesAddress.selector);
|
|
545
|
+
_onlyNonZeroAddress(_artblocksSecondarySalesAddress);
|
|
563
546
|
_updateArtblocksSecondarySalesAddress(_artblocksSecondarySalesAddress);
|
|
564
547
|
}
|
|
565
548
|
|
|
@@ -571,10 +554,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
571
554
|
*/
|
|
572
555
|
function updateArtblocksPrimarySalesPercentage(
|
|
573
556
|
uint256 artblocksPrimarySalesPercentage_
|
|
574
|
-
)
|
|
575
|
-
|
|
576
|
-
onlyAdminACL(this.updateArtblocksPrimarySalesPercentage.selector)
|
|
577
|
-
{
|
|
557
|
+
) external {
|
|
558
|
+
_onlyAdminACL(this.updateArtblocksPrimarySalesPercentage.selector);
|
|
578
559
|
require(
|
|
579
560
|
artblocksPrimarySalesPercentage_ <=
|
|
580
561
|
ART_BLOCKS_MAX_PRIMARY_SALES_PERCENTAGE,
|
|
@@ -599,7 +580,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
599
580
|
*/
|
|
600
581
|
function updateArtblocksSecondarySalesBPS(
|
|
601
582
|
uint256 _artblocksSecondarySalesBPS
|
|
602
|
-
) external
|
|
583
|
+
) external {
|
|
584
|
+
_onlyAdminACL(this.updateArtblocksSecondarySalesBPS.selector);
|
|
603
585
|
require(
|
|
604
586
|
_artblocksSecondarySalesBPS <= ART_BLOCKS_MAX_SECONDARY_SALES_BPS,
|
|
605
587
|
"Max of ART_BLOCKS_MAX_SECONDARY_SALES_BPS BPS"
|
|
@@ -612,13 +594,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
612
594
|
* @notice Updates minter to `_address`.
|
|
613
595
|
* @param _address Address of new minter.
|
|
614
596
|
*/
|
|
615
|
-
function updateMinterContract(
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
external
|
|
619
|
-
onlyAdminACL(this.updateMinterContract.selector)
|
|
620
|
-
onlyNonZeroAddress(_address)
|
|
621
|
-
{
|
|
597
|
+
function updateMinterContract(address _address) external {
|
|
598
|
+
_onlyAdminACL(this.updateMinterContract.selector);
|
|
599
|
+
_onlyNonZeroAddress(_address);
|
|
622
600
|
minterContract = _address;
|
|
623
601
|
emit MinterUpdated(_address);
|
|
624
602
|
}
|
|
@@ -627,13 +605,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
627
605
|
* @notice Updates randomizer to `_randomizerAddress`.
|
|
628
606
|
* @param _randomizerAddress Address of new randomizer.
|
|
629
607
|
*/
|
|
630
|
-
function updateRandomizerAddress(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
external
|
|
634
|
-
onlyAdminACL(this.updateRandomizerAddress.selector)
|
|
635
|
-
onlyNonZeroAddress(_randomizerAddress)
|
|
636
|
-
{
|
|
608
|
+
function updateRandomizerAddress(address _randomizerAddress) external {
|
|
609
|
+
_onlyAdminACL(this.updateRandomizerAddress.selector);
|
|
610
|
+
_onlyNonZeroAddress(_randomizerAddress);
|
|
637
611
|
_updateRandomizerAddress(_randomizerAddress);
|
|
638
612
|
}
|
|
639
613
|
|
|
@@ -641,13 +615,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
641
615
|
* @notice Toggles project `_projectId` as active/inactive.
|
|
642
616
|
* @param _projectId Project ID to be toggled.
|
|
643
617
|
*/
|
|
644
|
-
function toggleProjectIsActive(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
external
|
|
648
|
-
onlyAdminACL(this.toggleProjectIsActive.selector)
|
|
649
|
-
onlyValidProjectId(_projectId)
|
|
650
|
-
{
|
|
618
|
+
function toggleProjectIsActive(uint256 _projectId) external {
|
|
619
|
+
_onlyAdminACL(this.toggleProjectIsActive.selector);
|
|
620
|
+
_onlyValidProjectId(_projectId);
|
|
651
621
|
projects[_projectId].active = !projects[_projectId].active;
|
|
652
622
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ACTIVE);
|
|
653
623
|
}
|
|
@@ -688,12 +658,10 @@ contract GenArt721CoreV3_Explorations is
|
|
|
688
658
|
uint256 _additionalPayeePrimarySalesPercentage,
|
|
689
659
|
address payable _additionalPayeeSecondarySales,
|
|
690
660
|
uint256 _additionalPayeeSecondarySalesPercentage
|
|
691
|
-
)
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
onlyNonZeroAddress(_artistAddress)
|
|
696
|
-
{
|
|
661
|
+
) external {
|
|
662
|
+
_onlyValidProjectId(_projectId);
|
|
663
|
+
_onlyArtist(_projectId);
|
|
664
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
697
665
|
ProjectFinance storage projectFinance = projectIdToFinancials[
|
|
698
666
|
_projectId
|
|
699
667
|
];
|
|
@@ -808,15 +776,13 @@ contract GenArt721CoreV3_Explorations is
|
|
|
808
776
|
uint256 _additionalPayeePrimarySalesPercentage,
|
|
809
777
|
address payable _additionalPayeeSecondarySales,
|
|
810
778
|
uint256 _additionalPayeeSecondarySalesPercentage
|
|
811
|
-
)
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
onlyAdminACLOrRenouncedArtist(
|
|
779
|
+
) external {
|
|
780
|
+
_onlyValidProjectId(_projectId);
|
|
781
|
+
_onlyAdminACLOrRenouncedArtist(
|
|
815
782
|
_projectId,
|
|
816
783
|
this.adminAcceptArtistAddressesAndSplits.selector
|
|
817
|
-
)
|
|
818
|
-
|
|
819
|
-
{
|
|
784
|
+
);
|
|
785
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
820
786
|
// checks
|
|
821
787
|
require(
|
|
822
788
|
proposedArtistAddressesAndSplitsHash[_projectId] ==
|
|
@@ -862,15 +828,13 @@ contract GenArt721CoreV3_Explorations is
|
|
|
862
828
|
function updateProjectArtistAddress(
|
|
863
829
|
uint256 _projectId,
|
|
864
830
|
address payable _artistAddress
|
|
865
|
-
)
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
onlyAdminACLOrRenouncedArtist(
|
|
831
|
+
) external {
|
|
832
|
+
_onlyValidProjectId(_projectId);
|
|
833
|
+
_onlyAdminACLOrRenouncedArtist(
|
|
869
834
|
_projectId,
|
|
870
835
|
this.updateProjectArtistAddress.selector
|
|
871
|
-
)
|
|
872
|
-
|
|
873
|
-
{
|
|
836
|
+
);
|
|
837
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
874
838
|
projectIdToFinancials[_projectId].artistAddress = _artistAddress;
|
|
875
839
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_ADDRESS);
|
|
876
840
|
}
|
|
@@ -879,9 +843,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
879
843
|
* @notice Toggles paused state of project `_projectId`.
|
|
880
844
|
* @param _projectId Project ID to be toggled.
|
|
881
845
|
*/
|
|
882
|
-
function toggleProjectIsPaused(
|
|
883
|
-
|
|
884
|
-
) external onlyArtist(_projectId) {
|
|
846
|
+
function toggleProjectIsPaused(uint256 _projectId) external {
|
|
847
|
+
_onlyArtist(_projectId);
|
|
885
848
|
projects[_projectId].paused = !projects[_projectId].paused;
|
|
886
849
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_PAUSED);
|
|
887
850
|
}
|
|
@@ -895,12 +858,10 @@ contract GenArt721CoreV3_Explorations is
|
|
|
895
858
|
function addProject(
|
|
896
859
|
string memory _projectName,
|
|
897
860
|
address payable _artistAddress
|
|
898
|
-
)
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
onlyNonZeroAddress(_artistAddress)
|
|
903
|
-
{
|
|
861
|
+
) external {
|
|
862
|
+
_onlyAdminACL(this.addProject.selector);
|
|
863
|
+
_onlyNonEmptyString(_projectName);
|
|
864
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
904
865
|
require(!newProjectsForbidden, "New projects forbidden");
|
|
905
866
|
uint256 projectId = _nextProjectId;
|
|
906
867
|
projectIdToFinancials[projectId].artistAddress = _artistAddress;
|
|
@@ -916,10 +877,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
916
877
|
/**
|
|
917
878
|
* @notice Forever forbids new projects from being added to this contract.
|
|
918
879
|
*/
|
|
919
|
-
function forbidNewProjects()
|
|
920
|
-
|
|
921
|
-
onlyAdminACL(this.forbidNewProjects.selector)
|
|
922
|
-
{
|
|
880
|
+
function forbidNewProjects() external {
|
|
881
|
+
_onlyAdminACL(this.forbidNewProjects.selector);
|
|
923
882
|
require(!newProjectsForbidden, "Already forbidden");
|
|
924
883
|
_forbidNewProjects();
|
|
925
884
|
}
|
|
@@ -932,12 +891,10 @@ contract GenArt721CoreV3_Explorations is
|
|
|
932
891
|
function updateProjectName(
|
|
933
892
|
uint256 _projectId,
|
|
934
893
|
string memory _projectName
|
|
935
|
-
)
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
onlyNonEmptyString(_projectName)
|
|
940
|
-
{
|
|
894
|
+
) external {
|
|
895
|
+
_onlyUnlocked(_projectId);
|
|
896
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectName.selector);
|
|
897
|
+
_onlyNonEmptyString(_projectName);
|
|
941
898
|
projects[_projectId].name = _projectName;
|
|
942
899
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_NAME);
|
|
943
900
|
}
|
|
@@ -951,12 +908,13 @@ contract GenArt721CoreV3_Explorations is
|
|
|
951
908
|
function updateProjectArtistName(
|
|
952
909
|
uint256 _projectId,
|
|
953
910
|
string memory _projectArtistName
|
|
954
|
-
)
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
911
|
+
) external {
|
|
912
|
+
_onlyUnlocked(_projectId);
|
|
913
|
+
_onlyArtistOrAdminACL(
|
|
914
|
+
_projectId,
|
|
915
|
+
this.updateProjectArtistName.selector
|
|
916
|
+
);
|
|
917
|
+
_onlyNonEmptyString(_projectArtistName);
|
|
960
918
|
projects[_projectId].artist = _projectArtistName;
|
|
961
919
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_NAME);
|
|
962
920
|
}
|
|
@@ -975,7 +933,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
975
933
|
function updateProjectSecondaryMarketRoyaltyPercentage(
|
|
976
934
|
uint256 _projectId,
|
|
977
935
|
uint256 _secondMarketRoyalty
|
|
978
|
-
) external
|
|
936
|
+
) external {
|
|
937
|
+
_onlyArtist(_projectId);
|
|
979
938
|
require(
|
|
980
939
|
_secondMarketRoyalty <= ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE,
|
|
981
940
|
"Max of ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent"
|
|
@@ -1023,7 +982,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1023
982
|
function updateProjectWebsite(
|
|
1024
983
|
uint256 _projectId,
|
|
1025
984
|
string memory _projectWebsite
|
|
1026
|
-
) external
|
|
985
|
+
) external {
|
|
986
|
+
_onlyArtist(_projectId);
|
|
1027
987
|
projects[_projectId].website = _projectWebsite;
|
|
1028
988
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_WEBSITE);
|
|
1029
989
|
}
|
|
@@ -1036,12 +996,10 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1036
996
|
function updateProjectLicense(
|
|
1037
997
|
uint256 _projectId,
|
|
1038
998
|
string memory _projectLicense
|
|
1039
|
-
)
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
onlyNonEmptyString(_projectLicense)
|
|
1044
|
-
{
|
|
999
|
+
) external {
|
|
1000
|
+
_onlyUnlocked(_projectId);
|
|
1001
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectLicense.selector);
|
|
1002
|
+
_onlyNonEmptyString(_projectLicense);
|
|
1045
1003
|
projects[_projectId].license = _projectLicense;
|
|
1046
1004
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_LICENSE);
|
|
1047
1005
|
}
|
|
@@ -1058,7 +1016,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1058
1016
|
function updateProjectMaxInvocations(
|
|
1059
1017
|
uint256 _projectId,
|
|
1060
1018
|
uint24 _maxInvocations
|
|
1061
|
-
) external
|
|
1019
|
+
) external {
|
|
1020
|
+
_onlyArtist(_projectId);
|
|
1062
1021
|
// CHECKS
|
|
1063
1022
|
Project storage project = projects[_projectId];
|
|
1064
1023
|
uint256 _invocations = project.invocations;
|
|
@@ -1083,17 +1042,16 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1083
1042
|
/**
|
|
1084
1043
|
* @notice Adds a script to project `_projectId`.
|
|
1085
1044
|
* @param _projectId Project to be updated.
|
|
1086
|
-
* @param _script Script to be added.
|
|
1045
|
+
* @param _script Script to be added. Required to be a non-empty string,
|
|
1046
|
+
* but no further validation is performed.
|
|
1087
1047
|
*/
|
|
1088
1048
|
function addProjectScript(
|
|
1089
1049
|
uint256 _projectId,
|
|
1090
1050
|
string memory _script
|
|
1091
|
-
)
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
onlyNonEmptyString(_script)
|
|
1096
|
-
{
|
|
1051
|
+
) external {
|
|
1052
|
+
_onlyUnlocked(_projectId);
|
|
1053
|
+
_onlyArtistOrAdminACL(_projectId, this.addProjectScript.selector);
|
|
1054
|
+
_onlyNonEmptyString(_script);
|
|
1097
1055
|
Project storage project = projects[_projectId];
|
|
1098
1056
|
// store script in contract bytecode
|
|
1099
1057
|
project.scriptBytecodeAddresses[project.scriptCount] = _script
|
|
@@ -1106,24 +1064,21 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1106
1064
|
* @notice Updates script for project `_projectId` at script ID `_scriptId`.
|
|
1107
1065
|
* @param _projectId Project to be updated.
|
|
1108
1066
|
* @param _scriptId Script ID to be updated.
|
|
1109
|
-
* @param _script The updated script value.
|
|
1067
|
+
* @param _script The updated script value. Required to be a non-empty
|
|
1068
|
+
* string, but no further validation is performed.
|
|
1110
1069
|
*/
|
|
1111
1070
|
function updateProjectScript(
|
|
1112
1071
|
uint256 _projectId,
|
|
1113
1072
|
uint256 _scriptId,
|
|
1114
1073
|
string memory _script
|
|
1115
|
-
)
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
onlyNonEmptyString(_script)
|
|
1120
|
-
{
|
|
1074
|
+
) external {
|
|
1075
|
+
_onlyUnlocked(_projectId);
|
|
1076
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectScript.selector);
|
|
1077
|
+
_onlyNonEmptyString(_script);
|
|
1121
1078
|
Project storage project = projects[_projectId];
|
|
1122
1079
|
require(_scriptId < project.scriptCount, "scriptId out of range");
|
|
1123
|
-
// purge old contract bytecode contract from the blockchain state
|
|
1124
|
-
project.scriptBytecodeAddresses[_scriptId].purgeBytecode();
|
|
1125
1080
|
// store script in contract bytecode, replacing reference address from
|
|
1126
|
-
// the
|
|
1081
|
+
// the old storage contract with the newly created one
|
|
1127
1082
|
project.scriptBytecodeAddresses[_scriptId] = _script.writeToBytecode();
|
|
1128
1083
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT);
|
|
1129
1084
|
}
|
|
@@ -1132,20 +1087,15 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1132
1087
|
* @notice Removes last script from project `_projectId`.
|
|
1133
1088
|
* @param _projectId Project to be updated.
|
|
1134
1089
|
*/
|
|
1135
|
-
function removeProjectLastScript(
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
{
|
|
1090
|
+
function removeProjectLastScript(uint256 _projectId) external {
|
|
1091
|
+
_onlyUnlocked(_projectId);
|
|
1092
|
+
_onlyArtistOrAdminACL(
|
|
1093
|
+
_projectId,
|
|
1094
|
+
this.removeProjectLastScript.selector
|
|
1095
|
+
);
|
|
1142
1096
|
Project storage project = projects[_projectId];
|
|
1143
1097
|
require(project.scriptCount > 0, "there are no scripts to remove");
|
|
1144
|
-
//
|
|
1145
|
-
project
|
|
1146
|
-
.scriptBytecodeAddresses[project.scriptCount - 1]
|
|
1147
|
-
.purgeBytecode();
|
|
1148
|
-
// delete reference to contract address that no longer exists
|
|
1098
|
+
// delete reference to old storage contract address
|
|
1149
1099
|
delete project.scriptBytecodeAddresses[project.scriptCount - 1];
|
|
1150
1100
|
unchecked {
|
|
1151
1101
|
project.scriptCount = project.scriptCount - 1;
|
|
@@ -1162,11 +1112,12 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1162
1112
|
function updateProjectScriptType(
|
|
1163
1113
|
uint256 _projectId,
|
|
1164
1114
|
bytes32 _scriptTypeAndVersion
|
|
1165
|
-
)
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1115
|
+
) external {
|
|
1116
|
+
_onlyUnlocked(_projectId);
|
|
1117
|
+
_onlyArtistOrAdminACL(
|
|
1118
|
+
_projectId,
|
|
1119
|
+
this.updateProjectScriptType.selector
|
|
1120
|
+
);
|
|
1170
1121
|
Project storage project = projects[_projectId];
|
|
1171
1122
|
// require exactly one @ symbol in _scriptTypeAndVersion
|
|
1172
1123
|
require(
|
|
@@ -1190,12 +1141,13 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1190
1141
|
function updateProjectAspectRatio(
|
|
1191
1142
|
uint256 _projectId,
|
|
1192
1143
|
string memory _aspectRatio
|
|
1193
|
-
)
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1144
|
+
) external {
|
|
1145
|
+
_onlyUnlocked(_projectId);
|
|
1146
|
+
_onlyArtistOrAdminACL(
|
|
1147
|
+
_projectId,
|
|
1148
|
+
this.updateProjectAspectRatio.selector
|
|
1149
|
+
);
|
|
1150
|
+
_onlyNonEmptyString(_aspectRatio);
|
|
1199
1151
|
// Perform more detailed input validation for aspect ratio.
|
|
1200
1152
|
bytes memory aspectRatioBytes = bytes(_aspectRatio);
|
|
1201
1153
|
uint256 bytesLength = aspectRatioBytes.length;
|
|
@@ -1238,7 +1190,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1238
1190
|
function updateProjectBaseURI(
|
|
1239
1191
|
uint256 _projectId,
|
|
1240
1192
|
string memory _newBaseURI
|
|
1241
|
-
) external
|
|
1193
|
+
) external {
|
|
1194
|
+
_onlyArtist(_projectId);
|
|
1195
|
+
_onlyNonEmptyString(_newBaseURI);
|
|
1242
1196
|
projects[_projectId].projectBaseURI = _newBaseURI;
|
|
1243
1197
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_BASE_URI);
|
|
1244
1198
|
}
|
|
@@ -1249,13 +1203,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1249
1203
|
* projects. Token URIs are determined by their project's `projectBaseURI`.
|
|
1250
1204
|
* @param _defaultBaseURI New default base URI.
|
|
1251
1205
|
*/
|
|
1252
|
-
function updateDefaultBaseURI(
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
external
|
|
1256
|
-
onlyAdminACL(this.updateDefaultBaseURI.selector)
|
|
1257
|
-
onlyNonEmptyString(_defaultBaseURI)
|
|
1258
|
-
{
|
|
1206
|
+
function updateDefaultBaseURI(string memory _defaultBaseURI) external {
|
|
1207
|
+
_onlyAdminACL(this.updateDefaultBaseURI.selector);
|
|
1208
|
+
_onlyNonEmptyString(_defaultBaseURI);
|
|
1259
1209
|
_updateDefaultBaseURI(_defaultBaseURI);
|
|
1260
1210
|
}
|
|
1261
1211
|
|
|
@@ -1282,6 +1232,20 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1282
1232
|
return keccak256(abi.encode(_hashSeed));
|
|
1283
1233
|
}
|
|
1284
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* @notice Returns token hash **seed** for token ID `_tokenId`. Returns
|
|
1237
|
+
* null if hash seed has not been set. The hash seed id the bytes12 value
|
|
1238
|
+
* which is hashed to produce the token hash.
|
|
1239
|
+
* @param _tokenId Token ID to be queried.
|
|
1240
|
+
* @return bytes12 Token hash seed.
|
|
1241
|
+
* @dev token hash seed is keccak256 hashed to give the token hash
|
|
1242
|
+
*/
|
|
1243
|
+
function tokenIdToHashSeed(
|
|
1244
|
+
uint256 _tokenId
|
|
1245
|
+
) external view returns (bytes12) {
|
|
1246
|
+
return _ownersAndHashSeeds[_tokenId].hashSeed;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1285
1249
|
/**
|
|
1286
1250
|
* @notice View function returning Art Blocks portion of primary sales, in
|
|
1287
1251
|
* percent.
|
|
@@ -1534,7 +1498,7 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1534
1498
|
if (_index >= project.scriptCount) {
|
|
1535
1499
|
return "";
|
|
1536
1500
|
}
|
|
1537
|
-
return project.scriptBytecodeAddresses[_index]
|
|
1501
|
+
return _readFromBytecode(project.scriptBytecodeAddresses[_index]);
|
|
1538
1502
|
}
|
|
1539
1503
|
|
|
1540
1504
|
/**
|
|
@@ -1658,9 +1622,9 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1658
1622
|
)
|
|
1659
1623
|
external
|
|
1660
1624
|
view
|
|
1661
|
-
onlyValidTokenId(_tokenId)
|
|
1662
1625
|
returns (address payable[] memory recipients, uint256[] memory bps)
|
|
1663
1626
|
{
|
|
1627
|
+
_onlyValidTokenId(_tokenId);
|
|
1664
1628
|
// initialize arrays with maximum potential length
|
|
1665
1629
|
recipients = new address payable[](3);
|
|
1666
1630
|
bps = new uint256[](3);
|
|
@@ -1855,7 +1819,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1855
1819
|
*/
|
|
1856
1820
|
function tokenURI(
|
|
1857
1821
|
uint256 _tokenId
|
|
1858
|
-
) public view override
|
|
1822
|
+
) public view override returns (string memory) {
|
|
1823
|
+
_onlyValidTokenId(_tokenId);
|
|
1859
1824
|
string memory _projectBaseURI = projects[tokenIdToProjectId(_tokenId)]
|
|
1860
1825
|
.projectBaseURI;
|
|
1861
1826
|
return string.concat(_projectBaseURI, _tokenId.toString());
|
|
@@ -1975,9 +1940,8 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1975
1940
|
* @return bool true if project is unlocked, false otherwise.
|
|
1976
1941
|
* @dev This also enforces that the `_projectId` passed in is valid.
|
|
1977
1942
|
*/
|
|
1978
|
-
function _projectUnlocked(
|
|
1979
|
-
|
|
1980
|
-
) internal view onlyValidProjectId(_projectId) returns (bool) {
|
|
1943
|
+
function _projectUnlocked(uint256 _projectId) internal view returns (bool) {
|
|
1944
|
+
_onlyValidProjectId(_projectId);
|
|
1981
1945
|
uint256 projectCompletedTimestamp = projects[_projectId]
|
|
1982
1946
|
.completedTimestamp;
|
|
1983
1947
|
bool projectOpen = projectCompletedTimestamp == 0;
|
|
@@ -1986,4 +1950,14 @@ contract GenArt721CoreV3_Explorations is
|
|
|
1986
1950
|
(block.timestamp - projectCompletedTimestamp <
|
|
1987
1951
|
FOUR_WEEKS_IN_SECONDS);
|
|
1988
1952
|
}
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* Helper for calling `BytecodeStorageReader` external library reader method,
|
|
1956
|
+
* added for bytecode size reduction purposes.
|
|
1957
|
+
*/
|
|
1958
|
+
function _readFromBytecode(
|
|
1959
|
+
address _address
|
|
1960
|
+
) internal view returns (string memory) {
|
|
1961
|
+
return BytecodeStorageReader.readFromBytecode(_address);
|
|
1962
|
+
}
|
|
1989
1963
|
}
|