@artblocks/contracts 1.1.0 → 1.2.1

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 (326) hide show
  1. package/README.md +86 -34
  2. package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
  3. package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
  4. package/artifacts/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol/BytecodeStorageReaderContractV2.json +201 -0
  5. package/artifacts/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol/UniversalBytecodeStorageReader.json +154 -0
  6. package/artifacts/contracts/BytecodeStorageV2Writer.sol/BytecodeStorageV2Writer.json +87 -0
  7. package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +403 -155
  8. package/artifacts/contracts/GenArt721CoreV3_Curated.sol/GenArt721CoreV3_Curated.json +2493 -0
  9. package/artifacts/contracts/OwnedCreate2FactoryV0.sol/OwnedCreate2FactoryV0.json +311 -0
  10. package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +2060 -0
  11. package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +2034 -0
  12. package/artifacts/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol/MinterBase.json +1 -1
  13. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
  14. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
  15. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol/MinterDAExpV4.json +3 -3
  16. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
  17. package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
  18. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +3 -3
  19. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
  20. package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
  21. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol/MinterDALinV4.json +3 -3
  22. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
  23. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
  24. package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
  25. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol/MinterHolderV4.json +3 -3
  26. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
  27. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
  28. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
  29. package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
  30. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol/MinterMerkleV5.json +3 -3
  31. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +54 -49
  32. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/MinterPolyptychV0.json +3 -3
  33. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol/MinterSEAV0.json +3 -3
  34. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
  35. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
  36. package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol/MinterSetPriceV4.json +3 -3
  37. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +65 -2
  38. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +65 -2
  39. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
  40. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
  41. package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +807 -0
  42. package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +65 -2
  43. package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +65 -2
  44. package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +624 -0
  45. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +613 -216
  46. package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +805 -206
  47. package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +51 -8
  48. package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
  49. package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +51 -8
  50. package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +59 -54
  51. package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +2 -2
  52. package/artifacts/contracts/generator/AddressChunks.sol/AddressChunks.json +10 -0
  53. package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/GenArt721GeneratorV0.json +333 -0
  54. package/artifacts/contracts/generator/GenArt721GeneratorV0.sol/ILegacyGenArt721CoreV2_PBAB_Flex.json +47 -0
  55. package/artifacts/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -0
  56. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol/IBytecodeStorageReader.json +7 -7
  57. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +130 -0
  58. package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol/IBytecodeStorageReader_Base.json +30 -0
  59. package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +13 -0
  60. package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +228 -45
  61. package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +283 -0
  62. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +12 -12
  63. package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +12 -12
  64. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +53 -48
  65. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +53 -48
  66. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +198 -90
  67. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +198 -90
  68. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1065 -0
  69. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +778 -0
  70. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -0
  71. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol/IGenArt721CoreProjectScriptV0.json +59 -0
  72. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol/IGenArt721CoreProjectScriptV1.json +64 -0
  73. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol/IGenArt721CoreTokenHashProviderV0.json +30 -0
  74. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol/IGenArt721CoreTokenHashProviderV1.json +30 -0
  75. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol/IGenArt721GeneratorV0.json +63 -0
  76. package/artifacts/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
  77. package/artifacts/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol/IOwnedCreate2FactoryV0.json +74 -0
  78. package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
  79. package/artifacts/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol/ISeaDropShimForContract.json +37 -0
  80. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +18 -0
  81. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol/ISharedMinterMinPriceV0.json +37 -0
  82. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol/ISharedMinterRAMV0.json +62 -0
  83. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol/ISharedMinterRequired.json +37 -0
  84. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +1 -1
  85. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol/ISplitAtomicFactoryV0.json +170 -0
  86. package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol/ISplitAtomicV0.json +126 -0
  87. package/artifacts/contracts/interfaces/v0.8.x/ISplitProviderV0.sol/ISplitProviderV0.json +98 -0
  88. package/artifacts/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol/IUniversalBytecodeStorageReader.json +56 -0
  89. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol/ERC721SeaDropStructsErrorsAndEvents.json +43 -0
  90. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol/INonFungibleSeaDropToken.json +715 -0
  91. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol/ISeaDrop.json +1571 -0
  92. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol/ISeaDropTokenContractMetadata.json +345 -0
  93. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol/SeaDropErrorsAndEvents.json +717 -0
  94. package/artifacts/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol/ISplitFactoryV2.json +123 -0
  95. package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
  96. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
  97. package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
  98. package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
  99. package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +2 -2
  100. package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
  101. package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
  102. package/artifacts/contracts/libs/v0.8.x/BitMap.sol/BitMaps256.json +10 -0
  103. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV0.sol/BytecodeStorage.json +2 -2
  104. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +2 -2
  105. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +2 -2
  106. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +214 -0
  107. package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +10 -0
  108. package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
  109. package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +10 -0
  110. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
  111. package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol/ERC721_PackedHashSeedV1.json +444 -0
  112. package/artifacts/contracts/libs/v0.8.x/JsonStatic.sol/JsonStatic.json +10 -0
  113. package/artifacts/contracts/libs/v0.8.x/PackedBools.sol/PackedBools.json +10 -0
  114. package/artifacts/contracts/libs/v0.8.x/SSTORE2.sol/SSTORE2.json +2 -2
  115. package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +195 -0
  116. package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +2 -2
  117. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +2 -2
  118. package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +2 -2
  119. package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +2 -2
  120. package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +2 -2
  121. package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +2 -2
  122. package/artifacts/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol/MinPriceLib.json +24 -0
  123. package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
  124. package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +398 -0
  125. package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +2 -2
  126. package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +2 -2
  127. package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +2 -2
  128. package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +2 -2
  129. package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +2 -2
  130. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
  131. package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +2 -2
  132. package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +2 -2
  133. package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +2 -2
  134. package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +2 -2
  135. package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +2 -2
  136. package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +2 -2
  137. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol/MinterMinPriceMerkleV0.json +664 -0
  138. package/artifacts/contracts/minter-suite/Minters/MinterMinPriceV0.sol/MinterMinPriceV0.json +387 -0
  139. package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +1374 -0
  140. package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +7 -7
  141. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +2 -2
  142. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +2 -2
  143. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +2 -2
  144. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +2 -2
  145. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +2 -2
  146. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +2 -2
  147. package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +417 -0
  148. package/artifacts/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol/SeaDropXArtBlocksShim.json +1206 -0
  149. package/artifacts/contracts/mock/BytecodeV1LibCallsMock.sol/BytecodeV1LibCallsMock.json +2 -2
  150. package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +154 -0
  151. package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +428 -0
  152. package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
  153. package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
  154. package/artifacts/contracts/mock/ERC20MockAltDecimals.sol/ERC20MockAltDecimals.json +318 -0
  155. package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +24 -0
  156. package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +2 -2
  157. package/artifacts/contracts/mock/Mock0xSplitsV2PullFactory.sol/Mock0xSplitsV2PullFactory.json +149 -0
  158. package/artifacts/contracts/mock/Mock0xSplitsV2Splitter.sol/Mock0xSplitsV2Splitter.json +99 -0
  159. package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +20 -2
  160. package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +20 -2
  161. package/artifacts/contracts/mock/MockFileStore.sol/MockFileStore.json +35 -0
  162. package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
  163. package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
  164. package/artifacts/contracts/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
  165. package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
  166. package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +2 -2
  167. package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
  168. package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +2 -2
  169. package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
  170. package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +2 -2
  171. package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
  172. package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +2 -2
  173. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterDrainETHMock.json +54 -0
  174. package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterSendETHMock.json +54 -0
  175. package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
  176. package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
  177. package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
  178. package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +2 -2
  179. package/artifacts/contracts/split/SplitAtomicFactoryV0.sol/SplitAtomicFactoryV0.json +203 -0
  180. package/artifacts/contracts/split/SplitAtomicV0.sol/SplitAtomicV0.json +168 -0
  181. package/artifacts/contracts/split/split-provider/SplitProviderV0.sol/SplitProviderV0.json +141 -0
  182. package/contracts/AdminACLV0.sol +6 -2
  183. package/contracts/AdminACLV1.sol +2 -2
  184. package/contracts/BytecodeStorageReaders/BytecodeStorageReaderContractV2.sol +103 -0
  185. package/contracts/BytecodeStorageReaders/UniversalBytecodeStorageReader.sol +70 -0
  186. package/contracts/BytecodeStorageV2Writer.sol +69 -0
  187. package/contracts/DependencyRegistryV0.sol +878 -430
  188. package/contracts/GenArt721CoreV3_Curated.sol +133 -0
  189. package/contracts/OwnedCreate2FactoryV0.sol +173 -0
  190. package/contracts/{GenArt721CoreV3.sol → archive/GenArt721CoreV3.sol} +56 -20
  191. package/contracts/{explorations → archive}/GenArt721CoreV3_Explorations.sol +49 -13
  192. package/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol +4 -4
  193. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol +4 -4
  194. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +4 -4
  195. package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +5 -5
  196. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol +8 -8
  197. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol +4 -4
  198. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol +5 -5
  199. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol +5 -5
  200. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol +7 -7
  201. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol +13 -13
  202. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol +4 -4
  203. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +82 -10
  204. package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +82 -10
  205. package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPriceERC20}/MinterSetPriceERC20V4.sol +88 -21
  206. package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +81 -22
  207. package/contracts/engine/V2/GenArt721Minter_PBAB.sol +80 -22
  208. package/contracts/engine/V3/EngineFactoryV0.sol +427 -0
  209. package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +977 -502
  210. package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1137 -663
  211. package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +3 -3
  212. package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +1 -1
  213. package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
  214. package/contracts/generator/AddressChunks.sol +106 -0
  215. package/contracts/generator/GenArt721GeneratorV0.sol +1094 -0
  216. package/contracts/generator/scripty-support/Scripty.sol +5 -0
  217. package/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol +20 -0
  218. package/contracts/interfaces/v0.8.x/IBytecodeStorageReader.sol +34 -36
  219. package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +25 -0
  220. package/contracts/interfaces/v0.8.x/IBytecodeStorageReader_Base.sol +20 -0
  221. package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +5 -0
  222. package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +141 -45
  223. package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +124 -0
  224. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol +1 -3
  225. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol +1 -3
  226. package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpV1.sol +1 -3
  227. package/contracts/interfaces/v0.8.x/IFilteredMinterDALinV1.sol +1 -3
  228. package/contracts/interfaces/v0.8.x/IFilteredMinterHolderV2.sol +1 -3
  229. package/contracts/interfaces/v0.8.x/IFilteredMinterMerkleV2.sol +1 -3
  230. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +126 -11
  231. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +86 -8
  232. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +26 -8
  233. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol +141 -0
  234. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol +78 -0
  235. package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol +47 -0
  236. package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV0.sol +22 -0
  237. package/contracts/interfaces/v0.8.x/IGenArt721CoreProjectScriptV1.sol +23 -0
  238. package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV0.sol +11 -0
  239. package/contracts/interfaces/v0.8.x/IGenArt721CoreTokenHashProviderV1.sol +9 -0
  240. package/contracts/interfaces/v0.8.x/IGenArt721GeneratorV0.sol +14 -0
  241. package/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol +91 -0
  242. package/contracts/interfaces/v0.8.x/IOwnedCreate2FactoryV0.sol +40 -0
  243. package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
  244. package/contracts/interfaces/v0.8.x/ISeaDropShimForContract.sol +19 -0
  245. package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +19 -0
  246. package/contracts/interfaces/v0.8.x/ISharedMinterMinPriceV0.sol +22 -0
  247. package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
  248. package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +26 -0
  249. package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +1 -4
  250. package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +12 -6
  251. package/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol +81 -0
  252. package/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol +72 -0
  253. package/contracts/interfaces/v0.8.x/ISplitProviderV0.sol +49 -0
  254. package/contracts/interfaces/v0.8.x/IUniversalBytecodeStorageReader.sol +28 -0
  255. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ERC721SeaDropStructsErrorsAndEvents.sol +58 -0
  256. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/INonFungibleSeaDropToken.sol +186 -0
  257. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDrop.sol +337 -0
  258. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/ISeaDropTokenContractMetadata.sol +152 -0
  259. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropErrorsAndEvents.sol +320 -0
  260. package/contracts/interfaces/v0.8.x/integration-refs/OpenSea/SeaDropStructs.sol +146 -0
  261. package/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol +62 -0
  262. package/contracts/libs/v0.8.x/ABHelpers.sol +18 -4
  263. package/contracts/libs/v0.8.x/BitMap.sol +112 -0
  264. package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
  265. package/contracts/libs/v0.8.x/Bytes32Strings.sol +20 -0
  266. package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +98 -0
  267. package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
  268. package/contracts/libs/v0.8.x/JsonStatic.sol +373 -0
  269. package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
  270. package/contracts/libs/v0.8.x/V3FlexLib.sol +597 -0
  271. package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +10 -12
  272. package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +4 -9
  273. package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +44 -44
  274. package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +64 -63
  275. package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +14 -10
  276. package/contracts/libs/v0.8.x/minter-libs/MinPriceLib.sol +64 -0
  277. package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
  278. package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +60 -62
  279. package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +4 -8
  280. package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +92 -89
  281. package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +128 -15
  282. package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +5 -4
  283. package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +16 -10
  284. package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +2 -2
  285. package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +19 -15
  286. package/contracts/minter-suite/Minters/MinterDAExpV5.sol +2 -2
  287. package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +2 -2
  288. package/contracts/minter-suite/Minters/MinterDALinV5.sol +2 -2
  289. package/contracts/minter-suite/Minters/MinterMinPriceMerkleV0.sol +765 -0
  290. package/contracts/minter-suite/Minters/MinterMinPriceV0.sol +462 -0
  291. package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
  292. package/contracts/minter-suite/Minters/MinterSEAV1.sol +21 -32
  293. package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +17 -8
  294. package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +2 -2
  295. package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +2 -2
  296. package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +23 -9
  297. package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +2 -2
  298. package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +2 -2
  299. package/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol +446 -0
  300. package/contracts/minter-suite/Minters/one-off/SeaDropXArtBlocksShim.sol +869 -0
  301. package/contracts/mock/BytecodeV2LibCallsMock.sol +128 -0
  302. package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -0
  303. package/contracts/mock/ERC20MockAltDecimals.sol +31 -0
  304. package/contracts/mock/ForceSendMock.sol +22 -0
  305. package/contracts/mock/Mock0xSplitsV2PullFactory.sol +75 -0
  306. package/contracts/mock/Mock0xSplitsV2Splitter.sol +47 -0
  307. package/contracts/mock/MockAdminACLV0.sol +21 -0
  308. package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +21 -0
  309. package/contracts/mock/MockFileStore.sol +22 -0
  310. package/contracts/mock/ReentrancyGenArt721MinterMock.sol +47 -0
  311. package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
  312. package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
  313. package/contracts/randomizer/shared/SharedRandomizerV0.sol +1 -1
  314. package/contracts/split/SplitAtomicFactoryV0.sol +121 -0
  315. package/contracts/split/SplitAtomicV0.sol +265 -0
  316. package/contracts/split/split-provider/SplitProviderV0.sol +201 -0
  317. package/package.json +66 -36
  318. package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +0 -1965
  319. package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +0 -1939
  320. package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +0 -768
  321. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +0 -208
  322. package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +0 -301
  323. package/contracts/archive/readme.md +0 -16
  324. package/contracts/engine/README.md +0 -21
  325. package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
  326. package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
@@ -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
+ }
@@ -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,31 @@
1
+ // SPDX-License-Identifier: MIT
2
+
3
+ pragma solidity ^0.8.0;
4
+
5
+ import "@openzeppelin-4.5/contracts/token/ERC20/ERC20.sol";
6
+
7
+ contract ERC20MockAltDecimals is ERC20 {
8
+ // add a banned address to enable testing of unsuccessful transfers
9
+ address public bannedReceiver;
10
+
11
+ constructor(uint256 initialSupply) ERC20("Mock Token", "MOCK") {
12
+ _mint(msg.sender, initialSupply);
13
+ }
14
+
15
+ function updateBannedAddress(address account) external {
16
+ bannedReceiver = account;
17
+ }
18
+
19
+ function decimals() public view virtual override returns (uint8) {
20
+ return 6;
21
+ }
22
+
23
+ function _afterTokenTransfer(
24
+ address from,
25
+ address to,
26
+ uint256 amount
27
+ ) internal override {
28
+ require(to != bannedReceiver, "ERC20Mock: transfer to banned address");
29
+ super._afterTokenTransfer(from, to, amount);
30
+ }
31
+ }
@@ -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
+ }
@@ -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
  */