@sentio/sdk 2.6.4-rc.1 → 2.6.4-rc.3
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/core/normalization.js +9 -1
- package/lib/core/normalization.js.map +1 -1
- package/lib/core/numberish.test.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +19 -19
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +6 -6
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +9 -9
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +7 -7
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +10 -10
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +7 -7
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.js +1 -1
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/view-function.js +1 -1
- package/lib/eth/codegen/view-function.js.map +1 -1
- package/lib/eth/eth.d.ts +2 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/src/core/normalization.ts +9 -1
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +18 -19
- package/src/eth/builtin/internal/erc1155-processor.ts +5 -6
- package/src/eth/builtin/internal/erc20-processor.ts +8 -9
- package/src/eth/builtin/internal/erc20bytes-processor.ts +6 -7
- package/src/eth/builtin/internal/erc721-processor.ts +9 -10
- package/src/eth/builtin/internal/weth9-processor.ts +6 -7
- package/src/eth/codegen/file.ts +1 -1
- package/src/eth/codegen/view-function.ts +1 -1
- package/src/index.ts +3 -0
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -442,7 +441,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
442
441
|
async accessController(overrides?: Overrides): Promise<string> {
|
443
442
|
if (!overrides && this.context) {
|
444
443
|
overrides = {
|
445
|
-
blockTag:
|
444
|
+
blockTag: this.context.blockNumber,
|
446
445
|
};
|
447
446
|
}
|
448
447
|
return await this.view.accessController(overrides || {});
|
@@ -451,7 +450,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
451
450
|
async aggregator(overrides?: Overrides): Promise<string> {
|
452
451
|
if (!overrides && this.context) {
|
453
452
|
overrides = {
|
454
|
-
blockTag:
|
453
|
+
blockTag: this.context.blockNumber,
|
455
454
|
};
|
456
455
|
}
|
457
456
|
return await this.view.aggregator(overrides || {});
|
@@ -460,7 +459,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
460
459
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
461
460
|
if (!overrides && this.context) {
|
462
461
|
overrides = {
|
463
|
-
blockTag:
|
462
|
+
blockTag: this.context.blockNumber,
|
464
463
|
};
|
465
464
|
}
|
466
465
|
return await this.view.decimals(overrides || {});
|
@@ -469,7 +468,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
469
468
|
async description(overrides?: Overrides): Promise<string> {
|
470
469
|
if (!overrides && this.context) {
|
471
470
|
overrides = {
|
472
|
-
blockTag:
|
471
|
+
blockTag: this.context.blockNumber,
|
473
472
|
};
|
474
473
|
}
|
475
474
|
return await this.view.description(overrides || {});
|
@@ -481,7 +480,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
481
480
|
): Promise<bigint> {
|
482
481
|
if (!overrides && this.context) {
|
483
482
|
overrides = {
|
484
|
-
blockTag:
|
483
|
+
blockTag: this.context.blockNumber,
|
485
484
|
};
|
486
485
|
}
|
487
486
|
return await this.view.getAnswer(_roundId, overrides || {});
|
@@ -501,7 +500,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
501
500
|
> {
|
502
501
|
if (!overrides && this.context) {
|
503
502
|
overrides = {
|
504
|
-
blockTag:
|
503
|
+
blockTag: this.context.blockNumber,
|
505
504
|
};
|
506
505
|
}
|
507
506
|
return await this.view.getRoundData(_roundId, overrides || {});
|
@@ -513,7 +512,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
513
512
|
): Promise<bigint> {
|
514
513
|
if (!overrides && this.context) {
|
515
514
|
overrides = {
|
516
|
-
blockTag:
|
515
|
+
blockTag: this.context.blockNumber,
|
517
516
|
};
|
518
517
|
}
|
519
518
|
return await this.view.getTimestamp(_roundId, overrides || {});
|
@@ -522,7 +521,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
522
521
|
async latestAnswer(overrides?: Overrides): Promise<bigint> {
|
523
522
|
if (!overrides && this.context) {
|
524
523
|
overrides = {
|
525
|
-
blockTag:
|
524
|
+
blockTag: this.context.blockNumber,
|
526
525
|
};
|
527
526
|
}
|
528
527
|
return await this.view.latestAnswer(overrides || {});
|
@@ -531,7 +530,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
531
530
|
async latestRound(overrides?: Overrides): Promise<bigint> {
|
532
531
|
if (!overrides && this.context) {
|
533
532
|
overrides = {
|
534
|
-
blockTag:
|
533
|
+
blockTag: this.context.blockNumber,
|
535
534
|
};
|
536
535
|
}
|
537
536
|
return await this.view.latestRound(overrides || {});
|
@@ -550,7 +549,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
550
549
|
> {
|
551
550
|
if (!overrides && this.context) {
|
552
551
|
overrides = {
|
553
|
-
blockTag:
|
552
|
+
blockTag: this.context.blockNumber,
|
554
553
|
};
|
555
554
|
}
|
556
555
|
return await this.view.latestRoundData(overrides || {});
|
@@ -559,7 +558,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
559
558
|
async latestTimestamp(overrides?: Overrides): Promise<bigint> {
|
560
559
|
if (!overrides && this.context) {
|
561
560
|
overrides = {
|
562
|
-
blockTag:
|
561
|
+
blockTag: this.context.blockNumber,
|
563
562
|
};
|
564
563
|
}
|
565
564
|
return await this.view.latestTimestamp(overrides || {});
|
@@ -568,7 +567,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
568
567
|
async owner(overrides?: Overrides): Promise<string> {
|
569
568
|
if (!overrides && this.context) {
|
570
569
|
overrides = {
|
571
|
-
blockTag:
|
570
|
+
blockTag: this.context.blockNumber,
|
572
571
|
};
|
573
572
|
}
|
574
573
|
return await this.view.owner(overrides || {});
|
@@ -580,7 +579,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
580
579
|
): Promise<string> {
|
581
580
|
if (!overrides && this.context) {
|
582
581
|
overrides = {
|
583
|
-
blockTag:
|
582
|
+
blockTag: this.context.blockNumber,
|
584
583
|
};
|
585
584
|
}
|
586
585
|
return await this.view.phaseAggregators(arg0, overrides || {});
|
@@ -589,7 +588,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
589
588
|
async phaseId(overrides?: Overrides): Promise<bigint> {
|
590
589
|
if (!overrides && this.context) {
|
591
590
|
overrides = {
|
592
|
-
blockTag:
|
591
|
+
blockTag: this.context.blockNumber,
|
593
592
|
};
|
594
593
|
}
|
595
594
|
return await this.view.phaseId(overrides || {});
|
@@ -598,7 +597,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
598
597
|
async proposedAggregator(overrides?: Overrides): Promise<string> {
|
599
598
|
if (!overrides && this.context) {
|
600
599
|
overrides = {
|
601
|
-
blockTag:
|
600
|
+
blockTag: this.context.blockNumber,
|
602
601
|
};
|
603
602
|
}
|
604
603
|
return await this.view.proposedAggregator(overrides || {});
|
@@ -618,7 +617,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
618
617
|
> {
|
619
618
|
if (!overrides && this.context) {
|
620
619
|
overrides = {
|
621
|
-
blockTag:
|
620
|
+
blockTag: this.context.blockNumber,
|
622
621
|
};
|
623
622
|
}
|
624
623
|
return await this.view.proposedGetRoundData(_roundId, overrides || {});
|
@@ -637,7 +636,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
637
636
|
> {
|
638
637
|
if (!overrides && this.context) {
|
639
638
|
overrides = {
|
640
|
-
blockTag:
|
639
|
+
blockTag: this.context.blockNumber,
|
641
640
|
};
|
642
641
|
}
|
643
642
|
return await this.view.proposedLatestRoundData(overrides || {});
|
@@ -646,7 +645,7 @@ export class EACAggregatorProxyBoundContractView extends BoundContractView<
|
|
646
645
|
async version(overrides?: Overrides): Promise<bigint> {
|
647
646
|
if (!overrides && this.context) {
|
648
647
|
overrides = {
|
649
|
-
blockTag:
|
648
|
+
blockTag: this.context.blockNumber,
|
650
649
|
};
|
651
650
|
}
|
652
651
|
return await this.view.version(overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -211,7 +210,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
211
210
|
): Promise<bigint> {
|
212
211
|
if (!overrides && this.context) {
|
213
212
|
overrides = {
|
214
|
-
blockTag:
|
213
|
+
blockTag: this.context.blockNumber,
|
215
214
|
};
|
216
215
|
}
|
217
216
|
return await this.view.balanceOf(account, id, overrides || {});
|
@@ -224,7 +223,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
224
223
|
): Promise<bigint[]> {
|
225
224
|
if (!overrides && this.context) {
|
226
225
|
overrides = {
|
227
|
-
blockTag:
|
226
|
+
blockTag: this.context.blockNumber,
|
228
227
|
};
|
229
228
|
}
|
230
229
|
return await this.view.balanceOfBatch(accounts, ids, overrides || {});
|
@@ -237,7 +236,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
237
236
|
): Promise<boolean> {
|
238
237
|
if (!overrides && this.context) {
|
239
238
|
overrides = {
|
240
|
-
blockTag:
|
239
|
+
blockTag: this.context.blockNumber,
|
241
240
|
};
|
242
241
|
}
|
243
242
|
return await this.view.isApprovedForAll(account, operator, overrides || {});
|
@@ -249,7 +248,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
249
248
|
): Promise<boolean> {
|
250
249
|
if (!overrides && this.context) {
|
251
250
|
overrides = {
|
252
|
-
blockTag:
|
251
|
+
blockTag: this.context.blockNumber,
|
253
252
|
};
|
254
253
|
}
|
255
254
|
return await this.view.supportsInterface(interfaceId, overrides || {});
|
@@ -258,7 +257,7 @@ export class ERC1155BoundContractView extends BoundContractView<
|
|
258
257
|
async uri(id: BigNumberish, overrides?: Overrides): Promise<string> {
|
259
258
|
if (!overrides && this.context) {
|
260
259
|
overrides = {
|
261
|
-
blockTag:
|
260
|
+
blockTag: this.context.blockNumber,
|
262
261
|
};
|
263
262
|
}
|
264
263
|
return await this.view.uri(id, overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -268,7 +267,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
268
267
|
): Promise<bigint> {
|
269
268
|
if (!overrides && this.context) {
|
270
269
|
overrides = {
|
271
|
-
blockTag:
|
270
|
+
blockTag: this.context.blockNumber,
|
272
271
|
};
|
273
272
|
}
|
274
273
|
return await this.view.allowance(owner, spender, overrides || {});
|
@@ -277,7 +276,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
277
276
|
async balanceOf(account: string, overrides?: Overrides): Promise<bigint> {
|
278
277
|
if (!overrides && this.context) {
|
279
278
|
overrides = {
|
280
|
-
blockTag:
|
279
|
+
blockTag: this.context.blockNumber,
|
281
280
|
};
|
282
281
|
}
|
283
282
|
return await this.view.balanceOf(account, overrides || {});
|
@@ -286,7 +285,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
286
285
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
287
286
|
if (!overrides && this.context) {
|
288
287
|
overrides = {
|
289
|
-
blockTag:
|
288
|
+
blockTag: this.context.blockNumber,
|
290
289
|
};
|
291
290
|
}
|
292
291
|
return await this.view.decimals(overrides || {});
|
@@ -295,7 +294,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
295
294
|
async locker(overrides?: Overrides): Promise<string> {
|
296
295
|
if (!overrides && this.context) {
|
297
296
|
overrides = {
|
298
|
-
blockTag:
|
297
|
+
blockTag: this.context.blockNumber,
|
299
298
|
};
|
300
299
|
}
|
301
300
|
return await this.view.locker(overrides || {});
|
@@ -304,7 +303,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
304
303
|
async name(overrides?: Overrides): Promise<string> {
|
305
304
|
if (!overrides && this.context) {
|
306
305
|
overrides = {
|
307
|
-
blockTag:
|
306
|
+
blockTag: this.context.blockNumber,
|
308
307
|
};
|
309
308
|
}
|
310
309
|
return await this.view.name(overrides || {});
|
@@ -313,7 +312,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
313
312
|
async owner(overrides?: Overrides): Promise<string> {
|
314
313
|
if (!overrides && this.context) {
|
315
314
|
overrides = {
|
316
|
-
blockTag:
|
315
|
+
blockTag: this.context.blockNumber,
|
317
316
|
};
|
318
317
|
}
|
319
318
|
return await this.view.owner(overrides || {});
|
@@ -322,7 +321,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
322
321
|
async symbol(overrides?: Overrides): Promise<string> {
|
323
322
|
if (!overrides && this.context) {
|
324
323
|
overrides = {
|
325
|
-
blockTag:
|
324
|
+
blockTag: this.context.blockNumber,
|
326
325
|
};
|
327
326
|
}
|
328
327
|
return await this.view.symbol(overrides || {});
|
@@ -331,7 +330,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
331
330
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
332
331
|
if (!overrides && this.context) {
|
333
332
|
overrides = {
|
334
|
-
blockTag:
|
333
|
+
blockTag: this.context.blockNumber,
|
335
334
|
};
|
336
335
|
}
|
337
336
|
return await this.view.totalSupply(overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -174,7 +173,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
174
173
|
async name(overrides?: Overrides): Promise<string> {
|
175
174
|
if (!overrides && this.context) {
|
176
175
|
overrides = {
|
177
|
-
blockTag:
|
176
|
+
blockTag: this.context.blockNumber,
|
178
177
|
};
|
179
178
|
}
|
180
179
|
return await this.view.name(overrides || {});
|
@@ -183,7 +182,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
183
182
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
184
183
|
if (!overrides && this.context) {
|
185
184
|
overrides = {
|
186
|
-
blockTag:
|
185
|
+
blockTag: this.context.blockNumber,
|
187
186
|
};
|
188
187
|
}
|
189
188
|
return await this.view.totalSupply(overrides || {});
|
@@ -192,7 +191,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
192
191
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
193
192
|
if (!overrides && this.context) {
|
194
193
|
overrides = {
|
195
|
-
blockTag:
|
194
|
+
blockTag: this.context.blockNumber,
|
196
195
|
};
|
197
196
|
}
|
198
197
|
return await this.view.decimals(overrides || {});
|
@@ -201,7 +200,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
201
200
|
async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {
|
202
201
|
if (!overrides && this.context) {
|
203
202
|
overrides = {
|
204
|
-
blockTag:
|
203
|
+
blockTag: this.context.blockNumber,
|
205
204
|
};
|
206
205
|
}
|
207
206
|
return await this.view.balanceOf(who, overrides || {});
|
@@ -210,7 +209,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
210
209
|
async symbol(overrides?: Overrides): Promise<string> {
|
211
210
|
if (!overrides && this.context) {
|
212
211
|
overrides = {
|
213
|
-
blockTag:
|
212
|
+
blockTag: this.context.blockNumber,
|
214
213
|
};
|
215
214
|
}
|
216
215
|
return await this.view.symbol(overrides || {});
|
@@ -223,7 +222,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
|
|
223
222
|
): Promise<bigint> {
|
224
223
|
if (!overrides && this.context) {
|
225
224
|
overrides = {
|
226
|
-
blockTag:
|
225
|
+
blockTag: this.context.blockNumber,
|
227
226
|
};
|
228
227
|
}
|
229
228
|
return await this.view.allowance(owner, spender, overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -275,7 +274,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
275
274
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
276
275
|
if (!overrides && this.context) {
|
277
276
|
overrides = {
|
278
|
-
blockTag:
|
277
|
+
blockTag: this.context.blockNumber,
|
279
278
|
};
|
280
279
|
}
|
281
280
|
return await this.view.totalSupply(overrides || {});
|
@@ -284,7 +283,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
284
283
|
async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {
|
285
284
|
if (!overrides && this.context) {
|
286
285
|
overrides = {
|
287
|
-
blockTag:
|
286
|
+
blockTag: this.context.blockNumber,
|
288
287
|
};
|
289
288
|
}
|
290
289
|
return await this.view.balanceOf(owner, overrides || {});
|
@@ -296,7 +295,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
296
295
|
): Promise<string> {
|
297
296
|
if (!overrides && this.context) {
|
298
297
|
overrides = {
|
299
|
-
blockTag:
|
298
|
+
blockTag: this.context.blockNumber,
|
300
299
|
};
|
301
300
|
}
|
302
301
|
return await this.view.getApproved(tokenId, overrides || {});
|
@@ -309,7 +308,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
309
308
|
): Promise<boolean> {
|
310
309
|
if (!overrides && this.context) {
|
311
310
|
overrides = {
|
312
|
-
blockTag:
|
311
|
+
blockTag: this.context.blockNumber,
|
313
312
|
};
|
314
313
|
}
|
315
314
|
return await this.view.isApprovedForAll(owner, operator, overrides || {});
|
@@ -318,7 +317,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
318
317
|
async name(overrides?: Overrides): Promise<string> {
|
319
318
|
if (!overrides && this.context) {
|
320
319
|
overrides = {
|
321
|
-
blockTag:
|
320
|
+
blockTag: this.context.blockNumber,
|
322
321
|
};
|
323
322
|
}
|
324
323
|
return await this.view.name(overrides || {});
|
@@ -327,7 +326,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
327
326
|
async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {
|
328
327
|
if (!overrides && this.context) {
|
329
328
|
overrides = {
|
330
|
-
blockTag:
|
329
|
+
blockTag: this.context.blockNumber,
|
331
330
|
};
|
332
331
|
}
|
333
332
|
return await this.view.ownerOf(tokenId, overrides || {});
|
@@ -339,7 +338,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
339
338
|
): Promise<boolean> {
|
340
339
|
if (!overrides && this.context) {
|
341
340
|
overrides = {
|
342
|
-
blockTag:
|
341
|
+
blockTag: this.context.blockNumber,
|
343
342
|
};
|
344
343
|
}
|
345
344
|
return await this.view.supportsInterface(interfaceId, overrides || {});
|
@@ -348,7 +347,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
348
347
|
async symbol(overrides?: Overrides): Promise<string> {
|
349
348
|
if (!overrides && this.context) {
|
350
349
|
overrides = {
|
351
|
-
blockTag:
|
350
|
+
blockTag: this.context.blockNumber,
|
352
351
|
};
|
353
352
|
}
|
354
353
|
return await this.view.symbol(overrides || {});
|
@@ -360,7 +359,7 @@ export class ERC721BoundContractView extends BoundContractView<
|
|
360
359
|
): Promise<string> {
|
361
360
|
if (!overrides && this.context) {
|
362
361
|
overrides = {
|
363
|
-
blockTag:
|
362
|
+
blockTag: this.context.blockNumber,
|
364
363
|
};
|
365
364
|
}
|
366
365
|
return await this.view.tokenURI(tokenId, overrides || {});
|
@@ -19,7 +19,6 @@ import {
|
|
19
19
|
ContractView,
|
20
20
|
DummyProvider,
|
21
21
|
TypedCallTrace,
|
22
|
-
toBlockTag,
|
23
22
|
} from "@sentio/sdk/eth";
|
24
23
|
import { EthFetchConfig } from "@sentio/protos";
|
25
24
|
|
@@ -184,7 +183,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
184
183
|
async name(overrides?: Overrides): Promise<string> {
|
185
184
|
if (!overrides && this.context) {
|
186
185
|
overrides = {
|
187
|
-
blockTag:
|
186
|
+
blockTag: this.context.blockNumber,
|
188
187
|
};
|
189
188
|
}
|
190
189
|
return await this.view.name(overrides || {});
|
@@ -193,7 +192,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
193
192
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
194
193
|
if (!overrides && this.context) {
|
195
194
|
overrides = {
|
196
|
-
blockTag:
|
195
|
+
blockTag: this.context.blockNumber,
|
197
196
|
};
|
198
197
|
}
|
199
198
|
return await this.view.totalSupply(overrides || {});
|
@@ -202,7 +201,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
202
201
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
203
202
|
if (!overrides && this.context) {
|
204
203
|
overrides = {
|
205
|
-
blockTag:
|
204
|
+
blockTag: this.context.blockNumber,
|
206
205
|
};
|
207
206
|
}
|
208
207
|
return await this.view.decimals(overrides || {});
|
@@ -211,7 +210,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
211
210
|
async balanceOf(arg0: string, overrides?: Overrides): Promise<bigint> {
|
212
211
|
if (!overrides && this.context) {
|
213
212
|
overrides = {
|
214
|
-
blockTag:
|
213
|
+
blockTag: this.context.blockNumber,
|
215
214
|
};
|
216
215
|
}
|
217
216
|
return await this.view.balanceOf(arg0, overrides || {});
|
@@ -220,7 +219,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
220
219
|
async symbol(overrides?: Overrides): Promise<string> {
|
221
220
|
if (!overrides && this.context) {
|
222
221
|
overrides = {
|
223
|
-
blockTag:
|
222
|
+
blockTag: this.context.blockNumber,
|
224
223
|
};
|
225
224
|
}
|
226
225
|
return await this.view.symbol(overrides || {});
|
@@ -233,7 +232,7 @@ export class WETH9BoundContractView extends BoundContractView<
|
|
233
232
|
): Promise<bigint> {
|
234
233
|
if (!overrides && this.context) {
|
235
234
|
overrides = {
|
236
|
-
blockTag:
|
235
|
+
blockTag: this.context.blockNumber,
|
237
236
|
};
|
238
237
|
}
|
239
238
|
return await this.view.allowance(arg0, arg1, overrides || {});
|
package/src/eth/codegen/file.ts
CHANGED
@@ -162,7 +162,7 @@ export class ${contract.name}ProcessorTemplate extends BaseProcessorTemplate<${c
|
|
162
162
|
'ContractView',
|
163
163
|
'DummyProvider',
|
164
164
|
'TypedCallTrace',
|
165
|
-
'toBlockTag',
|
165
|
+
// 'toBlockTag',
|
166
166
|
],
|
167
167
|
'@sentio/protos': ['EthFetchConfig'],
|
168
168
|
'./common.js': ['PromiseOrValue'],
|
@@ -62,7 +62,7 @@ export function generateBoundViewFunction(fn: FunctionDeclaration, includeArgTyp
|
|
62
62
|
})}overrides?: Overrides): ${generateReturnTypes(fn)} {
|
63
63
|
if (!overrides && this.context) {
|
64
64
|
overrides = {
|
65
|
-
blockTag:
|
65
|
+
blockTag: this.context.blockNumber,
|
66
66
|
}
|
67
67
|
}
|
68
68
|
return await this.view.${declName}(${
|