@artblocks/contracts 1.0.4 → 1.2.0

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.
Files changed (289) hide show
  1. package/README.md +75 -7
  2. package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
  3. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  4. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +336 -131
  5. package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +2047 -0
  6. package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +2021 -0
  7. package/artifacts/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol/MinterBase.json +1 -1
  8. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
  9. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
  10. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol/MinterDAExpV4.json +3 -3
  11. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
  12. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
  13. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +1109 -0
  14. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
  15. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
  16. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol/MinterDALinV4.json +3 -3
  17. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
  18. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
  19. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
  20. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol/MinterHolderV4.json +3 -3
  21. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
  22. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
  23. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
  24. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
  25. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol/MinterMerkleV5.json +3 -3
  26. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +31 -63
  27. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/MinterPolyptychV0.json +3 -3
  28. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol/MinterSEAV0.json +3 -3
  29. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
  30. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
  31. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol/MinterSetPriceV4.json +3 -3
  32. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +65 -2
  33. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +65 -2
  34. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
  35. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
  36. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +807 -0
  37. package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +65 -2
  38. package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +65 -2
  39. package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +606 -0
  40. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +565 -209
  41. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +785 -227
  42. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +40 -15
  43. package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
  44. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +40 -15
  45. package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +36 -68
  46. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
  47. package/artifacts/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -0
  48. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +130 -0
  49. package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +6 -6
  50. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +71 -39
  51. package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +283 -0
  52. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +12 -12
  53. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +12 -12
  54. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +30 -62
  55. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +30 -62
  56. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +170 -104
  57. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +170 -104
  58. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1028 -0
  59. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +741 -0
  60. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -0
  61. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
  62. package/artifacts/contracts/interfaces/v0.8.x/IMinterFilterV1.sol/IMinterFilterV1.json +22 -22
  63. package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
  64. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +26 -101
  65. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +1 -57
  66. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +1 -57
  67. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +2 -21
  68. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
  69. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +15 -90
  70. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +10 -36
  71. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol/ISharedMinterRAMV0.json +62 -0
  72. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol/ISharedMinterRequired.json +37 -0
  73. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +4 -236
  74. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +5 -5
  75. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +7 -423
  76. package/artifacts/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +17 -17
  77. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol/ISplitAtomicFactoryV0.json +170 -0
  78. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol/ISplitAtomicV0.json +126 -0
  79. package/artifacts/contracts/interfaces/v0.8.x/ISplitProviderV0.sol/ISplitProviderV0.json +98 -0
  80. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol/ISplitFactoryV2.json +123 -0
  81. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
  82. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
  83. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
  84. package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
  85. package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +2 -2
  86. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
  87. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  88. package/artifacts/contracts/libs/v0.8.x/BitMap.sol/BitMaps256.json +10 -0
  89. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV0.sol/BytecodeStorage.json +2 -2
  90. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +2 -2
  91. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +2 -2
  92. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +214 -0
  93. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +10 -0
  94. package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
  95. package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +10 -0
  96. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
  97. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol/ERC721_PackedHashSeedV1.json +444 -0
  98. package/artifacts/contracts/libs/v0.8.x/PackedBools.sol/PackedBools.json +10 -0
  99. package/artifacts/contracts/libs/v0.8.x/SSTORE2.sol/SSTORE2.json +2 -2
  100. package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +208 -0
  101. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +60 -3
  102. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +30 -0
  103. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +60 -3
  104. package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +346 -0
  105. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +29 -3
  106. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +30 -3
  107. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  108. package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +398 -0
  109. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +254 -3
  110. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +48 -3
  111. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +41 -3
  112. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +35 -3
  113. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +79 -3
  114. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  115. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +41 -41
  116. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +66 -632
  117. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +67 -594
  118. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +33 -524
  119. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +66 -632
  120. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +33 -524
  121. package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +1374 -0
  122. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +56 -722
  123. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +58 -454
  124. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +61 -552
  125. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +55 -497
  126. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +110 -571
  127. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +69 -560
  128. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +28 -444
  129. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +417 -0
  130. package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +154 -0
  131. package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +428 -0
  132. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  133. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
  134. package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +24 -0
  135. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +4 -9
  136. package/artifacts/contracts/mock/Mock0xSplitsV2PullFactory.sol/Mock0xSplitsV2PullFactory.json +149 -0
  137. package/artifacts/contracts/mock/Mock0xSplitsV2Splitter.sol/Mock0xSplitsV2Splitter.json +99 -0
  138. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +20 -2
  139. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +20 -2
  140. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  141. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  142. package/artifacts/contracts/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
  143. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
  144. package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +136 -0
  145. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
  146. package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +105 -0
  147. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
  148. package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +100 -0
  149. package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
  150. package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +69 -0
  151. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterDrainETHMock.json +54 -0
  152. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterSendETHMock.json +54 -0
  153. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  154. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  155. package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
  156. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +19 -19
  157. package/artifacts/contracts/split/SplitAtomicFactoryV0.sol/SplitAtomicFactoryV0.json +203 -0
  158. package/artifacts/contracts/split/SplitAtomicV0.sol/SplitAtomicV0.json +168 -0
  159. package/artifacts/contracts/split/split-provider/SplitProviderV0.sol/SplitProviderV0.json +141 -0
  160. package/contracts/AdminACLV0.sol +6 -2
  161. package/contracts/AdminACLV1.sol +2 -2
  162. package/contracts/DependencyRegistryV0.sol +737 -390
  163. package/contracts/{GenArt721CoreV3.sol → archive/GenArt721CoreV3.sol} +56 -20
  164. package/contracts/{explorations → archive}/GenArt721CoreV3_Explorations.sol +49 -13
  165. package/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol +4 -4
  166. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol +4 -4
  167. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +4 -4
  168. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +5 -5
  169. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol +9 -62
  170. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol +4 -4
  171. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol +5 -5
  172. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol +5 -5
  173. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol +7 -7
  174. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol +13 -13
  175. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol +4 -4
  176. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +82 -10
  177. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +82 -10
  178. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPriceERC20}/MinterSetPriceERC20V4.sol +88 -21
  179. package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +81 -22
  180. package/contracts/engine/V2/GenArt721Minter_PBAB.sol +80 -22
  181. package/contracts/engine/V3/EngineFactoryV0.sol +419 -0
  182. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +893 -493
  183. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1053 -655
  184. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +7 -13
  185. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +5 -11
  186. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
  187. package/contracts/engine-registry/CoreRegistryV1.sol +58 -65
  188. package/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol +20 -0
  189. package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +23 -0
  190. package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +6 -8
  191. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +48 -43
  192. package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +124 -0
  193. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol +1 -3
  194. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol +1 -3
  195. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpV1.sol +1 -3
  196. package/contracts/interfaces/v0.8.x/IFilteredMinterDALinV1.sol +1 -3
  197. package/contracts/interfaces/v0.8.x/IFilteredMinterHolderV2.sol +1 -3
  198. package/contracts/interfaces/v0.8.x/IFilteredMinterMerkleV2.sol +1 -3
  199. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +115 -11
  200. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +84 -8
  201. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +26 -8
  202. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol +141 -0
  203. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol +78 -0
  204. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol +47 -0
  205. package/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol +91 -0
  206. package/contracts/interfaces/v0.8.x/IMinterFilterV1.sol +25 -25
  207. package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
  208. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +30 -20
  209. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +1 -14
  210. package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +1 -15
  211. package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +2 -8
  212. package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
  213. package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +15 -43
  214. package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +10 -20
  215. package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
  216. package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +20 -0
  217. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +1 -67
  218. package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +5 -5
  219. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +18 -160
  220. package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +37 -37
  221. package/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol +81 -0
  222. package/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol +72 -0
  223. package/contracts/interfaces/v0.8.x/ISplitProviderV0.sol +49 -0
  224. package/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol +62 -0
  225. package/contracts/libs/v0.8.x/ABHelpers.sol +31 -17
  226. package/contracts/libs/v0.8.x/AuthLib.sol +101 -102
  227. package/contracts/libs/v0.8.x/BitMap.sol +112 -0
  228. package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
  229. package/contracts/libs/v0.8.x/Bytes32Strings.sol +5 -5
  230. package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +90 -0
  231. package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
  232. package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
  233. package/contracts/libs/v0.8.x/V3FlexLib.sol +591 -0
  234. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +162 -39
  235. package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
  236. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +139 -37
  237. package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
  238. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +299 -158
  239. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +268 -55
  240. package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +138 -58
  241. package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
  242. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +796 -123
  243. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +131 -13
  244. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +607 -224
  245. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +494 -330
  246. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +217 -78
  247. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +358 -309
  248. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +391 -491
  249. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +396 -632
  250. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +212 -273
  251. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +393 -488
  252. package/contracts/minter-suite/Minters/MinterDALinV5.sol +220 -277
  253. package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
  254. package/contracts/minter-suite/Minters/MinterSEAV1.sol +329 -677
  255. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +287 -303
  256. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +355 -446
  257. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +328 -416
  258. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +552 -622
  259. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +429 -553
  260. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +180 -227
  261. package/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol +446 -0
  262. package/contracts/mock/BytecodeV2LibCallsMock.sol +128 -0
  263. package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -0
  264. package/contracts/mock/ForceSendMock.sol +22 -0
  265. package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +3 -10
  266. package/contracts/mock/Mock0xSplitsV2PullFactory.sol +75 -0
  267. package/contracts/mock/Mock0xSplitsV2Splitter.sol +47 -0
  268. package/contracts/mock/MockAdminACLV0.sol +21 -0
  269. package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +21 -0
  270. package/contracts/mock/ReentrancyGenArt721MinterMock.sol +47 -0
  271. package/contracts/mock/ReentrancyHolderMockShared.sol +59 -0
  272. package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
  273. package/contracts/mock/ReentrancyMockShared.sol +48 -0
  274. package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
  275. package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
  276. package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
  277. package/contracts/randomizer/shared/SharedRandomizerV0.sol +79 -71
  278. package/contracts/split/SplitAtomicFactoryV0.sol +121 -0
  279. package/contracts/split/SplitAtomicV0.sol +265 -0
  280. package/contracts/split/split-provider/SplitProviderV0.sol +201 -0
  281. package/package.json +79 -45
  282. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +0 -1965
  283. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +0 -1939
  284. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +0 -1127
  285. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +0 -768
  286. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +0 -208
  287. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +0 -301
  288. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
  289. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
