@artblocks/contracts 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +1 -1
  2. package/artifacts/contracts/interfaces/v0.8.x/IFormPaletteBindingHooks.sol/IFormPaletteBindingHooks.json +723 -0
  3. package/artifacts/contracts/interfaces/v0.8.x/IMintTimeAndTransferCountHooks.sol/IMintTimeAndTransferCountHooks.json +356 -0
  4. package/artifacts/contracts/interfaces/v0.8.x/IPMPProjectViewsV0.sol/IPMPProjectViewsV0.json +126 -0
  5. package/artifacts/contracts/interfaces/v0.8.x/ISharedMinterRequiredPMPV0.sol/ISharedMinterRequiredPMPV0.json +36 -0
  6. package/artifacts/contracts/libs/v0.8.x/minter-libs/RequiredPMPLib.sol/RequiredPMPLib.json +10 -0
  7. package/artifacts/contracts/minter-suite/Minters/MinterSetPricePMPV0.sol/MinterSetPricePMPV0.json +613 -0
  8. package/artifacts/contracts/mock/MockPMPMinterReentrantConfigureHook.sol/IMinterPMPPurchase.json +91 -0
  9. package/artifacts/contracts/mock/MockPMPMinterReentrantConfigureHook.sol/MockPMPMinterReentrantConfigureHook.json +180 -0
  10. package/artifacts/contracts/mock/MockPMPReentrantConfigureHook.sol/MockPMPReentrantConfigureHook.json +158 -0
  11. package/artifacts/contracts/mock/ReentrancyPMPMockShared.sol/IMinterPurchaseWithPMPs.json +67 -0
  12. package/artifacts/contracts/mock/ReentrancyPMPMockShared.sol/ReentrancyPMPMockShared.json +154 -0
  13. package/artifacts/contracts/web3call/combined-hooks/FormPaletteBindingHooks.sol/FormPaletteBindingHooks.json +919 -0
  14. package/artifacts/contracts/web3call/combined-hooks/MintTimeAndTransferCountHooks.sol/MintTimeAndTransferCountHooks.json +435 -0
  15. package/contracts/interfaces/v0.8.x/IFormPaletteBindingHooks.sol +339 -0
  16. package/contracts/interfaces/v0.8.x/IMintTimeAndTransferCountHooks.sol +125 -0
  17. package/contracts/interfaces/v0.8.x/IPMPProjectViewsV0.sol +59 -0
  18. package/contracts/interfaces/v0.8.x/ISharedMinterRequiredPMPV0.sol +27 -0
  19. package/contracts/libs/v0.8.x/minter-libs/RequiredPMPLib.sol +336 -0
  20. package/contracts/minter-suite/Minters/MinterSetPricePMPV0.sol +664 -0
  21. package/contracts/mock/MockPMPMinterReentrantConfigureHook.sol +85 -0
  22. package/contracts/mock/MockPMPReentrantConfigureHook.sol +59 -0
  23. package/contracts/mock/ReentrancyPMPMockShared.sol +81 -0
  24. package/contracts/web3call/combined-hooks/FormPaletteBindingHooks.sol +1392 -0
  25. package/contracts/web3call/combined-hooks/MintTimeAndTransferCountHooks.sol +483 -0
  26. package/package.json +2 -1
