@zoralabs/protocol-sdk 0.11.6-COMMENTS.0 → 0.11.7-COMMENTS.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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +11 -3
- package/dist/premint/premint-client.d.ts +8 -0
- package/dist/premint/premint-client.d.ts.map +1 -1
- package/dist/test-utils.d.ts +2 -0
- package/dist/test-utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/comments/comments.test.ts +5 -9
- package/src/secondary/secondary-client.test.ts +131 -1
- package/src/sparks/sparks-sponsored-sparks-spender.test.ts +1 -0
- package/src/test-utils.ts +7 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @zoralabs/protocol-sdk@0.11.
|
|
2
|
+
> @zoralabs/protocol-sdk@0.11.7-COMMENTS.0 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk
|
|
3
3
|
> pnpm tsup
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/index.ts
|
|
@@ -12,7 +12,7 @@ CJS Build start
|
|
|
12
12
|
ESM Build start
|
|
13
13
|
CJS dist/index.cjs 228.29 KB
|
|
14
14
|
CJS dist/index.cjs.map 462.51 KB
|
|
15
|
-
CJS ⚡️ Build success in
|
|
15
|
+
CJS ⚡️ Build success in 315ms
|
|
16
16
|
ESM dist/index.js 222.00 KB
|
|
17
17
|
ESM dist/index.js.map 460.67 KB
|
|
18
|
-
ESM ⚡️ Build success in
|
|
18
|
+
ESM ⚡️ Build success in 338ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zoralabs/protocol-sdk
|
|
2
2
|
|
|
3
|
-
## 0.11.
|
|
3
|
+
## 0.11.7-COMMENTS.0
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -9,9 +9,17 @@
|
|
|
9
9
|
- Updated dependencies [4928687d]
|
|
10
10
|
- Updated dependencies [c6e1c1bc]
|
|
11
11
|
- Updated dependencies [7e285fb1]
|
|
12
|
-
- Updated dependencies [17cc9821]
|
|
13
12
|
- Updated dependencies [a141e322]
|
|
14
|
-
- @zoralabs/protocol-deployments@0.3.
|
|
13
|
+
- @zoralabs/protocol-deployments@0.3.9-COMMENTS.0
|
|
14
|
+
|
|
15
|
+
## 0.11.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [ad707434]
|
|
20
|
+
- Updated dependencies [2e68a87c]
|
|
21
|
+
- Updated dependencies [17cc9821]
|
|
22
|
+
- @zoralabs/protocol-deployments@0.3.8
|
|
15
23
|
|
|
16
24
|
## 0.11.5
|
|
17
25
|
|
|
@@ -1363,6 +1363,14 @@ export declare class PremintClient {
|
|
|
1363
1363
|
readonly type: "error";
|
|
1364
1364
|
readonly inputs: readonly [];
|
|
1365
1365
|
readonly name: "OWNER_CANNOT_BE_ZERO_ADDRESS";
|
|
1366
|
+
}, {
|
|
1367
|
+
readonly type: "error";
|
|
1368
|
+
readonly inputs: readonly [];
|
|
1369
|
+
readonly name: "OnlyAllowedForRegisteredMinter";
|
|
1370
|
+
}, {
|
|
1371
|
+
readonly type: "error";
|
|
1372
|
+
readonly inputs: readonly [];
|
|
1373
|
+
readonly name: "OnlyAllowedForTimedSaleStrategy";
|
|
1366
1374
|
}, {
|
|
1367
1375
|
readonly type: "error";
|
|
1368
1376
|
readonly inputs: readonly [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"premint-client.d.ts","sourceRoot":"","sources":["../../src/premint/premint-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,GAAG,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EACL,uBAAuB,EAGvB,qCAAqC,EAC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AG,EAAE,MAAM,CAAA;KAAE;;;;;;;IAOpE;;;;OAIG;IACG,oBAAoB,CAAC,UAAU,EAAE,sBAAsB;IAOvD,YAAY,CAAC,EACjB,aAAa,EACb,cAAc,EACd,aAAa,GACd,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,OAAO,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC,SAAS,CAAC;IAStB;;;;;;OAMG;IACG,kBAAkB,CAAC,EACvB,aAAa,EACb,aAAa,EACb,GAAG,EACH,aAAa,EACb,WAAW,GACZ,EAAE,2BAA2B
|
|
1
|
+
{"version":3,"file":"premint-client.d.ts","sourceRoot":"","sources":["../../src/premint/premint-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,GAAG,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EACL,uBAAuB,EAGvB,qCAAqC,EACtC,MAAM,gCAAgC,CAAC;AAgBxC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EAGzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAGrD,OAAO,EAGL,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAEL,+BAA+B,EAChC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,SAAS,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,qCAAqC,EAAE,MAAM,WAAW,CAAC;AAElE,KAAK,kBAAkB,GAAG,wBAAwB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ACH,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,GACb,EAAE,IAAI,CAAC,kCAAkC,EAAE,UAAU,CAAC,GAAG;IACxD,aAAa,EAAE,cAAc,CAAC;IAC9B,YAAY,EAAE,YAAY,CAAC;CAC5B,GAAG,OAAO,CACT,0BAA0B,CACxB,OAAO,qCAAqC,EAC5C,SAAS,EACT,GAAG,EACH,GAAG,EACH,GAAG,EACH,OAAO,GAAG,OAAO,CAClB,CACF,CA2BA;AAED,eAAO,MAAM,oBAAoB,2LAW9B;IACD,aAAa,EAAE,IAAI,CAAC,+BAA+B,EAAE,eAAe,CAAC,GAAG;QACtE,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,IAAI,CACX,cAAc,EACd,YAAY,GAAG,mBAAmB,GAAG,SAAS,GAAG,WAAW,CAC7D,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;CACjB,KAAG,qCAgDH,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,OAAO,EACP,OAAO,EACP,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,cAAc,CAwBjB"}
|
package/dist/test-utils.d.ts
CHANGED
|
@@ -10,4 +10,6 @@ export declare const fixedPriceMinterMinterArguments: ({ mintRecipient, }: {
|
|
|
10
10
|
mintRecipient: Address;
|
|
11
11
|
}) => `0x${string}`;
|
|
12
12
|
export declare function randomNewContract(): NewContractParams;
|
|
13
|
+
export declare const randomNonce: () => `0x${string}`;
|
|
14
|
+
export declare const thirtySecondsFromNow: () => bigint;
|
|
13
15
|
//# sourceMappingURL=test-utils.d.ts.map
|
package/dist/test-utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iCAAiC,EAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,OAAO,EACP,GAAG,EACH,YAAY,
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iCAAiC,EAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,OAAO,EACP,GAAG,EACH,YAAY,EAKb,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,eAAO,MAAM,cAAc,SAAgB,GAAG,gBAAgB,YAAY,+CAQzE,CAAC;AAEF,eAAO,MAAM,oBAAoB,+BAG9B;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,OAAO,iCAAiC,CAAC;CACzD,2BAKG,CAAC;AAEL,eAAO,MAAM,+BAA+B,uBAEzC;IACD,aAAa,EAAE,OAAO,CAAC;CACxB,kBAAwE,CAAC;AAI1E,wBAAgB,iBAAiB,IAAI,iBAAiB,CAKrD;AAED,eAAO,MAAM,WAAW,qBAC8B,CAAC;AACvD,eAAO,MAAM,oBAAoB,cACsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-sdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7-COMMENTS.0",
|
|
4
4
|
"repository": "https://github.com/ourzora/zora-protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@zoralabs/protocol-deployments": "^0.3.8-COMMENTS.0"
|
|
19
|
+
"@zoralabs/protocol-deployments": "^0.3.9-COMMENTS.0"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
|
-
"viem": "^2.21.21"
|
|
22
|
+
"viem": "^2.21.21",
|
|
23
|
+
"abitype": "^1.0.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@lavamoat/preinstall-always-fail": "2.0.0",
|
|
@@ -18,8 +18,6 @@ import {
|
|
|
18
18
|
} from "@zoralabs/protocol-deployments";
|
|
19
19
|
import {
|
|
20
20
|
Address,
|
|
21
|
-
keccak256,
|
|
22
|
-
toBytes,
|
|
23
21
|
zeroAddress,
|
|
24
22
|
parseEther,
|
|
25
23
|
TransactionReceipt,
|
|
@@ -30,6 +28,7 @@ import { createCreatorClient } from "src/sdk";
|
|
|
30
28
|
import { randomNewContract, waitForSuccess } from "src/test-utils";
|
|
31
29
|
import { permitCommentTypedDataDefinition } from "@zoralabs/protocol-deployments";
|
|
32
30
|
import { demoTokenMetadataURI } from "src/fixtures/contract-setup";
|
|
31
|
+
import { randomNonce, thirtySecondsFromNow } from "src/test-utils";
|
|
33
32
|
|
|
34
33
|
const getCommentIdentifierFromReceipt = (
|
|
35
34
|
receipt: TransactionReceipt,
|
|
@@ -46,9 +45,7 @@ const getCommentIdentifierFromReceipt = (
|
|
|
46
45
|
|
|
47
46
|
return logs[0]!.args.commentIdentifier;
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
const thirtySecondsFromNow =
|
|
51
|
-
BigInt(Math.round(new Date().getTime() / 1000)) + 30n;
|
|
48
|
+
|
|
52
49
|
// todo: move this to protocol-deployments
|
|
53
50
|
describe("comments", () => {
|
|
54
51
|
makeAnvilTest({
|
|
@@ -127,7 +124,7 @@ describe("comments", () => {
|
|
|
127
124
|
tokenId: newTokenId,
|
|
128
125
|
commenter: collectorAddress,
|
|
129
126
|
text: "hello world",
|
|
130
|
-
deadline: thirtySecondsFromNow,
|
|
127
|
+
deadline: thirtySecondsFromNow(),
|
|
131
128
|
nonce: randomNonce(),
|
|
132
129
|
referrer: zeroAddress,
|
|
133
130
|
commenterSmartWallet: zeroAddress,
|
|
@@ -194,7 +191,7 @@ describe("comments", () => {
|
|
|
194
191
|
const sparkComment: PermitSparkComment = {
|
|
195
192
|
sparksQuantity: 3n,
|
|
196
193
|
sparker: sparkerAddress,
|
|
197
|
-
deadline: thirtySecondsFromNow,
|
|
194
|
+
deadline: thirtySecondsFromNow(),
|
|
198
195
|
nonce: randomNonce(),
|
|
199
196
|
referrer: zeroAddress,
|
|
200
197
|
sourceChainId,
|
|
@@ -273,7 +270,6 @@ describe("comments", () => {
|
|
|
273
270
|
});
|
|
274
271
|
|
|
275
272
|
// Step 2: Prepare the permit data for timed sale mint and comment
|
|
276
|
-
const thirtySecondsFromNow = BigInt(Math.floor(Date.now() / 1000) + 30);
|
|
277
273
|
const quantity = 3n;
|
|
278
274
|
const mintReferral = zeroAddress;
|
|
279
275
|
const comment = "This is a test comment for timed sale mint";
|
|
@@ -285,7 +281,7 @@ describe("comments", () => {
|
|
|
285
281
|
tokenId: newTokenId,
|
|
286
282
|
mintReferral,
|
|
287
283
|
comment,
|
|
288
|
-
deadline: thirtySecondsFromNow,
|
|
284
|
+
deadline: thirtySecondsFromNow(),
|
|
289
285
|
nonce: randomNonce(),
|
|
290
286
|
sourceChainId: chainId,
|
|
291
287
|
destinationChainId: chainId,
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
zoraCreator1155ImplABI,
|
|
12
12
|
commentsABI,
|
|
13
13
|
callerAndCommenterABI,
|
|
14
|
+
PermitBuyOnSecondaryAndComment,
|
|
15
|
+
permitBuyOnSecondaryAndCommentTypedDataDefinition,
|
|
16
|
+
callerAndCommenterAddress,
|
|
17
|
+
sparkValue,
|
|
14
18
|
} from "@zoralabs/protocol-deployments";
|
|
15
19
|
import { SubgraphMintGetter } from "src/mint/subgraph-mint-getter";
|
|
16
20
|
import { ERROR_SECONDARY_NOT_STARTED } from "./secondary-client";
|
|
@@ -18,6 +22,7 @@ import { ISubgraphQuerier } from "src/apis/subgraph-querier";
|
|
|
18
22
|
import { mockTimedSaleStrategyTokenQueryResult } from "src/fixtures/mint-query-results";
|
|
19
23
|
import { new1155ContractVersion } from "src/create/contract-setup";
|
|
20
24
|
import { advanceToSaleAndAndLaunchMarket } from "src/fixtures/secondary";
|
|
25
|
+
import { randomNonce } from "src/test-utils";
|
|
21
26
|
|
|
22
27
|
describe("secondary", () => {
|
|
23
28
|
makeAnvilTest({
|
|
@@ -263,7 +268,7 @@ describe("secondary", () => {
|
|
|
263
268
|
);
|
|
264
269
|
|
|
265
270
|
makeAnvilTest({
|
|
266
|
-
forkBlockNumber:
|
|
271
|
+
forkBlockNumber: 16339853,
|
|
267
272
|
forkUrl: forkUrls.zoraSepolia,
|
|
268
273
|
anvilChainId: zoraSepolia.id,
|
|
269
274
|
})(
|
|
@@ -272,6 +277,7 @@ describe("secondary", () => {
|
|
|
272
277
|
viemClients: { publicClient, chain, walletClient, testClient },
|
|
273
278
|
}) => {
|
|
274
279
|
const collectorAccount = (await walletClient.getAddresses()!)[1]!;
|
|
280
|
+
const executorAccount = (await walletClient.getAddresses()!)[3]!;
|
|
275
281
|
|
|
276
282
|
const mintGetter = new SubgraphMintGetter(chain.id);
|
|
277
283
|
const contractAddress: Address =
|
|
@@ -370,6 +376,130 @@ describe("secondary", () => {
|
|
|
370
376
|
expect(boughtAndCommentedEvent[0]!.args.comment).toBe("test comment");
|
|
371
377
|
expect(boughtAndCommentedEvent[0]!.args.quantity).toBe(5n);
|
|
372
378
|
expect(boughtAndCommentedEvent[0]!.args.swapDirection).toBe(0);
|
|
379
|
+
|
|
380
|
+
// PERMIT BUY TEST
|
|
381
|
+
const buyResultASecondTime = await collectorClient.buy1155OnSecondary({
|
|
382
|
+
account: collectorAccount,
|
|
383
|
+
quantity: 5n,
|
|
384
|
+
contract: contractAddress,
|
|
385
|
+
tokenId: newTokenId,
|
|
386
|
+
comment: "test comment",
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
const valueToSend = (buyResultASecondTime.price!.wei.total * 105n) / 100n;
|
|
390
|
+
|
|
391
|
+
const { timestamp } = await publicClient.getBlock();
|
|
392
|
+
|
|
393
|
+
const permitBuy: PermitBuyOnSecondaryAndComment = {
|
|
394
|
+
collection: contractAddress,
|
|
395
|
+
tokenId: newTokenId,
|
|
396
|
+
quantity: 5n,
|
|
397
|
+
commenter: collectorAccount,
|
|
398
|
+
comment: "test comment",
|
|
399
|
+
maxEthToSpend: valueToSend,
|
|
400
|
+
deadline: timestamp + 30n,
|
|
401
|
+
sqrtPriceLimitX96: 0n,
|
|
402
|
+
nonce: randomNonce(),
|
|
403
|
+
sourceChainId: chain.id,
|
|
404
|
+
destinationChainId: chain.id,
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
const permitBuySignature = await walletClient.signTypedData(
|
|
408
|
+
permitBuyOnSecondaryAndCommentTypedDataDefinition(permitBuy),
|
|
409
|
+
);
|
|
410
|
+
|
|
411
|
+
await testClient.setBalance({
|
|
412
|
+
address: executorAccount,
|
|
413
|
+
value: parseEther("1"),
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
const { request } = await publicClient.simulateContract({
|
|
417
|
+
abi: callerAndCommenterABI,
|
|
418
|
+
address:
|
|
419
|
+
callerAndCommenterAddress[
|
|
420
|
+
chain.id as keyof typeof callerAndCommenterAddress
|
|
421
|
+
],
|
|
422
|
+
functionName: "permitBuyOnSecondaryAndComment",
|
|
423
|
+
args: [permitBuy, permitBuySignature],
|
|
424
|
+
value: valueToSend,
|
|
425
|
+
account: executorAccount,
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
await simulateAndWriteContractWithRetries({
|
|
429
|
+
parameters: request,
|
|
430
|
+
walletClient,
|
|
431
|
+
publicClient,
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// now PERMIT SELL ON SECONDARY TEST
|
|
435
|
+
const quantityToSell = 3n;
|
|
436
|
+
|
|
437
|
+
const sellResult = await collectorClient.sell1155OnSecondary({
|
|
438
|
+
account: collectorAccount,
|
|
439
|
+
quantity: quantityToSell,
|
|
440
|
+
contract: contractAddress,
|
|
441
|
+
tokenId: newTokenId,
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
expect(sellResult.error).toBeUndefined();
|
|
445
|
+
|
|
446
|
+
// approve 1155s for callerAndCommenter to transfer, when selling
|
|
447
|
+
await simulateAndWriteContractWithRetries({
|
|
448
|
+
parameters: {
|
|
449
|
+
abi: zoraCreator1155ImplABI,
|
|
450
|
+
address: contractAddress,
|
|
451
|
+
functionName: "setApprovalForAll",
|
|
452
|
+
account: collectorAccount,
|
|
453
|
+
args: [
|
|
454
|
+
callerAndCommenterAddress[
|
|
455
|
+
chain.id as keyof typeof callerAndCommenterAddress
|
|
456
|
+
],
|
|
457
|
+
true,
|
|
458
|
+
],
|
|
459
|
+
},
|
|
460
|
+
walletClient,
|
|
461
|
+
publicClient,
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
// now sell on secondary with comment
|
|
465
|
+
// by calling the caller and commenter contract
|
|
466
|
+
// if including a comment, must send sparkValue() as value
|
|
467
|
+
// function signature:
|
|
468
|
+
// function sellOnSecondaryAndComment(
|
|
469
|
+
// address commenter,
|
|
470
|
+
// uint256 quantity,
|
|
471
|
+
// address collection,
|
|
472
|
+
// uint256 tokenId,
|
|
473
|
+
// address payable recipient,
|
|
474
|
+
// uint256 minEthToAcquire,
|
|
475
|
+
// uint160 sqrtPriceLimitX96,
|
|
476
|
+
// string calldata comment
|
|
477
|
+
// )
|
|
478
|
+
await simulateAndWriteContractWithRetries({
|
|
479
|
+
parameters: {
|
|
480
|
+
abi: callerAndCommenterABI,
|
|
481
|
+
address:
|
|
482
|
+
callerAndCommenterAddress[
|
|
483
|
+
chain.id as keyof typeof callerAndCommenterAddress
|
|
484
|
+
],
|
|
485
|
+
functionName: "sellOnSecondaryAndComment",
|
|
486
|
+
account: collectorAccount,
|
|
487
|
+
args: [
|
|
488
|
+
collectorAccount,
|
|
489
|
+
quantityToSell,
|
|
490
|
+
contractAddress,
|
|
491
|
+
newTokenId,
|
|
492
|
+
collectorAccount,
|
|
493
|
+
// sell result with slippage
|
|
494
|
+
(sellResult.price!.wei.total * 95n) / 100n,
|
|
495
|
+
0n,
|
|
496
|
+
"test comment",
|
|
497
|
+
],
|
|
498
|
+
value: sparkValue(),
|
|
499
|
+
},
|
|
500
|
+
walletClient,
|
|
501
|
+
publicClient,
|
|
502
|
+
});
|
|
373
503
|
},
|
|
374
504
|
20_000,
|
|
375
505
|
);
|
package/src/test-utils.ts
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
Hex,
|
|
8
8
|
PublicClient,
|
|
9
9
|
encodeAbiParameters,
|
|
10
|
+
keccak256,
|
|
11
|
+
toBytes,
|
|
10
12
|
parseAbiParameters,
|
|
11
13
|
} from "viem";
|
|
12
14
|
import { NewContractParams } from "./create/types";
|
|
@@ -49,3 +51,8 @@ export function randomNewContract(): NewContractParams {
|
|
|
49
51
|
uri: demoContractMetadataURI,
|
|
50
52
|
};
|
|
51
53
|
}
|
|
54
|
+
|
|
55
|
+
export const randomNonce = () =>
|
|
56
|
+
keccak256(toBytes(Math.round(Math.random() * 1000)));
|
|
57
|
+
export const thirtySecondsFromNow = () =>
|
|
58
|
+
BigInt(Math.round(new Date().getTime() / 1000)) + 30n;
|