@@ -0,0 +1,316 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ pragma solidity 0.8.19;
3
+
4
+ // Created By: Art Blocks Inc.
5
+
6
+ import {BytecodeStorageWriter, BytecodeStorageReader} from "../libs/v0.8.x/BytecodeStorageV2.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 BytecodeStorageV2 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 BytecodeStorageV2 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 BytecodeV2TextCR_DMock {
25
+ using BytecodeStorageWriter for string;
26
+ using BytecodeStorageReader for string;
27
+ using BytecodeStorageWriter for bytes;
28
+
29
+ // monotonically increasing slot counter and associated slot-storage mapping
30
+ uint256 public nextTextSlotId = 0;
31
+ mapping(uint256 => address) public storedTextBytecodeAddresses;
32
+
33
+ // save deployer address to support basic ACL checks for non-read operations
34
+ address public deployerAddress;
35
+
36
+ // dummy counter to implement non-view read function for gas measurements of large reads (RPC compatibility)
37
+ uint256 private _dummyCounter;
38
+
39
+ modifier onlyDeployer() {
40
+ require(msg.sender == deployerAddress, "Only deployer");
41
+ _;
42
+ }
43
+
44
+ /**
45
+ * @notice Initializes contract.
46
+ */
47
+ constructor() {
48
+ deployerAddress = msg.sender;
49
+ }
50
+
51
+ /*//////////////////////////////////////////////////////////////
52
+ Create Read _ Delete
53
+ //////////////////////////////////////////////////////////////*/
54
+
55
+ /**
56
+ * @notice "Create": Adds a chunk of text to be stored to chain-state.
57
+ * @param _text Text to be created in chain-state.
58
+ * @return uint256 Slot that the written bytecode contract address was
59
+ * stored in.
60
+ * @dev Intentionally do not perform input validation, instead allowing
61
+ * the underlying BytecodeStorage lib to throw errors where applicable.
62
+ */
63
+ function createText(
64
+ string memory _text
65
+ ) external onlyDeployer returns (uint256) {
66
+ // store text in contract bytecode
67
+ storedTextBytecodeAddresses[nextTextSlotId] = _text.writeToBytecode();
68
+ // record written slot before incrementing
69
+ uint256 textSlotId = nextTextSlotId;
70
+ nextTextSlotId++;
71
+ return textSlotId;
72
+ }
73
+
74
+ /**
75
+ * @notice "Create": Adds a chunk of text to be stored to chain-state.
76
+ * @param _textCompressed Compressed bytes representing text to be created in chain-state.
77
+ * @return uint256 Slot that the written bytecode contract address was
78
+ * stored in.
79
+ * @dev Intentionally do not perform input validation, instead allowing
80
+ * the underlying BytecodeStorage lib to throw errors where applicable.
81
+ */
82
+ function createTextCompressed(
83
+ bytes memory _textCompressed
84
+ ) external onlyDeployer returns (uint256) {
85
+ // store compressed text in contract bytecode
86
+ storedTextBytecodeAddresses[nextTextSlotId] = _textCompressed
87
+ .writeToBytecodeCompressed();
88
+ // record written slot before incrementing
89
+ uint256 textSlotId = nextTextSlotId;
90
+ nextTextSlotId++;
91
+ return textSlotId;
92
+ }
93
+
94
+ /**
95
+ * @notice "Read": Reads chunk of text currently in the provided slot, from
96
+ * chain-state.
97
+ * @param _textSlotId Slot (associated with this contract) for which to
98
+ * read text content.
99
+ * @return string Content read from contract bytecode in the given slot.
100
+ * @dev Intentionally do not perform input validation, instead allowing
101
+ * the underlying BytecodeStorage lib to throw errors where applicable.
102
+ */
103
+ function readText(uint256 _textSlotId) public view returns (string memory) {
104
+ return
105
+ BytecodeStorageReader.readFromBytecode(
106
+ storedTextBytecodeAddresses[_textSlotId]
107
+ );
108
+ }
109
+
110
+ /**
111
+ * @notice "Delete": Deletes chunk of text currently in the provided slot,
112
+ * from chain-state.
113
+ * @param _textSlotId Slot (associated with this contract) for which to
114
+ * delete text content.
115
+ * @dev Intentionally do not perform input validation, instead allowing
116
+ * the underlying BytecodeStorage lib to throw errors where applicable.
117
+ */
118
+ function deleteText(uint256 _textSlotId) external onlyDeployer {
119
+ // delete reference to old storage contract address
120
+ delete storedTextBytecodeAddresses[_textSlotId];
121
+ }
122
+
123
+ /**
124
+ * @notice function to assist in getting compressed text in a non-view function.
125
+ * Useful for measuring gas costs of large reads in RPC environments.
126
+ * @param _text Text to be compressed.
127
+ */
128
+ function getCompressedNonView(
129
+ string memory _text
130
+ ) external returns (bytes memory) {
131
+ // non-view dummy portion of the function
132
+ _dummyCounter++;
133
+ // read compressed text from chain-state
134
+ return _text.getCompressed();
135
+ }
136
+
137
+ /**
138
+ * @notice Allows additional read introspection, to read a chunk of text,
139
+ * from chain-state that lives at a given deployed address.
140
+ * Non-view variant to easily measure gas costs of large reads.
141
+ * @param _textSlotId Slot (associated with this contract) for which to
142
+ * read text content.
143
+ * @return string Content read from contract bytecode in the given slot.
144
+ * @dev Intentionally do not perform input validation, instead allowing
145
+ * the underlying BytecodeStorage lib to throw errors where applicable.
146
+ */
147
+ function readTextNonView(
148
+ uint256 _textSlotId
149
+ ) external returns (string memory) {
150
+ // non-view dummy portion of the function
151
+ _dummyCounter++;
152
+ // read text from chain-state
153
+ return
154
+ BytecodeStorageReader.readFromBytecode(
155
+ storedTextBytecodeAddresses[_textSlotId]
156
+ );
157
+ }
158
+
159
+ /*//////////////////////////////////////////////////////////////
160
+ Additional Introspection
161
+ //////////////////////////////////////////////////////////////*/
162
+
163
+ /**
164
+ * @notice Allows additional read introspection, to read a chunk of text,
165
+ * from chain-state that lives at a given deployed address.
166
+ * @param _bytecodeAddress address from which to read text content.
167
+ * @return string Content read from contract bytecode at the given address.
168
+ * @dev Intentionally do not perform input validation, instead allowing
169
+ * the underlying BytecodeStorage lib to throw errors where applicable.
170
+ */
171
+ function readTextAtAddress(
172
+ address _bytecodeAddress
173
+ ) public view returns (string memory) {
174
+ return BytecodeStorageReader.readFromBytecode(_bytecodeAddress);
175
+ }
176
+
177
+ /**
178
+ * @notice Allows additional read introspection, to read a chunk of text,
179
+ * from chain-state that lives at a given deployed address with an
180
+ * explicitly provided `_offset`.
181
+ * @param _bytecodeAddress address from which to read text content.
182
+ * @param _offset Offset to read from in contract bytecode,
183
+ * explicitly provided (not calculated)
184
+ * @return string Content read from contract bytecode at the given address.
185
+ * @dev Intentionally do not perform input validation, instead allowing
186
+ * the underlying BytecodeStorage lib to throw errors where applicable.
187
+ */
188
+ function forceReadTextAtAddress(
189
+ address _bytecodeAddress,
190
+ uint256 _offset
191
+ ) public view returns (string memory) {
192
+ return
193
+ string(
194
+ BytecodeStorageReader.readBytesFromBytecode(
195
+ _bytecodeAddress,
196
+ _offset
197
+ )
198
+ );
199
+ }
200
+
201
+ /**
202
+ * @notice Allows additional read introspection, to read a chunk of text,
203
+ * from chain-state that lives at a given deployed address that
204
+ * was written with SSTORE2.
205
+ * @param _bytecodeAddress address from which to read text content.
206
+ * @return string Content read from contract bytecode at the given address.
207
+ * @dev Intentionally do not perform input validation, instead allowing
208
+ * the underlying BytecodeStorage lib to throw errors where applicable.
209
+ */
210
+ function readSSTORE2TextAtAddress(
211
+ address _bytecodeAddress
212
+ ) public view returns (string memory) {
213
+ return
214
+ string(
215
+ BytecodeStorageReader.readBytesFromSSTORE2Bytecode(
216
+ _bytecodeAddress
217
+ )
218
+ );
219
+ }
220
+
221
+ /**
222
+ * @notice Allows introspection of who deployed a given contracts-as-storage
223
+ * contract, based on a provided `_bytecodeAddress`.
224
+ * @param _bytecodeAddress address for which to read the author address.
225
+ * @return address of the author who wrote the data contained in the
226
+ * given `_bytecodeAddress` contract.
227
+ * @dev Intentionally do not perform input validation, instead allowing
228
+ * the underlying BytecodeStorage lib to throw errors where applicable.
229
+ */
230
+ function readAuthorForTextAtAddress(
231
+ address _bytecodeAddress
232
+ ) public view returns (address) {
233
+ return
234
+ BytecodeStorageReader.getWriterAddressForBytecode(_bytecodeAddress);
235
+ }
236
+
237
+ /**
238
+ * @notice Allows introspection of the version of a given contracts-as-storage
239
+ * contract, based on a provided `_bytecodeAddress`.
240
+ * @param _bytecodeAddress address for which to read the version.
241
+ * @return bytes32 version of the version string contained in the given `_bytecodeAddress`
242
+ * contract.
243
+ * @dev Intentionally do not perform input validation, instead allowing
244
+ * the underlying BytecodeStorage lib to throw errors where applicable.
245
+ */
246
+ function readLibraryVersionForTextAtAddress(
247
+ address _bytecodeAddress
248
+ ) public view returns (bytes32) {
249
+ return
250
+ BytecodeStorageReader.getLibraryVersionForBytecode(
251
+ _bytecodeAddress
252
+ );
253
+ }
254
+
255
+ /**
256
+ * @notice Allows introspection of if stored data are in compressed format of a given
257
+ * contracts-as-storage contract, based on a provided `_bytecodeAddress`.
258
+ * @param _bytecodeAddress address for which to read the version.
259
+ * @return bool indicating if data are stored in compressed format in the given
260
+ * `_bytecodeAddress` contract.
261
+ * @dev Intentionally do not perform input validation, instead allowing
262
+ * the underlying BytecodeStorage lib to throw errors where applicable.
263
+ */
264
+ function readIsCompressedForTextAtAddress(
265
+ address _bytecodeAddress
266
+ ) public view returns (bool) {
267
+ return
268
+ BytecodeStorageReader.getIsCompressedForBytecode(_bytecodeAddress);
269
+ }
270
+
271
+ function getCompressed(
272
+ string memory _text
273
+ ) public pure returns (bytes memory) {
274
+ return _text.getCompressed();
275
+ }
276
+
277
+ /**
278
+ * @notice Allows additional internal purge-logic introspection, by allowing
279
+ * for the sending of arbitrary data from this contract to the
280
+ * provided existing `_bytecodeAddress`.
281
+ * @param _bytecodeAddress address for which to send call data.
282
+ * @param _data aribtrary data to send as call-data for raw `.call`.
283
+ * @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
284
+ */
285
+ function callWithNonsenseData(
286
+ address _bytecodeAddress,
287
+ bytes memory _data
288
+ ) external onlyDeployer {
289
+ (bool success /* `data` not needed */, ) = _bytecodeAddress.call(_data);
290
+ if (success) {
291
+ // WARNING - This implementation does not make use of the low-level
292
+ // call return result indicating success/failure. This is
293
+ // contrary to best practice but is OK in this instance as
294
+ // this method IS NOT SECURE AND SHOULD NOT BE USED IN
295
+ // PRODUCTION under any normal circumstances.
296
+ }
297
+ }
298
+
299
+ /**
300
+ * @notice Allows additional internal purge-logic introspection, by allowing
301
+ * for the sending of raw calls (with no data) from this contract to
302
+ * the provided existing `_bytecodeAddress`.
303
+ * @param _bytecodeAddress address for which to send call data.
304
+ * @dev WARNING - THIS IS NOT SECURE AND SHOULD NOT BE USED IN PRODUCTION.
305
+ */
306
+ function callWithoutData(address _bytecodeAddress) external onlyDeployer {
307
+ (bool success /* `data` not needed */, ) = _bytecodeAddress.call("");
308
+ if (success) {
309
+ // WARNING - This implementation does not make use of the low-level
310
+ // call return result indicating success/failure. This is
311
+ // contrary to best practice but is OK in this instance as
312
+ // this method IS NOT SECURE AND SHOULD NOT BE USED IN
313
+ // PRODUCTION under any normal circumstances.
314
+ }
315
+ }
316
+ }
@@ -0,0 +1,22 @@
1
+ // SPDX-License-Identifier: MIT
2
+
3
+ pragma solidity 0.8.19;
4
+
5
+ import {SplitFundsLib} from "../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
6
+
7
+ /**
8
+ * @dev Mock contract for testing purposes.
9
+ * This contract exposes a payable function that force-sends ETH to a target
10
+ * address.
11
+ */
12
+ contract ForceSendMock {
13
+ // @dev forwards msg.value to target address
14
+ function forceSendETH(address target) external payable {
15
+ SplitFundsLib.forceSafeTransferETH({
16
+ to: target,
17
+ amount: msg.value,
18
+ // induce force-send by having a low gas limit
19
+ minterRefundGasLimit: 1_000
20
+ });
21
+ }
22
+ }
@@ -5,7 +5,6 @@ pragma solidity 0.8.19;
5
5
 
