@sentio/sdk 2.44.3-rc.1 → 2.44.3-rc.10
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/lib/aptos/aptos-processor.d.ts +5 -4
- package/lib/aptos/aptos-processor.d.ts.map +1 -1
- package/lib/aptos/aptos-processor.js +13 -6
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +25 -0
- package/lib/aptos/builtin/0x1.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +22 -1
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/index.d.ts +2 -1
- package/lib/aptos/index.d.ts.map +1 -1
- package/lib/aptos/index.js.map +1 -1
- package/lib/core/event-logger.d.ts.map +1 -1
- package/lib/core/event-logger.js +2 -1
- package/lib/core/event-logger.js.map +1 -1
- package/lib/core/meter.d.ts.map +1 -1
- package/lib/core/meter.js +3 -1
- package/lib/core/meter.js.map +1 -1
- package/lib/eth/codegen/codegen.js +4 -5
- package/lib/eth/codegen/codegen.js.map +1 -1
- package/lib/eth/context.d.ts.map +1 -1
- package/lib/eth/context.js +9 -1
- package/lib/eth/context.js.map +1 -1
- package/lib/fuel/asset-processor.d.ts +1 -0
- package/lib/fuel/asset-processor.d.ts.map +1 -1
- package/lib/fuel/asset-processor.js +2 -1
- package/lib/fuel/asset-processor.js.map +1 -1
- package/lib/fuel/codegen/codegen.js +2 -2
- package/lib/fuel/codegen/codegen.js.map +1 -1
- package/lib/solana/builtin/types.d.ts +170 -170
- package/lib/solana/builtin/types.d.ts.map +1 -1
- package/lib/solana/builtin/types.js +1 -1
- package/lib/solana/builtin/types.js.map +1 -1
- package/lib/stark/codegen/codegen.js +2 -2
- package/lib/stark/codegen/codegen.js.map +1 -1
- package/lib/store/codegen.js +2 -2
- package/lib/store/codegen.js.map +1 -1
- package/lib/sui/builtin/0x1.d.ts +19 -0
- package/lib/sui/builtin/0x1.d.ts.map +1 -1
- package/lib/sui/builtin/0x1.js +28 -1
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/utils/price.d.ts.map +1 -1
- package/lib/utils/price.js +2 -1
- package/lib/utils/price.js.map +1 -1
- package/package.json +11 -15
- package/src/aptos/abis/0x1.json +73 -9
- package/src/aptos/aptos-processor.ts +21 -15
- package/src/aptos/builtin/0x1.ts +78 -1
- package/src/aptos/index.ts +2 -6
- package/src/core/event-logger.ts +2 -1
- package/src/core/meter.ts +3 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +204 -204
- package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.ts +12 -12
- package/src/eth/builtin/internal/erc1155-processor.ts +95 -95
- package/src/eth/builtin/internal/erc1155-test-utils.ts +8 -8
- package/src/eth/builtin/internal/erc20-processor.ts +140 -140
- package/src/eth/builtin/internal/erc20-test-utils.ts +6 -6
- package/src/eth/builtin/internal/erc20bytes-processor.ts +80 -80
- package/src/eth/builtin/internal/erc20bytes-test-utils.ts +4 -4
- package/src/eth/builtin/internal/erc721-processor.ts +133 -133
- package/src/eth/builtin/internal/erc721-test-utils.ts +6 -6
- package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.ts +1 -1
- package/src/eth/builtin/internal/factories/ERC1155__factory.ts +1 -1
- package/src/eth/builtin/internal/factories/ERC20Bytes__factory.ts +1 -1
- package/src/eth/builtin/internal/weth9-processor.ts +97 -97
- package/src/eth/builtin/internal/weth9-test-utils.ts +8 -8
- package/src/eth/codegen/codegen.ts +5 -5
- package/src/eth/context.ts +9 -1
- package/src/fuel/asset-processor.ts +3 -1
- package/src/fuel/codegen/codegen.ts +2 -2
- package/src/solana/builtin/types.ts +1 -1
- package/src/stark/codegen/codegen.ts +2 -2
- package/src/store/codegen.ts +2 -2
- package/src/sui/abis/0x1.json +391 -0
- package/src/sui/abis/0x3.json +20 -0
- package/src/sui/builtin/0x1.ts +44 -1
- package/src/sui/builtin/0x3.ts +1 -1
- package/src/utils/price.ts +2 -1
@@ -142,13 +142,13 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
142
142
|
id: BigNumberish,
|
143
143
|
overrides?: Overrides,
|
144
144
|
preparedData?: PreparedData,
|
145
|
-
ethCallContext?: EthCallContext
|
145
|
+
ethCallContext?: EthCallContext,
|
146
146
|
): Promise<bigint> {
|
147
147
|
try {
|
148
148
|
return await this.contract.getFunction("balanceOf(address,uint256)")(
|
149
149
|
account,
|
150
150
|
id,
|
151
|
-
overrides || {}
|
151
|
+
overrides || {},
|
152
152
|
);
|
153
153
|
} catch (e) {
|
154
154
|
const stack = new Error().stack;
|
@@ -161,11 +161,11 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
161
161
|
ids: BigNumberish[],
|
162
162
|
overrides?: Overrides,
|
163
163
|
preparedData?: PreparedData,
|
164
|
-
ethCallContext?: EthCallContext
|
164
|
+
ethCallContext?: EthCallContext,
|
165
165
|
): Promise<bigint[]> {
|
166
166
|
try {
|
167
167
|
return await this.contract.getFunction(
|
168
|
-
"balanceOfBatch(address[],uint256[])"
|
168
|
+
"balanceOfBatch(address[],uint256[])",
|
169
169
|
)(accounts, ids, overrides || {});
|
170
170
|
} catch (e) {
|
171
171
|
const stack = new Error().stack;
|
@@ -178,11 +178,11 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
178
178
|
operator: string,
|
179
179
|
overrides?: Overrides,
|
180
180
|
preparedData?: PreparedData,
|
181
|
-
ethCallContext?: EthCallContext
|
181
|
+
ethCallContext?: EthCallContext,
|
182
182
|
): Promise<boolean> {
|
183
183
|
try {
|
184
184
|
return await this.contract.getFunction(
|
185
|
-
"isApprovedForAll(address,address)"
|
185
|
+
"isApprovedForAll(address,address)",
|
186
186
|
)(account, operator, overrides || {});
|
187
187
|
} catch (e) {
|
188
188
|
const stack = new Error().stack;
|
@@ -194,12 +194,12 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
194
194
|
interfaceId: BytesLike,
|
195
195
|
overrides?: Overrides,
|
196
196
|
preparedData?: PreparedData,
|
197
|
-
ethCallContext?: EthCallContext
|
197
|
+
ethCallContext?: EthCallContext,
|
198
198
|
): Promise<boolean> {
|
199
199
|
try {
|
200
200
|
return await this.contract.getFunction("supportsInterface(bytes4)")(
|
201
201
|
interfaceId,
|
202
|
-
overrides || {}
|
202
|
+
overrides || {},
|
203
203
|
);
|
204
204
|
} catch (e) {
|
205
205
|
const stack = new Error().stack;
|
@@ -211,12 +211,12 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
211
211
|
id: BigNumberish,
|
212
212
|
overrides?: Overrides,
|
213
213
|
preparedData?: PreparedData,
|
214
|
-
ethCallContext?: EthCallContext
|
214
|
+
ethCallContext?: EthCallContext,
|
215
215
|
): Promise<string> {
|
216
216
|
try {
|
217
217
|
return await this.contract.getFunction("uri(uint256)")(
|
218
218
|
id,
|
219
|
-
overrides || {}
|
219
|
+
overrides || {},
|
220
220
|
);
|
221
221
|
} catch (e) {
|
222
222
|
const stack = new Error().stack;
|
@@ -235,12 +235,12 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
235
235
|
data: BytesLike,
|
236
236
|
overrides?: Overrides,
|
237
237
|
preparedData?: PreparedData,
|
238
|
-
ethCallContext?: EthCallContext
|
238
|
+
ethCallContext?: EthCallContext,
|
239
239
|
): Promise<void> {
|
240
240
|
try {
|
241
241
|
return await this.contract
|
242
242
|
.getFunction(
|
243
|
-
"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
|
243
|
+
"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)",
|
244
244
|
)
|
245
245
|
.staticCall(from, to, ids, amounts, data, overrides || {});
|
246
246
|
} catch (e) {
|
@@ -256,12 +256,12 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
256
256
|
data: BytesLike,
|
257
257
|
overrides?: Overrides,
|
258
258
|
preparedData?: PreparedData,
|
259
|
-
ethCallContext?: EthCallContext
|
259
|
+
ethCallContext?: EthCallContext,
|
260
260
|
): Promise<void> {
|
261
261
|
try {
|
262
262
|
return await this.contract
|
263
263
|
.getFunction(
|
264
|
-
"safeTransferFrom(address,address,uint256,uint256,bytes)"
|
264
|
+
"safeTransferFrom(address,address,uint256,uint256,bytes)",
|
265
265
|
)
|
266
266
|
.staticCall(from, to, id, amount, data, overrides || {});
|
267
267
|
} catch (e) {
|
@@ -274,7 +274,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
274
274
|
approved: boolean,
|
275
275
|
overrides?: Overrides,
|
276
276
|
preparedData?: PreparedData,
|
277
|
-
ethCallContext?: EthCallContext
|
277
|
+
ethCallContext?: EthCallContext,
|
278
278
|
): Promise<void> {
|
279
279
|
try {
|
280
280
|
return await this.contract
|
@@ -291,7 +291,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
291
291
|
balanceOf(
|
292
292
|
account: string,
|
293
293
|
id: BigNumberish,
|
294
|
-
ethCallContext: EthCallContext
|
294
|
+
ethCallContext: EthCallContext,
|
295
295
|
): EthCallParam {
|
296
296
|
try {
|
297
297
|
const iface = new Interface(["function balanceOf(address,uint256)"]);
|
@@ -308,7 +308,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
308
308
|
balanceOfBatch(
|
309
309
|
accounts: string[],
|
310
310
|
ids: BigNumberish[],
|
311
|
-
ethCallContext: EthCallContext
|
311
|
+
ethCallContext: EthCallContext,
|
312
312
|
): EthCallParam {
|
313
313
|
try {
|
314
314
|
const iface = new Interface([
|
@@ -330,7 +330,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
330
330
|
isApprovedForAll(
|
331
331
|
account: string,
|
332
332
|
operator: string,
|
333
|
-
ethCallContext: EthCallContext
|
333
|
+
ethCallContext: EthCallContext,
|
334
334
|
): EthCallParam {
|
335
335
|
try {
|
336
336
|
const iface = new Interface([
|
@@ -355,7 +355,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
355
355
|
ids: BigNumberish[],
|
356
356
|
amounts: BigNumberish[],
|
357
357
|
data: BytesLike,
|
358
|
-
ethCallContext: EthCallContext
|
358
|
+
ethCallContext: EthCallContext,
|
359
359
|
): EthCallParam {
|
360
360
|
try {
|
361
361
|
const iface = new Interface([
|
@@ -383,7 +383,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
383
383
|
id: BigNumberish,
|
384
384
|
amount: BigNumberish,
|
385
385
|
data: BytesLike,
|
386
|
-
ethCallContext: EthCallContext
|
386
|
+
ethCallContext: EthCallContext,
|
387
387
|
): EthCallParam {
|
388
388
|
try {
|
389
389
|
const iface = new Interface([
|
@@ -408,7 +408,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
408
408
|
setApprovalForAll(
|
409
409
|
operator: string,
|
410
410
|
approved: boolean,
|
411
|
-
ethCallContext: EthCallContext
|
411
|
+
ethCallContext: EthCallContext,
|
412
412
|
): EthCallParam {
|
413
413
|
try {
|
414
414
|
const iface = new Interface([
|
@@ -429,7 +429,7 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
429
429
|
},
|
430
430
|
supportsInterface(
|
431
431
|
interfaceId: BytesLike,
|
432
|
-
ethCallContext: EthCallContext
|
432
|
+
ethCallContext: EthCallContext,
|
433
433
|
): EthCallParam {
|
434
434
|
try {
|
435
435
|
const iface = new Interface(["function supportsInterface(bytes4)"]);
|
@@ -468,7 +468,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
468
468
|
async balanceOf(
|
469
469
|
account: string,
|
470
470
|
id: BigNumberish,
|
471
|
-
overrides?: Overrides
|
471
|
+
overrides?: Overrides,
|
472
472
|
): Promise<bigint> {
|
473
473
|
const ethCallContext = {
|
474
474
|
chainId: this.context.chainId,
|
@@ -483,14 +483,14 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
483
483
|
...overrides,
|
484
484
|
},
|
485
485
|
this.context.preparedData,
|
486
|
-
ethCallContext
|
486
|
+
ethCallContext,
|
487
487
|
);
|
488
488
|
}
|
489
489
|
|
490
490
|
async balanceOfBatch(
|
491
491
|
accounts: string[],
|
492
492
|
ids: BigNumberish[],
|
493
|
-
overrides?: Overrides
|
493
|
+
overrides?: Overrides,
|
494
494
|
): Promise<bigint[]> {
|
495
495
|
const ethCallContext = {
|
496
496
|
chainId: this.context.chainId,
|
@@ -505,14 +505,14 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
505
505
|
...overrides,
|
506
506
|
},
|
507
507
|
this.context.preparedData,
|
508
|
-
ethCallContext
|
508
|
+
ethCallContext,
|
509
509
|
);
|
510
510
|
}
|
511
511
|
|
512
512
|
async isApprovedForAll(
|
513
513
|
account: string,
|
514
514
|
operator: string,
|
515
|
-
overrides?: Overrides
|
515
|
+
overrides?: Overrides,
|
516
516
|
): Promise<boolean> {
|
517
517
|
const ethCallContext = {
|
518
518
|
chainId: this.context.chainId,
|
@@ -527,13 +527,13 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
527
527
|
...overrides,
|
528
528
|
},
|
529
529
|
this.context.preparedData,
|
530
|
-
ethCallContext
|
530
|
+
ethCallContext,
|
531
531
|
);
|
532
532
|
}
|
533
533
|
|
534
534
|
async supportsInterface(
|
535
535
|
interfaceId: BytesLike,
|
536
|
-
overrides?: Overrides
|
536
|
+
overrides?: Overrides,
|
537
537
|
): Promise<boolean> {
|
538
538
|
const ethCallContext = {
|
539
539
|
chainId: this.context.chainId,
|
@@ -547,7 +547,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
547
547
|
...overrides,
|
548
548
|
},
|
549
549
|
this.context.preparedData,
|
550
|
-
ethCallContext
|
550
|
+
ethCallContext,
|
551
551
|
);
|
552
552
|
}
|
553
553
|
|
@@ -564,7 +564,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
564
564
|
...overrides,
|
565
565
|
},
|
566
566
|
this.context.preparedData,
|
567
|
-
ethCallContext
|
567
|
+
ethCallContext,
|
568
568
|
);
|
569
569
|
}
|
570
570
|
|
@@ -578,7 +578,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
578
578
|
ids: BigNumberish[],
|
579
579
|
amounts: BigNumberish[],
|
580
580
|
data: BytesLike,
|
581
|
-
overrides?: Overrides
|
581
|
+
overrides?: Overrides,
|
582
582
|
): Promise<void> {
|
583
583
|
const ethCallContext = {
|
584
584
|
chainId: this.context.chainId,
|
@@ -596,7 +596,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
596
596
|
...overrides,
|
597
597
|
},
|
598
598
|
this.context.preparedData,
|
599
|
-
ethCallContext
|
599
|
+
ethCallContext,
|
600
600
|
);
|
601
601
|
},
|
602
602
|
async safeTransferFrom(
|
@@ -605,7 +605,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
605
605
|
id: BigNumberish,
|
606
606
|
amount: BigNumberish,
|
607
607
|
data: BytesLike,
|
608
|
-
overrides?: Overrides
|
608
|
+
overrides?: Overrides,
|
609
609
|
): Promise<void> {
|
610
610
|
const ethCallContext = {
|
611
611
|
chainId: this.context.chainId,
|
@@ -623,13 +623,13 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
623
623
|
...overrides,
|
624
624
|
},
|
625
625
|
this.context.preparedData,
|
626
|
-
ethCallContext
|
626
|
+
ethCallContext,
|
627
627
|
);
|
628
628
|
},
|
629
629
|
async setApprovalForAll(
|
630
630
|
operator: string,
|
631
631
|
approved: boolean,
|
632
|
-
overrides?: Overrides
|
632
|
+
overrides?: Overrides,
|
633
633
|
): Promise<void> {
|
634
634
|
const ethCallContext = {
|
635
635
|
chainId: this.context.chainId,
|
@@ -644,7 +644,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
644
644
|
...overrides,
|
645
645
|
},
|
646
646
|
this.context.preparedData,
|
647
|
-
ethCallContext
|
647
|
+
ethCallContext,
|
648
648
|
);
|
649
649
|
},
|
650
650
|
};
|
@@ -656,7 +656,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
656
656
|
balanceOf(
|
657
657
|
account: string,
|
658
658
|
id: BigNumberish,
|
659
|
-
overrides?: Overrides
|
659
|
+
overrides?: Overrides,
|
660
660
|
): EthCallParam {
|
661
661
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
662
662
|
if (overrides?.blockTag) {
|
@@ -675,7 +675,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
675
675
|
balanceOfBatch(
|
676
676
|
accounts: string[],
|
677
677
|
ids: BigNumberish[],
|
678
|
-
overrides?: Overrides
|
678
|
+
overrides?: Overrides,
|
679
679
|
): EthCallParam {
|
680
680
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
681
681
|
if (overrides?.blockTag) {
|
@@ -694,7 +694,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
694
694
|
isApprovedForAll(
|
695
695
|
account: string,
|
696
696
|
operator: string,
|
697
|
-
overrides?: Overrides
|
697
|
+
overrides?: Overrides,
|
698
698
|
): EthCallParam {
|
699
699
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
700
700
|
if (overrides?.blockTag) {
|
@@ -716,7 +716,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
716
716
|
ids: BigNumberish[],
|
717
717
|
amounts: BigNumberish[],
|
718
718
|
data: BytesLike,
|
719
|
-
overrides?: Overrides
|
719
|
+
overrides?: Overrides,
|
720
720
|
): EthCallParam {
|
721
721
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
722
722
|
if (overrides?.blockTag) {
|
@@ -736,7 +736,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
736
736
|
chainId: this.context.chainId.toString(),
|
737
737
|
address: this.context.address,
|
738
738
|
blockTag: blockTagWithOverride,
|
739
|
-
}
|
739
|
+
},
|
740
740
|
);
|
741
741
|
},
|
742
742
|
safeTransferFrom(
|
@@ -745,7 +745,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
745
745
|
id: BigNumberish,
|
746
746
|
amount: BigNumberish,
|
747
747
|
data: BytesLike,
|
748
|
-
overrides?: Overrides
|
748
|
+
overrides?: Overrides,
|
749
749
|
): EthCallParam {
|
750
750
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
751
751
|
if (overrides?.blockTag) {
|
@@ -764,7 +764,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
764
764
|
setApprovalForAll(
|
765
765
|
operator: string,
|
766
766
|
approved: boolean,
|
767
|
-
overrides?: Overrides
|
767
|
+
overrides?: Overrides,
|
768
768
|
): EthCallParam {
|
769
769
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
770
770
|
if (overrides?.blockTag) {
|
@@ -782,7 +782,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
782
782
|
},
|
783
783
|
supportsInterface(
|
784
784
|
interfaceId: BytesLike,
|
785
|
-
overrides?: Overrides
|
785
|
+
overrides?: Overrides,
|
786
786
|
): EthCallParam {
|
787
787
|
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
788
788
|
if (overrides?.blockTag) {
|
@@ -829,14 +829,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
829
829
|
preprocessHandler?: (
|
830
830
|
event: ApprovalForAllEvent,
|
831
831
|
ctx: ERC1155Context,
|
832
|
-
preprocessStore: { [k: string]: any }
|
833
|
-
) => Promise<PreprocessResult
|
832
|
+
preprocessStore: { [k: string]: any },
|
833
|
+
) => Promise<PreprocessResult>,
|
834
834
|
): this {
|
835
835
|
if (!filter) {
|
836
836
|
filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
|
837
837
|
null,
|
838
838
|
null,
|
839
|
-
null
|
839
|
+
null,
|
840
840
|
);
|
841
841
|
}
|
842
842
|
return super.onEthEvent(handler, filter!, fetchConfig, preprocessHandler);
|
@@ -849,8 +849,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
849
849
|
preprocessHandler?: (
|
850
850
|
event: TransferBatchEvent,
|
851
851
|
ctx: ERC1155Context,
|
852
|
-
preprocessStore: { [k: string]: any }
|
853
|
-
) => Promise<PreprocessResult
|
852
|
+
preprocessStore: { [k: string]: any },
|
853
|
+
) => Promise<PreprocessResult>,
|
854
854
|
): this {
|
855
855
|
if (!filter) {
|
856
856
|
filter = templateContract.filters[
|
@@ -867,8 +867,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
867
867
|
preprocessHandler?: (
|
868
868
|
event: TransferSingleEvent,
|
869
869
|
ctx: ERC1155Context,
|
870
|
-
preprocessStore: { [k: string]: any }
|
871
|
-
) => Promise<PreprocessResult
|
870
|
+
preprocessStore: { [k: string]: any },
|
871
|
+
) => Promise<PreprocessResult>,
|
872
872
|
): this {
|
873
873
|
if (!filter) {
|
874
874
|
filter = templateContract.filters[
|
@@ -885,8 +885,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
885
885
|
preprocessHandler?: (
|
886
886
|
event: URIEvent,
|
887
887
|
ctx: ERC1155Context,
|
888
|
-
preprocessStore: { [k: string]: any }
|
889
|
-
) => Promise<PreprocessResult
|
888
|
+
preprocessStore: { [k: string]: any },
|
889
|
+
) => Promise<PreprocessResult>,
|
890
890
|
): this {
|
891
891
|
if (!filter) {
|
892
892
|
filter = templateContract.filters["URI(string,uint256)"](null, null);
|
@@ -899,14 +899,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
899
899
|
fetchConfig?: Partial<EthFetchConfig>,
|
900
900
|
preprocessHandler?: (
|
901
901
|
call: BalanceOfCallTrace,
|
902
|
-
ctx: ERC1155Context
|
903
|
-
) => Promise<PreprocessResult
|
902
|
+
ctx: ERC1155Context,
|
903
|
+
) => Promise<PreprocessResult>,
|
904
904
|
): this {
|
905
905
|
return super.onEthTrace(
|
906
906
|
"0x00fdd58e",
|
907
907
|
handler as any,
|
908
908
|
fetchConfig,
|
909
|
-
preprocessHandler
|
909
|
+
preprocessHandler,
|
910
910
|
);
|
911
911
|
}
|
912
912
|
|
@@ -915,14 +915,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
915
915
|
fetchConfig?: Partial<EthFetchConfig>,
|
916
916
|
preprocessHandler?: (
|
917
917
|
call: BalanceOfBatchCallTrace,
|
918
|
-
ctx: ERC1155Context
|
919
|
-
) => Promise<PreprocessResult
|
918
|
+
ctx: ERC1155Context,
|
919
|
+
) => Promise<PreprocessResult>,
|
920
920
|
): this {
|
921
921
|
return super.onEthTrace(
|
922
922
|
"0x4e1273f4",
|
923
923
|
handler as any,
|
924
924
|
fetchConfig,
|
925
|
-
preprocessHandler
|
925
|
+
preprocessHandler,
|
926
926
|
);
|
927
927
|
}
|
928
928
|
|
@@ -931,33 +931,33 @@ export class ERC1155Processor extends BaseProcessor<
|
|
931
931
|
fetchConfig?: Partial<EthFetchConfig>,
|
932
932
|
preprocessHandler?: (
|
933
933
|
call: IsApprovedForAllCallTrace,
|
934
|
-
ctx: ERC1155Context
|
935
|
-
) => Promise<PreprocessResult
|
934
|
+
ctx: ERC1155Context,
|
935
|
+
) => Promise<PreprocessResult>,
|
936
936
|
): this {
|
937
937
|
return super.onEthTrace(
|
938
938
|
"0xe985e9c5",
|
939
939
|
handler as any,
|
940
940
|
fetchConfig,
|
941
|
-
preprocessHandler
|
941
|
+
preprocessHandler,
|
942
942
|
);
|
943
943
|
}
|
944
944
|
|
945
945
|
onCallSafeBatchTransferFrom(
|
946
946
|
handler: (
|
947
947
|
call: SafeBatchTransferFromCallTrace,
|
948
|
-
ctx: ERC1155Context
|
948
|
+
ctx: ERC1155Context,
|
949
949
|
) => void,
|
950
950
|
fetchConfig?: Partial<EthFetchConfig>,
|
951
951
|
preprocessHandler?: (
|
952
952
|
call: SafeBatchTransferFromCallTrace,
|
953
|
-
ctx: ERC1155Context
|
954
|
-
) => Promise<PreprocessResult
|
953
|
+
ctx: ERC1155Context,
|
954
|
+
) => Promise<PreprocessResult>,
|
955
955
|
): this {
|
956
956
|
return super.onEthTrace(
|
957
957
|
"0x2eb2c2d6",
|
958
958
|
handler as any,
|
959
959
|
fetchConfig,
|
960
|
-
preprocessHandler
|
960
|
+
preprocessHandler,
|
961
961
|
);
|
962
962
|
}
|
963
963
|
|
@@ -966,14 +966,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
966
966
|
fetchConfig?: Partial<EthFetchConfig>,
|
967
967
|
preprocessHandler?: (
|
968
968
|
call: SafeTransferFromCallTrace,
|
969
|
-
ctx: ERC1155Context
|
970
|
-
) => Promise<PreprocessResult
|
969
|
+
ctx: ERC1155Context,
|
970
|
+
) => Promise<PreprocessResult>,
|
971
971
|
): this {
|
972
972
|
return super.onEthTrace(
|
973
973
|
"0xf242432a",
|
974
974
|
handler as any,
|
975
975
|
fetchConfig,
|
976
|
-
preprocessHandler
|
976
|
+
preprocessHandler,
|
977
977
|
);
|
978
978
|
}
|
979
979
|
|
@@ -982,14 +982,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
982
982
|
fetchConfig?: Partial<EthFetchConfig>,
|
983
983
|
preprocessHandler?: (
|
984
984
|
call: SetApprovalForAllCallTrace,
|
985
|
-
ctx: ERC1155Context
|
986
|
-
) => Promise<PreprocessResult
|
985
|
+
ctx: ERC1155Context,
|
986
|
+
) => Promise<PreprocessResult>,
|
987
987
|
): this {
|
988
988
|
return super.onEthTrace(
|
989
989
|
"0xa22cb465",
|
990
990
|
handler as any,
|
991
991
|
fetchConfig,
|
992
|
-
preprocessHandler
|
992
|
+
preprocessHandler,
|
993
993
|
);
|
994
994
|
}
|
995
995
|
|
@@ -998,14 +998,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
998
998
|
fetchConfig?: Partial<EthFetchConfig>,
|
999
999
|
preprocessHandler?: (
|
1000
1000
|
call: SupportsInterfaceCallTrace,
|
1001
|
-
ctx: ERC1155Context
|
1002
|
-
) => Promise<PreprocessResult
|
1001
|
+
ctx: ERC1155Context,
|
1002
|
+
) => Promise<PreprocessResult>,
|
1003
1003
|
): this {
|
1004
1004
|
return super.onEthTrace(
|
1005
1005
|
"0x01ffc9a7",
|
1006
1006
|
handler as any,
|
1007
1007
|
fetchConfig,
|
1008
|
-
preprocessHandler
|
1008
|
+
preprocessHandler,
|
1009
1009
|
);
|
1010
1010
|
}
|
1011
1011
|
|
@@ -1014,14 +1014,14 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1014
1014
|
fetchConfig?: Partial<EthFetchConfig>,
|
1015
1015
|
preprocessHandler?: (
|
1016
1016
|
call: UriCallTrace,
|
1017
|
-
ctx: ERC1155Context
|
1018
|
-
) => Promise<PreprocessResult
|
1017
|
+
ctx: ERC1155Context,
|
1018
|
+
) => Promise<PreprocessResult>,
|
1019
1019
|
): this {
|
1020
1020
|
return super.onEthTrace(
|
1021
1021
|
"0x0e89341c",
|
1022
1022
|
handler as any,
|
1023
1023
|
fetchConfig,
|
1024
|
-
preprocessHandler
|
1024
|
+
preprocessHandler,
|
1025
1025
|
);
|
1026
1026
|
}
|
1027
1027
|
|
@@ -1029,12 +1029,12 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1029
1029
|
ApprovalForAll(
|
1030
1030
|
account?: string | null,
|
1031
1031
|
operator?: string | null,
|
1032
|
-
approved?: null
|
1032
|
+
approved?: null,
|
1033
1033
|
): ApprovalForAllEventFilter {
|
1034
1034
|
return templateContract.filters["ApprovalForAll(address,address,bool)"](
|
1035
1035
|
account,
|
1036
1036
|
operator,
|
1037
|
-
approved
|
1037
|
+
approved,
|
1038
1038
|
);
|
1039
1039
|
},
|
1040
1040
|
TransferBatch(
|
@@ -1042,7 +1042,7 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1042
1042
|
from?: string | null,
|
1043
1043
|
to?: string | null,
|
1044
1044
|
ids?: null,
|
1045
|
-
values?: null
|
1045
|
+
values?: null,
|
1046
1046
|
): TransferBatchEventFilter {
|
1047
1047
|
return templateContract.filters[
|
1048
1048
|
"TransferBatch(address,address,address,uint256[],uint256[])"
|
@@ -1053,7 +1053,7 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1053
1053
|
from?: string | null,
|
1054
1054
|
to?: string | null,
|
1055
1055
|
id?: null,
|
1056
|
-
value?: null
|
1056
|
+
value?: null,
|
1057
1057
|
): TransferSingleEventFilter {
|
1058
1058
|
return templateContract.filters[
|
1059
1059
|
"TransferSingle(address,address,address,uint256,uint256)"
|
@@ -1105,14 +1105,14 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1105
1105
|
preprocessHandler?: (
|
1106
1106
|
event: ApprovalForAllEvent,
|
1107
1107
|
ctx: ERC1155Context,
|
1108
|
-
preprocessStore: { [k: string]: any }
|
1109
|
-
) => Promise<PreprocessResult
|
1108
|
+
preprocessStore: { [k: string]: any },
|
1109
|
+
) => Promise<PreprocessResult>,
|
1110
1110
|
): this {
|
1111
1111
|
if (!filter) {
|
1112
1112
|
filter = templateContract.filters["ApprovalForAll(address,address,bool)"](
|
1113
1113
|
null,
|
1114
1114
|
null,
|
1115
|
-
null
|
1115
|
+
null,
|
1116
1116
|
);
|
1117
1117
|
}
|
1118
1118
|
return super.onEthEvent(handler, filter!, fetchConfig, preprocessHandler);
|
@@ -1125,8 +1125,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1125
1125
|
preprocessHandler?: (
|
1126
1126
|
event: TransferBatchEvent,
|
1127
1127
|
ctx: ERC1155Context,
|
1128
|
-
preprocessStore: { [k: string]: any }
|
1129
|
-
) => Promise<PreprocessResult
|
1128
|
+
preprocessStore: { [k: string]: any },
|
1129
|
+
) => Promise<PreprocessResult>,
|
1130
1130
|
): this {
|
1131
1131
|
if (!filter) {
|
1132
1132
|
filter = templateContract.filters[
|
@@ -1143,8 +1143,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1143
1143
|
preprocessHandler?: (
|
1144
1144
|
event: TransferSingleEvent,
|
1145
1145
|
ctx: ERC1155Context,
|
1146
|
-
preprocessStore: { [k: string]: any }
|
1147
|
-
) => Promise<PreprocessResult
|
1146
|
+
preprocessStore: { [k: string]: any },
|
1147
|
+
) => Promise<PreprocessResult>,
|
1148
1148
|
): this {
|
1149
1149
|
if (!filter) {
|
1150
1150
|
filter = templateContract.filters[
|
@@ -1161,8 +1161,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1161
1161
|
preprocessHandler?: (
|
1162
1162
|
event: URIEvent,
|
1163
1163
|
ctx: ERC1155Context,
|
1164
|
-
preprocessStore: { [k: string]: any }
|
1165
|
-
) => Promise<PreprocessResult
|
1164
|
+
preprocessStore: { [k: string]: any },
|
1165
|
+
) => Promise<PreprocessResult>,
|
1166
1166
|
): this {
|
1167
1167
|
if (!filter) {
|
1168
1168
|
filter = templateContract.filters["URI(string,uint256)"](null, null);
|
@@ -1173,12 +1173,12 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1173
1173
|
|
1174
1174
|
export function getERC1155Contract(
|
1175
1175
|
chainId: EthChainId,
|
1176
|
-
address: string
|
1176
|
+
address: string,
|
1177
1177
|
): ERC1155ContractView {
|
1178
1178
|
let contract = getContractByABI(
|
1179
1179
|
"ERC1155",
|
1180
1180
|
address,
|
1181
|
-
chainId
|
1181
|
+
chainId,
|
1182
1182
|
) as ERC1155ContractView;
|
1183
1183
|
if (!contract) {
|
1184
1184
|
const rawContract = ERC1155__factory.connect(address, getProvider(chainId));
|
@@ -1190,7 +1190,7 @@ export function getERC1155Contract(
|
|
1190
1190
|
|
1191
1191
|
export function getERC1155ContractOnContext(
|
1192
1192
|
context: EthContext,
|
1193
|
-
address: string
|
1193
|
+
address: string,
|
1194
1194
|
): ERC1155BoundContractView {
|
1195
1195
|
const view = getERC1155Contract(context.getChainId(), address);
|
1196
1196
|
const boundView = new ERC1155BoundContractView(address, view);
|