@artblocks/contracts 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -7
- package/artifacts/contracts/AdminACLV0.sol/AdminACLV0.json +2 -2
- package/artifacts/contracts/AdminACLV1.sol/AdminACLV1.json +2 -2
- package/artifacts/contracts/DependencyRegistryV0.sol/DependencyRegistryV0.json +336 -131
- package/artifacts/contracts/archive/GenArt721CoreV3.sol/GenArt721CoreV3.json +2047 -0
- package/artifacts/contracts/archive/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +2021 -0
- package/artifacts/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol/MinterBase.json +1 -1
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV2.sol/MinterDAExpV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExp/MinterDAExpV3.sol/MinterDAExpV3.json +2 -2
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol/MinterDAExpV4.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol/MinterDAExpSettlementV0.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol/MinterDAExpSettlementV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +1109 -0
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV2.sol/MinterDALinV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterDALin/MinterDALinV3.sol/MinterDALinV3.json +2 -2
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol/MinterDALinV4.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV1.sol/MinterHolderV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV2.sol/MinterHolderV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterHolder/MinterHolderV3.sol/MinterHolderV3.json +2 -2
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol/MinterHolderV4.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV1.sol/MinterMerkleV1.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV2.sol/MinterMerkleV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV3.sol/MinterMerkleV3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterMerkle/MinterMerkleV4.sol/MinterMerkleV4.json +2 -2
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol/MinterMerkleV5.json +3 -3
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/IGenArt721CoreContractV3WithRandomizer.json +31 -63
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol/MinterPolyptychV0.json +3 -3
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol/MinterSEAV0.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV2.sol/MinterSetPriceV2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPrice/MinterSetPriceV3.sol/MinterSetPriceV3.json +2 -2
- package/artifacts/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol/MinterSetPriceV4.json +3 -3
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol/MinterSetPriceERC20V0.json +65 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol/MinterSetPriceERC20V1.json +65 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V2.sol/MinterSetPriceERC20V2.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V3.sol/MinterSetPriceERC20V3.json +2 -2
- package/artifacts/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +807 -0
- package/artifacts/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol/GenArt721MinterBurner_PBAB.json +65 -2
- package/artifacts/contracts/engine/V2/GenArt721Minter_PBAB.sol/GenArt721Minter_PBAB.json +65 -2
- package/artifacts/contracts/engine/V3/EngineFactoryV0.sol/EngineFactoryV0.json +606 -0
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine.sol/GenArt721CoreV3_Engine.json +565 -209
- package/artifacts/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol/GenArt721CoreV3_Engine_Flex.json +785 -227
- package/artifacts/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol/GenArt721CoreV3_Engine_Flex_PROOF.json +40 -15
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/AdminACLV0_PROHIBITION.sol/AdminACLV0_PROHIBITION.json +2 -2
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol/GenArt721CoreV3_Engine_Flex_PROHIBITION.json +40 -15
- package/artifacts/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.json +36 -68
- package/artifacts/contracts/engine-registry/CoreRegistryV1.sol/CoreRegistryV1.json +12 -12
- package/artifacts/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol/IAdminACLV0_Extended.json +140 -0
- package/artifacts/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol/IBytecodeStorageReaderV2.json +130 -0
- package/artifacts/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol/ICoreRegistryV1.json +6 -6
- package/artifacts/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol/IDependencyRegistryV0.json +71 -39
- package/artifacts/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol/IEngineFactoryV0.json +283 -0
- package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol/IFilteredMinterDAExpSettlementV0.json +12 -12
- package/artifacts/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol/IFilteredMinterDAExpSettlementV1.json +12 -12
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3.sol/IGenArt721CoreContractV3.json +30 -62
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol/IGenArt721CoreContractV3_Base.json +30 -62
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol/IGenArt721CoreContractV3_Engine.json +170 -104
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol/IGenArt721CoreContractV3_Engine_Flex.json +170 -104
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.json +1028 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol/IGenArt721CoreContractV3_Engine_PreV3p2.json +741 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol/IGenArt721CoreContractV3_ProjectFinance.json +87 -0
- package/artifacts/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol/IGenArt721Minter_PBAB.json +279 -0
- package/artifacts/contracts/interfaces/v0.8.x/IMinterFilterV1.sol/IMinterFilterV1.json +22 -22
- package/artifacts/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol/IPseudorandomAtomic.json +1 -1
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol/ISharedMinterDAExpSettlementV0.json +26 -101
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol/ISharedMinterDAExpV0.json +1 -57
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol/ISharedMinterDALinV0.json +1 -57
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol/ISharedMinterDAV0.json +2 -21
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol/ISharedMinterHolderERC20V0.json +158 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol/ISharedMinterHolderV0.json +15 -90
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol/ISharedMinterMerkleV0.json +10 -36
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol/ISharedMinterRAMV0.json +62 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol/ISharedMinterRequired.json +37 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol/ISharedMinterSEAV0.json +4 -236
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol/ISharedMinterSimplePurchaseV0.json +5 -5
- package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterV0.sol/ISharedMinterV0.json +7 -423
- package/artifacts/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol/ISharedRandomizerV0.json +17 -17
- package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol/ISplitAtomicFactoryV0.json +170 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol/ISplitAtomicV0.json +126 -0
- package/artifacts/contracts/interfaces/v0.8.x/ISplitProviderV0.sol/ISplitProviderV0.json +98 -0
- package/artifacts/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol/ISplitFactoryV2.json +123 -0
- package/artifacts/contracts/libs/integration-refs/delegation-registry/DelegationRegistry.sol/DelegationRegistry.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeMock.sol/GnosisSafeMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/GnosisSafeProxyFactoryMock.sol/GnosisSafeProxyFactoryMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/gnosis-safe/MultiSendMock.sol/MultiSendMock.json +2 -2
- package/artifacts/contracts/libs/integration-refs/weth9/weth9.sol/WETH9_.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ABHelpers.sol/ABHelpers.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/AuthLib.sol/AuthLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BitMap.sol/BitMaps256.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV0.sol/BytecodeStorage.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageReader.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV1.sol/BytecodeStorageWriter.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageReader.json +214 -0
- package/artifacts/contracts/libs/v0.8.x/BytecodeStorageV2.sol/BytecodeStorageWriter.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/Bytes32Strings.sol/Bytes32Strings.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol/DependencyRegistryStorageLib.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeed.sol/ERC721_PackedHashSeed.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol/ERC721_PackedHashSeedV1.json +444 -0
- package/artifacts/contracts/libs/v0.8.x/PackedBools.sol/PackedBools.json +10 -0
- package/artifacts/contracts/libs/v0.8.x/SSTORE2.sol/SSTORE2.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/V3FlexLib.sol/V3FlexLib.json +208 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol/DAExpLib.json +60 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALib.sol/DALib.json +30 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/DALinLib.sol/DALinLib.json +60 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol/GenericMinterEventsLib.json +346 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol/MaxInvocationsLib.json +29 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol/MerkleLib.json +30 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol/PolyptychLib.json +2 -2
- package/artifacts/contracts/libs/v0.8.x/minter-libs/RAMLib.sol/RAMLib.json +398 -0
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SEALib.sol/SEALib.json +254 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol/SetPriceLib.json +48 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol/SettlementExpLib.json +41 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol/SplitFundsLib.json +35 -3
- package/artifacts/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol/TokenHolderLib.json +79 -3
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV1.sol/MinterFilterV1.json +2 -2
- package/artifacts/contracts/minter-suite/MinterFilter/MinterFilterV2.sol/MinterFilterV2.json +41 -41
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol/MinterDAExpHolderV5.json +66 -632
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol/MinterDAExpSettlementV3.json +67 -594
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpV5.sol/MinterDAExpV5.json +33 -524
- package/artifacts/contracts/minter-suite/Minters/MinterDALinHolderV5.sol/MinterDALinHolderV5.json +66 -632
- package/artifacts/contracts/minter-suite/Minters/MinterDALinV5.sol/MinterDALinV5.json +33 -524
- package/artifacts/contracts/minter-suite/Minters/MinterRAMV0.sol/MinterRAMV0.json +1374 -0
- package/artifacts/contracts/minter-suite/Minters/MinterSEAV1.sol/MinterSEAV1.json +56 -722
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol/MinterSetPriceERC20V5.json +58 -454
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol/MinterSetPriceHolderV5.json +61 -552
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol/MinterSetPriceMerkleV5.json +55 -497
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol/MinterSetPricePolyptychERC20V5.json +110 -571
- package/artifacts/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol/MinterSetPricePolyptychV5.json +69 -560
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceV5.sol/MinterSetPriceV5.json +28 -444
- package/artifacts/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol/MinterSetPriceV5_SingleCore.json +417 -0
- package/artifacts/contracts/mock/BytecodeV2LibCallsMock.sol/BytecodeV2LibCallsMock.json +154 -0
- package/artifacts/contracts/mock/BytecodeV2TextCR_DMock.sol/BytecodeV2TextCR_DMock.json +428 -0
- package/artifacts/contracts/mock/DummySharedMinter.sol/DummySharedMinter.json +2 -2
- package/artifacts/contracts/mock/ERC20Mock.sol/ERC20Mock.json +2 -2
- package/artifacts/contracts/mock/ForceSendMock.sol/ForceSendMock.json +24 -0
- package/artifacts/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol/GenArt721CoreV3_Engine_IncorrectCoreType.json +4 -9
- package/artifacts/contracts/mock/Mock0xSplitsV2PullFactory.sol/Mock0xSplitsV2PullFactory.json +149 -0
- package/artifacts/contracts/mock/Mock0xSplitsV2Splitter.sol/Mock0xSplitsV2Splitter.json +99 -0
- package/artifacts/contracts/mock/MockAdminACLV0.sol/MockAdminACLV0Events.json +20 -2
- package/artifacts/contracts/mock/MockAdminACLV0_PROHIBITION.sol/MockAdminACLV0Events_PROHIBITION.json +20 -2
- package/artifacts/contracts/mock/OriginRegisterMock.sol/OriginRegisterMock.json +2 -2
- package/artifacts/contracts/mock/RandomizerV2_NoAssignMock.sol/RandomizerV2_NoAssignMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyGenArt721MinterMock.sol/ReentrancyGenArt721MinterMock.json +100 -0
- package/artifacts/contracts/mock/ReentrancyHolderMock.sol/ReentrancyHolderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyHolderMockShared.sol/ReentrancyHolderMockShared.json +136 -0
- package/artifacts/contracts/mock/ReentrancyMerkleMock.sol/ReentrancyMerkleMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMerkleMockShared.sol/ReentrancyMerkleMockShared.json +105 -0
- package/artifacts/contracts/mock/ReentrancyMock.sol/ReentrancyMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancyMockShared.sol/ReentrancyMockShared.json +100 -0
- package/artifacts/contracts/mock/ReentrancySEAMock.sol/ReentrancySEAAutoBidderMock.json +2 -2
- package/artifacts/contracts/mock/ReentrancySEAMockShared.sol/ReentrancySEAAutoBidderMockShared.json +69 -0
- package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterDrainETHMock.json +54 -0
- package/artifacts/contracts/mock/ReentrancySplitterMocks.sol/ReentrancySplitterSendETHMock.json +54 -0
- package/artifacts/contracts/randomizer/deprecated/PolyptychRandomizerV0.sol/BasicPolyptychRandomizerV0.json +2 -2
- package/artifacts/contracts/randomizer/deprecated/RandomizerV2.sol/BasicRandomizerV2.json +2 -2
- package/artifacts/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol/PseudorandomAtomic.json +2 -2
- package/artifacts/contracts/randomizer/shared/SharedRandomizerV0.sol/SharedRandomizerV0.json +19 -19
- package/artifacts/contracts/split/SplitAtomicFactoryV0.sol/SplitAtomicFactoryV0.json +203 -0
- package/artifacts/contracts/split/SplitAtomicV0.sol/SplitAtomicV0.json +168 -0
- package/artifacts/contracts/split/split-provider/SplitProviderV0.sol/SplitProviderV0.json +141 -0
- package/contracts/AdminACLV0.sol +6 -2
- package/contracts/AdminACLV1.sol +2 -2
- package/contracts/DependencyRegistryV0.sol +737 -390
- package/contracts/{GenArt721CoreV3.sol → archive/GenArt721CoreV3.sol} +56 -20
- package/contracts/{explorations → archive}/GenArt721CoreV3_Explorations.sol +49 -13
- package/contracts/{minter-suite → archive/minter-suite}/Minters/MinterBase_v0_1_1.sol +4 -4
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExp}/MinterDAExpV4.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV0.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterDAExpSettlement/MinterDAExpSettlementV1.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDAExpSettlement}/MinterDAExpSettlementV2.sol +9 -62
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterDALin}/MinterDALinV4.sol +4 -4
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterHolder}/MinterHolderV4.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterMerkle}/MinterMerkleV5.sol +5 -5
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterPolyptych}/MinterPolyptychV0.sol +7 -7
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSEA}/MinterSEAV0.sol +13 -13
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPrice}/MinterSetPriceV4.sol +4 -4
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V0.sol +82 -10
- package/contracts/archive/minter-suite/Minters/MinterSetPriceERC20/MinterSetPriceERC20V1.sol +82 -10
- package/contracts/{minter-suite/Minters → archive/minter-suite/Minters/MinterSetPriceERC20}/MinterSetPriceERC20V4.sol +88 -21
- package/contracts/engine/V2/GenArt721MinterBurner_PBAB.sol +81 -22
- package/contracts/engine/V2/GenArt721Minter_PBAB.sol +80 -22
- package/contracts/engine/V3/EngineFactoryV0.sol +419 -0
- package/contracts/engine/V3/GenArt721CoreV3_Engine.sol +893 -493
- package/contracts/engine/V3/GenArt721CoreV3_Engine_Flex.sol +1053 -655
- package/contracts/engine/V3/forks/GenArt721CoreV3_Engine_Flex_PROOF.sol +7 -13
- package/contracts/engine/V3/forks/PROHIBITION/GenArt721CoreV3_Engine_Flex_PROHIBITION.sol +5 -11
- package/contracts/engine/V3/forks/PROHIBITION/interfaces/IGenArt721CoreContractV3_Engine_Flex_PROHIBITION.sol +2 -2
- package/contracts/engine-registry/CoreRegistryV1.sol +58 -65
- package/contracts/interfaces/v0.8.x/IAdminACLV0_Extended.sol +20 -0
- package/contracts/interfaces/v0.8.x/IBytecodeStorageReaderV2.sol +23 -0
- package/contracts/interfaces/v0.8.x/ICoreRegistryV1.sol +6 -8
- package/contracts/interfaces/v0.8.x/IDependencyRegistryV0.sol +48 -43
- package/contracts/interfaces/v0.8.x/IEngineFactoryV0.sol +124 -0
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV0.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpSettlementV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDAExpV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterDALinV1.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterHolderV2.sol +1 -3
- package/contracts/interfaces/v0.8.x/IFilteredMinterMerkleV2.sol +1 -3
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Base.sol +115 -11
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine.sol +84 -8
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex.sol +26 -8
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_Flex_PreV3p2.sol +141 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_Engine_PreV3p2.sol +78 -0
- package/contracts/interfaces/v0.8.x/IGenArt721CoreContractV3_ProjectFinance.sol +47 -0
- package/contracts/interfaces/v0.8.x/IGenArt721Minter_PBAB.sol +91 -0
- package/contracts/interfaces/v0.8.x/IMinterFilterV1.sol +25 -25
- package/contracts/interfaces/v0.8.x/IPseudorandomAtomic.sol +1 -3
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpSettlementV0.sol +30 -20
- package/contracts/interfaces/v0.8.x/ISharedMinterDAExpV0.sol +1 -14
- package/contracts/interfaces/v0.8.x/ISharedMinterDALinV0.sol +1 -15
- package/contracts/interfaces/v0.8.x/ISharedMinterDAV0.sol +2 -8
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderERC20V0.sol +47 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterHolderV0.sol +15 -43
- package/contracts/interfaces/v0.8.x/ISharedMinterMerkleV0.sol +10 -20
- package/contracts/interfaces/v0.8.x/ISharedMinterRAMV0.sol +23 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterRequired.sol +20 -0
- package/contracts/interfaces/v0.8.x/ISharedMinterSEAV0.sol +1 -67
- package/contracts/interfaces/v0.8.x/ISharedMinterSimplePurchaseV0.sol +5 -5
- package/contracts/interfaces/v0.8.x/ISharedMinterV0.sol +18 -160
- package/contracts/interfaces/v0.8.x/ISharedRandomizerV0.sol +37 -37
- package/contracts/interfaces/v0.8.x/ISplitAtomicFactoryV0.sol +81 -0
- package/contracts/interfaces/v0.8.x/ISplitAtomicV0.sol +72 -0
- package/contracts/interfaces/v0.8.x/ISplitProviderV0.sol +49 -0
- package/contracts/interfaces/v0.8.x/integration-refs/splits-0x-v2/ISplitFactoryV2.sol +62 -0
- package/contracts/libs/v0.8.x/ABHelpers.sol +31 -17
- package/contracts/libs/v0.8.x/AuthLib.sol +101 -102
- package/contracts/libs/v0.8.x/BitMap.sol +112 -0
- package/contracts/libs/v0.8.x/BytecodeStorageV2.sol +593 -0
- package/contracts/libs/v0.8.x/Bytes32Strings.sol +5 -5
- package/contracts/libs/v0.8.x/DependencyRegistryStorageLib.sol +90 -0
- package/contracts/libs/v0.8.x/ERC721_PackedHashSeedV1.sol +591 -0
- package/contracts/libs/v0.8.x/PackedBools.sol +42 -0
- package/contracts/libs/v0.8.x/V3FlexLib.sol +591 -0
- package/contracts/libs/v0.8.x/minter-libs/DAExpLib.sol +162 -39
- package/contracts/libs/v0.8.x/minter-libs/DALib.sol +26 -0
- package/contracts/libs/v0.8.x/minter-libs/DALinLib.sol +139 -37
- package/contracts/libs/v0.8.x/minter-libs/GenericMinterEventsLib.sol +171 -0
- package/contracts/libs/v0.8.x/minter-libs/MaxInvocationsLib.sol +299 -158
- package/contracts/libs/v0.8.x/minter-libs/MerkleLib.sol +268 -55
- package/contracts/libs/v0.8.x/minter-libs/PolyptychLib.sol +138 -58
- package/contracts/libs/v0.8.x/minter-libs/RAMLib.sol +2927 -0
- package/contracts/libs/v0.8.x/minter-libs/SEALib.sol +796 -123
- package/contracts/libs/v0.8.x/minter-libs/SetPriceLib.sol +131 -13
- package/contracts/libs/v0.8.x/minter-libs/SettlementExpLib.sol +607 -224
- package/contracts/libs/v0.8.x/minter-libs/SplitFundsLib.sol +494 -330
- package/contracts/libs/v0.8.x/minter-libs/TokenHolderLib.sol +217 -78
- package/contracts/minter-suite/MinterFilter/MinterFilterV2.sol +358 -309
- package/contracts/minter-suite/Minters/MinterDAExpHolderV5.sol +391 -491
- package/contracts/minter-suite/Minters/MinterDAExpSettlementV3.sol +396 -632
- package/contracts/minter-suite/Minters/MinterDAExpV5.sol +212 -273
- package/contracts/minter-suite/Minters/MinterDALinHolderV5.sol +393 -488
- package/contracts/minter-suite/Minters/MinterDALinV5.sol +220 -277
- package/contracts/minter-suite/Minters/MinterRAMV0.sol +1205 -0
- package/contracts/minter-suite/Minters/MinterSEAV1.sol +329 -677
- package/contracts/minter-suite/Minters/MinterSetPriceERC20V5.sol +287 -303
- package/contracts/minter-suite/Minters/MinterSetPriceHolderV5.sol +355 -446
- package/contracts/minter-suite/Minters/MinterSetPriceMerkleV5.sol +328 -416
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychERC20V5.sol +552 -622
- package/contracts/minter-suite/Minters/MinterSetPricePolyptychV5.sol +429 -553
- package/contracts/minter-suite/Minters/MinterSetPriceV5.sol +180 -227
- package/contracts/minter-suite/Minters/one-off/MinterSetPriceV5_SingleCore.sol +446 -0
- package/contracts/mock/BytecodeV2LibCallsMock.sol +128 -0
- package/contracts/mock/BytecodeV2TextCR_DMock.sol +316 -0
- package/contracts/mock/ForceSendMock.sol +22 -0
- package/contracts/mock/GenArt721CoreV3_Engine_IncorrectCoreType.sol +3 -10
- package/contracts/mock/Mock0xSplitsV2PullFactory.sol +75 -0
- package/contracts/mock/Mock0xSplitsV2Splitter.sol +47 -0
- package/contracts/mock/MockAdminACLV0.sol +21 -0
- package/contracts/mock/MockAdminACLV0_PROHIBITION.sol +21 -0
- package/contracts/mock/ReentrancyGenArt721MinterMock.sol +47 -0
- package/contracts/mock/ReentrancyHolderMockShared.sol +59 -0
- package/contracts/mock/ReentrancyMerkleMockShared.sol +58 -0
- package/contracts/mock/ReentrancyMockShared.sol +48 -0
- package/contracts/mock/ReentrancySEAMockShared.sol +40 -0
- package/contracts/mock/ReentrancySplitterMocks.sol +67 -0
- package/contracts/randomizer/primitive/PseudorandomAtomicBasic.sol +1 -1
- package/contracts/randomizer/shared/SharedRandomizerV0.sol +79 -71
- package/contracts/split/SplitAtomicFactoryV0.sol +121 -0
- package/contracts/split/SplitAtomicV0.sol +265 -0
- package/contracts/split/split-provider/SplitProviderV0.sol +201 -0
- package/package.json +79 -45
- package/artifacts/contracts/GenArt721CoreV3.sol/GenArt721CoreV3.json +0 -1965
- package/artifacts/contracts/explorations/GenArt721CoreV3_Explorations.sol/GenArt721CoreV3_Explorations.json +0 -1939
- package/artifacts/contracts/minter-suite/Minters/MinterDAExpSettlementV2.sol/MinterDAExpSettlementV2.json +0 -1127
- package/artifacts/contracts/minter-suite/Minters/MinterSetPriceERC20V4.sol/MinterSetPriceERC20V4.json +0 -768
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride.sol/GenArt721RoyaltyOverride.json +0 -208
- package/artifacts/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol/GenArt721RoyaltyOverride_PBAB.json +0 -301
- package/contracts/royalty-registry/GenArt721RoyaltyOverride.sol +0 -168
- package/contracts/royalty-registry/GenArt721RoyaltyOverride_PBAB.sol +0 -221
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
pragma solidity ^0.8.0;
|
|
5
5
|
|
|
6
|
+
import {DALib} from "./DALib.sol";
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* @title Art Blocks Dutch Auction (exponential price curve) Library
|
|
8
10
|
* @notice This library is designed to implement logic and checks for Art
|
|
@@ -12,6 +14,41 @@ pragma solidity ^0.8.0;
|
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
library DAExpLib {
|
|
17
|
+
/**
|
|
18
|
+
* @notice Auction details set for project `projectId` on core contract
|
|
19
|
+
* `coreContract`.
|
|
20
|
+
* @param projectId Project Id for which auction details were set
|
|
21
|
+
* @param coreContract Core contract address for which auction details were
|
|
22
|
+
* set
|
|
23
|
+
* @param auctionTimestampStart Timestamp when auction will start
|
|
24
|
+
* @param priceDecayHalfLifeSeconds Half life of price decay, in seconds
|
|
25
|
+
* @param startPrice Start price of auction
|
|
26
|
+
* @param basePrice Base price of auction (end price)
|
|
27
|
+
*/
|
|
28
|
+
event SetAuctionDetailsExp(
|
|
29
|
+
uint256 indexed projectId,
|
|
30
|
+
address indexed coreContract,
|
|
31
|
+
uint40 auctionTimestampStart,
|
|
32
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
33
|
+
uint256 startPrice,
|
|
34
|
+
uint256 basePrice
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @notice Minimum allowed price decay half life on the minter updated to
|
|
39
|
+
* `minimumPriceDecayHalfLifeSeconds`.
|
|
40
|
+
* @param minimumPriceDecayHalfLifeSeconds minimum price decay half life
|
|
41
|
+
* for new auctions, in seconds
|
|
42
|
+
*/
|
|
43
|
+
event AuctionMinHalfLifeSecondsUpdated(
|
|
44
|
+
uint256 minimumPriceDecayHalfLifeSeconds
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// position of DA Exp Lib storage, using a diamond storage pattern
|
|
48
|
+
// for this library
|
|
49
|
+
bytes32 constant DAE_EXP_LIB_STORAGE_POSITION =
|
|
50
|
+
keccak256("daexplib.storage");
|
|
51
|
+
|
|
15
52
|
struct DAProjectConfig {
|
|
16
53
|
// @dev max uint40 ~= 1.1e12 sec ~= 34 thousand years
|
|
17
54
|
uint40 timestampStart;
|
|
@@ -22,6 +59,11 @@ library DAExpLib {
|
|
|
22
59
|
uint88 basePrice;
|
|
23
60
|
}
|
|
24
61
|
|
|
62
|
+
// Diamond storage pattern is used in this library
|
|
63
|
+
struct DAExpLibStorage {
|
|
64
|
+
mapping(address coreContract => mapping(uint256 projectId => DAProjectConfig)) DAProjectConfigs_;
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
/**
|
|
26
68
|
* @notice Sets auction details for an exponential-price auction type.
|
|
27
69
|
* @dev The function sets the auction start timestamp, price decay
|
|
@@ -31,46 +73,78 @@ library DAExpLib {
|
|
|
31
73
|
* minter should check that _priceDecayHalfLifeSeconds is greater than the
|
|
32
74
|
* minter's minimum allowable value for price decay half-life (if the
|
|
33
75
|
* minter chooses to include that guard-rail).
|
|
34
|
-
* @param
|
|
35
|
-
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
76
|
+
* @param projectId The project Id to set auction details for.
|
|
77
|
+
* @param coreContract The core contract address to set auction details.
|
|
78
|
+
* @param auctionTimestampStart The timestamp when the auction will start.
|
|
79
|
+
* @param priceDecayHalfLifeSeconds The half-life time for price decay in
|
|
38
80
|
* seconds.
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
81
|
+
* @param startPrice The starting price of the auction.
|
|
82
|
+
* @param basePrice The base price of the auction.
|
|
83
|
+
* @param allowReconfigureAfterStart Bool indicating whether the auction
|
|
42
84
|
* can be reconfigured after it has started. This is sometimes useful for
|
|
43
85
|
* minter implementations that want to allow an artist to reconfigure the
|
|
44
86
|
* auction after it has reached minter-local max invocations, for example.
|
|
45
87
|
*/
|
|
46
88
|
function setAuctionDetailsExp(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
uint40
|
|
50
|
-
|
|
51
|
-
uint88
|
|
52
|
-
|
|
89
|
+
uint256 projectId,
|
|
90
|
+
address coreContract,
|
|
91
|
+
uint40 auctionTimestampStart,
|
|
92
|
+
uint40 priceDecayHalfLifeSeconds,
|
|
93
|
+
uint88 startPrice,
|
|
94
|
+
uint88 basePrice,
|
|
95
|
+
bool allowReconfigureAfterStart
|
|
53
96
|
) internal {
|
|
97
|
+
DAProjectConfig storage DAProjectConfig_ = getDAProjectConfig({
|
|
98
|
+
projectId: projectId,
|
|
99
|
+
coreContract: coreContract
|
|
100
|
+
});
|
|
54
101
|
require(
|
|
55
|
-
|
|
56
|
-
block.timestamp <
|
|
57
|
-
|
|
102
|
+
DAProjectConfig_.timestampStart == 0 || // uninitialized
|
|
103
|
+
block.timestamp < DAProjectConfig_.timestampStart || // auction not yet started
|
|
104
|
+
allowReconfigureAfterStart, // specifically allowing reconfiguration after start
|
|
58
105
|
"No modifications mid-auction"
|
|
59
106
|
);
|
|
60
107
|
require(
|
|
61
|
-
block.timestamp <
|
|
108
|
+
block.timestamp < auctionTimestampStart,
|
|
62
109
|
"Only future auctions"
|
|
63
110
|
);
|
|
64
111
|
require(
|
|
65
|
-
|
|
112
|
+
startPrice > basePrice,
|
|
66
113
|
"Auction start price must be greater than auction end price"
|
|
67
114
|
);
|
|
115
|
+
// @dev no coverage, as minter auction min half life may be more
|
|
116
|
+
// restrictive than gt 0
|
|
117
|
+
require(priceDecayHalfLifeSeconds > 0, "Only half life gt 0");
|
|
68
118
|
|
|
69
119
|
// EFFECTS
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
120
|
+
DAProjectConfig_.timestampStart = auctionTimestampStart;
|
|
121
|
+
DAProjectConfig_.priceDecayHalfLifeSeconds = priceDecayHalfLifeSeconds;
|
|
122
|
+
DAProjectConfig_.startPrice = startPrice;
|
|
123
|
+
DAProjectConfig_.basePrice = basePrice;
|
|
124
|
+
|
|
125
|
+
emit SetAuctionDetailsExp({
|
|
126
|
+
projectId: projectId,
|
|
127
|
+
coreContract: coreContract,
|
|
128
|
+
auctionTimestampStart: auctionTimestampStart,
|
|
129
|
+
priceDecayHalfLifeSeconds: priceDecayHalfLifeSeconds,
|
|
130
|
+
startPrice: startPrice,
|
|
131
|
+
basePrice: basePrice
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function resetAuctionDetails(
|
|
136
|
+
uint256 projectId,
|
|
137
|
+
address coreContract
|
|
138
|
+
) internal {
|
|
139
|
+
// @dev all fields must be deleted, and none of them are a complex type
|
|
140
|
+
// @dev getDAProjectConfig not used, as deletion of storage pointers is
|
|
141
|
+
// not supported
|
|
142
|
+
delete s().DAProjectConfigs_[coreContract][projectId];
|
|
143
|
+
|
|
144
|
+
emit DALib.ResetAuctionDetails({
|
|
145
|
+
projectId: projectId,
|
|
146
|
+
coreContract: coreContract
|
|
147
|
+
});
|
|
74
148
|
}
|
|
75
149
|
|
|
76
150
|
/**
|
|
@@ -79,30 +153,37 @@ library DAExpLib {
|
|
|
79
153
|
* This function reverts if auction has not yet started, or if auction is
|
|
80
154
|
* unconfigured, which is relied upon by certain minter implications for
|
|
81
155
|
* security.
|
|
156
|
+
* @param projectId Project Id to get price for
|
|
157
|
+
* @param coreContract Core contract address to get price for
|
|
82
158
|
* @return uint256 current price of token in Wei
|
|
83
159
|
*/
|
|
84
160
|
function getPriceExp(
|
|
85
|
-
|
|
161
|
+
uint256 projectId,
|
|
162
|
+
address coreContract
|
|
86
163
|
) internal view returns (uint256) {
|
|
164
|
+
DAProjectConfig storage DAProjectConfig_ = getDAProjectConfig({
|
|
165
|
+
projectId: projectId,
|
|
166
|
+
coreContract: coreContract
|
|
167
|
+
});
|
|
87
168
|
// move parameters to memory if used more than once
|
|
88
|
-
uint256
|
|
89
|
-
uint256
|
|
169
|
+
uint256 timestampStart = DAProjectConfig_.timestampStart;
|
|
170
|
+
uint256 priceDecayHalfLifeSeconds = DAProjectConfig_
|
|
90
171
|
.priceDecayHalfLifeSeconds;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
require(
|
|
94
|
-
require(
|
|
95
|
-
uint256 decayedPrice =
|
|
172
|
+
// @dev check also ensures we don't divide by priceDecayHalfLifeSeconds
|
|
173
|
+
// of zero
|
|
174
|
+
require(priceDecayHalfLifeSeconds > 0, "Only configured auctions");
|
|
175
|
+
require(block.timestamp >= timestampStart, "Auction not yet started");
|
|
176
|
+
uint256 decayedPrice = DAProjectConfig_.startPrice;
|
|
96
177
|
uint256 elapsedTimeSeconds;
|
|
97
178
|
unchecked {
|
|
98
179
|
// already checked that block.timestamp > _timestampStart above
|
|
99
|
-
elapsedTimeSeconds = block.timestamp -
|
|
180
|
+
elapsedTimeSeconds = block.timestamp - timestampStart;
|
|
100
181
|
}
|
|
101
182
|
// Divide by two (via bit-shifting) for the number of entirely completed
|
|
102
183
|
// half-lives that have elapsed since auction start time.
|
|
103
184
|
unchecked {
|
|
104
|
-
// already required
|
|
105
|
-
decayedPrice >>= elapsedTimeSeconds /
|
|
185
|
+
// already required priceDecayHalfLifeSeconds > 0
|
|
186
|
+
decayedPrice >>= elapsedTimeSeconds / priceDecayHalfLifeSeconds;
|
|
106
187
|
}
|
|
107
188
|
// Perform a linear interpolation between partial half-life points, to
|
|
108
189
|
// approximate the current place on a perfect exponential decay curve.
|
|
@@ -111,15 +192,57 @@ library DAExpLib {
|
|
|
111
192
|
// so no underflow is possible when the subtraction assignment
|
|
112
193
|
// operator is used on decayedPrice.
|
|
113
194
|
decayedPrice -=
|
|
114
|
-
(decayedPrice *
|
|
115
|
-
(elapsedTimeSeconds %
|
|
116
|
-
|
|
117
|
-
2
|
|
195
|
+
((decayedPrice *
|
|
196
|
+
(elapsedTimeSeconds % priceDecayHalfLifeSeconds)) /
|
|
197
|
+
priceDecayHalfLifeSeconds) >>
|
|
198
|
+
1; // divide by 2 via bitshift 1
|
|
118
199
|
}
|
|
119
|
-
|
|
200
|
+
uint256 basePrice = DAProjectConfig_.basePrice;
|
|
201
|
+
if (decayedPrice < basePrice) {
|
|
120
202
|
// Price may not decay below stay `basePrice`.
|
|
121
|
-
return
|
|
203
|
+
return basePrice;
|
|
122
204
|
}
|
|
123
205
|
return decayedPrice;
|
|
124
206
|
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Gets auction base price for project `projectId` on core contract
|
|
210
|
+
* `coreContract`.
|
|
211
|
+
* @param projectId Project Id to get price for
|
|
212
|
+
* @param coreContract Core contract address to get price for
|
|
213
|
+
*/
|
|
214
|
+
function getAuctionBasePrice(
|
|
215
|
+
uint256 projectId,
|
|
216
|
+
address coreContract
|
|
217
|
+
) internal view returns (uint256) {
|
|
218
|
+
return
|
|
219
|
+
getDAProjectConfig({
|
|
220
|
+
projectId: projectId,
|
|
221
|
+
coreContract: coreContract
|
|
222
|
+
}).basePrice;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Loads the DAProjectConfig for a given project and core contract.
|
|
227
|
+
* @param projectId Project Id to get config for
|
|
228
|
+
* @param coreContract Core contract address to get config for
|
|
229
|
+
*/
|
|
230
|
+
function getDAProjectConfig(
|
|
231
|
+
uint256 projectId,
|
|
232
|
+
address coreContract
|
|
233
|
+
) internal view returns (DAProjectConfig storage) {
|
|
234
|
+
return s().DAProjectConfigs_[coreContract][projectId];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @notice Return the storage struct for reading and writing. This library
|
|
239
|
+
* uses a diamond storage pattern when managing storage.
|
|
240
|
+
* @return storageStruct The DAExpLibStorage struct.
|
|
241
|
+
*/
|
|
242
|
+
function s() internal pure returns (DAExpLibStorage storage storageStruct) {
|
|
243
|
+
bytes32 position = DAE_EXP_LIB_STORAGE_POSITION;
|
|
244
|
+
assembly ("memory-safe") {
|
|
245
|
+
storageStruct.slot := position
|
|
246
|
+
}
|
|
247
|
+
}
|
|
125
248
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: LGPL-3.0-only
|
|
2
|
+
// Created By: Art Blocks Inc.
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title Art Blocks Dutch Auction (exponential price curve) Library
|
|
8
|
+
* @notice This library is designed to implement logic and checks for Art
|
|
9
|
+
* Blocks projects using an exponential Dutch auctionprice curve for minting
|
|
10
|
+
* tokens.
|
|
11
|
+
* @author Art Blocks Inc.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
library DALib {
|
|
15
|
+
/**
|
|
16
|
+
* @notice Auction details cleared for project `projectId` on core contract
|
|
17
|
+
* `coreContract`.
|
|
18
|
+
* @param projectId Project Id for which auction details were cleared
|
|
19
|
+
* @param coreContract Core contract address for which auction details were
|
|
20
|
+
* cleared
|
|
21
|
+
*/
|
|
22
|
+
event ResetAuctionDetails(
|
|
23
|
+
uint256 indexed projectId,
|
|
24
|
+
address indexed coreContract
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -3,15 +3,52 @@
|
|
|
3
3
|
|
|
4
4
|
pragma solidity ^0.8.0;
|
|
5
5
|
|
|
6
|
+
import {DALib} from "./DALib.sol";
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* @title Art Blocks Dutch Auction (linear price curve) Library
|
|
8
10
|
* @notice This library is designed to implement logic and checks for Art
|
|
9
|
-
* Blocks projects using an
|
|
11
|
+
* Blocks projects using an linear Dutch auctionprice curve for minting
|
|
10
12
|
* tokens.
|
|
11
13
|
* @author Art Blocks Inc.
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
library DALinLib {
|
|
17
|
+
/**
|
|
18
|
+
* @notice Auction details set for project `projectId` on core contract
|
|
19
|
+
* `coreContract`.
|
|
20
|
+
* @param projectId Project Id for which auction details were set
|
|
21
|
+
* @param coreContract Core contract address for which auction details were
|
|
22
|
+
* set
|
|
23
|
+
* @param auctionTimestampStart Timestamp when auction will start
|
|
24
|
+
* @param auctionTimestampEnd Timestamp when auction will end
|
|
25
|
+
* @param startPrice Start price of auction
|
|
26
|
+
* @param basePrice Base price of auction (end price)
|
|
27
|
+
*/
|
|
28
|
+
event SetAuctionDetailsLin(
|
|
29
|
+
uint256 indexed projectId,
|
|
30
|
+
address indexed coreContract,
|
|
31
|
+
uint40 auctionTimestampStart,
|
|
32
|
+
uint40 auctionTimestampEnd,
|
|
33
|
+
uint256 startPrice,
|
|
34
|
+
uint256 basePrice
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @notice Minimum allowed auction length updated to
|
|
39
|
+
* `minimumAuctionLengthSeconds` on the minter.
|
|
40
|
+
* @param minimumAuctionLengthSeconds minimum auction length for new
|
|
41
|
+
* auctions, in seconds
|
|
42
|
+
*/
|
|
43
|
+
event AuctionMinimumLengthSecondsUpdated(
|
|
44
|
+
uint256 minimumAuctionLengthSeconds
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// position of DA Lin Lib storage, using a diamond storage pattern
|
|
48
|
+
// for this library
|
|
49
|
+
bytes32 constant DAE_LIN_LIB_STORAGE_POSITION =
|
|
50
|
+
keccak256("dalinlib.storage");
|
|
51
|
+
|
|
15
52
|
struct DAProjectConfig {
|
|
16
53
|
// @dev max uint40 ~= 1.1e12 sec ~= 34 thousand years
|
|
17
54
|
uint40 timestampStart;
|
|
@@ -22,6 +59,11 @@ library DALinLib {
|
|
|
22
59
|
uint88 basePrice;
|
|
23
60
|
}
|
|
24
61
|
|
|
62
|
+
// Diamond storage pattern is used in this library
|
|
63
|
+
struct DALinLibStorage {
|
|
64
|
+
mapping(address coreContract => mapping(uint256 projectId => DAProjectConfig)) DAProjectConfigs_;
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
/**
|
|
26
68
|
* @notice Sets auction details for a linear-price auction type.
|
|
27
69
|
* @dev The function sets the auction start timestamp, auction end
|
|
@@ -31,45 +73,74 @@ library DALinLib {
|
|
|
31
73
|
* minter should check that auction length is greater than the minter's
|
|
32
74
|
* minimum allowable value (if the minter chooses to include that guard-
|
|
33
75
|
* rail).
|
|
34
|
-
* @param
|
|
35
|
-
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
76
|
+
* @param projectId The project Id to set auction details for.
|
|
77
|
+
* @param coreContract The core contract address to set auction details.
|
|
78
|
+
* @param auctionTimestampStart The timestamp when the auction will start.
|
|
79
|
+
* @param auctionTimestampEnd The timestamp when the auction will end.
|
|
80
|
+
* @param startPrice The starting price of the auction.
|
|
81
|
+
* @param basePrice The base price of the auction.
|
|
82
|
+
* @param allowReconfigureAfterStart Bool indicating whether the auction
|
|
41
83
|
* can be reconfigured after it has started. This is sometimes useful for
|
|
42
84
|
* minter implementations that want to allow an artist to reconfigure the
|
|
43
85
|
* auction after it has reached minter-local max invocations, for example.
|
|
44
86
|
*/
|
|
45
87
|
function setAuctionDetailsLin(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
uint40
|
|
49
|
-
|
|
50
|
-
uint88
|
|
51
|
-
|
|
88
|
+
uint256 projectId,
|
|
89
|
+
address coreContract,
|
|
90
|
+
uint40 auctionTimestampStart,
|
|
91
|
+
uint40 auctionTimestampEnd,
|
|
92
|
+
uint88 startPrice,
|
|
93
|
+
uint88 basePrice,
|
|
94
|
+
bool allowReconfigureAfterStart
|
|
52
95
|
) internal {
|
|
96
|
+
DAProjectConfig storage DAProjectConfig_ = getDAProjectConfig({
|
|
97
|
+
projectId: projectId,
|
|
98
|
+
coreContract: coreContract
|
|
99
|
+
});
|
|
53
100
|
require(
|
|
54
|
-
|
|
55
|
-
block.timestamp <
|
|
56
|
-
|
|
101
|
+
DAProjectConfig_.timestampStart == 0 || // uninitialized
|
|
102
|
+
block.timestamp < DAProjectConfig_.timestampStart || // auction not yet started
|
|
103
|
+
allowReconfigureAfterStart, // specifically allowing reconfiguration after start
|
|
57
104
|
"No modifications mid-auction"
|
|
58
105
|
);
|
|
59
106
|
require(
|
|
60
|
-
block.timestamp <
|
|
107
|
+
block.timestamp < auctionTimestampStart,
|
|
61
108
|
"Only future auctions"
|
|
62
109
|
);
|
|
63
110
|
require(
|
|
64
|
-
|
|
111
|
+
startPrice > basePrice,
|
|
65
112
|
"Auction start price must be greater than auction end price"
|
|
66
113
|
);
|
|
67
114
|
|
|
68
115
|
// EFFECTS
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
116
|
+
DAProjectConfig_.timestampStart = auctionTimestampStart;
|
|
117
|
+
DAProjectConfig_.timestampEnd = auctionTimestampEnd;
|
|
118
|
+
DAProjectConfig_.startPrice = startPrice;
|
|
119
|
+
DAProjectConfig_.basePrice = basePrice;
|
|
120
|
+
|
|
121
|
+
emit SetAuctionDetailsLin({
|
|
122
|
+
projectId: projectId,
|
|
123
|
+
coreContract: coreContract,
|
|
124
|
+
auctionTimestampStart: auctionTimestampStart,
|
|
125
|
+
auctionTimestampEnd: auctionTimestampEnd,
|
|
126
|
+
startPrice: startPrice,
|
|
127
|
+
basePrice: basePrice
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function resetAuctionDetails(
|
|
132
|
+
uint256 projectId,
|
|
133
|
+
address coreContract
|
|
134
|
+
) internal {
|
|
135
|
+
// @dev all fields must be deleted, and none of them are a complex type
|
|
136
|
+
// @dev getDAProjectConfig not used, as deletion of storage pointers is
|
|
137
|
+
// not supported
|
|
138
|
+
delete s().DAProjectConfigs_[coreContract][projectId];
|
|
139
|
+
|
|
140
|
+
emit DALib.ResetAuctionDetails({
|
|
141
|
+
projectId: projectId,
|
|
142
|
+
coreContract: coreContract
|
|
143
|
+
});
|
|
73
144
|
}
|
|
74
145
|
|
|
75
146
|
/**
|
|
@@ -77,33 +148,64 @@ library DALinLib {
|
|
|
77
148
|
* DAProjectConfig.
|
|
78
149
|
* This function reverts if auction has not yet started, or if auction is
|
|
79
150
|
* unconfigured.
|
|
151
|
+
* @param projectId Project Id to get price for
|
|
152
|
+
* @param coreContract Core contract address to get price for
|
|
80
153
|
* @return current price of token in Wei
|
|
81
154
|
*/
|
|
82
155
|
function getPriceLin(
|
|
83
|
-
|
|
156
|
+
uint256 projectId,
|
|
157
|
+
address coreContract
|
|
84
158
|
) internal view returns (uint256) {
|
|
159
|
+
DAProjectConfig storage _DAProjectConfig = getDAProjectConfig({
|
|
160
|
+
projectId: projectId,
|
|
161
|
+
coreContract: coreContract
|
|
162
|
+
});
|
|
85
163
|
// move parameters to memory if used more than once
|
|
86
|
-
uint256
|
|
87
|
-
uint256
|
|
88
|
-
uint256
|
|
89
|
-
uint256
|
|
90
|
-
|
|
91
|
-
require(block.timestamp >
|
|
92
|
-
if (block.timestamp >=
|
|
93
|
-
require(
|
|
94
|
-
return
|
|
164
|
+
uint256 timestampStart = _DAProjectConfig.timestampStart;
|
|
165
|
+
uint256 timestampEnd = _DAProjectConfig.timestampEnd;
|
|
166
|
+
uint256 startPrice = _DAProjectConfig.startPrice;
|
|
167
|
+
uint256 basePrice = _DAProjectConfig.basePrice;
|
|
168
|
+
|
|
169
|
+
require(block.timestamp > timestampStart, "Auction not yet started");
|
|
170
|
+
if (block.timestamp >= timestampEnd) {
|
|
171
|
+
require(timestampEnd > 0, "Only configured auctions");
|
|
172
|
+
return basePrice;
|
|
95
173
|
}
|
|
96
174
|
uint256 elapsedTime;
|
|
97
175
|
uint256 duration;
|
|
98
176
|
uint256 startToEndDiff;
|
|
99
177
|
unchecked {
|
|
100
178
|
// already checked that block.timestamp > _timestampStart
|
|
101
|
-
elapsedTime = block.timestamp -
|
|
179
|
+
elapsedTime = block.timestamp - timestampStart;
|
|
102
180
|
// _timestampEnd > _timestampStart enforced during assignment
|
|
103
|
-
duration =
|
|
181
|
+
duration = timestampEnd - timestampStart;
|
|
104
182
|
// _startPrice > _basePrice enforced during assignment
|
|
105
|
-
startToEndDiff =
|
|
183
|
+
startToEndDiff = startPrice - basePrice;
|
|
184
|
+
}
|
|
185
|
+
return startPrice - ((elapsedTime * startToEndDiff) / duration);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Loads the DAProjectConfig for a given project and core contract.
|
|
190
|
+
* @param projectId Project Id to get config for
|
|
191
|
+
* @param coreContract Core contract address to get config for
|
|
192
|
+
*/
|
|
193
|
+
function getDAProjectConfig(
|
|
194
|
+
uint256 projectId,
|
|
195
|
+
address coreContract
|
|
196
|
+
) internal view returns (DAProjectConfig storage) {
|
|
197
|
+
return s().DAProjectConfigs_[coreContract][projectId];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @notice Return the storage struct for reading and writing. This library
|
|
202
|
+
* uses a diamond storage pattern when managing storage.
|
|
203
|
+
* @return storageStruct The DALinLibStorage struct.
|
|
204
|
+
*/
|
|
205
|
+
function s() internal pure returns (DALinLibStorage storage storageStruct) {
|
|
206
|
+
bytes32 position = DAE_LIN_LIB_STORAGE_POSITION;
|
|
207
|
+
assembly ("memory-safe") {
|
|
208
|
+
storageStruct.slot := position
|
|
106
209
|
}
|
|
107
|
-
return _startPrice - ((elapsedTime * startToEndDiff) / duration);
|
|
108
210
|
}
|
|
109
211
|
}
|