6
6
  import "../interfaces/v0.8.x/IRandomizerV2.sol";
7
7
  import "../interfaces/v0.8.x/IAdminACLV0.sol";
8
- import "../interfaces/v0.8.x/IEngineRegistryV0.sol";
9
8
  import "../interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol";
10
9
  import "../interfaces/v0.8.x/IDependencyRegistryCompatibleV0.sol";
11
10
  import "../interfaces/v0.8.x/IManifold.sol";
@@ -310,8 +309,7 @@ contract GenArt721CoreV3_Engine_IncorrectCoreType is
310
309
  address _randomizerContract,
311
310
  address _adminACLContract,
312
311
  uint248 _startingProjectId,
313
- bool _autoApproveArtistSplitProposals,
314
- address _engineRegistryContract
312
+ bool _autoApproveArtistSplitProposals
315
313
  )
316
314
  ERC721_PackedHashSeed(_tokenName, _tokenSymbol)
317
315
  onlyNonZeroAddress(_renderProviderAddress)
@@ -343,13 +341,8 @@ contract GenArt721CoreV3_Engine_IncorrectCoreType is
343
341
  );
344
342
  // initialize next project ID
345
343
  _nextProjectId = _startingProjectId;
346
- // emit PlatformUpdated(FIELD_NEXT_PROJECT_ID);
347
- // register contract as an Engine contract
348
- IEngineRegistryV0(_engineRegistryContract).registerContract(
349
- address(this),
350
- CORE_VERSION,
351
- CORE_TYPE
352
- );
344
+ // @dev follow-on action: This contract does not self-register. A core
345
+ // registry owner must register contract in a subsequent call.
353
346
  }
