@0xsequence/relayer 2.2.7 → 2.2.8
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/package.json +6 -6
- package/src/index.ts +10 -3
- package/src/local-relayer.ts +10 -3
- package/src/provider-relayer.ts +10 -5
- package/src/rpc-relayer/index.ts +10 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/relayer",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8",
|
|
4
4
|
"description": "relayer sub-package for Sequence",
|
|
5
5
|
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/relayer",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"ethers": ">=6"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@0xsequence/
|
|
16
|
-
"@0xsequence/
|
|
17
|
-
"@0xsequence/utils": "2.2.
|
|
15
|
+
"@0xsequence/core": "2.2.8",
|
|
16
|
+
"@0xsequence/abi": "2.2.8",
|
|
17
|
+
"@0xsequence/utils": "2.2.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@0xsequence/wallet-contracts": "^3.0.1",
|
|
21
21
|
"ethers": "6.13.4",
|
|
22
|
-
"@0xsequence/
|
|
23
|
-
"@0xsequence/
|
|
22
|
+
"@0xsequence/signhub": "2.2.8",
|
|
23
|
+
"@0xsequence/tests": "2.2.8"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"src",
|
package/src/index.ts
CHANGED
|
@@ -56,13 +56,20 @@ export interface Relayer {
|
|
|
56
56
|
): Promise<commons.transaction.TransactionResponse>
|
|
57
57
|
|
|
58
58
|
// getMetaTransactions returns a list of meta transactions for a given project and gas tank
|
|
59
|
-
getMetaTransactions(
|
|
60
|
-
|
|
59
|
+
getMetaTransactions(
|
|
60
|
+
projectId: number,
|
|
61
|
+
page?: proto.Page
|
|
62
|
+
): Promise<{
|
|
63
|
+
page: proto.Page
|
|
61
64
|
transactions: proto.MetaTxnLog[]
|
|
62
65
|
}>
|
|
63
66
|
|
|
64
67
|
// getTransactionCost returns the used fee cost for gas tank during a given period
|
|
65
|
-
getTransactionCost(
|
|
68
|
+
getTransactionCost(
|
|
69
|
+
projectId: number,
|
|
70
|
+
from: string,
|
|
71
|
+
to: string
|
|
72
|
+
): Promise<{
|
|
66
73
|
cost: number
|
|
67
74
|
}>
|
|
68
75
|
}
|
package/src/local-relayer.ts
CHANGED
|
@@ -77,14 +77,21 @@ export class LocalRelayer extends ProviderRelayer implements Relayer {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
async getMetaTransactions(
|
|
81
|
-
|
|
80
|
+
async getMetaTransactions(
|
|
81
|
+
projectId: number,
|
|
82
|
+
page?: proto.Page
|
|
83
|
+
): Promise<{
|
|
84
|
+
page: proto.Page
|
|
82
85
|
transactions: proto.MetaTxnLog[]
|
|
83
86
|
}> {
|
|
84
87
|
return { page: { page: 0, pageSize: 100 }, transactions: [] }
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
async getTransactionCost(
|
|
90
|
+
async getTransactionCost(
|
|
91
|
+
projectId: number,
|
|
92
|
+
from: string,
|
|
93
|
+
to: string
|
|
94
|
+
): Promise<{
|
|
88
95
|
cost: number
|
|
89
96
|
}> {
|
|
90
97
|
return { cost: 0 }
|
package/src/provider-relayer.ts
CHANGED
|
@@ -59,12 +59,19 @@ export abstract class ProviderRelayer implements Relayer {
|
|
|
59
59
|
waitForReceipt?: boolean
|
|
60
60
|
): Promise<commons.transaction.TransactionResponse>
|
|
61
61
|
|
|
62
|
-
abstract getTransactionCost(
|
|
62
|
+
abstract getTransactionCost(
|
|
63
|
+
projectId: number,
|
|
64
|
+
from: string,
|
|
65
|
+
to: string
|
|
66
|
+
): Promise<{
|
|
63
67
|
cost: number
|
|
64
68
|
}>
|
|
65
69
|
|
|
66
|
-
abstract getMetaTransactions(
|
|
67
|
-
|
|
70
|
+
abstract getMetaTransactions(
|
|
71
|
+
projectId: number,
|
|
72
|
+
page?: proto.Page
|
|
73
|
+
): Promise<{
|
|
74
|
+
page: proto.Page
|
|
68
75
|
transactions: proto.MetaTxnLog[]
|
|
69
76
|
}>
|
|
70
77
|
|
|
@@ -257,8 +264,6 @@ export abstract class ProviderRelayer implements Relayer {
|
|
|
257
264
|
return waitReceipt()
|
|
258
265
|
}
|
|
259
266
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
267
|
}
|
|
263
268
|
|
|
264
269
|
function isAbstractProvider(provider: any): provider is ethers.AbstractProvider {
|
package/src/rpc-relayer/index.ts
CHANGED
|
@@ -305,14 +305,21 @@ export class RpcRelayer implements Relayer {
|
|
|
305
305
|
} as commons.transaction.TransactionResponse
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
async getMetaTransactions(
|
|
309
|
-
|
|
308
|
+
async getMetaTransactions(
|
|
309
|
+
projectId: number,
|
|
310
|
+
page?: proto.Page
|
|
311
|
+
): Promise<{
|
|
312
|
+
page: proto.Page
|
|
310
313
|
transactions: proto.MetaTxnLog[]
|
|
311
314
|
}> {
|
|
312
315
|
return this.service.getMetaTransactions({ projectId, page })
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
async getTransactionCost(
|
|
318
|
+
async getTransactionCost(
|
|
319
|
+
projectId: number,
|
|
320
|
+
from: string,
|
|
321
|
+
to: string
|
|
322
|
+
): Promise<{
|
|
316
323
|
cost: number
|
|
317
324
|
}> {
|
|
318
325
|
return this.service.getTransactionCost({ projectId, from, to })
|