@artblocks/contracts 1.1.0 → 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 (257) 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 +273 -155
  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/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +3 -3
  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 +567 -206
  41. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +787 -224
  42. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +38 -8
  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 +38 -8
  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/interfaces/v0.8.x/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -0
  47. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +130 -0
  48. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +58 -45
  49. package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +283 -0
  50. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +12 -12
  51. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +12 -12
  52. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +30 -62
  53. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +30 -62
  54. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +170 -104
  55. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +170 -104
  56. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1028 -0
  57. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +741 -0
  58. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -0
  59. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
  60. package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
  61. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +18 -0
  62. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol/ISharedMinterRAMV0.json +62 -0
  63. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol/ISharedMinterRequired.json +37 -0
  64. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +1 -1
  65. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol/ISplitAtomicFactoryV0.json +170 -0
  66. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol/ISplitAtomicV0.json +126 -0
  67. package/artifacts/contracts/interfaces/v0.8.x/ISplitProviderV0.sol/ISplitProviderV0.json +98 -0
  68. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol/ISplitFactoryV2.json +123 -0
  69. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
  70. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
  71. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
  72. package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
  73. package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +2 -2
  74. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
  75. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  76. package/artifacts/contracts/libs/v0.8.x/BitMap.sol/BitMaps256.json +10 -0
  77. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV0.sol/BytecodeStorage.json +2 -2
  78. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +2 -2
  79. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +2 -2
  80. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +214 -0
  81. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +10 -0
  82. package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
  83. package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +10 -0
  84. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
  85. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol/ERC721_PackedHashSeedV1.json +444 -0
  86. package/artifacts/contracts/libs/v0.8.x/PackedBools.sol/PackedBools.json +10 -0
  87. package/artifacts/contracts/libs/v0.8.x/SSTORE2.sol/SSTORE2.json +2 -2
  88. package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +208 -0
  89. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +2 -2
  90. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +2 -2
  91. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +2 -2
  92. package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +2 -2
  93. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
  94. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +2 -2
  95. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  96. package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +398 -0
  97. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
  98. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +2 -2
  99. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
  100. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
  101. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +2 -2
  102. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  103. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
  104. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
  105. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
  106. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
  107. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
  108. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
  109. package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +1374 -0
  110. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +7 -7
  111. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
  112. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
  113. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
  114. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
  115. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
  116. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
  117. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +417 -0
  118. package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +154 -0
  119. package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +428 -0
  120. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  121. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
  122. package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +24 -0
  123. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
  124. package/artifacts/contracts/mock/Mock0xSplitsV2PullFactory.sol/Mock0xSplitsV2PullFactory.json +149 -0
  125. package/artifacts/contracts/mock/Mock0xSplitsV2Splitter.sol/Mock0xSplitsV2Splitter.json +99 -0
  126. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +20 -2
  127. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +20 -2
  128. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  129. package/artifacts/contracts/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
  130. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
  131. package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +2 -2
  132. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
  133. package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +2 -2
  134. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
  135. package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +2 -2
  136. package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
  137. package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +2 -2
  138. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterDrainETHMock.json +54 -0
  139. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterSendETHMock.json +54 -0
  140. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  141. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  142. package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
  143. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
  144. package/artifacts/contracts/split/SplitAtomicFactoryV0.sol/SplitAtomicFactoryV0.json +203 -0
  145. package/artifacts/contracts/split/SplitAtomicV0.sol/SplitAtomicV0.json +168 -0
  146. package/artifacts/contracts/split/split-provider/SplitProviderV0.sol/SplitProviderV0.json +141 -0
  147. package/contracts/AdminACLV0.sol +6 -2
  148. package/contracts/AdminACLV1.sol +2 -2
  149. package/contracts/DependencyRegistryV0.sol +687 -408
  150. package/contracts/{GenArt721CoreV3.sol → archive/GenArt721CoreV3.sol} +56 -20
  151. package/contracts/{explorations → archive}/GenArt721CoreV3_Explorations.sol +49 -13
  152. package/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol +4 -4
  153. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol +4 -4
  154. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +4 -4
  155. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +5 -5
  156. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol +8 -8
  157. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol +4 -4
  158. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol +5 -5
  159. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol +5 -5
  160. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol +7 -7
  161. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol +13 -13
  162. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol +4 -4
  163. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +82 -10
  164. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +82 -10
  165. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPriceERC20}/MinterSetPriceERC20V4.sol +88 -21
  166. package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +81 -22
  167. package/contracts/engine/V2/GenArt721Minter_PBAB.sol +80 -22
  168. package/contracts/engine/V3/EngineFactoryV0.sol +419 -0
  169. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +894 -488
  170. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1054 -650
  171. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +3 -3
  172. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +1 -1
  173. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
  174. package/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol +20 -0
  175. package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +23 -0
  176. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +47 -45
  177. package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +124 -0
  178. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol +1 -3
  179. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol +1 -3
  180. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpV1.sol +1 -3
  181. package/contracts/interfaces/v0.8.x/IFilteredMinterDALinV1.sol +1 -3
  182. package/contracts/interfaces/v0.8.x/IFilteredMinterHolderV2.sol +1 -3
  183. package/contracts/interfaces/v0.8.x/IFilteredMinterMerkleV2.sol +1 -3
  184. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +115 -11
  185. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +84 -8
  186. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +26 -8
  187. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol +141 -0
  188. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol +78 -0
  189. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol +47 -0
  190. package/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol +91 -0
  191. package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
  192. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +19 -0
  193. package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
  194. package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +20 -0
  195. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +1 -4
  196. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +12 -6
  197. package/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol +81 -0
  198. package/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol +72 -0
  199. package/contracts/interfaces/v0.8.x/ISplitProviderV0.sol +49 -0
  200. package/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol +62 -0
  201. package/contracts/libs/v0.8.x/ABHelpers.sol +18 -4
  202. package/contracts/libs/v0.8.x/BitMap.sol +112 -0
  203. package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
  204. package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +90 -0
  205. package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
  206. package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
  207. package/contracts/libs/v0.8.x/V3FlexLib.sol +591 -0
  208. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +10 -12
  209. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +4 -9
  210. package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +44 -44
  211. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +64 -63
  212. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +14 -10
  213. package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
  214. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +60 -62
  215. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +4 -8
  216. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +92 -89
  217. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +21 -15
  218. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +5 -4
  219. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +16 -10
  220. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +2 -2
  221. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +19 -15
  222. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +2 -2
  223. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +2 -2
  224. package/contracts/minter-suite/Minters/MinterDALinV5.sol +2 -2
  225. package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
  226. package/contracts/minter-suite/Minters/MinterSEAV1.sol +21 -32
  227. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +17 -8
  228. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +2 -2
  229. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +2 -2
  230. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +23 -9
  231. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +2 -2
  232. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +2 -2
  233. package/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol +446 -0
  234. package/contracts/mock/BytecodeV2LibCallsMock.sol +128 -0
  235. package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -0
  236. package/contracts/mock/ForceSendMock.sol +22 -0
  237. package/contracts/mock/Mock0xSplitsV2PullFactory.sol +75 -0
  238. package/contracts/mock/Mock0xSplitsV2Splitter.sol +47 -0
  239. package/contracts/mock/MockAdminACLV0.sol +21 -0
  240. package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +21 -0
  241. package/contracts/mock/ReentrancyGenArt721MinterMock.sol +47 -0
  242. package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
  243. package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
  244. package/contracts/randomizer/shared/SharedRandomizerV0.sol +1 -1
  245. package/contracts/split/SplitAtomicFactoryV0.sol +121 -0
  246. package/contracts/split/SplitAtomicV0.sol +265 -0
  247. package/contracts/split/split-provider/SplitProviderV0.sol +201 -0
  248. package/package.json +62 -34
  249. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +0 -1965
  250. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +0 -1939
  251. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +0 -768
  252. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +0 -208
  253. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +0 -301
  254. package/contracts/archive/readme.md +0 -16
  255. package/contracts/engine/README.md +0 -21
  256. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
  257. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