354
347
 
355
348
  /**
@@ -0,0 +1,75 @@
1
+ // SPDX-License-Identifier: MIT
2
+
3
+ pragma solidity 0.8.22;
4
+
5
+ import "../interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol";
6
+ import {Mock0xSplitsV2Splitter} from "./Mock0xSplitsV2Splitter.sol";
7
+
8
+ import {Create2} from "@openzeppelin-5.0/contracts/utils/Create2.sol";
9
+
10
+ /**
11
+ * @dev Mock contract for testing purposes.
12
+ * This contract implements a mock version of the splitter factory deployed
13
+ * by 0xSplits V2.
14
+ * Behaviors are not exactly the same as the production version of the contract
15
+ * and are implemented for integration and testing purposes.
16
+ */
17
+ contract Mock0xSplitsV2PullFactory is ISplitFactoryV2 {
18
+ /**
19
+ * @notice Create a new split with params and owner.
20
+ * For testing purposes only.
21
+ * @dev This function is not implemented exactly like 0xSplits V2 factory, but is
22
+ * sufficient for testing purposes.
23
+ * @param _splitParams Params to create split with.
24
+ * @param _owner Owner of created split.
25
+ * @param _creator Creator of created split.
26
+ * @param _salt Salt for create2.
27
+ * @return split Address of the created split.
28
+ */
29
+ function createSplitDeterministic(
30
+ Split calldata _splitParams,
31
+ address _owner,
32
+ address _creator,
33
+ bytes32 _salt
34
+ ) external returns (address split) {
35
+ require(_creator != address(0), "Invalid creator");
36
+ // deploy + initialize
37
+ address newSplitter = Create2.deploy({
38
+ amount: 0,
39
+ salt: _getFakeMockHash(_splitParams, _owner, _salt),
40
+ bytecode: type(Mock0xSplitsV2Splitter).creationCode
41
+ });
42
+ Mock0xSplitsV2Splitter(newSplitter).initialize(_splitParams, _owner);
43
+ return newSplitter;
44
+ }
45
+
46
+ /**
47
+ * @notice Predict the address of a new split and check if it is deployed.
48
+ * For testing purposes only, namely, this function is not equivalent to the
49
+ * implementation shipped for 0xSplits V2, and is only for testing purposes.
50
+ * @param _splitParams Params to create split with.
51
+ * @param _owner Owner of created split.
52
+ * @param _salt Salt for create2.
53
+ */
54
+ function isDeployed(
55
+ Split calldata _splitParams,
56
+ address _owner,
57
+ bytes32 _salt
58
+ ) external view returns (address split, bool exists) {
59
+ address predictedSplitter = Create2.computeAddress({
60
+ salt: _getFakeMockHash(_splitParams, _owner, _salt),
61
+ bytecodeHash: keccak256(type(Mock0xSplitsV2Splitter).creationCode)
62
+ });
63
+ return (predictedSplitter, predictedSplitter.code.length > 0);
64
+ }
65
+
66
+ // this gets a fack hash with all split and owner params for testing purposes,
67
+ // and does not match 0xSplits implementation
68
+ function _getFakeMockHash(
69
+ Split memory splitParams,
70
+ address owner,
71
+ bytes32 salt
72
+ ) private pure returns (bytes32) {
73
+ return keccak256(abi.encode(splitParams, owner, salt));
74
+ }
75
+ }
@@ -0,0 +1,47 @@
1
+ // SPDX-License-Identifier: MIT
2
+
3
+ pragma solidity 0.8.22;
4
+
5
+ import "../interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol";
6
+
7
+ /**
8
+ * @dev Mock contract for testing purposes.
9
+ * This contract implements a mock version of a splitter deployed
10
+ * by 0xSplits V2.
11
+ * Behaviors are not the same as the production version of the contract
12
+ * and are implemented for integration and testing purposes.
13
+ * Notably, this contract is not actually a splitter, but more of an introspection
14
+ * contract for testing purposes.
15
+ */
16
+ contract Mock0xSplitsV2Splitter {
17
+ ISplitFactoryV2.Split private _splitParams;
18
+ address private _owner;
19
+ bool private _isInitialized;
20
+
21
+ function initialize(
22
+ ISplitFactoryV2.Split memory splitParams,
23
+ address owner
24
+ ) external {
25
+ _splitParams = splitParams;
26
+ _owner = owner;
27
+ _isInitialized = true;
28
+ }
29
+
30
+ function getSplitParams()
31
+ external
32
+ view
33
+ returns (ISplitFactoryV2.Split memory)
34
+ {
35
+ _onlyInitialized();
36
+ return _splitParams;
37
+ }
38
+
39
+ function getOwner() external view returns (address) {
40
+ _onlyInitialized();
41
+ return _owner;
42
+ }
43
+
44
+ function _onlyInitialized() private view {
45
+ require(_isInitialized, "Splitter not initialized");
46
+ }
47
+ }
@@ -54,6 +54,27 @@ contract MockAdminACLV0Events is IAdminACLV0, ERC165 {
54
54
  Ownable(_contract).transferOwnership(_newAdminACL);
55
55
  }
