@zoralabs/protocol-sdk 0.7.2 → 0.7.3-SPARKS.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/CHANGELOG.md +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/mints/mints-contracts.d.ts +14 -30
- package/dist/mints/mints-contracts.d.ts.map +1 -1
- package/dist/mints/mints-relay-example.d.ts +4 -4
- package/dist/mints/mints-relay-example.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/mints/mints-eth-unwrapper-and-caller.ts +2 -2
- package/src/mints/mints-relay-example.ts +10 -10
- package/yarn-error.log +8602 -0
- package/.turbo/turbo-build.log +0 -15
- package/src/create/1155-create-helper.test.ts +0 -325
- package/src/mint/mint-client.test.ts +0 -263
- package/src/mints/mints-contracts.test.ts +0 -529
- package/src/mints/mints-eth-unwrapper-and-caller.test.ts +0 -467
- package/src/mints/mints-queries.test.ts +0 -105
- package/src/premint/premint-client.test.ts +0 -290
- package/src/premint/preminter.test.ts +0 -866
- package/test-integration/setup-test-contracts.ts +0 -96
- package/tsconfig.build.json +0 -10
- package/tsup.config.ts +0 -12
|
@@ -242,14 +242,6 @@ export declare function decodeCallFailedError(error: ContractFunctionRevertedErr
|
|
|
242
242
|
};
|
|
243
243
|
args: readonly [];
|
|
244
244
|
errorName: "CallerNotZoraCreator1155";
|
|
245
|
-
} | {
|
|
246
|
-
abiItem: {
|
|
247
|
-
readonly type: "error";
|
|
248
|
-
readonly inputs: readonly [];
|
|
249
|
-
readonly name: "CanOnlyReduceMaxSupply";
|
|
250
|
-
};
|
|
251
|
-
args: readonly [];
|
|
252
|
-
errorName: "CanOnlyReduceMaxSupply";
|
|
253
245
|
} | {
|
|
254
246
|
abiItem: {
|
|
255
247
|
readonly type: "error";
|
|
@@ -274,14 +266,6 @@ export declare function decodeCallFailedError(error: ContractFunctionRevertedErr
|
|
|
274
266
|
};
|
|
275
267
|
args: readonly [bigint, bigint, bigint, bigint];
|
|
276
268
|
errorName: "CannotMintMoreTokens";
|
|
277
|
-
} | {
|
|
278
|
-
abiItem: {
|
|
279
|
-
readonly type: "error";
|
|
280
|
-
readonly inputs: readonly [];
|
|
281
|
-
readonly name: "CannotReduceMaxSupplyBelowMinted";
|
|
282
|
-
};
|
|
283
|
-
args: readonly [];
|
|
284
|
-
errorName: "CannotReduceMaxSupplyBelowMinted";
|
|
285
269
|
} | {
|
|
286
270
|
abiItem: {
|
|
287
271
|
readonly type: "error";
|
|
@@ -494,14 +478,6 @@ export declare function decodeCallFailedError(error: ContractFunctionRevertedErr
|
|
|
494
478
|
};
|
|
495
479
|
args: readonly [];
|
|
496
480
|
errorName: "NonEthRedemption";
|
|
497
|
-
} | {
|
|
498
|
-
abiItem: {
|
|
499
|
-
readonly type: "error";
|
|
500
|
-
readonly inputs: readonly [];
|
|
501
|
-
readonly name: "OnlyTransfersFromZoraMints";
|
|
502
|
-
};
|
|
503
|
-
args: readonly [];
|
|
504
|
-
errorName: "OnlyTransfersFromZoraMints";
|
|
505
481
|
} | {
|
|
506
482
|
abiItem: {
|
|
507
483
|
readonly type: "error";
|
|
@@ -902,18 +878,18 @@ export declare function decodeCallFailedError(error: ContractFunctionRevertedErr
|
|
|
902
878
|
abiItem: {
|
|
903
879
|
readonly type: "error";
|
|
904
880
|
readonly inputs: readonly [];
|
|
905
|
-
readonly name: "
|
|
881
|
+
readonly name: "InvalidOwnerForAssociatedZoraSparks";
|
|
906
882
|
};
|
|
907
883
|
args: readonly [];
|
|
908
|
-
errorName: "
|
|
884
|
+
errorName: "InvalidOwnerForAssociatedZoraSparks";
|
|
909
885
|
} | {
|
|
910
886
|
abiItem: {
|
|
911
887
|
readonly type: "error";
|
|
912
888
|
readonly inputs: readonly [];
|
|
913
|
-
readonly name: "
|
|
889
|
+
readonly name: "MintWithSparksNotSupportedOnContract";
|
|
914
890
|
};
|
|
915
891
|
args: readonly [];
|
|
916
|
-
errorName: "
|
|
892
|
+
errorName: "MintWithSparksNotSupportedOnContract";
|
|
917
893
|
} | {
|
|
918
894
|
abiItem: {
|
|
919
895
|
readonly type: "error";
|
|
@@ -942,10 +918,18 @@ export declare function decodeCallFailedError(error: ContractFunctionRevertedErr
|
|
|
942
918
|
abiItem: {
|
|
943
919
|
readonly type: "error";
|
|
944
920
|
readonly inputs: readonly [];
|
|
945
|
-
readonly name: "
|
|
921
|
+
readonly name: "NotZoraSparks1155";
|
|
922
|
+
};
|
|
923
|
+
args: readonly [];
|
|
924
|
+
errorName: "NotZoraSparks1155";
|
|
925
|
+
} | {
|
|
926
|
+
abiItem: {
|
|
927
|
+
readonly type: "error";
|
|
928
|
+
readonly inputs: readonly [];
|
|
929
|
+
readonly name: "OnlyTransfersFromZoraSparks";
|
|
946
930
|
};
|
|
947
931
|
args: readonly [];
|
|
948
|
-
errorName: "
|
|
932
|
+
errorName: "OnlyTransfersFromZoraSparks";
|
|
949
933
|
} | {
|
|
950
934
|
abiItem: {
|
|
951
935
|
readonly type: "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mints-contracts.d.ts","sourceRoot":"","sources":["../../src/mints/mints-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAGnB,0BAA0B,EAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,6BAA6B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,eAAe,EAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EACL,OAAO,EACP,OAAO,EACP,6BAA6B,EAC7B,GAAG,EACH,YAAY,EACZ,sBAAsB,EACtB,uBAAuB,EAIxB,MAAM,MAAM,CAAC;AAKd;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;cAOlB,MAAM;;aAEP,MAAM,OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address, Hex, PublicClient, WalletClient } from "viem";
|
|
2
2
|
import { PermitSafeTransferBatch } from "./mints-contracts";
|
|
3
|
-
import {
|
|
3
|
+
import { sparksEthUnwrapperAndCallerAddress } from "@zoralabs/protocol-deployments";
|
|
4
4
|
export declare const getRelayCall: ({ tx, depositingAccount, originChainId, toChainId, }: {
|
|
5
5
|
tx: {
|
|
6
6
|
to: Address;
|
|
@@ -23,7 +23,7 @@ export declare const getRelayCall: ({ tx, depositingAccount, originChainId, toCh
|
|
|
23
23
|
relayFee: bigint;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const makeAndSignSponsoredRelayCall: ({ originChainId, toChainId, tx, executingAccount, walletClient, }: {
|
|
26
|
-
originChainId: keyof typeof
|
|
26
|
+
originChainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
27
27
|
toChainId: number;
|
|
28
28
|
tx: {
|
|
29
29
|
to: Address;
|
|
@@ -43,7 +43,7 @@ export declare const validateSponsoredRelayCall: ({ safeTransferData, additional
|
|
|
43
43
|
additionalValueToSend: bigint;
|
|
44
44
|
deadline: bigint;
|
|
45
45
|
executingAccount: Address;
|
|
46
|
-
chainId: keyof typeof
|
|
46
|
+
chainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
47
47
|
signature: Hex;
|
|
48
48
|
}) => Promise<void>;
|
|
49
49
|
export declare const validateAndExecuteSponsoredRelayCall: ({ permit, permitSignature, additionalValueToSend, deadline, chainId, executingAccount, sponsoredCallSignature, walletClient, publicClient, }: {
|
|
@@ -52,7 +52,7 @@ export declare const validateAndExecuteSponsoredRelayCall: ({ permit, permitSign
|
|
|
52
52
|
additionalValueToSend: bigint;
|
|
53
53
|
deadline: bigint;
|
|
54
54
|
executingAccount: Address;
|
|
55
|
-
chainId: keyof typeof
|
|
55
|
+
chainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
56
56
|
sponsoredCallSignature: Hex;
|
|
57
57
|
publicClient: PublicClient;
|
|
58
58
|
walletClient: WalletClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mints-relay-example.d.ts","sourceRoot":"","sources":["../../src/mints/mints-relay-example.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,YAAY,EAGZ,YAAY,EAEb,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"mints-relay-example.d.ts","sourceRoot":"","sources":["../../src/mints/mints-relay-example.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,YAAY,EAGZ,YAAY,EAEb,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAEL,kCAAkC,EACnC,MAAM,gCAAgC,CAAC;AAuBxC,eAAO,MAAM,YAAY;QAMnB;QACF,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;KACX;uBACkB,OAAO;mBACX,MAAM;eACV,MAAM;;;;;;;;;;;;EAyClB,CAAC;AAKF,eAAO,MAAM,6BAA6B;mBAQzB,MAAM,yCAAyC;eAEnD,MAAM;QAEb;QACF,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;KACX;sBACiB,OAAO;kBACX,YAAY;;;;;;EA2C3B,CAAC;AAIF,eAAO,MAAM,0BAA0B;sBASnB,GAAG;2BACE,MAAM;cACnB,MAAM;sBACE,OAAO;aAChB,MAAM,yCAAyC;eAC7C,GAAG;mBAiBf,CAAC;AAIF,eAAO,MAAM,oCAAoC;YAYvC,uBAAuB;qBACd,GAAG;2BAEG,MAAM;cAEnB,MAAM;sBAEE,OAAO;aAChB,MAAM,yCAAyC;4BAEhC,GAAG;kBACb,YAAY;kBACZ,YAAY;mBAyC3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3-SPARKS.0",
|
|
4
4
|
"repository": "https://github.com/ourzora/zora-protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lint": "prettier --check 'src/**/*.ts' 'test-integration/**/*.ts'"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@zoralabs/protocol-deployments": "
|
|
28
|
+
"@zoralabs/protocol-deployments": "0.2.0-SPARKS.0",
|
|
29
29
|
"semver": "^7.6.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
iUnwrapAndForwardActionABI,
|
|
3
|
-
|
|
3
|
+
sparksEthUnwrapperAndCallerAddress,
|
|
4
4
|
zoraMints1155Config,
|
|
5
5
|
} from "@zoralabs/protocol-deployments";
|
|
6
6
|
import { Account, Address, Hex, encodeFunctionData } from "viem";
|
|
@@ -78,6 +78,6 @@ export const unwrapAndForwardEthPermitAndTypedDataDefinition = ({
|
|
|
78
78
|
quantities,
|
|
79
79
|
safeTransferData:
|
|
80
80
|
safeTransferData || makeCallWithEthSafeTransferData(callWithEth),
|
|
81
|
-
to:
|
|
81
|
+
to: sparksEthUnwrapperAndCallerAddress[chainId],
|
|
82
82
|
nonce,
|
|
83
83
|
});
|
|
@@ -11,8 +11,8 @@ import axios from "axios";
|
|
|
11
11
|
import { paths, TransactionStepItem } from "@reservoir0x/relay-sdk";
|
|
12
12
|
import { PermitSafeTransferBatch } from "./mints-contracts";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
sparksEthUnwrapperAndCallerABI,
|
|
15
|
+
sparksEthUnwrapperAndCallerAddress,
|
|
16
16
|
} from "@zoralabs/protocol-deployments";
|
|
17
17
|
import { makeCallWithEthSafeTransferData } from "./mints-eth-unwrapper-and-caller";
|
|
18
18
|
|
|
@@ -103,7 +103,7 @@ export const makeAndSignSponsoredRelayCall = async ({
|
|
|
103
103
|
walletClient,
|
|
104
104
|
}: {
|
|
105
105
|
// the chain to call from (current chain)
|
|
106
|
-
originChainId: keyof typeof
|
|
106
|
+
originChainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
107
107
|
// the chain that the call will be executed on
|
|
108
108
|
toChainId: number;
|
|
109
109
|
// the tx to call on the other chain:
|
|
@@ -120,7 +120,7 @@ export const makeAndSignSponsoredRelayCall = async ({
|
|
|
120
120
|
originChainId,
|
|
121
121
|
toChainId,
|
|
122
122
|
tx,
|
|
123
|
-
depositingAccount:
|
|
123
|
+
depositingAccount: sparksEthUnwrapperAndCallerAddress[originChainId],
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
// build call to forward the relay call to the other chain that will be
|
|
@@ -173,7 +173,7 @@ export const validateSponsoredRelayCall = async ({
|
|
|
173
173
|
additionalValueToSend: bigint;
|
|
174
174
|
deadline: bigint;
|
|
175
175
|
executingAccount: Address;
|
|
176
|
-
chainId: keyof typeof
|
|
176
|
+
chainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
177
177
|
signature: Hex;
|
|
178
178
|
}) => {
|
|
179
179
|
const typedData = permitWithAdditionalValueTypedDataDefinition({
|
|
@@ -215,7 +215,7 @@ export const validateAndExecuteSponsoredRelayCall = async ({
|
|
|
215
215
|
deadline: bigint;
|
|
216
216
|
// account that is to execute the call, and must have signed the sponsored call
|
|
217
217
|
executingAccount: Address;
|
|
218
|
-
chainId: keyof typeof
|
|
218
|
+
chainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
219
219
|
// signature of the sponsored call
|
|
220
220
|
sponsoredCallSignature: Hex;
|
|
221
221
|
publicClient: PublicClient;
|
|
@@ -241,8 +241,8 @@ export const validateAndExecuteSponsoredRelayCall = async ({
|
|
|
241
241
|
// value of the mints and sent to the other chain.
|
|
242
242
|
// any remaining value from the unwrapped MINTs is refunded to the original caller.
|
|
243
243
|
const simulated = await publicClient.simulateContract({
|
|
244
|
-
abi:
|
|
245
|
-
address:
|
|
244
|
+
abi: sparksEthUnwrapperAndCallerABI,
|
|
245
|
+
address: sparksEthUnwrapperAndCallerAddress[chainId],
|
|
246
246
|
functionName: "permitWithAdditionalValue",
|
|
247
247
|
args: [permit, permitSignature],
|
|
248
248
|
account: executingAccount,
|
|
@@ -278,7 +278,7 @@ function permitWithAdditionalValueTypedDataDefinition({
|
|
|
278
278
|
safeTransferData: Hex;
|
|
279
279
|
additionalValueToSend: bigint;
|
|
280
280
|
deadline: bigint;
|
|
281
|
-
chainId: keyof typeof
|
|
281
|
+
chainId: keyof typeof sparksEthUnwrapperAndCallerAddress;
|
|
282
282
|
}) {
|
|
283
283
|
return makeTypeData({
|
|
284
284
|
primaryType: "PermitWithAdditionalValue",
|
|
@@ -307,7 +307,7 @@ function permitWithAdditionalValueTypedDataDefinition({
|
|
|
307
307
|
chainId,
|
|
308
308
|
name: "Relay",
|
|
309
309
|
version: "1",
|
|
310
|
-
verifyingContract:
|
|
310
|
+
verifyingContract: sparksEthUnwrapperAndCallerAddress[chainId],
|
|
311
311
|
},
|
|
312
312
|
});
|
|
313
313
|
}
|