@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
|
-
import "./interfaces/0.8.x/
|
|
6
|
+
import "./interfaces/0.8.x/IRandomizer_V3CoreBase.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
|
/**
|
|
@@ -89,10 +90,10 @@ import "./libs/0.8.x/Bytes32Strings.sol";
|
|
|
89
90
|
contract GenArt721CoreV3 is
|
|
90
91
|
ERC721_PackedHashSeed,
|
|
91
92
|
Ownable,
|
|
92
|
-
IGenArt721CoreContractV3
|
|
93
|
+
IGenArt721CoreContractV3,
|
|
94
|
+
IGenArt721CoreContractExposesHashSeed
|
|
93
95
|
{
|
|
94
|
-
using
|
|
95
|
-
using BytecodeStorage for address;
|
|
96
|
+
using BytecodeStorageWriter for string;
|
|
96
97
|
using Bytes32Strings for bytes32;
|
|
97
98
|
using Strings for uint256;
|
|
98
99
|
uint256 constant ONE_HUNDRED = 100;
|
|
@@ -166,7 +167,7 @@ contract GenArt721CoreV3 is
|
|
|
166
167
|
address public artblocksDependencyRegistryAddress;
|
|
167
168
|
|
|
168
169
|
/// current randomizer contract
|
|
169
|
-
|
|
170
|
+
IRandomizer_V3CoreBase public randomizerContract;
|
|
170
171
|
|
|
171
172
|
/// append-only array of all randomizer contract addresses ever used by
|
|
172
173
|
/// this contract
|
|
@@ -240,65 +241,60 @@ contract GenArt721CoreV3 is
|
|
|
240
241
|
bool public newProjectsForbidden;
|
|
241
242
|
|
|
242
243
|
/// version & type of this core contract
|
|
243
|
-
string public constant coreVersion = "v3.
|
|
244
|
+
string public constant coreVersion = "v3.2.0";
|
|
244
245
|
string public constant coreType = "GenArt721CoreV3";
|
|
245
246
|
|
|
246
247
|
/// default base URI to initialize all new project projectBaseURI values to
|
|
247
248
|
string public defaultBaseURI;
|
|
248
249
|
|
|
249
|
-
|
|
250
|
+
function _onlyNonZeroAddress(address _address) internal pure {
|
|
250
251
|
require(_address != address(0), "Must input non-zero address");
|
|
251
|
-
_;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
function _onlyNonEmptyString(string memory _string) internal pure {
|
|
255
255
|
require(bytes(_string).length != 0, "Must input non-empty string");
|
|
256
|
-
_;
|
|
257
256
|
}
|
|
258
257
|
|
|
259
|
-
|
|
258
|
+
function _onlyValidTokenId(uint256 _tokenId) internal view {
|
|
260
259
|
require(_exists(_tokenId), "Token ID does not exist");
|
|
261
|
-
_;
|
|
262
260
|
}
|
|
263
261
|
|
|
264
|
-
|
|
262
|
+
function _onlyValidProjectId(uint256 _projectId) internal view {
|
|
265
263
|
require(
|
|
266
264
|
(_projectId >= startingProjectId) && (_projectId < _nextProjectId),
|
|
267
265
|
"Project ID does not exist"
|
|
268
266
|
);
|
|
269
|
-
_;
|
|
270
267
|
}
|
|
271
268
|
|
|
272
|
-
|
|
269
|
+
function _onlyUnlocked(uint256 _projectId) internal view {
|
|
273
270
|
// Note: calling `_projectUnlocked` enforces that the `_projectId`
|
|
274
271
|
// passed in is valid.`
|
|
275
272
|
require(_projectUnlocked(_projectId), "Only if unlocked");
|
|
276
|
-
_;
|
|
277
273
|
}
|
|
278
274
|
|
|
279
|
-
|
|
275
|
+
function _onlyAdminACL(bytes4 _selector) internal {
|
|
280
276
|
require(
|
|
281
277
|
adminACLAllowed(msg.sender, address(this), _selector),
|
|
282
278
|
"Only Admin ACL allowed"
|
|
283
279
|
);
|
|
284
|
-
_;
|
|
285
280
|
}
|
|
286
281
|
|
|
287
|
-
|
|
282
|
+
function _onlyArtist(uint256 _projectId) internal view {
|
|
288
283
|
require(
|
|
289
284
|
msg.sender == projectIdToFinancials[_projectId].artistAddress,
|
|
290
285
|
"Only artist"
|
|
291
286
|
);
|
|
292
|
-
_;
|
|
293
287
|
}
|
|
294
288
|
|
|
295
|
-
|
|
289
|
+
function _onlyArtistOrAdminACL(
|
|
290
|
+
uint256 _projectId,
|
|
291
|
+
bytes4 _selector
|
|
292
|
+
) internal {
|
|
296
293
|
require(
|
|
297
294
|
msg.sender == projectIdToFinancials[_projectId].artistAddress ||
|
|
298
295
|
adminACLAllowed(msg.sender, address(this), _selector),
|
|
299
296
|
"Only artist or Admin ACL allowed"
|
|
300
297
|
);
|
|
301
|
-
_;
|
|
302
298
|
}
|
|
303
299
|
|
|
304
300
|
/**
|
|
@@ -307,10 +303,10 @@ contract GenArt721CoreV3 is
|
|
|
307
303
|
* contract to continue to function if the owner decides to renounce
|
|
308
304
|
* ownership.
|
|
309
305
|
*/
|
|
310
|
-
|
|
306
|
+
function _onlyAdminACLOrRenouncedArtist(
|
|
311
307
|
uint256 _projectId,
|
|
312
308
|
bytes4 _selector
|
|
313
|
-
) {
|
|
309
|
+
) internal {
|
|
314
310
|
require(
|
|
315
311
|
adminACLAllowed(msg.sender, address(this), _selector) ||
|
|
316
312
|
(owner() == address(0) &&
|
|
@@ -318,7 +314,6 @@ contract GenArt721CoreV3 is
|
|
|
318
314
|
projectIdToFinancials[_projectId].artistAddress),
|
|
319
315
|
"Only Admin ACL allowed, or artist if owner has renounced"
|
|
320
316
|
);
|
|
321
|
-
_;
|
|
322
317
|
}
|
|
323
318
|
|
|
324
319
|
/**
|
|
@@ -340,10 +335,8 @@ contract GenArt721CoreV3 is
|
|
|
340
335
|
address _randomizerContract,
|
|
341
336
|
address _adminACLContract,
|
|
342
337
|
uint248 _startingProjectId
|
|
343
|
-
)
|
|
344
|
-
|
|
345
|
-
onlyNonZeroAddress(_randomizerContract)
|
|
346
|
-
{
|
|
338
|
+
) ERC721_PackedHashSeed(_tokenName, _tokenSymbol) {
|
|
339
|
+
_onlyNonZeroAddress(_randomizerContract);
|
|
347
340
|
// record contracts starting project ID
|
|
348
341
|
// casting-up is safe
|
|
349
342
|
startingProjectId = uint256(_startingProjectId);
|
|
@@ -447,10 +440,8 @@ contract GenArt721CoreV3 is
|
|
|
447
440
|
* for indexing purposes, it must be emitted by the randomizer. This is to
|
|
448
441
|
* minimize gas when minting.
|
|
449
442
|
*/
|
|
450
|
-
function setTokenHash_8PT(
|
|
451
|
-
|
|
452
|
-
bytes32 _hashSeed
|
|
453
|
-
) external onlyValidTokenId(_tokenId) {
|
|
443
|
+
function setTokenHash_8PT(uint256 _tokenId, bytes32 _hashSeed) external {
|
|
444
|
+
_onlyValidTokenId(_tokenId);
|
|
454
445
|
OwnerAndHashSeed storage ownerAndHashSeed = _ownersAndHashSeeds[
|
|
455
446
|
_tokenId
|
|
456
447
|
];
|
|
@@ -500,11 +491,9 @@ contract GenArt721CoreV3 is
|
|
|
500
491
|
*/
|
|
501
492
|
function updateArtblocksCurationRegistryAddress(
|
|
502
493
|
address _artblocksCurationRegistryAddress
|
|
503
|
-
)
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
onlyNonZeroAddress(_artblocksCurationRegistryAddress)
|
|
507
|
-
{
|
|
494
|
+
) external {
|
|
495
|
+
_onlyAdminACL(this.updateArtblocksCurationRegistryAddress.selector);
|
|
496
|
+
_onlyNonZeroAddress(_artblocksCurationRegistryAddress);
|
|
508
497
|
artblocksCurationRegistryAddress = _artblocksCurationRegistryAddress;
|
|
509
498
|
emit PlatformUpdated(FIELD_ARTBLOCKS_CURATION_REGISTRY_ADDRESS);
|
|
510
499
|
}
|
|
@@ -516,11 +505,9 @@ contract GenArt721CoreV3 is
|
|
|
516
505
|
*/
|
|
517
506
|
function updateArtblocksDependencyRegistryAddress(
|
|
518
507
|
address _artblocksDependencyRegistryAddress
|
|
519
|
-
)
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
onlyNonZeroAddress(_artblocksDependencyRegistryAddress)
|
|
523
|
-
{
|
|
508
|
+
) external {
|
|
509
|
+
_onlyAdminACL(this.updateArtblocksDependencyRegistryAddress.selector);
|
|
510
|
+
_onlyNonZeroAddress(_artblocksDependencyRegistryAddress);
|
|
524
511
|
artblocksDependencyRegistryAddress = _artblocksDependencyRegistryAddress;
|
|
525
512
|
emit PlatformUpdated(FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS);
|
|
526
513
|
}
|
|
@@ -533,11 +520,9 @@ contract GenArt721CoreV3 is
|
|
|
533
520
|
*/
|
|
534
521
|
function updateArtblocksPrimarySalesAddress(
|
|
535
522
|
address payable _artblocksPrimarySalesAddress
|
|
536
|
-
)
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
onlyNonZeroAddress(_artblocksPrimarySalesAddress)
|
|
540
|
-
{
|
|
523
|
+
) external {
|
|
524
|
+
_onlyAdminACL(this.updateArtblocksPrimarySalesAddress.selector);
|
|
525
|
+
_onlyNonZeroAddress(_artblocksPrimarySalesAddress);
|
|
541
526
|
_updateArtblocksPrimarySalesAddress(_artblocksPrimarySalesAddress);
|
|
542
527
|
}
|
|
543
528
|
|
|
@@ -549,11 +534,9 @@ contract GenArt721CoreV3 is
|
|
|
549
534
|
*/
|
|
550
535
|
function updateArtblocksSecondarySalesAddress(
|
|
551
536
|
address payable _artblocksSecondarySalesAddress
|
|
552
|
-
)
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
onlyNonZeroAddress(_artblocksSecondarySalesAddress)
|
|
556
|
-
{
|
|
537
|
+
) external {
|
|
538
|
+
_onlyAdminACL(this.updateArtblocksSecondarySalesAddress.selector);
|
|
539
|
+
_onlyNonZeroAddress(_artblocksSecondarySalesAddress);
|
|
557
540
|
_updateArtblocksSecondarySalesAddress(_artblocksSecondarySalesAddress);
|
|
558
541
|
}
|
|
559
542
|
|
|
@@ -565,10 +548,8 @@ contract GenArt721CoreV3 is
|
|
|
565
548
|
*/
|
|
566
549
|
function updateArtblocksPrimarySalesPercentage(
|
|
567
550
|
uint256 artblocksPrimarySalesPercentage_
|
|
568
|
-
)
|
|
569
|
-
|
|
570
|
-
onlyAdminACL(this.updateArtblocksPrimarySalesPercentage.selector)
|
|
571
|
-
{
|
|
551
|
+
) external {
|
|
552
|
+
_onlyAdminACL(this.updateArtblocksPrimarySalesPercentage.selector);
|
|
572
553
|
require(
|
|
573
554
|
artblocksPrimarySalesPercentage_ <=
|
|
574
555
|
ART_BLOCKS_MAX_PRIMARY_SALES_PERCENTAGE,
|
|
@@ -593,7 +574,8 @@ contract GenArt721CoreV3 is
|
|
|
593
574
|
*/
|
|
594
575
|
function updateArtblocksSecondarySalesBPS(
|
|
595
576
|
uint256 _artblocksSecondarySalesBPS
|
|
596
|
-
) external
|
|
577
|
+
) external {
|
|
578
|
+
_onlyAdminACL(this.updateArtblocksSecondarySalesBPS.selector);
|
|
597
579
|
require(
|
|
598
580
|
_artblocksSecondarySalesBPS <= ART_BLOCKS_MAX_SECONDARY_SALES_BPS,
|
|
599
581
|
"Max of ART_BLOCKS_MAX_SECONDARY_SALES_BPS BPS"
|
|
@@ -606,13 +588,9 @@ contract GenArt721CoreV3 is
|
|
|
606
588
|
* @notice Updates minter to `_address`.
|
|
607
589
|
* @param _address Address of new minter.
|
|
608
590
|
*/
|
|
609
|
-
function updateMinterContract(
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
external
|
|
613
|
-
onlyAdminACL(this.updateMinterContract.selector)
|
|
614
|
-
onlyNonZeroAddress(_address)
|
|
615
|
-
{
|
|
591
|
+
function updateMinterContract(address _address) external {
|
|
592
|
+
_onlyAdminACL(this.updateMinterContract.selector);
|
|
593
|
+
_onlyNonZeroAddress(_address);
|
|
616
594
|
minterContract = _address;
|
|
617
595
|
emit MinterUpdated(_address);
|
|
618
596
|
}
|
|
@@ -621,13 +599,9 @@ contract GenArt721CoreV3 is
|
|
|
621
599
|
* @notice Updates randomizer to `_randomizerAddress`.
|
|
622
600
|
* @param _randomizerAddress Address of new randomizer.
|
|
623
601
|
*/
|
|
624
|
-
function updateRandomizerAddress(
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
external
|
|
628
|
-
onlyAdminACL(this.updateRandomizerAddress.selector)
|
|
629
|
-
onlyNonZeroAddress(_randomizerAddress)
|
|
630
|
-
{
|
|
602
|
+
function updateRandomizerAddress(address _randomizerAddress) external {
|
|
603
|
+
_onlyAdminACL(this.updateRandomizerAddress.selector);
|
|
604
|
+
_onlyNonZeroAddress(_randomizerAddress);
|
|
631
605
|
_updateRandomizerAddress(_randomizerAddress);
|
|
632
606
|
}
|
|
633
607
|
|
|
@@ -635,13 +609,9 @@ contract GenArt721CoreV3 is
|
|
|
635
609
|
* @notice Toggles project `_projectId` as active/inactive.
|
|
636
610
|
* @param _projectId Project ID to be toggled.
|
|
637
611
|
*/
|
|
638
|
-
function toggleProjectIsActive(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
external
|
|
642
|
-
onlyAdminACL(this.toggleProjectIsActive.selector)
|
|
643
|
-
onlyValidProjectId(_projectId)
|
|
644
|
-
{
|
|
612
|
+
function toggleProjectIsActive(uint256 _projectId) external {
|
|
613
|
+
_onlyAdminACL(this.toggleProjectIsActive.selector);
|
|
614
|
+
_onlyValidProjectId(_projectId);
|
|
645
615
|
projects[_projectId].active = !projects[_projectId].active;
|
|
646
616
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ACTIVE);
|
|
647
617
|
}
|
|
@@ -682,12 +652,10 @@ contract GenArt721CoreV3 is
|
|
|
682
652
|
uint256 _additionalPayeePrimarySalesPercentage,
|
|
683
653
|
address payable _additionalPayeeSecondarySales,
|
|
684
654
|
uint256 _additionalPayeeSecondarySalesPercentage
|
|
685
|
-
)
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
onlyNonZeroAddress(_artistAddress)
|
|
690
|
-
{
|
|
655
|
+
) external {
|
|
656
|
+
_onlyValidProjectId(_projectId);
|
|
657
|
+
_onlyArtist(_projectId);
|
|
658
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
691
659
|
ProjectFinance storage projectFinance = projectIdToFinancials[
|
|
692
660
|
_projectId
|
|
693
661
|
];
|
|
@@ -802,15 +770,13 @@ contract GenArt721CoreV3 is
|
|
|
802
770
|
uint256 _additionalPayeePrimarySalesPercentage,
|
|
803
771
|
address payable _additionalPayeeSecondarySales,
|
|
804
772
|
uint256 _additionalPayeeSecondarySalesPercentage
|
|
805
|
-
)
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
onlyAdminACLOrRenouncedArtist(
|
|
773
|
+
) external {
|
|
774
|
+
_onlyValidProjectId(_projectId);
|
|
775
|
+
_onlyAdminACLOrRenouncedArtist(
|
|
809
776
|
_projectId,
|
|
810
777
|
this.adminAcceptArtistAddressesAndSplits.selector
|
|
811
|
-
)
|
|
812
|
-
|
|
813
|
-
{
|
|
778
|
+
);
|
|
779
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
814
780
|
// checks
|
|
815
781
|
require(
|
|
816
782
|
proposedArtistAddressesAndSplitsHash[_projectId] ==
|
|
@@ -856,15 +822,13 @@ contract GenArt721CoreV3 is
|
|
|
856
822
|
function updateProjectArtistAddress(
|
|
857
823
|
uint256 _projectId,
|
|
858
824
|
address payable _artistAddress
|
|
859
|
-
)
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
onlyAdminACLOrRenouncedArtist(
|
|
825
|
+
) external {
|
|
826
|
+
_onlyValidProjectId(_projectId);
|
|
827
|
+
_onlyAdminACLOrRenouncedArtist(
|
|
863
828
|
_projectId,
|
|
864
829
|
this.updateProjectArtistAddress.selector
|
|
865
|
-
)
|
|
866
|
-
|
|
867
|
-
{
|
|
830
|
+
);
|
|
831
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
868
832
|
projectIdToFinancials[_projectId].artistAddress = _artistAddress;
|
|
869
833
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_ADDRESS);
|
|
870
834
|
}
|
|
@@ -873,9 +837,8 @@ contract GenArt721CoreV3 is
|
|
|
873
837
|
* @notice Toggles paused state of project `_projectId`.
|
|
874
838
|
* @param _projectId Project ID to be toggled.
|
|
875
839
|
*/
|
|
876
|
-
function toggleProjectIsPaused(
|
|
877
|
-
|
|
878
|
-
) external onlyArtist(_projectId) {
|
|
840
|
+
function toggleProjectIsPaused(uint256 _projectId) external {
|
|
841
|
+
_onlyArtist(_projectId);
|
|
879
842
|
projects[_projectId].paused = !projects[_projectId].paused;
|
|
880
843
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_PAUSED);
|
|
881
844
|
}
|
|
@@ -889,12 +852,10 @@ contract GenArt721CoreV3 is
|
|
|
889
852
|
function addProject(
|
|
890
853
|
string memory _projectName,
|
|
891
854
|
address payable _artistAddress
|
|
892
|
-
)
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
onlyNonZeroAddress(_artistAddress)
|
|
897
|
-
{
|
|
855
|
+
) external {
|
|
856
|
+
_onlyAdminACL(this.addProject.selector);
|
|
857
|
+
_onlyNonEmptyString(_projectName);
|
|
858
|
+
_onlyNonZeroAddress(_artistAddress);
|
|
898
859
|
require(!newProjectsForbidden, "New projects forbidden");
|
|
899
860
|
uint256 projectId = _nextProjectId;
|
|
900
861
|
projectIdToFinancials[projectId].artistAddress = _artistAddress;
|
|
@@ -910,10 +871,8 @@ contract GenArt721CoreV3 is
|
|
|
910
871
|
/**
|
|
911
872
|
* @notice Forever forbids new projects from being added to this contract.
|
|
912
873
|
*/
|
|
913
|
-
function forbidNewProjects()
|
|
914
|
-
|
|
915
|
-
onlyAdminACL(this.forbidNewProjects.selector)
|
|
916
|
-
{
|
|
874
|
+
function forbidNewProjects() external {
|
|
875
|
+
_onlyAdminACL(this.forbidNewProjects.selector);
|
|
917
876
|
require(!newProjectsForbidden, "Already forbidden");
|
|
918
877
|
_forbidNewProjects();
|
|
919
878
|
}
|
|
@@ -926,12 +885,10 @@ contract GenArt721CoreV3 is
|
|
|
926
885
|
function updateProjectName(
|
|
927
886
|
uint256 _projectId,
|
|
928
887
|
string memory _projectName
|
|
929
|
-
)
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
onlyNonEmptyString(_projectName)
|
|
934
|
-
{
|
|
888
|
+
) external {
|
|
889
|
+
_onlyUnlocked(_projectId);
|
|
890
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectName.selector);
|
|
891
|
+
_onlyNonEmptyString(_projectName);
|
|
935
892
|
projects[_projectId].name = _projectName;
|
|
936
893
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_NAME);
|
|
937
894
|
}
|
|
@@ -945,12 +902,13 @@ contract GenArt721CoreV3 is
|
|
|
945
902
|
function updateProjectArtistName(
|
|
946
903
|
uint256 _projectId,
|
|
947
904
|
string memory _projectArtistName
|
|
948
|
-
)
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
905
|
+
) external {
|
|
906
|
+
_onlyUnlocked(_projectId);
|
|
907
|
+
_onlyArtistOrAdminACL(
|
|
908
|
+
_projectId,
|
|
909
|
+
this.updateProjectArtistName.selector
|
|
910
|
+
);
|
|
911
|
+
_onlyNonEmptyString(_projectArtistName);
|
|
954
912
|
projects[_projectId].artist = _projectArtistName;
|
|
955
913
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_NAME);
|
|
956
914
|
}
|
|
@@ -969,7 +927,8 @@ contract GenArt721CoreV3 is
|
|
|
969
927
|
function updateProjectSecondaryMarketRoyaltyPercentage(
|
|
970
928
|
uint256 _projectId,
|
|
971
929
|
uint256 _secondMarketRoyalty
|
|
972
|
-
) external
|
|
930
|
+
) external {
|
|
931
|
+
_onlyArtist(_projectId);
|
|
973
932
|
require(
|
|
974
933
|
_secondMarketRoyalty <= ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE,
|
|
975
934
|
"Max of ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent"
|
|
@@ -1017,7 +976,8 @@ contract GenArt721CoreV3 is
|
|
|
1017
976
|
function updateProjectWebsite(
|
|
1018
977
|
uint256 _projectId,
|
|
1019
978
|
string memory _projectWebsite
|
|
1020
|
-
) external
|
|
979
|
+
) external {
|
|
980
|
+
_onlyArtist(_projectId);
|
|
1021
981
|
projects[_projectId].website = _projectWebsite;
|
|
1022
982
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_WEBSITE);
|
|
1023
983
|
}
|
|
@@ -1030,12 +990,10 @@ contract GenArt721CoreV3 is
|
|
|
1030
990
|
function updateProjectLicense(
|
|
1031
991
|
uint256 _projectId,
|
|
1032
992
|
string memory _projectLicense
|
|
1033
|
-
)
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
onlyNonEmptyString(_projectLicense)
|
|
1038
|
-
{
|
|
993
|
+
) external {
|
|
994
|
+
_onlyUnlocked(_projectId);
|
|
995
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectLicense.selector);
|
|
996
|
+
_onlyNonEmptyString(_projectLicense);
|
|
1039
997
|
projects[_projectId].license = _projectLicense;
|
|
1040
998
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_LICENSE);
|
|
1041
999
|
}
|
|
@@ -1052,7 +1010,8 @@ contract GenArt721CoreV3 is
|
|
|
1052
1010
|
function updateProjectMaxInvocations(
|
|
1053
1011
|
uint256 _projectId,
|
|
1054
1012
|
uint24 _maxInvocations
|
|
1055
|
-
) external
|
|
1013
|
+
) external {
|
|
1014
|
+
_onlyArtist(_projectId);
|
|
1056
1015
|
// CHECKS
|
|
1057
1016
|
Project storage project = projects[_projectId];
|
|
1058
1017
|
uint256 _invocations = project.invocations;
|
|
@@ -1083,12 +1042,10 @@ contract GenArt721CoreV3 is
|
|
|
1083
1042
|
function addProjectScript(
|
|
1084
1043
|
uint256 _projectId,
|
|
1085
1044
|
string memory _script
|
|
1086
|
-
)
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
onlyNonEmptyString(_script)
|
|
1091
|
-
{
|
|
1045
|
+
) external {
|
|
1046
|
+
_onlyUnlocked(_projectId);
|
|
1047
|
+
_onlyArtistOrAdminACL(_projectId, this.addProjectScript.selector);
|
|
1048
|
+
_onlyNonEmptyString(_script);
|
|
1092
1049
|
Project storage project = projects[_projectId];
|
|
1093
1050
|
// store script in contract bytecode
|
|
1094
1051
|
project.scriptBytecodeAddresses[project.scriptCount] = _script
|
|
@@ -1108,26 +1065,14 @@ contract GenArt721CoreV3 is
|
|
|
1108
1065
|
uint256 _projectId,
|
|
1109
1066
|
uint256 _scriptId,
|
|
1110
1067
|
string memory _script
|
|
1111
|
-
)
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
onlyNonEmptyString(_script)
|
|
1116
|
-
{
|
|
1068
|
+
) external {
|
|
1069
|
+
_onlyUnlocked(_projectId);
|
|
1070
|
+
_onlyArtistOrAdminACL(_projectId, this.updateProjectScript.selector);
|
|
1071
|
+
_onlyNonEmptyString(_script);
|
|
1117
1072
|
Project storage project = projects[_projectId];
|
|
1118
1073
|
require(_scriptId < project.scriptCount, "scriptId out of range");
|
|
1119
|
-
// purge old contract bytecode contract from the blockchain state
|
|
1120
|
-
// note: Although this does reduce usage of Ethereum state, it does not
|
|
1121
|
-
// reduce the gas costs of removal transactions. We believe this is the
|
|
1122
|
-
// best behavior at the time of writing, and do not expect this to
|
|
1123
|
-
// result in any breaking changes in the future. All current proposals
|
|
1124
|
-
// to change the self-destruct opcode are backwards compatible, but may
|
|
1125
|
-
// result in not removing the bytecode from the blockchain state. This
|
|
1126
|
-
// implementation is compatible with that architecture, as it does not
|
|
1127
|
-
// rely on the bytecode being removed from the blockchain state.
|
|
1128
|
-
project.scriptBytecodeAddresses[_scriptId].purgeBytecode();
|
|
1129
1074
|
// store script in contract bytecode, replacing reference address from
|
|
1130
|
-
// the
|
|
1075
|
+
// the old storage contract with the newly created one
|
|
1131
1076
|
project.scriptBytecodeAddresses[_scriptId] = _script.writeToBytecode();
|
|
1132
1077
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT);
|
|
1133
1078
|
}
|
|
@@ -1136,28 +1081,15 @@ contract GenArt721CoreV3 is
|
|
|
1136
1081
|
* @notice Removes last script from project `_projectId`.
|
|
1137
1082
|
* @param _projectId Project to be updated.
|
|
1138
1083
|
*/
|
|
1139
|
-
function removeProjectLastScript(
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
{
|
|
1084
|
+
function removeProjectLastScript(uint256 _projectId) external {
|
|
1085
|
+
_onlyUnlocked(_projectId);
|
|
1086
|
+
_onlyArtistOrAdminACL(
|
|
1087
|
+
_projectId,
|
|
1088
|
+
this.removeProjectLastScript.selector
|
|
1089
|
+
);
|
|
1146
1090
|
Project storage project = projects[_projectId];
|
|
1147
1091
|
require(project.scriptCount > 0, "there are no scripts to remove");
|
|
1148
|
-
//
|
|
1149
|
-
// note: Although this does reduce usage of Ethereum state, it does not
|
|
1150
|
-
// reduce the gas costs of removal transactions. We believe this is the
|
|
1151
|
-
// best behavior at the time of writing, and do not expect this to
|
|
1152
|
-
// result in any breaking changes in the future. All current proposals
|
|
1153
|
-
// to change the self-destruct opcode are backwards compatible, but may
|
|
1154
|
-
// result in not removing the bytecode from the blockchain state. This
|
|
1155
|
-
// implementation is compatible with that architecture, as it does not
|
|
1156
|
-
// rely on the bytecode being removed from the blockchain state.
|
|
1157
|
-
project
|
|
1158
|
-
.scriptBytecodeAddresses[project.scriptCount - 1]
|
|
1159
|
-
.purgeBytecode();
|
|
1160
|
-
// delete reference to contract address that no longer exists
|
|
1092
|
+
// delete reference to old storage contract address
|
|
1161
1093
|
delete project.scriptBytecodeAddresses[project.scriptCount - 1];
|
|
1162
1094
|
unchecked {
|
|
1163
1095
|
project.scriptCount = project.scriptCount - 1;
|
|
@@ -1174,11 +1106,12 @@ contract GenArt721CoreV3 is
|
|
|
1174
1106
|
function updateProjectScriptType(
|
|
1175
1107
|
uint256 _projectId,
|
|
1176
1108
|
bytes32 _scriptTypeAndVersion
|
|
1177
|
-
)
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1109
|
+
) external {
|
|
1110
|
+
_onlyUnlocked(_projectId);
|
|
1111
|
+
_onlyArtistOrAdminACL(
|
|
1112
|
+
_projectId,
|
|
1113
|
+
this.updateProjectScriptType.selector
|
|
1114
|
+
);
|
|
1182
1115
|
Project storage project = projects[_projectId];
|
|
1183
1116
|
// require exactly one @ symbol in _scriptTypeAndVersion
|
|
1184
1117
|
require(
|
|
@@ -1202,12 +1135,13 @@ contract GenArt721CoreV3 is
|
|
|
1202
1135
|
function updateProjectAspectRatio(
|
|
1203
1136
|
uint256 _projectId,
|
|
1204
1137
|
string memory _aspectRatio
|
|
1205
|
-
)
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1138
|
+
) external {
|
|
1139
|
+
_onlyUnlocked(_projectId);
|
|
1140
|
+
_onlyArtistOrAdminACL(
|
|
1141
|
+
_projectId,
|
|
1142
|
+
this.updateProjectAspectRatio.selector
|
|
1143
|
+
);
|
|
1144
|
+
_onlyNonEmptyString(_aspectRatio);
|
|
1211
1145
|
// Perform more detailed input validation for aspect ratio.
|
|
1212
1146
|
bytes memory aspectRatioBytes = bytes(_aspectRatio);
|
|
1213
1147
|
uint256 bytesLength = aspectRatioBytes.length;
|
|
@@ -1250,7 +1184,9 @@ contract GenArt721CoreV3 is
|
|
|
1250
1184
|
function updateProjectBaseURI(
|
|
1251
1185
|
uint256 _projectId,
|
|
1252
1186
|
string memory _newBaseURI
|
|
1253
|
-
) external
|
|
1187
|
+
) external {
|
|
1188
|
+
_onlyArtist(_projectId);
|
|
1189
|
+
_onlyNonEmptyString(_newBaseURI);
|
|
1254
1190
|
projects[_projectId].projectBaseURI = _newBaseURI;
|
|
1255
1191
|
emit ProjectUpdated(_projectId, FIELD_PROJECT_BASE_URI);
|
|
1256
1192
|
}
|
|
@@ -1261,13 +1197,9 @@ contract GenArt721CoreV3 is
|
|
|
1261
1197
|
* projects. Token URIs are determined by their project's `projectBaseURI`.
|
|
1262
1198
|
* @param _defaultBaseURI New default base URI.
|
|
1263
1199
|
*/
|
|
1264
|
-
function updateDefaultBaseURI(
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
external
|
|
1268
|
-
onlyAdminACL(this.updateDefaultBaseURI.selector)
|
|
1269
|
-
onlyNonEmptyString(_defaultBaseURI)
|
|
1270
|
-
{
|
|
1200
|
+
function updateDefaultBaseURI(string memory _defaultBaseURI) external {
|
|
1201
|
+
_onlyAdminACL(this.updateDefaultBaseURI.selector);
|
|
1202
|
+
_onlyNonEmptyString(_defaultBaseURI);
|
|
1271
1203
|
_updateDefaultBaseURI(_defaultBaseURI);
|
|
1272
1204
|
}
|
|
1273
1205
|
|
|
@@ -1294,6 +1226,20 @@ contract GenArt721CoreV3 is
|
|
|
1294
1226
|
return keccak256(abi.encode(_hashSeed));
|
|
1295
1227
|
}
|
|
1296
1228
|
|
|
1229
|
+
/**
|
|
1230
|
+
* @notice Returns token hash **seed** for token ID `_tokenId`. Returns
|
|
1231
|
+
* null if hash seed has not been set. The hash seed id the bytes12 value
|
|
1232
|
+
* which is hashed to produce the token hash.
|
|
1233
|
+
* @param _tokenId Token ID to be queried.
|
|
1234
|
+
* @return bytes12 Token hash seed.
|
|
1235
|
+
* @dev token hash seed is keccak256 hashed to give the token hash
|
|
1236
|
+
*/
|
|
1237
|
+
function tokenIdToHashSeed(
|
|
1238
|
+
uint256 _tokenId
|
|
1239
|
+
) external view returns (bytes12) {
|
|
1240
|
+
return _ownersAndHashSeeds[_tokenId].hashSeed;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1297
1243
|
/**
|
|
1298
1244
|
* @notice View function returning Art Blocks portion of primary sales, in
|
|
1299
1245
|
* percent.
|
|
@@ -1546,7 +1492,7 @@ contract GenArt721CoreV3 is
|
|
|
1546
1492
|
if (_index >= project.scriptCount) {
|
|
1547
1493
|
return "";
|
|
1548
1494
|
}
|
|
1549
|
-
return project.scriptBytecodeAddresses[_index]
|
|
1495
|
+
return _readFromBytecode(project.scriptBytecodeAddresses[_index]);
|
|
1550
1496
|
}
|
|
1551
1497
|
|
|
1552
1498
|
/**
|
|
@@ -1670,9 +1616,9 @@ contract GenArt721CoreV3 is
|
|
|
1670
1616
|
)
|
|
1671
1617
|
external
|
|
1672
1618
|
view
|
|
1673
|
-
onlyValidTokenId(_tokenId)
|
|
1674
1619
|
returns (address payable[] memory recipients, uint256[] memory bps)
|
|
1675
1620
|
{
|
|
1621
|
+
_onlyValidTokenId(_tokenId);
|
|
1676
1622
|
// initialize arrays with maximum potential length
|
|
1677
1623
|
recipients = new address payable[](3);
|
|
1678
1624
|
bps = new uint256[](3);
|
|
@@ -1867,7 +1813,8 @@ contract GenArt721CoreV3 is
|
|
|
1867
1813
|
*/
|
|
1868
1814
|
function tokenURI(
|
|
1869
1815
|
uint256 _tokenId
|
|
1870
|
-
) public view override
|
|
1816
|
+
) public view override returns (string memory) {
|
|
1817
|
+
_onlyValidTokenId(_tokenId);
|
|
1871
1818
|
string memory _projectBaseURI = projects[tokenIdToProjectId(_tokenId)]
|
|
1872
1819
|
.projectBaseURI;
|
|
1873
1820
|
return string.concat(_projectBaseURI, _tokenId.toString());
|
|
@@ -1949,7 +1896,7 @@ contract GenArt721CoreV3 is
|
|
|
1949
1896
|
* perform input validation where applicable.
|
|
1950
1897
|
*/
|
|
1951
1898
|
function _updateRandomizerAddress(address _randomizerAddress) internal {
|
|
1952
|
-
randomizerContract =
|
|
1899
|
+
randomizerContract = IRandomizer_V3CoreBase(_randomizerAddress);
|
|
1953
1900
|
// populate historical randomizer array
|
|
1954
1901
|
_historicalRandomizerAddresses.push(_randomizerAddress);
|
|
1955
1902
|
emit PlatformUpdated(FIELD_RANDOMIZER_ADDRESS);
|
|
@@ -1987,9 +1934,8 @@ contract GenArt721CoreV3 is
|
|
|
1987
1934
|
* @return bool true if project is unlocked, false otherwise.
|
|
1988
1935
|
* @dev This also enforces that the `_projectId` passed in is valid.
|
|
1989
1936
|
*/
|
|
1990
|
-
function _projectUnlocked(
|
|
1991
|
-
|
|
1992
|
-
) internal view onlyValidProjectId(_projectId) returns (bool) {
|
|
1937
|
+
function _projectUnlocked(uint256 _projectId) internal view returns (bool) {
|
|
1938
|
+
_onlyValidProjectId(_projectId);
|
|
1993
1939
|
uint256 projectCompletedTimestamp = projects[_projectId]
|
|
1994
1940
|
.completedTimestamp;
|
|
1995
1941
|
bool projectOpen = projectCompletedTimestamp == 0;
|
|
@@ -1998,4 +1944,14 @@ contract GenArt721CoreV3 is
|
|
|
1998
1944
|
(block.timestamp - projectCompletedTimestamp <
|
|
1999
1945
|
FOUR_WEEKS_IN_SECONDS);
|
|
2000
1946
|
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Helper for calling `BytecodeStorageReader` external library reader method,
|
|
1950
|
+
* added for bytecode size reduction purposes.
|
|
1951
|
+
*/
|
|
1952
|
+
function _readFromBytecode(
|
|
1953
|
+
address _address
|
|
1954
|
+
) internal view returns (string memory) {
|
|
1955
|
+
return BytecodeStorageReader.readFromBytecode(_address);
|
|
1956
|
+
}
|
|
2001
1957
|
}
|