56
56
 
57
+ /**
58
+ * @notice Allows superAdmin change the superAdmin address.
59
+ * @param _newSuperAdmin The new superAdmin address.
60
+ * @param _genArt721CoreAddressesToUpdate Array of genArt721Core
61
+ * addresses to update to the new superAdmin, for indexing purposes only.
62
+ * @dev this function is gated to only superAdmin address.
63
+ */
64
+ function changeSuperAdmin(
65
+ address _newSuperAdmin,
66
+ address[] calldata _genArt721CoreAddressesToUpdate
67
+ ) external {
68
+ require(msg.sender == superAdmin, "Only superAdmin");
69
+ address previousSuperAdmin = superAdmin;
70
+ superAdmin = _newSuperAdmin;
71
+ emit SuperAdminTransferred(
72
+ previousSuperAdmin,
73
+ _newSuperAdmin,
74
+ _genArt721CoreAddressesToUpdate
75
+ );
76
+ }
77
+
57
78
  /**
58
79
  * @dev Allows superAdmin to call renounceOwnership on other contract from
59
80
  * this contract.
@@ -63,6 +63,27 @@ contract MockAdminACLV0Events_PROHIBITION is IAdminACLV0_PROHIBITION, ERC165 {
63
63
  contractArtistApprovals[hashArtistApprovalKey(_contract, _caller)];
64
64
  }
65
65
 
66
+ /**
67
+ * @notice Allows superAdmin change the superAdmin address.
68
+ * @param _newSuperAdmin The new superAdmin address.
69
+ * @param _genArt721CoreAddressesToUpdate Array of genArt721Core
70
+ * addresses to update to the new superAdmin, for indexing purposes only.
71
+ * @dev this function is gated to only superAdmin address.
72
+ */
73
+ function changeSuperAdmin(
74
+ address _newSuperAdmin,
75
+ address[] calldata _genArt721CoreAddressesToUpdate
76
+ ) external {
77
+ require(msg.sender == superAdmin, "Only superAdmin");
78
+ address previousSuperAdmin = superAdmin;
79
+ superAdmin = _newSuperAdmin;
80
+ emit SuperAdminTransferred(
81
+ previousSuperAdmin,
82
+ _newSuperAdmin,
83
+ _genArt721CoreAddressesToUpdate
84
+ );
85
+ }
86
+
66
87
  /**
67
88
  * @dev Allows superAdmin to set a contract function caller.
68
89
  */
