@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
|
@@ -10,7 +10,7 @@ import "./MinterBase_v0_1_1.sol";
|
|
|
10
10
|
|
|
11
11
|
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
12
12
|
|
|
13
|
-
pragma solidity 0.8.
|
|
13
|
+
pragma solidity 0.8.19;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @title Filtered Minter contract that allows tokens to be minted with ETH
|
|
@@ -76,13 +76,12 @@ contract MinterSetPriceERC20V4 is
|
|
|
76
76
|
// /// projectId => currency address - supersedes any defined core value
|
|
77
77
|
// mapping(uint256 => address) private projectIdToCurrencyAddress;
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
function _onlyArtist(uint256 _projectId) internal view {
|
|
80
80
|
require(
|
|
81
81
|
msg.sender ==
|
|
82
82
|
genArtCoreContract_Base.projectIdToArtistAddress(_projectId),
|
|
83
83
|
"Only Artist"
|
|
84
84
|
);
|
|
85
|
-
_;
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
/**
|
|
@@ -151,9 +150,8 @@ contract MinterSetPriceERC20V4 is
|
|
|
151
150
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
152
151
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
153
152
|
*/
|
|
154
|
-
function setProjectMaxInvocations(
|
|
155
|
-
|
|
156
|
-
) public onlyArtist(_projectId) {
|
|
153
|
+
function setProjectMaxInvocations(uint256 _projectId) public {
|
|
154
|
+
_onlyArtist(_projectId);
|
|
157
155
|
uint256 maxInvocations;
|
|
158
156
|
uint256 invocations;
|
|
159
157
|
(invocations, maxInvocations, , , , ) = genArtCoreContract_Base
|
|
@@ -185,7 +183,8 @@ contract MinterSetPriceERC20V4 is
|
|
|
185
183
|
function manuallyLimitProjectMaxInvocations(
|
|
186
184
|
uint256 _projectId,
|
|
187
185
|
uint256 _maxInvocations
|
|
188
|
-
) external
|
|
186
|
+
) external {
|
|
187
|
+
_onlyArtist(_projectId);
|
|
189
188
|
// CHECKS
|
|
190
189
|
// ensure that the manually set maxInvocations is not greater than what is set on the core contract
|
|
191
190
|
uint256 maxInvocations;
|
|
@@ -216,9 +215,8 @@ contract MinterSetPriceERC20V4 is
|
|
|
216
215
|
* @notice Warning: Disabling purchaseTo is not supported on this minter.
|
|
217
216
|
* This method exists purely for interface-conformance purposes.
|
|
218
217
|
*/
|
|
219
|
-
function togglePurchaseToDisabled(
|
|
220
|
-
|
|
221
|
-
) external view onlyArtist(_projectId) {
|
|
218
|
+
function togglePurchaseToDisabled(uint256 _projectId) external view {
|
|
219
|
+
_onlyArtist(_projectId);
|
|
222
220
|
revert("Action not supported");
|
|
223
221
|
}
|
|
224
222
|
|
|
@@ -273,7 +271,8 @@ contract MinterSetPriceERC20V4 is
|
|
|
273
271
|
function updatePricePerTokenInWei(
|
|
274
272
|
uint256 _projectId,
|
|
275
273
|
uint256 _pricePerTokenInWei
|
|
276
|
-
) external
|
|
274
|
+
) external {
|
|
275
|
+
_onlyArtist(_projectId);
|
|
277
276
|
require(_pricePerTokenInWei > 0, "Price may not be 0");
|
|
278
277
|
ProjectConfig storage _projectConfig = projectConfig[_projectId];
|
|
279
278
|
_projectConfig.pricePerTokenInWei = _pricePerTokenInWei;
|
|
@@ -302,7 +301,8 @@ contract MinterSetPriceERC20V4 is
|
|
|
302
301
|
uint256 _projectId,
|
|
303
302
|
string memory _currencySymbol,
|
|
304
303
|
address _currencyAddress
|
|
305
|
-
) external
|
|
304
|
+
) external {
|
|
305
|
+
_onlyArtist(_projectId);
|
|
306
306
|
// require null address if symbol is "ETH"
|
|
307
307
|
require(
|
|
308
308
|
(keccak256(abi.encodePacked(_currencySymbol)) ==
|
|
@@ -8,7 +8,7 @@ import "./MinterBase_v0_1_1.sol";
|
|
|
8
8
|
|
|
9
9
|
import "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
|
|
10
10
|
|
|
11
|
-
pragma solidity 0.8.
|
|
11
|
+
pragma solidity 0.8.19;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @title Filtered Minter contract that allows tokens to be minted with ETH.
|
|
@@ -61,13 +61,12 @@ contract MinterSetPriceV4 is ReentrancyGuard, MinterBase, IFilteredMinterV2 {
|
|
|
61
61
|
|
|
62
62
|
mapping(uint256 => ProjectConfig) public projectConfig;
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
function _onlyArtist(uint256 _projectId) internal view {
|
|
65
65
|
require(
|
|
66
66
|
msg.sender ==
|
|
67
67
|
genArtCoreContract_Base.projectIdToArtistAddress(_projectId),
|
|
68
68
|
"Only Artist"
|
|
69
69
|
);
|
|
70
|
-
_;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
/**
|
|
@@ -104,9 +103,8 @@ contract MinterSetPriceV4 is ReentrancyGuard, MinterBase, IFilteredMinterV2 {
|
|
|
104
103
|
* @dev this enables gas reduction after maxInvocations have been reached -
|
|
105
104
|
* core contracts shall still enforce a maxInvocation check during mint.
|
|
106
105
|
*/
|
|
107
|
-
function setProjectMaxInvocations(
|
|
108
|
-
|
|
109
|
-
) public onlyArtist(_projectId) {
|
|
106
|
+
function setProjectMaxInvocations(uint256 _projectId) public {
|
|
107
|
+
_onlyArtist(_projectId);
|
|
110
108
|
uint256 maxInvocations;
|
|
111
109
|
uint256 invocations;
|
|
112
110
|
(invocations, maxInvocations, , , , ) = genArtCoreContract_Base
|
|
@@ -138,7 +136,8 @@ contract MinterSetPriceV4 is ReentrancyGuard, MinterBase, IFilteredMinterV2 {
|
|
|
138
136
|
function manuallyLimitProjectMaxInvocations(
|
|
139
137
|
uint256 _projectId,
|
|
140
138
|
uint256 _maxInvocations
|
|
141
|
-
) external
|
|
139
|
+
) external {
|
|
140
|
+
_onlyArtist(_projectId);
|
|
142
141
|
// CHECKS
|
|
143
142
|
// ensure that the manually set maxInvocations is not greater than what is set on the core contract
|
|
144
143
|
uint256 maxInvocations;
|
|
@@ -169,9 +168,8 @@ contract MinterSetPriceV4 is ReentrancyGuard, MinterBase, IFilteredMinterV2 {
|
|
|
169
168
|
* @notice Warning: Disabling purchaseTo is not supported on this minter.
|
|
170
169
|
* This method exists purely for interface-conformance purposes.
|
|
171
170
|
*/
|
|
172
|
-
function togglePurchaseToDisabled(
|
|
173
|
-
|
|
174
|
-
) external view onlyArtist(_projectId) {
|
|
171
|
+
function togglePurchaseToDisabled(uint256 _projectId) external view {
|
|
172
|
+
_onlyArtist(_projectId);
|
|
175
173
|
revert("Action not supported");
|
|
176
174
|
}
|
|
177
175
|
|
|
@@ -228,7 +226,8 @@ contract MinterSetPriceV4 is ReentrancyGuard, MinterBase, IFilteredMinterV2 {
|
|
|
228
226
|
function updatePricePerTokenInWei(
|
|
229
227
|
uint256 _projectId,
|
|
230
228
|
uint256 _pricePerTokenInWei
|
|
231
|
-
) external
|
|
229
|
+
) external {
|
|
230
|
+
_onlyArtist(_projectId);
|
|
232
231
|
ProjectConfig storage _projectConfig = projectConfig[_projectId];
|
|
233
232
|
_projectConfig.pricePerTokenInWei = _pricePerTokenInWei;
|
|
234
233
|
_projectConfig.priceIsConfigured = true;
|
|
@@ -1,19 +1,19 @@
|
|
|
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 "../libs/0.8.x/
|
|
6
|
+
import "../libs/0.8.x/BytecodeStorageV0.sol";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @title Art Blocks BytecodeTextCR_DMock.
|
|
10
10
|
* @author Art Blocks Inc.
|
|
11
|
-
* @notice This contract serves as a mock client of the
|
|
11
|
+
* @notice This contract serves as a mock client of the BytecodeStorageV0 library
|
|
12
12
|
* to allow for more granular testing of this library than is supported
|
|
13
13
|
* by the usage of the library directly by specific current Art Blocks
|
|
14
14
|
* client smart contracts, such as the `GenArt721CoreV3` contract. This
|
|
15
15
|
* mock exposes the CR_D (create, read, _not updates_, delete)
|
|
16
|
-
* operations that the underlying
|
|
16
|
+
* operations that the underlying BytecodeStorageV0 library allows clients
|
|
17
17
|
* to support.
|
|
18
18
|
* Note that because updates can only functionally be performed by
|
|
19
19
|
* combining a "delete" and "create" operation, given that deployed
|
|
@@ -21,7 +21,7 @@ import "../libs/0.8.x/BytecodeStorage.sol";
|
|
|
21
21
|
* not expose updates (the usual "U" in "CRUD") as they are not
|
|
22
22
|
* supported by the underlying library.
|
|
23
23
|
*/
|
|
24
|
-
contract
|
|
24
|
+
contract BytecodeV0TextCR_DMock {
|
|
25
25
|
using BytecodeStorage for string;
|
|
26
26
|
using BytecodeStorage for address;
|
|
27
27
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.19;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import "../interfaces/0.8.x/IBytecodeStorageReader.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Art Blocks IBytecodeStorageReader-conforming mock.
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice This contract serves as a mock client of the BytecodeStorageV1 library
|
|
12
|
+
* to allow for testing of making direct calls (rather than delegate calls)
|
|
13
|
+
* to a deployed copy of the library. This is for testing purposes as this
|
|
14
|
+
* is the expected integration flow for direct usage of the BytecodeStorageV1
|
|
15
|
+
* reader library in a post-EOF world where new EOF-contracts cannot DELEGATECALL
|
|
16
|
+
* into legacy contracts, in which we plan to have a BytecodeStorageV2 variant
|
|
17
|
+
* of the library that makes use of CALL rather than DELEGATECALL for the
|
|
18
|
+
* purposes of backwards-compatible reads.
|
|
19
|
+
*/
|
|
20
|
+
contract BytecodeV1LibCallsMock {
|
|
21
|
+
// Address of the deployed BytecodeStorageReader contract library under mock harness.
|
|
22
|
+
address public bytecodeStorageReaderDeploymentAddress;
|
|
23
|
+
// Deployed instance of the BytecodeStorageReader contract library under mock harness.
|
|
24
|
+
IBytecodeStorageReader private bytecodeStorageReaderDeployment;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @notice Initializes contract.
|
|
28
|
+
*/
|
|
29
|
+
constructor(address _bytecodeStorageReaderDeploymentAddress) {
|
|
30
|
+
bytecodeStorageReaderDeploymentAddress = _bytecodeStorageReaderDeploymentAddress;
|
|
31
|
+
bytecodeStorageReaderDeployment = IBytecodeStorageReader(
|
|
32
|
+
_bytecodeStorageReaderDeploymentAddress
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*//////////////////////////////////////////////////////////////
|
|
37
|
+
Proxy Read Operations of V1 Library
|
|
38
|
+
//////////////////////////////////////////////////////////////*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @notice Read a string from contract bytecode
|
|
42
|
+
* @param _address address of deployed contract with bytecode stored in the V0 or V1 format
|
|
43
|
+
* @return data string read from contract bytecode
|
|
44
|
+
* @dev This function performs input validation that the contract to read is in an expected format
|
|
45
|
+
*/
|
|
46
|
+
function readFromBytecode(
|
|
47
|
+
address _address
|
|
48
|
+
) public view returns (string memory data) {
|
|
49
|
+
return bytecodeStorageReaderDeployment.readFromBytecode(_address);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @notice Read the bytes from contract bytecode that was written to the EVM using SSTORE2
|
|
54
|
+
* @param _address address of deployed contract with bytecode stored in the SSTORE2 format
|
|
55
|
+
* @return data bytes read from contract bytecode
|
|
56
|
+
* @dev This function performs no input validation on the provided contract,
|
|
57
|
+
* other than that there is content to read (but not that its a "storage contract")
|
|
58
|
+
*/
|
|
59
|
+
function readBytesFromSSTORE2Bytecode(
|
|
60
|
+
address _address
|
|
61
|
+
) public view returns (bytes memory data) {
|
|
62
|
+
return
|
|
63
|
+
bytecodeStorageReaderDeployment.readBytesFromSSTORE2Bytecode(
|
|
64
|
+
_address
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @notice Read the bytes from contract bytecode, with an explicitly provided starting offset
|
|
70
|
+
* @param _address address of deployed contract with bytecode stored in the V0 or V1 format
|
|
71
|
+
* @param _offset offset to read from in contract bytecode, explicitly provided (not calculated)
|
|
72
|
+
* @return data bytes read from contract bytecode
|
|
73
|
+
* @dev This function performs no input validation on the provided contract,
|
|
74
|
+
* other than that there is content to read (but not that its a "storage contract")
|
|
75
|
+
*/
|
|
76
|
+
function readBytesFromBytecode(
|
|
77
|
+
address _address,
|
|
78
|
+
uint256 _offset
|
|
79
|
+
) public view returns (bytes memory data) {
|
|
80
|
+
return
|
|
81
|
+
bytecodeStorageReaderDeployment.readBytesFromBytecode(
|
|
82
|
+
_address,
|
|
83
|
+
_offset
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @notice Get address for deployer for given contract bytecode
|
|
89
|
+
* @param _address address of deployed contract with bytecode stored in the V0 or V1 format
|
|
90
|
+
* @return writerAddress address read from contract bytecode
|
|
91
|
+
*/
|
|
92
|
+
function getWriterAddressForBytecode(
|
|
93
|
+
address _address
|
|
94
|
+
) public view returns (address) {
|
|
95
|
+
return
|
|
96
|
+
bytecodeStorageReaderDeployment.getWriterAddressForBytecode(
|
|
97
|
+
_address
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @notice Get version for given contract bytecode
|
|
103
|
+
* @param _address address of deployed contract with bytecode stored in the V0 or V1 format
|
|
104
|
+
* @return version version read from contract bytecode
|
|
105
|
+
*/
|
|
106
|
+
function getLibraryVersionForBytecode(
|
|
107
|
+
address _address
|
|
108
|
+
) public view returns (bytes32) {
|
|
109
|
+
return
|
|
110
|
+
bytecodeStorageReaderDeployment.getLibraryVersionForBytecode(
|
|
111
|
+
_address
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
pragma solidity 0.8.19;
|
|
3
|
+
|
|
4
|
+
// Created By: Art Blocks Inc.
|
|
5
|
+
|
|
6
|
+
import "../libs/0.8.x/BytecodeStorageV1.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title Art Blocks BytecodeTextCR_DMock.
|
|
10
|
+
* @author Art Blocks Inc.
|
|
11
|
+
* @notice This contract serves as a mock client of the BytecodeStorageV1 library
|
|
12
|
+
* to allow for more granular testing of this library than is supported
|
|
13
|
+
* by the usage of the library directly by specific current Art Blocks
|
|
14
|
+
* client smart contracts, such as the `GenArt721CoreV3` contract. This
|
|
15
|
+
* mock exposes the CR_D (create, read, _not updates_, delete)
|
|
16
|
+
* operations that the underlying BytecodeStorageV1 library allows clients
|
|
17
|
+
* to support.
|
|
18
|
+
* Note that because updates can only functionally be performed by
|
|
19
|
+
* combining a "delete" and "create" operation, given that deployed
|
|
20
|
+
* contracts cannot be _updated_ directly in chain-state, this mock does
|
|
21
|
+
* not expose updates (the usual "U" in "CRUD") as they are not
|
|
22
|
+
* supported by the underlying library.
|
|
23
|
+
*/
|
|
24
|
+
contract BytecodeV1TextCR_DMock {
|
|
25
|
+
using BytecodeStorageWriter for string;
|
|
26
|
+
|
|
27
|
+
// monotonically increasing slot counter and associated slot-storage mapping
|
|
28
|
+
uint256 public nextTextSlotId = 0;
|
|
29
|
+
mapping(uint256 => address) public storedTextBytecodeAddresses;
|
|
30
|
+
|
|
31
|
+
// save deployer address to support basic ACL checks for non-read operations
|
|
32
|
+
address public deployerAddress;
|
|
33
|
+
|
|
34
|
+
modifier onlyDeployer() {
|
|
35
|
+
require(msg.sender == deployerAddress, "Only deployer");
|
|
36
|
+
_;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @notice Initializes contract.
|
|
41
|
+
*/
|
|
42
|
+
constructor() {
|
|
43
|
+
deployerAddress = msg.sender;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/*//////////////////////////////////////////////////////////////
|
|
47
|
+
Create Read _ Delete
|
|
48
|
+
//////////////////////////////////////////////////////////////*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @notice "Create": Adds a chunk of text to be stored to chain-state.
|
|
52
|
+
* @param _text Text to be created in chain-state.
|
|
53
|
+
* @return uint256 Slot that the written bytecode contract address was
|
|
54
|
+
* stored in.
|
|
55
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
56
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
57
|
+
*/
|
|
58
|
+
function createText(
|
|
59
|
+
string memory _text
|
|
60
|
+
) external onlyDeployer returns (uint256) {
|
|
61
|
+
// store text in contract bytecode
|
|
62
|
+
storedTextBytecodeAddresses[nextTextSlotId] = _text.writeToBytecode();
|
|
63
|
+
// record written slot before incrementing
|
|
64
|
+
uint256 textSlotId = nextTextSlotId;
|
|
65
|
+
nextTextSlotId++;
|
|
66
|
+
return textSlotId;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @notice "Read": Reads chunk of text currently in the provided slot, from
|
|
71
|
+
* chain-state.
|
|
72
|
+
* @param _textSlotId Slot (associated with this contract) for which to
|
|
73
|
+
* read text content.
|
|
74
|
+
* @return string Content read from contract bytecode in the given slot.
|
|
75
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
76
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
77
|
+
*/
|
|
78
|
+
function readText(uint256 _textSlotId) public view returns (string memory) {
|
|
79
|
+
return
|
|
80
|
+
BytecodeStorageReader.readFromBytecode(
|
|
81
|
+
storedTextBytecodeAddresses[_textSlotId]
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @notice "Delete": Deletes chunk of text currently in the provided slot,
|
|
87
|
+
* from chain-state.
|
|
88
|
+
* @param _textSlotId Slot (associated with this contract) for which to
|
|
89
|
+
* delete text content.
|
|
90
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
91
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
92
|
+
*/
|
|
93
|
+
function deleteText(uint256 _textSlotId) external onlyDeployer {
|
|
94
|
+
// delete reference to old storage contract address
|
|
95
|
+
delete storedTextBytecodeAddresses[_textSlotId];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/*//////////////////////////////////////////////////////////////
|
|
99
|
+
Additional Introspection
|
|
100
|
+
//////////////////////////////////////////////////////////////*/
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
104
|
+
* from chain-state that lives at a given deployed address.
|
|
105
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
106
|
+
* @return string Content read from contract bytecode at the given address.
|
|
107
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
108
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
109
|
+
*/
|
|
110
|
+
function readTextAtAddress(
|
|
111
|
+
address _bytecodeAddress
|
|
112
|
+
) public view returns (string memory) {
|
|
113
|
+
return BytecodeStorageReader.readFromBytecode(_bytecodeAddress);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
118
|
+
* from chain-state that lives at a given deployed address with an
|
|
119
|
+
* explicitly provided `_offset`.
|
|
120
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
121
|
+
* @param _offset Offset to read from in contract bytecode,
|
|
122
|
+
* explicitly provided (not calculated)
|
|
123
|
+
* @return string Content read from contract bytecode at the given address.
|
|
124
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
125
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
126
|
+
*/
|
|
127
|
+
function forceReadTextAtAddress(
|
|
128
|
+
address _bytecodeAddress,
|
|
129
|
+
uint256 _offset
|
|
130
|
+
) public view returns (string memory) {
|
|
131
|
+
return
|
|
132
|
+
string(
|
|
133
|
+
BytecodeStorageReader.readBytesFromBytecode(
|
|
134
|
+
_bytecodeAddress,
|
|
135
|
+
_offset
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @notice Allows additional read introspection, to read a chunk of text,
|
|
142
|
+
* from chain-state that lives at a given deployed address that
|
|
143
|
+
* was written with SSTORE2.
|
|
144
|
+
* @param _bytecodeAddress address from which to read text content.
|
|
145
|
+
* @return string Content read from contract bytecode at the given address.
|
|
146
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
147
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
148
|
+
*/
|
|
149
|
+
function readSSTORE2TextAtAddress(
|
|
150
|
+
address _bytecodeAddress
|
|
151
|
+
) public view returns (string memory) {
|
|
152
|
+
return
|
|
153
|
+
string(
|
|
154
|
+
BytecodeStorageReader.readBytesFromSSTORE2Bytecode(
|
|
155
|
+
_bytecodeAddress
|
|
156
|
+
)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @notice Allows introspection of who deployed a given contracts-as-storage
|
|
162
|
+
* contract, based on a provided `_bytecodeAddress`.
|
|
163
|
+
* @param _bytecodeAddress address for which to read the author address.
|
|
164
|
+
* @return address of the author who wrote the data contained in the
|
|
165
|
+
* given `_bytecodeAddress` contract.
|
|
166
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
167
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
168
|
+
*/
|
|
169
|
+
function readAuthorForTextAtAddress(
|
|
170
|
+
address _bytecodeAddress
|
|
171
|
+
) public view returns (address) {
|
|
172
|
+
return
|
|
173
|
+
BytecodeStorageReader.getWriterAddressForBytecode(_bytecodeAddress);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @notice Allows introspection of the version of a given contracts-as-storage
|
|
178
|
+
* contract, based on a provided `_bytecodeAddress`.
|
|
179
|
+
* @param _bytecodeAddress address for which to read the version.
|
|
180
|
+
* @return bytes32 version of the version string contained in the given `_bytecodeAddress`
|
|
181
|
+
* contract.
|
|
182
|
+
* @dev Intentionally do not perform input validation, instead allowing
|
|
183
|
+
* the underlying BytecodeStorage lib to throw errors where applicable.
|
|
184
|
+
*/
|
|
185
|
+
function readLibraryVersionForTextAtAddress(
|
|
186
|
+
address _bytecodeAddress
|
|
187
|
+
) public view returns (bytes32) {
|
|
188
|
+
return
|
|
189
|
+
BytecodeStorageReader.getLibraryVersionForBytecode(
|
|
190
|
+
_bytecodeAddress
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @notice Allows additional internal purge-logic introspection, by allowing
|
|
196
|
+
* for the sending of arbitrary data from this contract to the
|
|
197
|
+
* provided existing `_bytecodeAddress`.
|
|
198
|
+
* @param _bytecodeAddress address for which to send call data.
|
|
199
|
+
* @param _data aribtrary data to send as call-data for raw `.call`.
|
|
200
|
+
* @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
|
|
201
|
+
*/
|
|
202
|
+
function callWithNonsenseData(
|
|
203
|
+
address _bytecodeAddress,
|
|
204
|
+
bytes memory _data
|
|
205
|
+
) external onlyDeployer {
|
|
206
|
+
(bool success /* `data` not needed */, ) = _bytecodeAddress.call(_data);
|
|
207
|
+
if (success) {
|
|
208
|
+
// WARNING - This implementation does not make use of the low-level
|
|
209
|
+
// call return result indicating success/failure. This is
|
|
210
|
+
// contrary to best practice but is OK in this instance as
|
|
211
|
+
// this method IS NOT SECURE AND SHOULD NOT BE USED IN
|
|
212
|
+
// PRODUCTION under any normal circumstances.
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @notice Allows additional internal purge-logic introspection, by allowing
|
|
218
|
+
* for the sending of raw calls (with no data) from this contract to
|
|
219
|
+
* the provided existing `_bytecodeAddress`.
|
|
220
|
+
* @param _bytecodeAddress address for which to send call data.
|
|
221
|
+
* @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
|
|
222
|
+
*/
|
|
223
|
+
function callWithoutData(address _bytecodeAddress) external onlyDeployer {
|
|
224
|
+
(bool success /* `data` not needed */, ) = _bytecodeAddress.call("");
|
|
225
|
+
if (success) {
|
|
226
|
+
// WARNING - This implementation does not make use of the low-level
|
|
227
|
+
// call return result indicating success/failure. This is
|
|
228
|
+
// contrary to best practice but is OK in this instance as
|
|
229
|
+
// this method IS NOT SECURE AND SHOULD NOT BE USED IN
|
|
230
|
+
// PRODUCTION under any normal circumstances.
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.19;
|
|
4
|
+
|
|
5
|
+
import {DeadReceiverMock} from "./DeadReceiverMock.sol";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @notice This reverts when receiving Ether.
|
|
9
|
+
* Also exposes a createBidOnAuction function to create a bid on an auction
|
|
10
|
+
* of a serial English auction minter.
|
|
11
|
+
* @dev Mock contract for testing purposes.
|
|
12
|
+
*/
|
|
13
|
+
contract DeadReceiverBidderMock is DeadReceiverMock {
|
|
14
|
+
function createBidOnAuction(
|
|
15
|
+
address minter,
|
|
16
|
+
uint256 tokenId
|
|
17
|
+
) external payable {
|
|
18
|
+
(bool success, ) = minter.call{value: msg.value}(
|
|
19
|
+
abi.encodeWithSignature("createBid(uint256)", tokenId)
|
|
20
|
+
);
|
|
21
|
+
require(success, "DeadReceiverBidderMock: call failed");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
import "../interfaces/0.8.x/IGenArt721CoreContractV3_Base.sol";
|
|
5
|
+
import "../interfaces/0.8.x/IMinterFilterV1.sol";
|
|
6
|
+
|
|
7
|
+
pragma solidity 0.8.19;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @title NON-PRODUCTION shared minter used for testing purposes only.
|
|
11
|
+
* In general, this is intended to integrate with IMinterFilterV1, and should
|
|
12
|
+
* be used for integration testing purposes only.
|
|
13
|
+
* @author Art Blocks Inc.
|
|
14
|
+
*/
|
|
15
|
+
contract DummySharedMinter {
|
|
16
|
+
/// Minter filter address this minter interacts with
|
|
17
|
+
address public immutable minterFilterAddress;
|
|
18
|
+
|
|
19
|
+
/// Minter filter this minter may interact with.
|
|
20
|
+
IMinterFilterV1 private immutable minterFilter;
|
|
21
|
+
|
|
22
|
+
/// minterType for this minter
|
|
23
|
+
string public constant minterType = "DummySharedMinter";
|
|
24
|
+
|
|
25
|
+
/// minter version for this minter
|
|
26
|
+
string public constant minterVersion = "v0.0.0";
|
|
27
|
+
|
|
28
|
+
uint256 constant ONE_MILLION = 1_000_000;
|
|
29
|
+
|
|
30
|
+
function _onlyArtist(
|
|
31
|
+
uint256 _projectId,
|
|
32
|
+
address _coreContract
|
|
33
|
+
) internal view {
|
|
34
|
+
require(
|
|
35
|
+
msg.sender ==
|
|
36
|
+
IGenArt721CoreContractV3_Base(_coreContract)
|
|
37
|
+
.projectIdToArtistAddress(_projectId),
|
|
38
|
+
"Only Artist"
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @notice Initializes contract to be a Filtered Minter for
|
|
44
|
+
* `_minterFilter`.
|
|
45
|
+
* @param _minterFilter Minter filter for which this will be a
|
|
46
|
+
* filtered minter.
|
|
47
|
+
*/
|
|
48
|
+
constructor(address _minterFilter) {
|
|
49
|
+
minterFilterAddress = _minterFilter;
|
|
50
|
+
minterFilter = IMinterFilterV1(_minterFilter);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function purchase(
|
|
54
|
+
uint256 _projectId,
|
|
55
|
+
address _coreContract
|
|
56
|
+
) external payable returns (uint256 tokenId) {
|
|
57
|
+
tokenId = purchaseTo(msg.sender, _projectId, _coreContract);
|
|
58
|
+
return tokenId;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function purchaseTo(
|
|
62
|
+
address _to,
|
|
63
|
+
uint256 _projectId,
|
|
64
|
+
address _coreContract
|
|
65
|
+
) public payable returns (uint256 tokenId) {
|
|
66
|
+
tokenId = minterFilter.mint_joo(
|
|
67
|
+
_to,
|
|
68
|
+
_projectId,
|
|
69
|
+
_coreContract,
|
|
70
|
+
msg.sender
|
|
71
|
+
);
|
|
72
|
+
// intentionally does not split funds to keep this dummy minter simple
|
|
73
|
+
return tokenId;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.19;
|
|
4
|
+
|
|
5
|
+
import {GasLimitReceiverMock} from "./GasLimitReceiverMock.sol";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @notice This reverts when receiving Ether.
|
|
9
|
+
* Also exposes a createBidOnAuction function to create a bid on an auction
|
|
10
|
+
* of a serial English auction minter.
|
|
11
|
+
* @dev Mock contract for testing purposes.
|
|
12
|
+
*/
|
|
13
|
+
contract GasLimitReceiverBidderMock is GasLimitReceiverMock {
|
|
14
|
+
function createBidOnAuction(
|
|
15
|
+
address minter,
|
|
16
|
+
uint256 tokenId
|
|
17
|
+
) external payable {
|
|
18
|
+
(bool success, ) = minter.call{value: msg.value}(
|
|
19
|
+
abi.encodeWithSignature("createBid(uint256)", tokenId)
|
|
20
|
+
);
|
|
21
|
+
require(success, "GasLimitReceiverBidderMock: call failed");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.19;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @notice This uses all gas when receiving Ether, useful when testing denial
|
|
7
|
+
* of service attacks.
|
|
8
|
+
* @dev Mock contract for testing purposes.
|
|
9
|
+
*/
|
|
10
|
+
contract GasLimitReceiverMock {
|
|
11
|
+
string public a = "a string in storage.";
|
|
12
|
+
|
|
13
|
+
receive() external payable {
|
|
14
|
+
// infinite loop to burn all available gas
|
|
15
|
+
while (true) {
|
|
16
|
+
a = string.concat(a, " A longer string in storage to burn gas.");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|