@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
@@ -151,11 +151,16 @@ library SEALib {
151
151
  // for this library
152
152
  bytes32 constant SEA_LIB_STORAGE_POSITION = keccak256("sealib.storage");
153
153
 
154
- uint256 constant ONE_MILLION = 1_000_000;
155
-
156
154
  // project-specific parameters
157
155
  struct SEAProjectConfig {
156
+ // bool to indicate if next token number has been populated, or is
157
+ // still default value of 0
158
+ // @dev required to handle edge case where next token number is 0
159
+ bool nextTokenNumberIsPopulated;
160
+ // timestamp at/after which new auctions may be created
158
161
  uint64 timestampStart;
162
+ //
163
+ // ---- Auction Factory Settings Start ----
159
164
  // duration of each new auction, before any extensions due to late bids
160
165
  // @dev for configured auctions, this will be gt 0, so it may be used
161
166
  // to determine if an auction is configured
@@ -173,12 +178,10 @@ library SEALib {
173
178
  // be derived from this value in combination with project ID
174
179
  // max uint24 ~= 1.6e7, > max possible project invocations of 1e6
175
180
  uint24 nextTokenNumber;
176
- // bool to indicate if next token number has been populated, or is
177
- // still default value of 0
178
- // @dev required to handle edge case where next token number is 0
179
- bool nextTokenNumberIsPopulated;
180
181
  // reserve price, i.e. minimum starting bid price, in wei
181
182
  uint256 basePrice;
183
+ // ---- Auction Factory Settings End ----
184
+ //
182
185
  // active auction for project
183
186
  Auction activeAuction;
184
187
  }
@@ -264,6 +267,13 @@ library SEALib {
264
267
  projectId: projectId,
265
268
  coreContract: coreContract
266
269
  });
270
+ // base price of zero breaks auction system as percent min increase
271
+ // makes no sense
272
+ require(basePrice != 0, "Only non-zero");
273
+ // midBidIncrementPercentage of zero would allow a bidder to "outbid"
274
+ // previous users without posting more, so don't allow it
275
+ require(minBidIncrementPercentage != 0, "Only non-zero");
276
+
267
277
  require(
268
278
  timestampStart == 0 || block.timestamp < timestampStart,
269
279
  "Only future start times or 0"
@@ -279,7 +289,7 @@ library SEALib {
279
289
  projectId: projectId,
280
290
  coreContract: coreContract,
281
291
  timestampStart: uint64(timestampStart), // @dev safe-casting already previously checked
282
- auctionDurationSeconds: auctionDurationSeconds.toUint32(),
292
+ auctionDurationSeconds: uint32(auctionDurationSeconds), // @dev safe-casting already previously checked
283
293
  basePrice: basePrice,
284
294
  minBidIncrementPercentage: minBidIncrementPercentage
285
295
  });
@@ -378,7 +388,7 @@ library SEALib {
378
388
  * - there is an auction for a different token ID on the project
379
389
  * (likely due to a front-run)
380
390
  * This function reverts if the auction for `tokenId` exists, but has not
381
- * yet ended.
391
+ * yet ended. Function also reverts if there is no initialized auction.
382
392
  * @param tokenId Token ID to settle auction for.
383
393
  * @param coreContract Core contract address for the given token.
384
394
  */
@@ -393,8 +403,6 @@ library SEALib {
393
403
  address currentBidder = auction.currentBidder;
394
404
  uint256 currentBid = auction.currentBid;
395
405
  // CHECKS
396
- // @dev this check is not strictly necessary, but is included for
397
- // clear error messaging
398
406
  require(auctionIsInitialized(auction), "Auction not initialized");
399
407
  if (auction.settled || (auction.tokenId != tokenId)) {
400
408
  // auction already settled or is for a different token ID, so
@@ -572,10 +580,10 @@ library SEALib {
572
580
  // invocations has not been reached
573
581
  // we require up-to-date invocation data to properly handle last token
574
582
  // and avoid revert if relying on core to limit invocations, therefore
575
- // use MaxInvocationsLib.invocationsRemain, which calls core contract
583
+ // use MaxInvocationsLib.invocationsRemainOnCore, which calls core contract
576
584
  // to get latest invocation data
577
585
  if (
578
- !MaxInvocationsLib.invocationsRemain({
586
+ !MaxInvocationsLib.invocationsRemainOnCore({
579
587
  projectId: projectId,
580
588
  coreContract: coreContract
581
589
  })
@@ -605,7 +613,7 @@ library SEALib {
605
613
  );
606
614
  }
607
615
  // update local maxHasBeenInvoked value if necessary
608
- MaxInvocationsLib.validatePurchaseEffectsInvocations({
616
+ MaxInvocationsLib.validateMintEffectsInvocations({
609
617
  tokenId: nextTokenId,
610
618
  coreContract: coreContract
611
619
  });
@@ -650,12 +658,12 @@ library SEALib {
650
658
  }
651
659
 
652
660
  /**
653
- * @notice Function returns bool representing if an auction is accepting bids above base
654
- * price. It is accepting bids if it is initialized and has not reached its
655
- * end time.
661
+ * @notice Function returns bool representing if an auction is live and
662
+ * accepting bids above base price. It is live if it is initialized and
663
+ * has not reached its end time.
656
664
  * @param auction The auction to check.
657
665
  */
658
- function auctionIsAcceptingIncreasingBids(
666
+ function isAuctionLive(
659
667
  Auction storage auction
660
668
  ) internal view returns (bool isAcceptingBids) {
661
669
  // auction is accepting bids if it is initialized and has not reached
@@ -713,9 +721,7 @@ library SEALib {
713
721
  Auction storage auction = SEAProjectConfig_.activeAuction;
714
722
  // if project has an active token auction that is not settled, return
715
723
  // that token ID
716
- if (
717
- auctionIsInitialized(auction) && (auction.endTime > block.timestamp)
718
- ) {
724
+ if (isAuctionLive(auction)) {
719
725
  return auction.tokenId;
720
726
  }
721
727
  // otherwise, return the next expected token ID to be auctioned.
@@ -742,10 +748,10 @@ library SEALib {
742
748
  "Next token not populated"
743
749
  );
744
750
 
745
- // @dev overflow automatically checked in Solidity ^0.8.0
746
- nextTokenId =
747
- (projectId * ONE_MILLION) +
748
- SEAProjectConfig_.nextTokenNumber;
751
+ nextTokenId = ABHelpers.tokenIdFromProjectIdAndTokenNumber({
752
+ projectId: projectId,
753
+ tokenNumber: SEAProjectConfig_.nextTokenNumber
754
+ });
749
755
  }
750
756
 
751
757
  /**
@@ -776,21 +782,15 @@ library SEALib {
776
782
  coreContract: coreContract
777
783
  });
778
784
  Auction storage auction = SEAProjectConfig_.activeAuction;
779
- // base price of zero not allowed when configuring auctions, so use it
780
- // as indicator of whether auctions are configured for the project
781
785
  bool projectIsConfigured_ = projectIsConfigured({
782
786
  projectId: projectId,
783
787
  coreContract: coreContract
784
788
  });
785
- bool auctionIsAcceptingIncreasingBids_ = auctionIsAcceptingIncreasingBids(
786
- auction
787
- );
788
- isConfigured =
789
- projectIsConfigured_ ||
790
- auctionIsAcceptingIncreasingBids_;
789
+ bool isAuctionLive_ = isAuctionLive(auction);
790
+ isConfigured = projectIsConfigured_ || isAuctionLive_;
791
791
  // only return non-zero price if auction is configured
792
792
  if (isConfigured) {
793
- if (auctionIsAcceptingIncreasingBids_) {
793
+ if (isAuctionLive_) {
794
794
  // return minimum next bid, given current bid
795
795
  tokenPriceInWei = getMinimumNextBid(auction);
796
796
  } else {
@@ -858,8 +858,6 @@ library SEALib {
858
858
  Auction storage auction = SEAProjectConfig_.activeAuction;
859
859
  // CHECKS
860
860
  // ensure project auctions are configured
861
- // @dev base price of zero indicates auctions are not configured
862
- // because only base price of gt zero is allowed when configuring
863
861
  require(
864
862
  projectIsConfigured({
865
863
  projectId: projectId,
@@ -903,7 +901,7 @@ library SEALib {
903
901
 
904
902
  // EFFECTS
905
903
  // create new auction, overwriting previous auction if it exists
906
- uint64 endTime = overwriteProjectActiveAuction({
904
+ uint64 endTime = _overwriteProjectActiveAuction({
907
905
  SEAProjectConfig_: SEAProjectConfig_,
908
906
  targetTokenId: targetTokenId,
909
907
  bidAmount: msg.value,
@@ -937,6 +935,31 @@ library SEALib {
937
935
  });
938
936
  }
939
937
 
938
+ /**
939
+ * Loads the SEAProjectConfig for a given project and core
940
+ * contract.
941
+ * @param projectId Project Id to get config for
942
+ * @param coreContract Core contract address to get config for
943
+ */
944
+ function getSEAProjectConfig(
945
+ uint256 projectId,
946
+ address coreContract
947
+ ) internal view returns (SEAProjectConfig storage) {
948
+ return s().SEAProjectConfigs[coreContract][projectId];
949
+ }
950
+
951
+ /**
952
+ * @notice Return the storage struct for reading and writing. This library
953
+ * uses a diamond storage pattern when managing storage.
954
+ * @return storageStruct The SEALibStorage struct.
955
+ */
956
+ function s() internal pure returns (SEALibStorage storage storageStruct) {
957
+ bytes32 position = SEA_LIB_STORAGE_POSITION;
958
+ assembly ("memory-safe") {
959
+ storageStruct.slot := position
960
+ }
961
+ }
962
+
940
963
  /**
941
964
  * @notice Function to overwrite the active auction for a project with a new auction.
942
965
  * @dev This function is used to initialize a new auction. Care must be
@@ -947,7 +970,7 @@ library SEALib {
947
970
  * @param bidder initial bidder's payable address
948
971
  * @return endTime end time of the newly created auction
949
972
  */
950
- function overwriteProjectActiveAuction(
973
+ function _overwriteProjectActiveAuction(
951
974
  SEAProjectConfig storage SEAProjectConfig_,
952
975
  uint256 targetTokenId,
953
976
  uint256 bidAmount,
@@ -967,29 +990,4 @@ library SEALib {
967
990
  settled: false
968
991
  });
969
992
  }
970
-
971
- /**
972
- * Loads the SEAProjectConfig for a given project and core
973
- * contract.
974
- * @param projectId Project Id to get config for
975
- * @param coreContract Core contract address to get config for
976
- */
977
- function getSEAProjectConfig(
978
- uint256 projectId,
979
- address coreContract
980
- ) internal view returns (SEAProjectConfig storage) {
981
- return s().SEAProjectConfigs[coreContract][projectId];
982
- }
983
-
984
- /**
985
- * @notice Return the storage struct for reading and writing. This library
986
- * uses a diamond storage pattern when managing storage.
987
- * @return storageStruct The SEALibStorage struct.
988
- */
989
- function s() internal pure returns (SEALibStorage storage storageStruct) {
990
- bytes32 position = SEA_LIB_STORAGE_POSITION;
991
- assembly ("memory-safe") {
992
- storageStruct.slot := position
993
- }
994
- }
995
993
  }
@@ -95,14 +95,10 @@ library SetPriceLib {
95
95
  uint256 projectId,
96
96
  address coreContract
97
97
  ) internal {
98
- SetPriceProjectConfig
99
- storage setPriceProjectConfig = getSetPriceProjectConfig({
100
- projectId: projectId,
101
- coreContract: coreContract
102
- });
103
- // update storage with solidity initial values
104
- setPriceProjectConfig.pricePerToken = uint248(0);
105
- setPriceProjectConfig.priceIsConfigured = false;
98
+ // @dev all fields must be deleted, and none of them are a complex type
99
+ // @dev getSetPriceProjectConfig not used, as deletion of storage
100
+ // pointers is not supported
101
+ delete s().setPriceProjectConfigs[coreContract][projectId];
106
102
 
107
103
  emit PricePerTokenReset({
108
104
  projectId: projectId,
@@ -41,7 +41,7 @@ library SettlementExpLib {
41
41
  // position of Settlement Exp Lib storage, using a diamond storage pattern
42
42
  // for this library
43
43
  bytes32 constant SETTLEMENT_EXP_LIB_STORAGE_POSITION =
44
- keccak256("settlementExpLib.storage");
44
+ keccak256("settlementexplib.storage");
45
45
 
46
46
  bytes32 internal constant CONFIG_CURRENT_SETTLED_PRICE =
47
47
  "currentSettledPrice";
@@ -106,58 +106,6 @@ library SettlementExpLib {
106
106
  mapping(address walletAddress => mapping(address coreContract => mapping(uint256 projectId => Receipt))) receipts;
107
107
  }
108
108
 
109
- /**
110
- * @notice This function updates the _receipt to include `msg.value` and increments
111
- * the number of tokens purchased by 1. It then checks that the updated
112
- * receipt is valid (i.e. sufficient funds have been posted for the
113
- * number of tokens purchased on the updated receipt), and reverts if not.
114
- * The new receipt net posted and num purchased are then returned to make
115
- * the values available in a gas-efficient manner to the caller of this
116
- * function.
117
- * @param walletAddress Address of user to update receipt for
118
- * @param projectId Project ID to update receipt for
119
- * @param coreContract Core contract address
120
- * @param currentPriceInWei current price of token in Wei
121
- * @return netPosted total funds posted by user on project (that have not
122
- * been yet settled), including the current transaction
123
- * @return numPurchased total number of tokens purchased by user on
124
- * project, including the current transaction
125
- */
126
- function _validateReceiptEffects(
127
- address walletAddress,
128
- uint256 projectId,
129
- address coreContract,
130
- uint256 currentPriceInWei
131
- ) private returns (uint232 netPosted, uint24 numPurchased) {
132
- Receipt storage receipt = getReceipt({
133
- walletAddress: walletAddress,
134
- projectId: projectId,
135
- coreContract: coreContract
136
- });
137
- // in memory copy + update
138
- netPosted = (receipt.netPosted + msg.value).toUint232();
139
- numPurchased = receipt.numPurchased + 1;
140
-
141
- // require sufficient payment on project
142
- require(
143
- netPosted >= numPurchased * currentPriceInWei,
144
- "Min value to mint req."
145
- );
146
-
147
- // update Receipt in storage
148
- receipt.netPosted = netPosted;
149
- receipt.numPurchased = numPurchased;
150
-
151
- // emit event indicating new receipt state
152
- emit ReceiptUpdated({
153
- purchaser: msg.sender,
154
- projectId: projectId,
155
- coreContract: coreContract,
156
- numPurchased: numPurchased,
157
- netPosted: netPosted
158
- });
159
- }
160
-
161
109
  /**
162
110
  * @notice Distributes the net revenues from the project's auction, and
163
111
  * marks the auction as having had its revenues collected.
@@ -193,9 +141,9 @@ library SettlementExpLib {
193
141
 
194
142
  // get the current net price of the auction - reverts if no auction
195
143
  // is configured.
196
- // @dev we use _getPriceUnsafe here, since we just safely synced the
144
+ // @dev we use getPriceUnsafe here, since we just safely synced the
197
145
  // project's max invocations and maxHasBeenInvoked, which guarantees
198
- // an accurate price calculation from _getPriceUnsafe, while being
146
+ // an accurate price calculation from getPriceUnsafe, while being
199
147
  // more gas efficient than getPriceSafe.
200
148
  // @dev price is guaranteed <= _projectConfig.latestPurchasePrice,
201
149
  // since this minter enforces monotonically decreasing purchase prices.
@@ -252,7 +200,8 @@ library SettlementExpLib {
252
200
  } else {
253
201
  // base price of zero indicates that the auction has not been configured,
254
202
  // since base price of zero is not allowed when configuring an auction.
255
- // @dev no coverage else branch of following line because redundant
203
+ // @dev no coverage else branch of following line because redundant,
204
+ // acknowledge redundant check
256
205
  require(basePrice > 0, "Only latestPurchasePrice > 0");
257
206
  // if the price is base price, the auction is valid and may be claimed
258
207
  // update the latest purchase price to the base price, to ensure
@@ -309,13 +258,20 @@ library SettlementExpLib {
309
258
  * @param coreContract Core contract address
310
259
  * @param purchaserAddress Address to reclaim excess settlement funds for
311
260
  * @param to Address to send excess settlement funds to
261
+ * @param doSendFunds If true, sends funds to `to`. If false, only updates
262
+ * the receipt to reflect the new funds posted, and returns the amount of
263
+ * excess settlement funds that still need to be sent to `to`.
264
+ * @return remainingUnsentExcessSettlementFunds amount of excess settlement
265
+ * funds that still need to be sent to `to`, in wei. If doSendFunds, this
266
+ * value will be zero, because funds will have been sent to `to`.
312
267
  */
313
268
  function reclaimProjectExcessSettlementFundsTo(
314
269
  address payable to,
315
270
  uint256 projectId,
316
271
  address coreContract,
317
- address purchaserAddress
318
- ) internal {
272
+ address purchaserAddress,
273
+ bool doSendFunds
274
+ ) internal returns (uint256 remainingUnsentExcessSettlementFunds) {
319
275
  (
320
276
  uint256 excessSettlementFunds,
321
277
  uint256 requiredAmountPosted
@@ -353,9 +309,14 @@ library SettlementExpLib {
353
309
  });
354
310
 
355
311
  // INTERACTIONS
356
- bool success_;
357
- (success_, ) = to.call{value: excessSettlementFunds}("");
358
- require(success_, "Reclaiming failed");
312
+ if (doSendFunds) {
313
+ bool success_;
314
+ (success_, ) = to.call{value: excessSettlementFunds}("");
315
+ require(success_, "Reclaiming failed");
316
+ } else {
317
+ // return unsent funds amount to caller
318
+ remainingUnsentExcessSettlementFunds = excessSettlementFunds;
319
+ }
359
320
  }
360
321
 
361
322
  /**
@@ -516,7 +477,7 @@ library SettlementExpLib {
516
477
  }
517
478
 
518
479
  /**
519
- * Returns number of purchases that have been made on the minter, for a
480
+ * @notice Returns number of purchases that have been made on the minter, for a
520
481
  * given project.
521
482
  * @param projectId The id of the project.
522
483
  * @param coreContract The address of the core contract.
@@ -651,37 +612,25 @@ library SettlementExpLib {
651
612
  uint256 projectId,
652
613
  address coreContract
653
614
  ) internal view returns (uint256 tokenPriceInWei) {
654
- // load the project's settlement auction config
655
- SettlementAuctionProjectConfig
656
- storage settlementAuctionProjectConfig = getSettlementAuctionProjectConfig({
615
+ // get up-to-date maxHasBeenInvoked state from core contract
616
+ bool maxHasBeenInvokedSafe = MaxInvocationsLib
617
+ .projectMaxHasBeenInvokedSafe({
657
618
  projectId: projectId,
658
619
  coreContract: coreContract
659
620
  });
660
- // accurately check if project has sold out
661
- if (
662
- MaxInvocationsLib.projectMaxHasBeenInvokedSafe({
663
- projectId: projectId,
664
- coreContract: coreContract
665
- })
666
- ) {
667
- // max invocations have been reached, return the latest purchased
668
- // price
669
- tokenPriceInWei = settlementAuctionProjectConfig
670
- .latestPurchasePrice;
671
- } else {
672
- // if not sold out, return the current price via getPriceUnsafe
673
- tokenPriceInWei = getPriceUnsafe({
674
- projectId: projectId,
675
- coreContract: coreContract,
676
- maxHasBeenInvoked: false // this branch is only reached if max invocations have not been reached
677
- });
678
- }
679
- return tokenPriceInWei;
621
+ // get price using up-to-date maxHasBeenInvoked state
622
+ tokenPriceInWei = getPriceUnsafe({
623
+ projectId: projectId,
624
+ coreContract: coreContract,
625
+ maxHasBeenInvoked: maxHasBeenInvokedSafe
626
+ });
680
627
  }
681
628
 
682
629
  /**
683
630
  * @notice Returns if a new auction's start price is valid, given the current
684
631
  * state of the project's settlement auction configuration.
632
+ * @dev does not check for non-zero start price, since startPrice > basePrice
633
+ * is checked in DAExpLib.
685
634
  * @param projectId Project ID to check start price for
686
635
  * @param coreContract Core contract address to check start price for
687
636
  * @param startPrice starting price of new auction, in wei
@@ -702,13 +651,15 @@ library SettlementExpLib {
702
651
  // claiming logic. Since base price is always non-zero, if
703
652
  // latestPurchasePrice is zero, then no previous purchases have been
704
653
  // made, and startPrice may be set to any value.
654
+ // @dev DAExpLib checks that startPrice > basePrice, so no need to
655
+ // check for non-zero startPrice here.
705
656
  return (settlementAuctionProjectConfig.latestPurchasePrice == 0 || // never purchased
706
657
  startPrice <= settlementAuctionProjectConfig.latestPurchasePrice);
707
658
  }
708
659
 
709
660
  /**
710
- * Loads the SettlementAuctionProjectConfig for a given project and core
711
- * contract.
661
+ * @notice Loads the SettlementAuctionProjectConfig for a given project and
662
+ * core contract.
712
663
  * @param projectId Project Id to get config for
713
664
  * @param coreContract Core contract address to get config for
714
665
  */
@@ -720,7 +671,7 @@ library SettlementExpLib {
720
671
  }
721
672
 
722
673
  /**
723
- * Loads the Receipt for a given user, project and core contract.
674
+ * @notice Loads the Receipt for a given user, project and core contract.
724
675
  * @param walletAddress User address to get receipt for
725
676
  * @param projectId Project Id to get config for
726
677
  * @param coreContract Core contract address to get config for
@@ -750,7 +701,7 @@ library SettlementExpLib {
750
701
  }
751
702
 
752
703
  /**
753
- * Returns if all tokens to be auctioned were sold, for a given project.
704
+ * @notice Returns if all tokens to be auctioned were sold, for a given project.
754
705
  * Returns false if the number of tokens to be auctioned is zero, since
755
706
  * that is the default value for unconfigured values.
756
707
  * @param settlementAuctionProjectConfig The SettlementAuctionProjectConfig
@@ -767,4 +718,56 @@ library SettlementExpLib {
767
718
  settlementAuctionProjectConfig.numPurchasesOnMinter ==
768
719
  numTokensToBeAuctioned;
769
720
  }
721
+
722
+ /**
723
+ * @notice This function updates the receipt to include `msg.value` and increments
724
+ * the number of tokens purchased by 1. It then checks that the updated
725
+ * receipt is valid (i.e. sufficient funds have been posted for the
726
+ * number of tokens purchased on the updated receipt), and reverts if not.
727
+ * The new receipt net posted and num purchased are then returned to make
728
+ * the values available in a gas-efficient manner to the caller of this
729
+ * function.
730
+ * @param walletAddress Address of user to update receipt for
731
+ * @param projectId Project ID to update receipt for
732
+ * @param coreContract Core contract address
733
+ * @param currentPriceInWei current price of token in Wei
734
+ * @return netPosted total funds posted by user on project (that have not
735
+ * been yet settled), including the current transaction
736
+ * @return numPurchased total number of tokens purchased by user on
737
+ * project, including the current transaction
738
+ */
739
+ function _validateReceiptEffects(
740
+ address walletAddress,
741
+ uint256 projectId,
742
+ address coreContract,
743
+ uint256 currentPriceInWei
744
+ ) private returns (uint232 netPosted, uint24 numPurchased) {
745
+ Receipt storage receipt = getReceipt({
746
+ walletAddress: walletAddress,
747
+ projectId: projectId,
748
+ coreContract: coreContract
749
+ });
750
+ // in memory copy + update
751
+ netPosted = (receipt.netPosted + msg.value).toUint232();
752
+ numPurchased = receipt.numPurchased + 1;
753
+
754
+ // require sufficient payment on project
755
+ require(
756
+ netPosted >= numPurchased * currentPriceInWei,
757
+ "Min value to mint req."
758
+ );
759
+
760
+ // update Receipt in storage
761
+ receipt.netPosted = netPosted;
762
+ receipt.numPurchased = numPurchased;
763
+
764
+ // emit event indicating new receipt state
765
+ emit ReceiptUpdated({
766
+ purchaser: msg.sender,
767
+ projectId: projectId,
768
+ coreContract: coreContract,
769
+ numPurchased: numPurchased,
770
+ netPosted: netPosted
771
+ });
772
+ }
770
773
  }