@@ -0,0 +1,47 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ import "../interfaces/v0.8.x/IGenArt721Minter_PBAB.sol";
5
+
6
+ pragma solidity ^0.8.0;
7
+
8
+ contract ReentrancyGenArt721MinterMock {
9
+ uint256 public currentQtyToPurchase;
10
+ uint256 public currentProjectId;
11
+ uint256 public currentPriceToPay;
12
+ address public currencyAddress;
13
+
14
+ /**
15
+ @notice This function can be called to induce controlled reentrency attacks
16
+ on AB minter filter suite.
17
+ Note that _priceToPay should be > project price per token to induce refund,
18
+ making reentrency possible via fallback function.
19
+ */
20
+ function attack(
21
+ uint256 _qtyToPurchase,
22
+ address _minterContractAddress,
23
+ uint256 _projectId,
24
+ uint256 _priceToPay,
25
+ address _currencyAddress
26
+ ) external payable {
27
+ currentQtyToPurchase = _qtyToPurchase;
28
+ currentProjectId = _projectId;
29
+ currentPriceToPay = _priceToPay;
30
+ currencyAddress = _currencyAddress;
31
+ IGenArt721Minter_PBAB(_minterContractAddress).purchase{
32
+ value: _priceToPay
33
+ }(_projectId, _priceToPay, _currencyAddress);
34
+ }
35
+
36
+ // receiver is called when minter sends refunded Ether to this contract.
37
+ receive() external payable {
38
+ // decrement num to be purchased
39
+ currentQtyToPurchase--;
40
+ if (currentQtyToPurchase > 0) {
41
+ // purchase again!
42
+ IGenArt721Minter_PBAB(msg.sender).purchase{
43
+ value: currentPriceToPay
44
+ }(currentProjectId, currentPriceToPay, currencyAddress);
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,59 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ import "../interfaces/v0.8.x/ISharedMinterHolderV0.sol";
5
+
6
+ pragma solidity ^0.8.0;
7
+
8
+ contract ReentrancyHolderMockShared {
9
+ uint256 public currentQtyToPurchase;
10
+ uint256 public currentProjectId;
11
+ address public currentCoreContract;
12
+ uint256 public currentPriceToPay;
13
+ address public currentOwnedNftAddress;
14
+ uint256 public currentOwnedNftTokenId;
15
+
16
+ /**
17
+ @notice This function can be called to induce controlled reentrency attacks
18
+ on the shared AB minter filter suite.
19
+ Note that _priceToPay should be > project price per token to induce refund,
20
+ making reentrency possible via fallback function.
21
+ */
22
+ function attack(
23
+ uint256 _qtyToPurchase,
24
+ address _minterContractAddress,
25
+ uint256 _projectId,
26
+ address _coreContract,
27
+ uint256 _priceToPay,
28
+ address _ownedNftAddress,
29
+ uint256 _ownedNftTokenId
30
+ ) external payable {
31
+ // update state variables so that receive() knows what to do
32
+ currentQtyToPurchase = _qtyToPurchase;
33
+ currentProjectId = _projectId;
34
+ currentCoreContract = _coreContract;
35
+ currentPriceToPay = _priceToPay;
36
+ currentOwnedNftAddress = _ownedNftAddress;
37
+ currentOwnedNftTokenId = _ownedNftTokenId;
38
+ ISharedMinterHolderV0(_minterContractAddress).purchase{
39
+ value: _priceToPay
40
+ }(_projectId, _coreContract, _ownedNftAddress, _ownedNftTokenId);
41
+ }
42
+
43
+ // receiver is called when minter sends refunded Ether to this contract.
44
+ receive() external payable {
45
+ // decrement num to be purchased
46
+ currentQtyToPurchase--;
47
+ if (currentQtyToPurchase > 0) {
48
+ // purchase again!
49
+ ISharedMinterHolderV0(msg.sender).purchase{
50
+ value: currentPriceToPay
51
+ }(
52
+ currentProjectId,
53
+ currentCoreContract,
54
+ currentOwnedNftAddress,
55
+ currentOwnedNftTokenId
56
+ );
57
+ }
58
+ }
59
+ }