@@ -0,0 +1,446 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ // @dev fixed to specific solidity version for clarity and for more clear
5
+ // source code verification purposes.
6
+ pragma solidity 0.8.19;
7
+
8
+ import {ISharedMinterSimplePurchaseV0} from "../../../interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol";
9
+ import {ISharedMinterV0} from "../../../interfaces/v0.8.x/ISharedMinterV0.sol";
10
+ import {IMinterFilterV1} from "../../../interfaces/v0.8.x/IMinterFilterV1.sol";
11
+
12
+ import {AuthLib} from "../../../libs/v0.8.x/AuthLib.sol";
13
+ import {SplitFundsLib} from "../../../libs/v0.8.x/minter-libs/SplitFundsLib.sol";
14
+ import {MaxInvocationsLib} from "../../../libs/v0.8.x/minter-libs/MaxInvocationsLib.sol";
15
+ import {SetPriceLib} from "../../../libs/v0.8.x/minter-libs/SetPriceLib.sol";
16
+
17
+ import {ReentrancyGuard} from "@openzeppelin-4.5/contracts/security/ReentrancyGuard.sol";
18
+
19
+ /**
20
+ * @title Filtered Minter contract that allows tokens to be minted with
21
+ * ETH. Compatible with shared minter suite, but only allows minting with
22
+ * a single core contract. An updated purchaseTo function is provided to
23
+ * allow minting without a core contract argument.
24
+ * This is designed to be used with a GenArt721CoreContractV3 flagship or
25
+ * engine contract.
26
+ * This is a one-off contract that has not been audited, but is only a minor
27
+ * modification of the MinterSetPriceV5 contract.
28
+ * @author Art Blocks Inc.
29
+ * @notice Privileged Roles and Ownership:
30
+ * This contract is designed to be managed, with limited powers.
31
+ * Privileged roles and abilities are controlled by the project's artist, which
32
+ * can be modified by the core contract's Admin ACL contract. Both of these
33
+ * roles hold extensive power and can modify minter details.
34
+ * Care must be taken to ensure that the admin ACL contract and artist
35
+ * addresses are secure behind a multi-sig or other access control mechanism.
36
+ * ----------------------------------------------------------------------------
37
+ * The following functions are restricted to a project's artist:
38
+ * - updatePricePerTokenInWei
39
+ * - syncProjectMaxInvocationsToCore
40
+ * - manuallyLimitProjectMaxInvocations
41
+ * ----------------------------------------------------------------------------
42
+ * Additional admin and artist privileged roles may be described on other
43
+ * contracts that this minter integrates with.
44
+ * ----------------------------------------------------------------------------
45
+ * @notice Caution: While Engine projects must be registered on the Art Blocks
46
+ * Core Registry to assign this minter, this minter does not enforce that a
47
+ * project is registered when configured or queried. This is primarily for gas
48
+ * optimization purposes. It is, therefore, possible that fake projects may be
49
+ * configured on this minter, but they will not be able to mint tokens due to
50
+ * checks performed by this minter's Minter Filter.
51
+ */
52
+ contract MinterSetPriceV5_SingleCore is
53
+ ReentrancyGuard,
54
+ ISharedMinterSimplePurchaseV0,
55
+ ISharedMinterV0
56
+ {
57
+ /// Core contract address for this minter.
58
+ address public immutable coreContractAddress;
59
+
60
+ /// Minter filter address this minter interacts with
61
+ address public immutable minterFilterAddress;
62
+
63
+ /// Minter filter this minter may interact with.
64
+ IMinterFilterV1 private immutable _minterFilter;
65
+
66
+ /// minterType for this minter
67
+ string public constant minterType = "MinterSetPriceV5_SingleCore";
68
+
69
+ /// minter version for this minter
70
+ string public constant minterVersion = "v5.1.0";
71
+
72
+ // MODIFIERS
73
+ // @dev contract uses modifier-like internal functions instead of modifiers
74
+ // to reduce contract bytecode size
75
+ // @dev contract uses AuthLib for some modifier-like functions
76
+
77
+ /**
78
+ * @notice Initializes contract to be a Filtered Minter for
79
+ * `minterFilter` minter filter.
80
+ * @param minterFilter Minter filter for which this will be a
81
+ * filtered minter.
82
+ * @param coreContract The only core contract address this minter will
83
+ * interact with.
84
+ */
85
+ constructor(address minterFilter, address coreContract) ReentrancyGuard() {
86
+ minterFilterAddress = minterFilter;
87
+ _minterFilter = IMinterFilterV1(minterFilter);
88
+ coreContractAddress = coreContract;
89
+ }
90
+
91
+ /**
92
+ * @notice Manually sets the local maximum invocations of project `projectId`
93
+ * with the provided `maxInvocations`, checking that `maxInvocations` is less
94
+ * than or equal to the value of project `project_id`'s maximum invocations that is
95
+ * set on the core contract.
96
+ * @dev Note that a `maxInvocations` of 0 can only be set if the current `invocations`
97
+ * value is also 0 and this would also set `maxHasBeenInvoked` to true, correctly short-circuiting
98
+ * this minter's purchase function, avoiding extra gas costs from the core contract's maxInvocations check.
99
+ * @param projectId Project ID to set the maximum invocations for.
100
+ * @param coreContract Core contract address for the given project.
101
+ * @param maxInvocations Maximum invocations to set for the project.
102
+ */
103
+ function manuallyLimitProjectMaxInvocations(
104
+ uint256 projectId,
105
+ address coreContract,
106
+ uint24 maxInvocations
107
+ ) external {
108
+ AuthLib.onlyArtist({
109
+ projectId: projectId,
110
+ coreContract: coreContract,
111
+ sender: msg.sender
112
+ });
113
+ MaxInvocationsLib.manuallyLimitProjectMaxInvocations({
114
+ projectId: projectId,
115
+ coreContract: coreContract,
116
+ maxInvocations: maxInvocations
117
+ });
118
+ }
119
+
120
+ /**
121
+ * @notice Updates this minter's price per token of project `projectId`
122
+ * to be '_pricePerTokenInWei`, in Wei.
123
+ * @dev Note that it is intentionally supported here that the configured
124
+ * price may be explicitly set to `0`.
125
+ * @param projectId Project ID to set the price per token for.
126
+ * @param coreContract Core contract address for the given project.
127
+ * @param pricePerTokenInWei Price per token to set for the project, in Wei.
128
+ */
129
+ function updatePricePerTokenInWei(
130
+ uint256 projectId,
131
+ address coreContract,
132
+ uint248 pricePerTokenInWei
133
+ ) external {
134
+ AuthLib.onlyArtist({
135
+ projectId: projectId,
136
+ coreContract: coreContract,
137
+ sender: msg.sender
138
+ });
139
+ SetPriceLib.updatePricePerToken({
140
+ projectId: projectId,
141
+ coreContract: coreContract,
142
+ pricePerToken: pricePerTokenInWei
143
+ });
144
+
145
+ // for convenience, sync local max invocations to the core contract if
146
+ // and only if max invocations have not already been synced.
147
+ // @dev do not sync if max invocations have already been synced, as
148
+ // local max invocations could have been manually set to be
149
+ // intentionally less than the core contract's max invocations.
150
+ // @dev if local maxInvocations and maxHasBeenInvoked are both
151
+ // initial values, we know they have not been populated on this minter
152
+ if (
153
+ MaxInvocationsLib.maxInvocationsIsUnconfigured({
154
+ projectId: projectId,
155
+ coreContract: coreContract
156
+ })
157
+ ) {
158
+ MaxInvocationsLib.syncProjectMaxInvocationsToCore({
159
+ projectId: projectId,
160
+ coreContract: coreContract
161
+ });
162
+ }
163
+ }
164
+
165
+ /**
166
+ * @notice Purchase not supported - reverts.
167
+ */
168
+ function purchase(
169
+ uint256 /*projectId*/,
170
+ address /*coreContract*/
171
+ ) external payable returns (uint256 /*tokenId*/) {
172
+ revert("Purchase not supported");
173
+ }
174
+
175
+ /**
176
+ * @notice Purchases a token from project `projectId`.
177
+ * IMPORTANT: This forked V5 minter does not support the `coreContract`,
178
+ * and will attempt to mint only on the public immutable core contract
179
+ * address configured on this minter at `coreContractAddress`.
180
+ * @param projectId Project ID to mint a token on.
181
+ * @return tokenId Token ID of minted token
182
+ */
183
+ function purchase(
184
+ uint256 projectId
185
+ ) external payable returns (uint256 tokenId) {
186
+ // call the purchaseTo variant without a core contract argument
187
+ tokenId = purchaseTo({to: msg.sender, projectId: projectId});
188
+ return tokenId;
189
+ }
190
+
191
+ // public getter functions
192
+ /**
193
+ * @notice Gets the maximum invocations project configuration.
194
+ * @param projectId The ID of the project whose data needs to be fetched.
195
+ * @param coreContract The address of the core contract.
196
+ * @return MaxInvocationsLib.MaxInvocationsProjectConfig instance with the
197
+ * configuration data.
198
+ */
199
+ function maxInvocationsProjectConfig(
200
+ uint256 projectId,
201
+ address coreContract
202
+ )
203
+ external
204
+ view
205
+ returns (MaxInvocationsLib.MaxInvocationsProjectConfig memory)
206
+ {
207
+ return
208
+ MaxInvocationsLib.getMaxInvocationsProjectConfig({
209
+ projectId: projectId,
210
+ coreContract: coreContract
211
+ });
212
+ }
213
+
214
+ /**
215
+ * @notice Gets the set price project configuration.
216
+ * @param projectId The ID of the project whose data needs to be fetched.
217
+ * @param coreContract The address of the core contract.
218
+ * @return SetPriceProjectConfig struct with the fixed price project
219
+ * configuration data.
220
+ */
221
+ function setPriceProjectConfig(
222
+ uint256 projectId,
223
+ address coreContract
224
+ ) external view returns (SetPriceLib.SetPriceProjectConfig memory) {
225
+ return
226
+ SetPriceLib.getSetPriceProjectConfig({
227
+ projectId: projectId,
228
+ coreContract: coreContract
229
+ });
230
+ }
231
+
232
+ /**
233
+ * @notice Checks if the specified `coreContract` is a valid engine contract.
234
+ * @dev This function retrieves the cached value of `isEngine` from
235
+ * the `isEngineCache` mapping. If the cached value is already set, it
236
+ * returns the cached value. Otherwise, it calls the `getV3CoreIsEngineView`
237
+ * function from the `SplitFundsLib` library to check if `coreContract`
238
+ * is a valid engine contract.
239
+ * @dev This function will revert if the provided `coreContract` is not
240
+ * a valid Engine or V3 Flagship contract.
241
+ * @param coreContract The address of the contract to check.
242
+ * @return bool indicating if `coreContract` is a valid engine contract.
243
+ */
244
+ function isEngineView(address coreContract) external view returns (bool) {
245
+ SplitFundsLib.IsEngineCache storage isEngineCache = SplitFundsLib
246
+ .getIsEngineCacheConfig(coreContract);
247
+ if (isEngineCache.isCached) {
248
+ return isEngineCache.isEngine;
249
+ } else {
250
+ // @dev this calls the non-state-modifying variant of isEngine
251
+ return SplitFundsLib.getV3CoreIsEngineView(coreContract);
252
+ }
253
+ }
254
+
255
+ /**
256
+ * @notice projectId => has project reached its maximum number of
257
+ * invocations? Note that this returns a local cache of the core contract's
258
+ * state, and may be out of sync with the core contract. This is
259
+ * intentional, as it only enables gas optimization of mints after a
260
+ * project's maximum invocations has been reached. A false negative will
261
+ * only result in a gas cost increase, since the core contract will still
262
+ * enforce a maxInvocation check during minting. A false positive is not
263
+ * possible because the V3 core contract only allows maximum invocations
264
+ * to be reduced, not increased. Based on this rationale, we intentionally
265
+ * do not do input validation in this method as to whether or not the input
266
+ * @param projectId is an existing project ID.
267
+ * @param coreContract is an existing core contract address.
268
+ */
269
+ function projectMaxHasBeenInvoked(
270
+ uint256 projectId,
271
+ address coreContract
272
+ ) external view returns (bool) {
273
+ return
274
+ MaxInvocationsLib.getMaxHasBeenInvoked({
275
+ projectId: projectId,
276
+ coreContract: coreContract
277
+ });
278
+ }
279
+
280
+ /**
281
+ * @notice projectId => project's maximum number of invocations.
282
+ * Optionally synced with core contract value, for gas optimization.
283
+ * Note that this returns a local cache of the core contract's
284
+ * state, and may be out of sync with the core contract. This is
285
+ * intentional, as it only enables gas optimization of mints after a
286
+ * project's maximum invocations has been reached.
287
+ * @dev A number greater than the core contract's project max invocations
288
+ * will only result in a gas cost increase, since the core contract will
289
+ * still enforce a maxInvocation check during minting. A number less than
290
+ * the core contract's project max invocations is only possible when the
291
+ * project's max invocations have not been synced on this minter, since the
292
+ * V3 core contract only allows maximum invocations to be reduced, not
293
+ * increased. When this happens, the minter will enable minting, allowing
294
+ * the core contract to enforce the max invocations check. Based on this
295
+ * rationale, we intentionally do not do input validation in this method as
296
+ * to whether or not the input `projectId` is an existing project ID.
297
+ * @param projectId is an existing project ID.
298
+ * @param coreContract is an existing core contract address.
299
+ */
300
+ function projectMaxInvocations(
301
+ uint256 projectId,
302
+ address coreContract
303
+ ) external view returns (uint256) {
304
+ return
305
+ MaxInvocationsLib.getMaxInvocations({
306
+ projectId: projectId,
307
+ coreContract: coreContract
308
+ });
309
+ }
310
+
311
+ /**
312
+ * @notice Gets if price of token is configured, price of minting a
313
+ * token on project `projectId`, and currency symbol and address to be
314
+ * used as payment.
315
+ * @param projectId Project ID to get price information for
316
+ * @param coreContract Contract address of the core contract
317
+ * @return isConfigured true only if token price has been configured on
318
+ * this minter
319
+ * @return tokenPriceInWei current price of token on this minter - invalid
320
+ * if price has not yet been configured
321
+ * @return currencySymbol currency symbol for purchases of project on this
322
+ * minter. This minter always returns "ETH"
323
+ * @return currencyAddress currency address for purchases of project on
324
+ * this minter. This minter always returns null address, reserved for ether
325
+ */
326
+ function getPriceInfo(
327
+ uint256 projectId,
328
+ address coreContract
329
+ )
330
+ external
331
+ view
332
+ returns (
333
+ bool isConfigured,
334
+ uint256 tokenPriceInWei,
335
+ string memory currencySymbol,
336
+ address currencyAddress
337
+ )
338
+ {
339
+ SetPriceLib.SetPriceProjectConfig
340
+ storage setPriceProjectConfig_ = SetPriceLib
341
+ .getSetPriceProjectConfig({
342
+ projectId: projectId,
343
+ coreContract: coreContract
344
+ });
345
+ isConfigured = setPriceProjectConfig_.priceIsConfigured;
346
+ tokenPriceInWei = setPriceProjectConfig_.pricePerToken;
347
+ currencySymbol = "ETH";
348
+ currencyAddress = address(0);
349
+ }
350
+
351
+ /**
352
+ * @notice Syncs local maximum invocations of project `projectId` based on
353
+ * the value currently defined in the core contract.
354
+ * @param projectId Project ID to set the maximum invocations for.
355
+ * @param coreContract Core contract address for the given project.
356
+ * @dev this enables gas reduction after maxInvocations have been reached -
357
+ * core contracts shall still enforce a maxInvocation check during mint.
358
+ */
359
+ function syncProjectMaxInvocationsToCore(
360
+ uint256 projectId,
361
+ address coreContract
362
+ ) public {
363
+ AuthLib.onlyArtist({
364
+ projectId: projectId,
365
+ coreContract: coreContract,
366
+ sender: msg.sender
367
+ });
368
+
369
+ MaxInvocationsLib.syncProjectMaxInvocationsToCore({
370
+ projectId: projectId,
371
+ coreContract: coreContract
372
+ });
373
+ }
374
+
375
+ /**
376
+ * @notice purchaseTo with core contract arg not supported - reverts.
377
+ */
378
+ function purchaseTo(
379
+ address /*to*/,
380
+ uint256 /*projectId*/,
381
+ address /*coreContract*/
382
+ ) public payable nonReentrant returns (uint256 /*tokenId*/) {
383
+ revert("purchaseTo with core contract arg not supported");
384
+ }
385
+
386
+ /**
387
+ * @notice Purchases a token from project `projectId` and sets
388
+ * the token's owner to `to`.
389
+ * IMPORTANT: This forked V5 minter does not support the `coreContract`,
390
+ * and will attempt to mint only on the public immutable core contract
391
+ * address configured on this minter at `coreContractAddress`.
392
+ * @param to Address to be the new token's owner.
393
+ * @param projectId Project ID to mint a token on.
394
+ * @return tokenId Token ID of minted token
395
+ */
396
+ function purchaseTo(
397
+ address to,
398
+ uint256 projectId
399
+ ) public payable nonReentrant returns (uint256 tokenId) {
400
+ // load core contract address into memory
401
+ address coreContract = coreContractAddress;
402
+ // CHECKS
403
+ // pre-mint MaxInvocationsLib checks
404
+ // Note that `maxHasBeenInvoked` is only checked here to reduce gas
405
+ // consumption after a project has been fully minted.
406
+ // `maxInvocationsProjectConfig.maxHasBeenInvoked` is locally cached to reduce
407
+ // gas consumption, but if not in sync with the core contract's value,
408
+ // the core contract also enforces its own max invocation check during
409
+ // minting.
410
+ MaxInvocationsLib.preMintChecks({
411
+ projectId: projectId,
412
+ coreContract: coreContract
413
+ });
414
+
415
+ // pre-mint checks for set price lib, and get price per token in wei
416
+ // @dev price per token is loaded into memory here for gas efficiency
417
+ uint256 pricePerTokenInWei = SetPriceLib.preMintChecksAndGetPrice({
418
+ projectId: projectId,
419
+ coreContract: coreContract
420
+ });
421
+
422
+ require(msg.value >= pricePerTokenInWei, "Min value to mint req.");
423
+
424
+ // EFFECTS
425
+ tokenId = _minterFilter.mint_joo({
426
+ to: to,
427
+ projectId: projectId,
428
+ coreContract: coreContract,
429
+ sender: msg.sender
430
+ });
431
+
432
+ MaxInvocationsLib.validateMintEffectsInvocations({
433
+ tokenId: tokenId,
434
+ coreContract: coreContract
435
+ });
436
+
437
+ // INTERACTIONS
438
+ SplitFundsLib.splitFundsETHRefundSender({
439
+ projectId: projectId,
440
+ pricePerTokenInWei: pricePerTokenInWei,
441
+ coreContract: coreContract
442
+ });
443
+
444
+ return tokenId;
445
+ }
446
+ }
@@ -0,0 +1,128 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ pragma solidity 0.8.19;
3
+
4
+ // Created By: Art Blocks Inc.
5
+
6
+ import {IBytecodeStorageReaderV2} from "../interfaces/v0.8.x/IBytecodeStorageReaderV2.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 BytecodeStorageV2 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 BytecodeStorageV2
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 BytecodeStorageV3 variant
17
+ * of the library that makes use of CALL rather than DELEGATECALL for the
18
+ * purposes of backwards-compatible reads.
19
+ */
20
+ contract BytecodeV2LibCallsMock {
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
+ IBytecodeStorageReaderV2 private bytecodeStorageReaderDeployment;
25
+
26
+ /**
27
+ * @notice Initializes contract.
28
+ */
29
+ constructor(address _bytecodeStorageReaderDeploymentAddress) {
30
+ bytecodeStorageReaderDeploymentAddress = _bytecodeStorageReaderDeploymentAddress;
31
+ bytecodeStorageReaderDeployment = IBytecodeStorageReaderV2(
32
+ _bytecodeStorageReaderDeploymentAddress
33
+ );
34
+ }
35
+
36
+ /*//////////////////////////////////////////////////////////////
37
+ Proxy Read Operations of V2 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, V1, or V2 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, V1 or V2 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, V1 or V2 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, V1 or V2 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
+
115
+ /**
116
+ * @notice Get if using compressed storage for given contract bytecode
117
+ * @param _address address of deployed contract with bytecode stored in the V0, V1, or V2 format
118
+ * @return isCompressed boolean indicating if the stored data are compressed
119
+ */
120
+ function getIsCompressedForBytecode(
121
+ address _address
122
+ ) public view returns (bool) {
123
+ return
124
+ bytecodeStorageReaderDeployment.getIsCompressedForBytecode(
125
+ _address
126
+ );
127
+ }
128
+ }