@@ -0,0 +1,339 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ pragma solidity ^0.8.0;
5
+
6
+ import {ITransferHook} from "./ITransferHook.sol";
7
+ import {IPMPAugmentHook} from "./IPMPAugmentHook.sol";
8
+ import {IPMPConfigureHook} from "./IPMPConfigureHook.sol";
9
+
10
+ /**
11
+ * @title Interface for the form/palette binding combined hook.
12
+ * @author Art Blocks Inc.
13
+ * @notice Binds one token of a registered "palette" project to one token of a
14
+ * "form" project, 1:1, while both are held by the same wallet. The binding is
15
+ * driven by a PostParam on the form token, enforced by a configure hook,
16
+ * surfaced by a read-augmentation hook, and broken by a transfer hook when
17
+ * either side changes hands. The contract also stores each palette project's
18
+ * entries and resolves which one a palette token receives.
19
+ */
20
+ interface IFormPaletteBindingHooks is
21
+ ITransferHook,
22
+ IPMPAugmentHook,
23
+ IPMPConfigureHook
24
+ {
25
+ /**
26
+ * @notice A registered palette project.
27
+ * @param coreContract Core contract hosting the project.
28
+ * @param projectId Project ID on that core.
29
+ */
30
+ struct PaletteProject {
31
+ address coreContract;
32
+ uint256 projectId;
33
+ }
34
+
35
+ /**
36
+ * @notice Why a binding was cleared.
37
+ * @param Configured The form token's binding param was set to
38
+ * `UNBOUND_PARAM_VALUE` by an authorized party.
39
+ * @param FormTransferred The form token changed owners.
40
+ * @param PaletteTransferred The palette token changed owners.
41
+ */
42
+ enum UnbindReason {
43
+ Configured,
44
+ FormTransferred,
45
+ PaletteTransferred
46
+ }
47
+
48
+ /**
49
+ * @notice Why `previewBind` reports a prospective binding as disallowed.
50
+ * @dev `None` is returned only when the binding would be accepted.
51
+ */
52
+ enum BindBlocker {
53
+ None,
54
+ FormTokenNotInFormProject,
55
+ PaletteProjectNotRegistered,
56
+ FormTokenDoesNotExist,
57
+ PaletteTokenDoesNotExist,
58
+ FormAlreadyBound,
59
+ PaletteAlreadyBound,
60
+ OwnerMismatch
61
+ }
62
+
63
+ /**
64
+ * @notice Project `projectId` on `coreContract` was registered as a palette
65
+ * project and assigned `slot`, with `paletteCount` immutable entries.
66
+ */
67
+ event PaletteProjectRegistered(
68
+ address indexed coreContract,
69
+ uint256 indexed projectId,
70
+ uint256 paletteCount
71
+ );
72
+
73
+ /**
74
+ * @notice A palette token is now bound to form token `formTokenId`.
75
+ * `owner` held both at the moment of binding.
76
+ */
77
+ event Bound(
78
+ uint256 indexed formTokenId,
79
+ address indexed paletteCoreContract,
80
+ uint256 indexed paletteTokenId,
81
+ address owner
82
+ );
83
+
84
+ /**
85
+ * @notice A palette token is no longer bound to form token `formTokenId`.
86
+ */
87
+ event Unbound(
88
+ uint256 indexed formTokenId,
89
+ address indexed paletteCoreContract,
90
+ uint256 indexed paletteTokenId,
91
+ UnbindReason reason
92
+ );
93
+
94
+ /**
95
+ * @notice A transfer-driven write of form token `formTokenId`'s binding
96
+ * param reverted inside the transfer hook and was swallowed.
97
+ * @dev The on-chain binding is still cleared and reads are still correct;
98
+ * only the stored off-chain render of the form token is left stale. Any
99
+ * authorized party can repair it by writing the binding param.
100
+ */
101
+ event BindingParamSyncFailed(uint256 indexed formTokenId);
102
+
103
+ /// @notice `onTokenPMPConfigure` was called by an address other than the
104
+ /// bound PMP contract.
105
+ error OnlyPMP(address caller);
106
+
107
+ /// @notice This hook is configured as a configure hook on a project it
108
+ /// does not serve as the form project.
109
+ error ConfigureHookOnUnexpectedProject(
110
+ address coreContract,
111
+ uint256 tokenId
112
+ );
113
+
114
+ /// @notice The form token is already bound. Bindings are strict: set the
115
+ /// binding param to `UNBOUND_PARAM_VALUE` before binding a new palette.
116
+ error FormAlreadyBound(
117
+ uint256 formTokenId,
118
+ address paletteCoreContract,
119
+ uint256 paletteTokenId
120
+ );
121
+
122
+ /// @notice The palette token is already bound to another form token. Unbind
123
+ /// it from that form token first.
124
+ error PaletteAlreadyBound(
125
+ address paletteCoreContract,
126
+ uint256 paletteTokenId,
127
+ uint256 formTokenId
128
+ );
129
+
130
+ /// @notice The binding param value does not unpack to a token of a
131
+ /// registered palette project. Build values with `bindingParamValueFor`.
132
+ error UnknownBindingParamValue(uint256 bindingParamValue);
133
+
134
+ /// @notice The form token and palette token are held by different wallets.
135
+ error OwnerMismatch(address formOwner, address paletteOwner);
136
+
137
+ /// @notice A constructor argument was invalid.
138
+ error InvalidConstructorArgs();
139
+
140
+ /// @notice Only the form project's artist may register a palette project.
141
+ error OnlyFormProjectArtist(address caller, address artist);
142
+
143
+ /// @notice The zero address, and the form project itself, can never be
144
+ /// palette projects.
145
+ error InvalidPaletteProject(address coreContract, uint256 projectId);
146
+
147
+ /// @notice The palette project is already registered. Registration is
148
+ /// append-only and idempotent registration is rejected to surface mistakes.
149
+ error PaletteProjectAlreadyRegistered(
150
+ address coreContract,
151
+ uint256 projectId
152
+ );
153
+
154
+ /// @notice A palette project must be registered with at least one entry.
155
+ error EmptyPaletteList();
156
+
157
+ /// @notice `coreContract` does not have this hook configured as the
158
+ /// transfer hook for `projectId`.
159
+ error HookNotConfiguredForProject(
160
+ address coreContract,
161
+ uint256 projectId,
162
+ address configuredHook
163
+ );
164
+
165
+ /**
166
+ * @notice Register a palette project, whose tokens then become bindable to
167
+ * form tokens, together with the palette entries its tokens resolve to.
168
+ * @dev Callable only by the form project's artist, read live from the core.
169
+ * Append-only: there is no deregistration, so a pairing already made can
170
+ * never be invalidated by a later registration.
171
+ * @dev Registering is not sufficient on its own. The project also needs this
172
+ * contract as its read-augmentation hook on the PMP, or its own tokens
173
+ * receive no palette data, and as its transfer hook on its core, or pairings
174
+ * against it will not break when its tokens change hands. See REQUIRED
175
+ * SETUP, PER PALETTE PROJECT in the implementation's natspec.
176
+ * @dev `palettes` is written once via SSTORE2 and can never be changed,
177
+ * grown, or removed. That is deliberate: a token's entry is selected as
178
+ * `hash % palettes.length`, so a mutable list would silently repaint tokens
179
+ * that had already minted.
180
+ * @param coreContract Core contract hosting the project. Palette projects
181
+ * may live on any number of cores, including the form project's own. Must
182
+ * be an Art Blocks core: token hashes and owners are read from it, and it
183
+ * must support transfer hooks for pairings to break on transfer.
184
+ * @param projectId Project ID on that core. May be `0`; the form project
185
+ * itself is excluded, as is a project ID so large that its token IDs would
186
+ * not fit the binding param's low 96 bits, which no real project
187
+ * approaches.
188
+ * @param palettes The project's complete, ordered palette entries. Opaque
189
+ * to this contract — whatever the art scripts agree to consume. At least
190
+ * one entry is required. Repeat an entry to weight it.
191
+ */
192
+ function registerPaletteProject(
193
+ address coreContract,
194
+ uint256 projectId,
195
+ string[] calldata palettes
196
+ ) external;
197
+
198
+ /**
199
+ * @notice Whether a project's tokens may be bound to form tokens.
200
+ * @param coreContract Core contract hosting the project.
201
+ * @param projectId Project ID on that core.
202
+ * @return registered True if the project has been registered.
203
+ */
204
+ function isPaletteProject(
205
+ address coreContract,
206
+ uint256 projectId
207
+ ) external view returns (bool registered);
208
+
209
+ /**
210
+ * @notice The palette token currently bound to `formTokenId`.
211
+ * @dev Raw canonical state, with no same-owner check. The augment hook
212
+ * applies one before reporting a pairing on read, so in a deployment whose
213
+ * transfer hook was never configured this getter can report a pairing that
214
+ * `getTokenParams` reports as unbound. That divergence is intentional: the
215
+ * artwork must not render a cross-wallet pairing, while a front end still
216
+ * needs to see the mapping that is blocking a new binding.
217
+ * @param formTokenId Token ID in the form project.
218
+ * @return isBound True if a palette token is bound.
219
+ * @return coreContract Core of the bound palette token; zero when unbound.
220
+ * @return paletteTokenId The bound palette token; `0` when unbound.
221
+ */
222
+ function boundPaletteOf(
223
+ uint256 formTokenId
224
+ )
225
+ external
226
+ view
227
+ returns (bool isBound, address coreContract, uint256 paletteTokenId);
228
+
229
+ /**
230
+ * @notice The form token that a palette token is currently bound to.
231
+ * @dev Raw canonical state, with no same-owner check; see `boundPaletteOf`.
232
+ * @param coreContract Core of the palette token.
233
+ * @param paletteTokenId Token ID on that core.
234
+ * @return isBound True if the palette token is bound to a form token.
235
+ * @return formTokenId The bound form token; `0` when not bound.
236
+ */
237
+ function boundFormOf(
238
+ address coreContract,
239
+ uint256 paletteTokenId
240
+ ) external view returns (bool isBound, uint256 formTokenId);
241
+
242
+ /**
243
+ * @notice The binding param value that names a palette token.
244
+ * @dev The value a collector writes to bind it:
245
+ * `(uint256(uint160(coreContract)) << 96) | paletteTokenId`. Derivable off
246
+ * chain by arithmetic alone; this view additionally reports whether the
247
+ * project is registered. It is not a token ID, and nothing else in this
248
+ * interface speaks in it.
249
+ * @param coreContract Core of the palette token.
250
+ * @param paletteTokenId Token ID on that core.
251
+ * @return registered False if the token's project is not registered, in
252
+ * which case no value can name it.
253
+ * @return paramValue The value to write; `0` when not registered.
254
+ */
255
+ function bindingParamValueFor(
256
+ address coreContract,
257
+ uint256 paletteTokenId
258
+ ) external view returns (bool registered, uint256 paramValue);
259
+
260
+ /**
261
+ * @notice Whether binding a palette token to `formTokenId` would be
262
+ * accepted right now, and what blocks it if not.
263
+ * @dev Intended for front ends deciding between a single binding write and
264
+ * an unbind-then-bind pair, and for warning before either. Never reverts.
265
+ * @dev Same-owner is checked for the prospective pair. Existing pairings
266
+ * are read from raw canonical state, without the augment hook's ownership
267
+ * backstop, so a pairing that no longer renders can still be reported as
268
+ * `FormAlreadyBound` or `PaletteAlreadyBound` — which is what tells the
269
+ * front end an unbind is still required.
270
+ * @dev Re-writing the pairing that already exists is a no-op that the write
271
+ * path accepts, and is reported here as allowed.
272
+ * @param formTokenId Token ID in the form project.
273
+ * @param paletteCoreContract Core of the palette token.
274
+ * @param paletteTokenId Token ID on that core.
275
+ * @return allowed True if a binding write would succeed.
276
+ * @return blocker The first condition that fails, or `None`.
277
+ */
278
+ function previewBind(
279
+ uint256 formTokenId,
280
+ address paletteCoreContract,
281
+ uint256 paletteTokenId
282
+ ) external view returns (bool allowed, BindBlocker blocker);
283
+
284
+ /**
285
+ * @notice How many palette projects have been registered.
286
+ * @return count Registered palette project count.
287
+ */
288
+ function paletteProjectCount() external view returns (uint256 count);
289
+
290
+ /**
291
+ * @notice The palette project at an enumeration index.
292
+ * @dev Zero-based, in registration order, over `paletteProjectCount`
293
+ * entries. An index at or past the count returns zeros.
294
+ * @param index Enumeration index.
295
+ * @return coreContract Core contract, or zero if the index is unused.
296
+ * @return projectId Project ID on that core.
297
+ */
298
+ function paletteProjectAt(
299
+ uint256 index
300
+ ) external view returns (address coreContract, uint256 projectId);
301
+
302
+ /**
303
+ * @notice Number of palette entries registered for a palette project.
304
+ * @param coreContract Core contract hosting the project.
305
+ * @param projectId Project ID on that core.
306
+ * @return count Entry count; `0` if the project is not registered.
307
+ */
308
+ function paletteCount(
309
+ address coreContract,
310
+ uint256 projectId
311
+ ) external view returns (uint256 count);
312
+
313
+ /**
314
+ * @notice One registered palette entry by index.
315
+ * @param coreContract Core contract hosting the project.
316
+ * @param projectId Project ID on that core.
317
+ * @param index Index into the project's registered list.
318
+ * @return palette The entry. Reverts if the index is out of bounds.
319
+ */
320
+ function paletteAt(
321
+ address coreContract,
322
+ uint256 projectId,
323
+ uint256 index
324
+ ) external view returns (string memory palette);
325
+
326
+ /**
327
+ * @notice The palette entry a palette token resolves to.
328
+ * @dev The same value injected as `paletteData`, exposed for front ends and
329
+ * for anyone verifying a render. Empty if the token's project is not
330
+ * registered.
331
+ * @param coreContract Core of the palette token.
332
+ * @param paletteTokenId Token ID on that core.
333
+ * @return palette The resolved entry, or the empty string.
334
+ */
335
+ function paletteDataFor(
336
+ address coreContract,
337
+ uint256 paletteTokenId
338
+ ) external view returns (string memory palette);
339
+ }
@@ -0,0 +1,125 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ pragma solidity ^0.8.0;
5
+
6
+ import {ITransferHook} from "./ITransferHook.sol";
7
+ import {IPMPAugmentHook} from "./IPMPAugmentHook.sol";
8
+
9
+ /**
10
+ * @title Interface for the mint-time and transfer-count combined hook.
11
+ * @author Art Blocks Inc.
12
+ * @notice Reference implementation that records each token's mint timestamp
13
+ * and subsequent transfer count, and injects those values (plus live seconds
14
+ * since mint) into the token's PostParams.
15
+ */
16
+ interface IMintTimeAndTransferCountHooks is ITransferHook, IPMPAugmentHook {
17
+ /**
18
+ * @notice Packed per-token state written by the transfer hook.
19
+ * @dev Fits in a single storage slot. `mintTimestamp == 0` means this hook
20
+ * has not observed the token's mint.
21
+ * @param mintTimestamp Unix seconds of the mint block; `0` if the mint
22
+ * was not observed.
23
+ * @param transferCount Ownership-changing transfers after mint. Does not
24
+ * include the mint itself.
25
+ */
26
+ struct TokenTransferState {
27
+ uint64 mintTimestamp;
28
+ uint64 transferCount;
29
+ }
30
+
31
+ /**
32
+ * @notice Token `tokenId` on `coreContract` recorded its mint at
33
+ * `timestamp`.
34
+ */
35
+ event MintTimestampRecorded(
36
+ address indexed coreContract,
37
+ uint256 indexed tokenId,
38
+ uint64 timestamp
39
+ );
40
+
41
+ /**
42
+ * @notice Token `tokenId` on `coreContract` recorded an ownership-changing
43
+ * transfer. `transferCount` is the new count after this transfer.
44
+ */
45
+ event TransferCounted(
46
+ address indexed coreContract,
47
+ uint256 indexed tokenId,
48
+ uint64 transferCount,
49
+ address from,
50
+ address to
51
+ );
52
+
53
+ /**
54
+ * @notice PMP write of `transferCount` failed. Local hook state was still
55
+ * updated; the transfer that invoked this hook was not reverted.
56
+ * @dev Typical causes: the project has not configured a `transferCount`
57
+ * PMP with `AuthOption.Address` and `authAddress == this`, the param is
58
+ * locked, or the value is out of the configured range.
59
+ */
60
+ event TransferCountPMPSyncFailed(
61
+ address indexed coreContract,
62
+ uint256 indexed tokenId,
63
+ uint64 transferCount
64
+ );
65
+
66
+ /**
67
+ * @notice Thrown when the calling core does not have this hook configured
68
+ * for the token's project.
69
+ */
70
+ error HookNotConfiguredForProject(
71
+ address coreContract,
72
+ uint256 projectId,
73
+ address configuredHook
74
+ );
75
+
76
+ /**
77
+ * @notice Packed mint timestamp and transfer count for a token.
78
+ * @param coreContract Core contract the token belongs to.
79
+ * @param tokenId Token ID.
80
+ * @return state Packed state. Both fields are `0` if the token has never
81
+ * been recorded.
82
+ */
83
+ function tokenTransferState(
84
+ address coreContract,
85
+ uint256 tokenId
86
+ ) external view returns (TokenTransferState memory state);
87
+
88
+ /**
89
+ * @notice Unix seconds of the mint block, or `0` if this hook did not
90
+ * observe the mint.
91
+ */
92
+ function mintTimestamp(
93
+ address coreContract,
94
+ uint256 tokenId
95
+ ) external view returns (uint256);
96
+
97
+ /**
98
+ * @notice Ownership-changing transfers after mint. Does not include the
99
+ * mint itself. `0` until a post-mint transfer is recorded.
100
+ */
101
+ function transferCount(
102
+ address coreContract,
103
+ uint256 tokenId
104
+ ) external view returns (uint256);
105
+
106
+ /**
107
+ * @notice Seconds between the recorded mint timestamp and `block.timestamp`
108
+ * at the time of the call. `0` if the mint was not observed, or if
109
+ * `block.timestamp` is not after the mint timestamp.
110
+ */
111
+ function secondsSinceMint(
112
+ address coreContract,
113
+ uint256 tokenId
114
+ ) external view returns (uint256);
115
+
116
+ /**
117
+ * @notice Whether this hook observed the token's mint, which is the case
118
+ * only if it was configured as the project's transfer hook before the
119
+ * token was minted.
120
+ */
121
+ function isTrackedFromMint(
122
+ address coreContract,
123
+ uint256 tokenId
124
+ ) external view returns (bool);
125
+ }
@@ -0,0 +1,59 @@
1
+ // SPDX-License-Identifier: LGPL-3.0-only
2
+ // Created By: Art Blocks Inc.
3
+
4
+ pragma solidity ^0.8.0;
5
+
6
+ import {IPMPV0} from "./IPMPV0.sol";
7
+ import {IPMPConfigureHook} from "./IPMPConfigureHook.sol";
8
+ import {IPMPAugmentHook} from "./IPMPAugmentHook.sol";
9
+
10
+ /**
11
+ * @title PMP project introspection views
12
+ * @author Art Blocks Inc.
13
+ * @notice Interface for the project-level introspection views implemented by
14
+ * the PMP contracts. These views are intentionally not part of `IPMPV0`, which
15
+ * describes the configuration and read surface of the PMP protocol itself.
16
+ * They are declared separately here so that consumers which need to validate a
17
+ * project's PMP configuration on-chain may do so without requiring PMP
18
+ * implementers to adopt them.
19
+ * @dev Implemented by PMPV0 and PMPV1.
20
+ */
21
+ interface IPMPProjectViewsV0 {
22
+ /**
23
+ * @notice Get the project config for a given project.
24
+ * @param coreContract The address of the core contract to call.
25
+ * @param projectId The projectId of the project to get data for.
26
+ * @return pmpKeys The configured pmpKeys for the project.
27
+ * @return configNonce The config nonce for the project.
28
+ * @return tokenPMPPostConfigHook The tokenPMPPostConfigHook for the project.
29
+ * @return tokenPMPReadAugmentationHook The tokenPMPReadAugmentationHook for the project.
30
+ */
31
+ function getProjectConfig(
32
+ address coreContract,
33
+ uint256 projectId
34
+ )
35
+ external
36
+ view
37
+ returns (
38
+ string[] memory pmpKeys,
39
+ uint8 configNonce,
40
+ IPMPConfigureHook tokenPMPPostConfigHook,
41
+ IPMPAugmentHook tokenPMPReadAugmentationHook
42
+ );
43
+
44
+ /**
45
+ * @notice Get the PMP config from storage for a given project and pmpKey.
46
+ * @dev Returns the storage values, even if unconfigured or not part of the
47
+ * active project config. Check highestConfigNonce against the project's
48
+ * configNonce to verify if the pmpKey is part of the active project config.
49
+ * @param coreContract The address of the core contract to call.
50
+ * @param projectId The projectId of the project to get data for.
51
+ * @param pmpKey The pmpKey of the pmp to get data for.
52
+ * @return pmpConfigView The PMP config for the given project and pmpKey.
53
+ */
54
+ function getProjectPMPConfig(
55
+ address coreContract,
56
+ uint256 projectId,
57
+ string memory pmpKey
58
+ ) external view returns (IPMPV0.PMPConfigView memory pmpConfigView);
59
+ }
@@ -0,0 +1,27 @@
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 This interface defines events for shared minters that require
8
+ * specific post-mint params (PMPs) to be configured during mint.
9
+ * @author Art Blocks Inc.
10
+ */
11
+ interface ISharedMinterRequiredPMPV0 {
12
+ /**
13
+ * @notice The set of PMP keys required to be configured during mint for
14
+ * project `projectId` was updated to `requiredPMPKeys`.
15
+ * @dev A dedicated event is used rather than GenericMinterEventsLib, which
16
+ * intentionally does not support string values.
17
+ * @param projectId Project ID the required keys were set for
18
+ * @param coreContract Core contract address that projectId is on
19
+ * @param requiredPMPKeys The project's new set of required PMP keys. An
20
+ * empty array indicates the project has no required keys.
21
+ */
22
+ event ProjectRequiredPMPKeysUpdated(
23
+ uint256 indexed projectId,
24
+ address indexed coreContract,
25
+ string[] requiredPMPKeys
26
+ );
27
+ }