@zoralabs/protocol-sdk 0.11.11-DEV.0 → 0.11.12

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.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/secondary/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,wBAAsB,gBAAgB,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA0CrC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/secondary/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAMxC,wBAAsB,gBAAgB,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAiDrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/protocol-sdk",
3
- "version": "0.11.11-DEV.0",
3
+ "version": "0.11.12",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@zoralabs/protocol-deployments": "^0.3.11-DEV.4"
19
+ "@zoralabs/protocol-deployments": "^0.4.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "viem": "^2.21.21",
@@ -2,30 +2,67 @@ import {
2
2
  IHttpClient,
3
3
  httpClient as defaultHttpClient,
4
4
  } from "src/apis/http-api-base";
5
- import { paths } from "../apis/generated/allow-list-api-types";
6
- import { Hex } from "viem";
5
+ import { Address, decodeAbiParameters, encodeAbiParameters, Hex } from "viem";
7
6
  import { AllowList } from "./types";
8
7
 
9
- type AllowListCreateType = paths["/allowlist"]["post"];
10
- type AllowListCreateParameters =
11
- AllowListCreateType["requestBody"]["content"]["application/json"];
8
+ type AllowListCreateParameters = {
9
+ unhashedLeaves: Hex[];
10
+ leafTypeDescriptor: string[];
11
+ packedEncoding: boolean;
12
+ };
13
+
12
14
  type AllowListCreateResponse = {
13
- existing?: {
14
- entries: AllowListCreateParameters["entries"];
15
- root: string;
16
- added: string;
17
- };
18
- success: boolean;
19
- root: string;
20
- associated_id?: string;
15
+ merkleRoot: Hex;
16
+ };
17
+
18
+ type LanyardResponse = {
19
+ proof: Hex[];
20
+ unhashedLeaf: Hex;
21
21
  };
22
22
 
23
- const ALLOW_LIST_API_BASE = "http://allowlist.zora.co/";
24
- type AllowListAllowedResponse = {
23
+ const ALLOWLIST_ABI_PARAMETERS = [
24
+ { type: "address", name: "user" },
25
+ { type: "uint256", name: "maxCanMint" },
26
+ { type: "uint256", name: "price" },
27
+ ];
28
+
29
+ const ALLOW_LIST_API_BASE = "https://lanyard.org/api/v1/";
30
+ type AllowlistEntry = {
31
+ user: Address;
25
32
  maxCanMint: number;
26
- price: string;
27
- proof: string[];
28
- }[];
33
+ price: bigint;
34
+ priceDecimal: number;
35
+ proof: Hex[];
36
+ };
37
+
38
+ function getZoraEntry(
39
+ lanyardResponse: LanyardResponse | undefined,
40
+ root: string | undefined,
41
+ ): AllowlistEntry | undefined {
42
+ if (!lanyardResponse || !root) {
43
+ return;
44
+ }
45
+
46
+ try {
47
+ const [user, maxCanMint, price] = decodeAbiParameters(
48
+ ALLOWLIST_ABI_PARAMETERS,
49
+ lanyardResponse.unhashedLeaf,
50
+ );
51
+
52
+ return {
53
+ user: user as Address,
54
+ maxCanMint: Number(maxCanMint),
55
+ price: price as bigint,
56
+ // This won't realistically overflow.
57
+ priceDecimal: Number(price),
58
+ proof: lanyardResponse.proof,
59
+ };
60
+ } catch (e: any) {
61
+ console.error(e);
62
+ // Silently error here because the format is unexpected
63
+ return;
64
+ }
65
+ }
29
66
 
30
67
  export const createAllowList = async ({
31
68
  allowList,
@@ -39,26 +76,22 @@ export const createAllowList = async ({
39
76
  const { post, retries } = httpClient;
40
77
 
41
78
  const data: AllowListCreateParameters = {
42
- entries: allowList.entries.map((entry) => ({
43
- user: entry.user,
44
- maxCanMint: entry.maxCanMint,
45
- price: entry.price.toString(),
46
- })),
79
+ unhashedLeaves: allowList.entries.map((entry) =>
80
+ encodeAbiParameters(ALLOWLIST_ABI_PARAMETERS, [
81
+ entry.user,
82
+ entry.maxCanMint,
83
+ entry.price,
84
+ ]),
85
+ ),
86
+ leafTypeDescriptor: ["address", "uint256", "uint256"],
87
+ packedEncoding: false,
47
88
  };
48
89
 
49
90
  return (
50
- await retries(() =>
51
- post<AllowListCreateResponse>(`${baseUrl}allowlist`, data),
52
- )
53
- ).root;
91
+ await retries(() => post<AllowListCreateResponse>(`${baseUrl}tree`, data))
92
+ ).merkleRoot;
54
93
  };
55
94
 
56
- function padHex(value: string): Hex {
57
- if (value.startsWith("0x")) return value as Hex;
58
-
59
- return `0x${value}`;
60
- }
61
-
62
95
  export const getAllowListEntry = async ({
63
96
  merkleRoot,
64
97
  address,
@@ -73,24 +106,16 @@ export const getAllowListEntry = async ({
73
106
  const { retries, get } = httpClient;
74
107
 
75
108
  const response = await retries(() =>
76
- get<AllowListAllowedResponse>(
77
- `${baseUrl}allowed?user=${address}&root=${merkleRoot}`,
109
+ get<LanyardResponse>(
110
+ `${baseUrl}proof?address=${address}&root=${merkleRoot}`,
78
111
  ),
79
112
  );
80
113
 
81
- const entries = response?.map((x) => ({
82
- maxCanMint: x.maxCanMint,
83
- price: BigInt(x.price),
84
- proof: x.proof.map(padHex),
85
- }));
86
-
87
- const entry = entries?.sort(
88
- (a, b) => Number(a.price) - Number(b.price) || b.maxCanMint - a.maxCanMint,
89
- )[0];
114
+ const allowListEntry = getZoraEntry(response, merkleRoot);
90
115
 
91
116
  return {
92
- accessAllowed: entry && entry?.proof?.length,
93
- allowListEntry: entry,
117
+ accessAllowed: allowListEntry && allowListEntry?.proof?.length,
118
+ allowListEntry,
94
119
  };
95
120
  };
96
121
 
@@ -560,7 +560,7 @@ describe("create-helper", () => {
560
560
  "ipfs://bafkreice23maski3x52tsfqgxstx3kbiifnt5jotg3a5ynvve53c4soi2u",
561
561
  salesConfig: {
562
562
  type: "allowlistMint",
563
- presaleMerkleRoot: `0x${root}`,
563
+ presaleMerkleRoot: root,
564
564
  },
565
565
  },
566
566
  account: creator,
@@ -10,8 +10,11 @@ import {
10
10
  TimedSaleParamsType,
11
11
  } from "./types";
12
12
  import { parseEther } from "viem";
13
- // 1111 mints worth of market reward eth - 0.0000111 eth * 1,111 = 0.0123321 eth
14
- export const DEFAULT_MINIMUM_MARKET_ETH = parseEther("0.0123321");
13
+
14
+ // The amount of eth per mint for the secondary market
15
+ export const MARKET_REWARD_V2 = parseEther("0.0000222");
16
+ // 1111 mints worth of market reward eth - 0.0000222 eth * 1,111 = 0.0246642 eth
17
+ export const DEFAULT_MINIMUM_MARKET_ETH = parseEther("0.0246642");
15
18
  // 24 hour countdown
16
19
  export const DEFAULT_MARKET_COUNTDOWN = BigInt(24 * 60 * 60);
17
20
 
@@ -86,7 +89,7 @@ const getMinimumMarketEth = (
86
89
  >,
87
90
  ) => {
88
91
  if (params.minimumMintsForCountdown) {
89
- return params.minimumMintsForCountdown * parseEther("0.0000111");
92
+ return params.minimumMintsForCountdown * MARKET_REWARD_V2;
90
93
  }
91
94
  return params.minimumMarketEth || DEFAULT_MINIMUM_MARKET_ETH;
92
95
  };
@@ -101,7 +104,7 @@ const timedSaleSettingsWithDefaults = (
101
104
  minimumMarketEth: params.minimumMarketEth,
102
105
  minimumMintsForCountdown: params.minimumMintsForCountdown,
103
106
  });
104
- const minimumMintsForCountdown = minimumMarketEth / parseEther("0.0000111");
107
+ const minimumMintsForCountdown = minimumMarketEth / MARKET_REWARD_V2;
105
108
 
106
109
  return {
107
110
  type: "timed",
@@ -135,7 +135,7 @@ describe("rewardsClient", () => {
135
135
  30_000,
136
136
  );
137
137
  makeAnvilTest({
138
- forkBlockNumber: 14653556,
138
+ forkBlockNumber: 17938475,
139
139
  forkUrl: forkUrls.zoraSepolia,
140
140
  anvilChainId: zoraSepolia.id,
141
141
  })(
@@ -5,6 +5,11 @@ import {
5
5
  zoraTimedSaleStrategyAddress,
6
6
  } from "@zoralabs/protocol-deployments";
7
7
  import { SecondaryInfo } from "./types";
8
+
9
+ const LEGACY_MINIMUM_MARKET_ETH = parseEther("0.0123321");
10
+ const LEGACY_MARKET_REWARD = parseEther("0.0000111");
11
+ const MARKET_REWARD = parseEther("0.0000222");
12
+
8
13
  export async function getSecondaryInfo({
9
14
  contract,
10
15
  tokenId,
@@ -38,6 +43,12 @@ export async function getSecondaryInfo({
38
43
  return undefined;
39
44
  }
40
45
 
46
+ const usesLegacyMarketReward =
47
+ result.minimumMarketEth === LEGACY_MINIMUM_MARKET_ETH;
48
+ const erc20zBalance = await publicClient.getBalance({
49
+ address: result.erc20zAddress,
50
+ });
51
+
41
52
  return {
42
53
  erc20z: result.erc20zAddress,
43
54
  pool: result.poolAddress,
@@ -51,10 +62,11 @@ export async function getSecondaryInfo({
51
62
  minimumMintsForCountdown:
52
63
  result.minimumMarketEth === 0n
53
64
  ? undefined
54
- : result.minimumMarketEth / parseEther("0.0000111"),
55
- mintCount:
56
- (await publicClient.getBalance({
57
- address: result.erc20zAddress,
58
- })) / parseEther("0.0000111"),
65
+ : usesLegacyMarketReward
66
+ ? result.minimumMarketEth / LEGACY_MARKET_REWARD
67
+ : result.minimumMarketEth / MARKET_REWARD,
68
+ mintCount: usesLegacyMarketReward
69
+ ? erc20zBalance / LEGACY_MARKET_REWARD
70
+ : erc20zBalance / MARKET_REWARD,
59
71
  };
60
72
  }
package/.env DELETED
@@ -1,3 +0,0 @@
1
- VITE_CONDUIT_KEY=066ae224-b5c3-4086-ac11-a3a44ede9458
2
- VITE_ALCHEMY_KEY=SMkQiSpoj4za3-0hO0eP78i3b0OrBT4k
3
- PRIVATE_KEY=0x3a751f9ab33f32f374bd8c800b7a78725b33744dbf0716ca359dcd042c4b31c8
@@ -1,288 +0,0 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
- export interface paths {
6
- "/_health": {
7
- parameters: {
8
- query?: never;
9
- header?: never;
10
- path?: never;
11
- cookie?: never;
12
- };
13
- /** Health */
14
- get: operations["health__health_get"];
15
- put?: never;
16
- post?: never;
17
- delete?: never;
18
- options?: never;
19
- head?: never;
20
- patch?: never;
21
- trace?: never;
22
- };
23
- "/allowlist": {
24
- parameters: {
25
- query?: never;
26
- header?: never;
27
- path?: never;
28
- cookie?: never;
29
- };
30
- get?: never;
31
- put?: never;
32
- /**
33
- * Add Allowlist
34
- * @description This route adds a new allowlist
35
- */
36
- post: operations["add_allowlist_allowlist_post"];
37
- delete?: never;
38
- options?: never;
39
- head?: never;
40
- patch?: never;
41
- trace?: never;
42
- };
43
- "/allowed": {
44
- parameters: {
45
- query?: never;
46
- header?: never;
47
- path?: never;
48
- cookie?: never;
49
- };
50
- /** Allowed */
51
- get: operations["allowed_allowed_get"];
52
- put?: never;
53
- post?: never;
54
- delete?: never;
55
- options?: never;
56
- head?: never;
57
- patch?: never;
58
- trace?: never;
59
- };
60
- "/allowlist/{root}": {
61
- parameters: {
62
- query?: never;
63
- header?: never;
64
- path?: never;
65
- cookie?: never;
66
- };
67
- /** Allowlist */
68
- get: operations["allowlist_allowlist__root__get"];
69
- put?: never;
70
- post?: never;
71
- delete?: never;
72
- options?: never;
73
- head?: never;
74
- patch?: never;
75
- trace?: never;
76
- };
77
- "/allowlist/{root}/count": {
78
- parameters: {
79
- query?: never;
80
- header?: never;
81
- path?: never;
82
- cookie?: never;
83
- };
84
- /** Allowlist Count */
85
- get: operations["allowlist_count_allowlist__root__count_get"];
86
- put?: never;
87
- post?: never;
88
- delete?: never;
89
- options?: never;
90
- head?: never;
91
- patch?: never;
92
- trace?: never;
93
- };
94
- }
95
- export type webhooks = Record<string, never>;
96
- export interface components {
97
- schemas: {
98
- /**
99
- * AllowlistEntry
100
- * @description Currently matches zora-nft-drops model
101
- */
102
- AllowlistEntry: {
103
- /** User */
104
- user: string;
105
- /** Price */
106
- price: string;
107
- /** Maxcanmint */
108
- maxCanMint: number;
109
- };
110
- /** AllowlistRequest */
111
- AllowlistRequest: {
112
- /** Entries */
113
- entries: components["schemas"]["AllowlistEntry"][];
114
- /** Contract */
115
- contract?: string;
116
- };
117
- /** HTTPValidationError */
118
- HTTPValidationError: {
119
- /** Detail */
120
- detail?: components["schemas"]["ValidationError"][];
121
- };
122
- /** ValidationError */
123
- ValidationError: {
124
- /** Location */
125
- loc: (string | number)[];
126
- /** Message */
127
- msg: string;
128
- /** Error Type */
129
- type: string;
130
- };
131
- };
132
- responses: never;
133
- parameters: never;
134
- requestBodies: never;
135
- headers: never;
136
- pathItems: never;
137
- }
138
- export type $defs = Record<string, never>;
139
- export interface operations {
140
- health__health_get: {
141
- parameters: {
142
- query?: never;
143
- header?: never;
144
- path?: never;
145
- cookie?: never;
146
- };
147
- requestBody?: never;
148
- responses: {
149
- /** @description Successful Response */
150
- 200: {
151
- headers: {
152
- [name: string]: unknown;
153
- };
154
- content: {
155
- "application/json": unknown;
156
- };
157
- };
158
- };
159
- };
160
- add_allowlist_allowlist_post: {
161
- parameters: {
162
- query?: never;
163
- header?: never;
164
- path?: never;
165
- cookie?: never;
166
- };
167
- requestBody: {
168
- content: {
169
- "application/json": components["schemas"]["AllowlistRequest"];
170
- };
171
- };
172
- responses: {
173
- /** @description Successful Response */
174
- 200: {
175
- headers: {
176
- [name: string]: unknown;
177
- };
178
- content: {
179
- "application/json": unknown;
180
- };
181
- };
182
- /** @description Validation Error */
183
- 422: {
184
- headers: {
185
- [name: string]: unknown;
186
- };
187
- content: {
188
- "application/json": components["schemas"]["HTTPValidationError"];
189
- };
190
- };
191
- };
192
- };
193
- allowed_allowed_get: {
194
- parameters: {
195
- query: {
196
- user: string;
197
- root: string;
198
- };
199
- header?: never;
200
- path?: never;
201
- cookie?: never;
202
- };
203
- requestBody?: never;
204
- responses: {
205
- /** @description Successful Response */
206
- 200: {
207
- headers: {
208
- [name: string]: unknown;
209
- };
210
- content: {
211
- "application/json": unknown;
212
- };
213
- };
214
- /** @description Validation Error */
215
- 422: {
216
- headers: {
217
- [name: string]: unknown;
218
- };
219
- content: {
220
- "application/json": components["schemas"]["HTTPValidationError"];
221
- };
222
- };
223
- };
224
- };
225
- allowlist_allowlist__root__get: {
226
- parameters: {
227
- query?: never;
228
- header?: never;
229
- path: {
230
- root: string;
231
- };
232
- cookie?: never;
233
- };
234
- requestBody?: never;
235
- responses: {
236
- /** @description Successful Response */
237
- 200: {
238
- headers: {
239
- [name: string]: unknown;
240
- };
241
- content: {
242
- "application/json": unknown;
243
- };
244
- };
245
- /** @description Validation Error */
246
- 422: {
247
- headers: {
248
- [name: string]: unknown;
249
- };
250
- content: {
251
- "application/json": components["schemas"]["HTTPValidationError"];
252
- };
253
- };
254
- };
255
- };
256
- allowlist_count_allowlist__root__count_get: {
257
- parameters: {
258
- query?: never;
259
- header?: never;
260
- path: {
261
- root: string;
262
- };
263
- cookie?: never;
264
- };
265
- requestBody?: never;
266
- responses: {
267
- /** @description Successful Response */
268
- 200: {
269
- headers: {
270
- [name: string]: unknown;
271
- };
272
- content: {
273
- "application/json": unknown;
274
- };
275
- };
276
- /** @description Validation Error */
277
- 422: {
278
- headers: {
279
- [name: string]: unknown;
280
- };
281
- content: {
282
- "application/json": components["schemas"]["HTTPValidationError"];
283
- };
284
- };
285
- };
286
- };
287
- }
288
- //# sourceMappingURL=allow-list-api-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"allow-list-api-types.d.ts","sourceRoot":"","sources":["../../../src/apis/generated/allow-list-api-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE;QACV,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,aAAa;QACb,GAAG,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAC;QACtC,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,IAAI,CAAC,EAAE,KAAK,CAAC;QACb,MAAM,CAAC,EAAE,KAAK,CAAC;QACf,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,CAAC,EAAE,KAAK,CAAC;QACb,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,CAAC,EAAE,KAAK,CAAC;KACf,CAAC;IACF,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ;;;WAGG;QACH,IAAI,EAAE,UAAU,CAAC,8BAA8B,CAAC,CAAC;QACjD,MAAM,CAAC,EAAE,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