@sentio/sdk 2.40.0-rc.13 → 2.40.0-rc.15

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.
Files changed (29) hide show
  1. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
  2. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +230 -69
  3. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  4. package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
  5. package/lib/eth/builtin/internal/erc1155-processor.js +80 -24
  6. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  7. package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
  8. package/lib/eth/builtin/internal/erc20-processor.js +180 -54
  9. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  10. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
  11. package/lib/eth/builtin/internal/erc20bytes-processor.js +90 -27
  12. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  13. package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
  14. package/lib/eth/builtin/internal/erc721-processor.js +140 -42
  15. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  16. package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
  17. package/lib/eth/builtin/internal/weth9-processor.js +110 -33
  18. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  19. package/lib/eth/codegen/function-calls.d.ts.map +1 -1
  20. package/lib/eth/codegen/function-calls.js +7 -2
  21. package/lib/eth/codegen/function-calls.js.map +1 -1
  22. package/package.json +3 -3
  23. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +230 -92
  24. package/src/eth/builtin/internal/erc1155-processor.ts +80 -32
  25. package/src/eth/builtin/internal/erc20-processor.ts +180 -72
  26. package/src/eth/builtin/internal/erc20bytes-processor.ts +90 -36
  27. package/src/eth/builtin/internal/erc721-processor.ts +140 -56
  28. package/src/eth/builtin/internal/weth9-processor.ts +110 -44
  29. package/src/eth/codegen/function-calls.ts +7 -2
@@ -193,8 +193,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
193
193
  context: ethCallContext,
194
194
  calldata,
195
195
  });
196
+ console.debug("looking up eth call key:", key);
196
197
  const ret = preparedData.ethCallResults[key];
197
198
  if (ret) {
199
+ console.debug("prepared eth call found:", key);
198
200
  const result = iface.decodeFunctionResult("allowance", ret).toArray();
199
201
  return result.length == 1 ? result[0] : result;
200
202
  }
@@ -226,8 +228,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
226
228
  context: ethCallContext,
227
229
  calldata,
228
230
  });
231
+ console.debug("looking up eth call key:", key);
229
232
  const ret = preparedData.ethCallResults[key];
230
233
  if (ret) {
234
+ console.debug("prepared eth call found:", key);
231
235
  const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
232
236
  return result.length == 1 ? result[0] : result;
233
237
  }
@@ -257,8 +261,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
257
261
  context: ethCallContext,
258
262
  calldata,
259
263
  });
264
+ console.debug("looking up eth call key:", key);
260
265
  const ret = preparedData.ethCallResults[key];
261
266
  if (ret) {
267
+ console.debug("prepared eth call found:", key);
262
268
  const result = iface.decodeFunctionResult("decimals", ret).toArray();
263
269
  return result.length == 1 ? result[0] : result;
264
270
  }
@@ -285,8 +291,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
285
291
  context: ethCallContext,
286
292
  calldata,
287
293
  });
294
+ console.debug("looking up eth call key:", key);
288
295
  const ret = preparedData.ethCallResults[key];
289
296
  if (ret) {
297
+ console.debug("prepared eth call found:", key);
290
298
  const result = iface.decodeFunctionResult("locker", ret).toArray();
291
299
  return result.length == 1 ? result[0] : result;
292
300
  }
@@ -311,8 +319,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
311
319
  context: ethCallContext,
312
320
  calldata,
313
321
  });
322
+ console.debug("looking up eth call key:", key);
314
323
  const ret = preparedData.ethCallResults[key];
315
324
  if (ret) {
325
+ console.debug("prepared eth call found:", key);
316
326
  const result = iface.decodeFunctionResult("name", ret).toArray();
317
327
  return result.length == 1 ? result[0] : result;
318
328
  }
@@ -339,8 +349,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
339
349
  context: ethCallContext,
340
350
  calldata,
341
351
  });
352
+ console.debug("looking up eth call key:", key);
342
353
  const ret = preparedData.ethCallResults[key];
343
354
  if (ret) {
355
+ console.debug("prepared eth call found:", key);
344
356
  const result = iface.decodeFunctionResult("owner", ret).toArray();
345
357
  return result.length == 1 ? result[0] : result;
346
358
  }
@@ -367,8 +379,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
367
379
  context: ethCallContext,
368
380
  calldata,
369
381
  });
382
+ console.debug("looking up eth call key:", key);
370
383
  const ret = preparedData.ethCallResults[key];
371
384
  if (ret) {
385
+ console.debug("prepared eth call found:", key);
372
386
  const result = iface.decodeFunctionResult("symbol", ret).toArray();
373
387
  return result.length == 1 ? result[0] : result;
374
388
  }
@@ -395,8 +409,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
395
409
  context: ethCallContext,
396
410
  calldata,
397
411
  });
412
+ console.debug("looking up eth call key:", key);
398
413
  const ret = preparedData.ethCallResults[key];
399
414
  if (ret) {
415
+ console.debug("prepared eth call found:", key);
400
416
  const result = iface
401
417
  .decodeFunctionResult("totalSupply", ret)
402
418
  .toArray();
@@ -433,8 +449,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
433
449
  context: ethCallContext,
434
450
  calldata,
435
451
  });
452
+ console.debug("looking up eth call key:", key);
436
453
  const ret = preparedData.ethCallResults[key];
437
454
  if (ret) {
455
+ console.debug("prepared eth call found:", key);
438
456
  const result = iface.decodeFunctionResult("approve", ret).toArray();
439
457
  return result.length == 1 ? result[0] : result;
440
458
  }
@@ -463,8 +481,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
463
481
  context: ethCallContext,
464
482
  calldata,
465
483
  });
484
+ console.debug("looking up eth call key:", key);
466
485
  const ret = preparedData.ethCallResults[key];
467
486
  if (ret) {
487
+ console.debug("prepared eth call found:", key);
468
488
  const result = iface.decodeFunctionResult("burn", ret).toArray();
469
489
  return result.length == 1 ? result[0] : result;
470
490
  }
@@ -497,8 +517,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
497
517
  context: ethCallContext,
498
518
  calldata,
499
519
  });
520
+ console.debug("looking up eth call key:", key);
500
521
  const ret = preparedData.ethCallResults[key];
501
522
  if (ret) {
523
+ console.debug("prepared eth call found:", key);
502
524
  const result = iface
503
525
  .decodeFunctionResult("burnFrom", ret)
504
526
  .toArray();
@@ -533,8 +555,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
533
555
  context: ethCallContext,
534
556
  calldata,
535
557
  });
558
+ console.debug("looking up eth call key:", key);
536
559
  const ret = preparedData.ethCallResults[key];
537
560
  if (ret) {
561
+ console.debug("prepared eth call found:", key);
538
562
  const result = iface
539
563
  .decodeFunctionResult("decreaseAllowance", ret)
540
564
  .toArray();
@@ -569,8 +593,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
569
593
  context: ethCallContext,
570
594
  calldata,
571
595
  });
596
+ console.debug("looking up eth call key:", key);
572
597
  const ret = preparedData.ethCallResults[key];
573
598
  if (ret) {
599
+ console.debug("prepared eth call found:", key);
574
600
  const result = iface
575
601
  .decodeFunctionResult("increaseAllowance", ret)
576
602
  .toArray();
@@ -600,8 +626,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
600
626
  context: ethCallContext,
601
627
  calldata,
602
628
  });
629
+ console.debug("looking up eth call key:", key);
603
630
  const ret = preparedData.ethCallResults[key];
604
631
  if (ret) {
632
+ console.debug("prepared eth call found:", key);
605
633
  const result = iface
606
634
  .decodeFunctionResult("renounceOwnership", ret)
607
635
  .toArray();
@@ -632,8 +660,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
632
660
  context: ethCallContext,
633
661
  calldata,
634
662
  });
663
+ console.debug("looking up eth call key:", key);
635
664
  const ret = preparedData.ethCallResults[key];
636
665
  if (ret) {
666
+ console.debug("prepared eth call found:", key);
637
667
  const result = iface
638
668
  .decodeFunctionResult("setLocker", ret)
639
669
  .toArray();
@@ -668,8 +698,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
668
698
  context: ethCallContext,
669
699
  calldata,
670
700
  });
701
+ console.debug("looking up eth call key:", key);
671
702
  const ret = preparedData.ethCallResults[key];
672
703
  if (ret) {
704
+ console.debug("prepared eth call found:", key);
673
705
  const result = iface
674
706
  .decodeFunctionResult("transfer", ret)
675
707
  .toArray();
@@ -706,8 +738,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
706
738
  context: ethCallContext,
707
739
  calldata,
708
740
  });
741
+ console.debug("looking up eth call key:", key);
709
742
  const ret = preparedData.ethCallResults[key];
710
743
  if (ret) {
744
+ console.debug("prepared eth call found:", key);
711
745
  const result = iface
712
746
  .decodeFunctionResult("transferFrom", ret)
713
747
  .toArray();
@@ -740,8 +774,10 @@ export class ERC20ContractView extends ContractView<ERC20> {
740
774
  context: ethCallContext,
741
775
  calldata,
742
776
  });
777
+ console.debug("looking up eth call key:", key);
743
778
  const ret = preparedData.ethCallResults[key];
744
779
  if (ret) {
780
+ console.debug("prepared eth call found:", key);
745
781
  const result = iface
746
782
  .decodeFunctionResult("transferOwnership", ret)
747
783
  .toArray();
@@ -1066,7 +1102,7 @@ export class ERC20BoundContractView extends BoundContractView<
1066
1102
  ): Promise<bigint> {
1067
1103
  const ethCallContext = {
1068
1104
  chainId: this.context.chainId,
1069
- blockTag: this.context.blockNumber.toString(16),
1105
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1070
1106
  address: this.context.address,
1071
1107
  };
1072
1108
  return await this.view.allowance(
@@ -1084,7 +1120,7 @@ export class ERC20BoundContractView extends BoundContractView<
1084
1120
  async balanceOf(account: string, overrides?: Overrides): Promise<bigint> {
1085
1121
  const ethCallContext = {
1086
1122
  chainId: this.context.chainId,
1087
- blockTag: this.context.blockNumber.toString(16),
1123
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1088
1124
  address: this.context.address,
1089
1125
  };
1090
1126
  return await this.view.balanceOf(
@@ -1101,7 +1137,7 @@ export class ERC20BoundContractView extends BoundContractView<
1101
1137
  async decimals(overrides?: Overrides): Promise<bigint> {
1102
1138
  const ethCallContext = {
1103
1139
  chainId: this.context.chainId,
1104
- blockTag: this.context.blockNumber.toString(16),
1140
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1105
1141
  address: this.context.address,
1106
1142
  };
1107
1143
  return await this.view.decimals(
@@ -1117,7 +1153,7 @@ export class ERC20BoundContractView extends BoundContractView<
1117
1153
  async locker(overrides?: Overrides): Promise<string> {
1118
1154
  const ethCallContext = {
1119
1155
  chainId: this.context.chainId,
1120
- blockTag: this.context.blockNumber.toString(16),
1156
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1121
1157
  address: this.context.address,
1122
1158
  };
1123
1159
  return await this.view.locker(
@@ -1133,7 +1169,7 @@ export class ERC20BoundContractView extends BoundContractView<
1133
1169
  async name(overrides?: Overrides): Promise<string> {
1134
1170
  const ethCallContext = {
1135
1171
  chainId: this.context.chainId,
1136
- blockTag: this.context.blockNumber.toString(16),
1172
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1137
1173
  address: this.context.address,
1138
1174
  };
1139
1175
  return await this.view.name(
@@ -1149,7 +1185,7 @@ export class ERC20BoundContractView extends BoundContractView<
1149
1185
  async owner(overrides?: Overrides): Promise<string> {
1150
1186
  const ethCallContext = {
1151
1187
  chainId: this.context.chainId,
1152
- blockTag: this.context.blockNumber.toString(16),
1188
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1153
1189
  address: this.context.address,
1154
1190
  };
1155
1191
  return await this.view.owner(
@@ -1165,7 +1201,7 @@ export class ERC20BoundContractView extends BoundContractView<
1165
1201
  async symbol(overrides?: Overrides): Promise<string> {
1166
1202
  const ethCallContext = {
1167
1203
  chainId: this.context.chainId,
1168
- blockTag: this.context.blockNumber.toString(16),
1204
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1169
1205
  address: this.context.address,
1170
1206
  };
1171
1207
  return await this.view.symbol(
@@ -1181,7 +1217,7 @@ export class ERC20BoundContractView extends BoundContractView<
1181
1217
  async totalSupply(overrides?: Overrides): Promise<bigint> {
1182
1218
  const ethCallContext = {
1183
1219
  chainId: this.context.chainId,
1184
- blockTag: this.context.blockNumber.toString(16),
1220
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1185
1221
  address: this.context.address,
1186
1222
  };
1187
1223
  return await this.view.totalSupply(
@@ -1205,7 +1241,7 @@ export class ERC20BoundContractView extends BoundContractView<
1205
1241
  ): Promise<boolean> {
1206
1242
  const ethCallContext = {
1207
1243
  chainId: this.context.chainId,
1208
- blockTag: this.context.blockNumber.toString(16),
1244
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1209
1245
  address: this.context.address,
1210
1246
  };
1211
1247
  return await this.view.callStatic.approve(
@@ -1222,7 +1258,7 @@ export class ERC20BoundContractView extends BoundContractView<
1222
1258
  async burn(amount: BigNumberish, overrides?: Overrides): Promise<void> {
1223
1259
  const ethCallContext = {
1224
1260
  chainId: this.context.chainId,
1225
- blockTag: this.context.blockNumber.toString(16),
1261
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1226
1262
  address: this.context.address,
1227
1263
  };
1228
1264
  return await this.view.callStatic.burn(
@@ -1242,7 +1278,7 @@ export class ERC20BoundContractView extends BoundContractView<
1242
1278
  ): Promise<void> {
1243
1279
  const ethCallContext = {
1244
1280
  chainId: this.context.chainId,
1245
- blockTag: this.context.blockNumber.toString(16),
1281
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1246
1282
  address: this.context.address,
1247
1283
  };
1248
1284
  return await this.view.callStatic.burnFrom(
@@ -1263,7 +1299,7 @@ export class ERC20BoundContractView extends BoundContractView<
1263
1299
  ): Promise<boolean> {
1264
1300
  const ethCallContext = {
1265
1301
  chainId: this.context.chainId,
1266
- blockTag: this.context.blockNumber.toString(16),
1302
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1267
1303
  address: this.context.address,
1268
1304
  };
1269
1305
  return await this.view.callStatic.decreaseAllowance(
@@ -1284,7 +1320,7 @@ export class ERC20BoundContractView extends BoundContractView<
1284
1320
  ): Promise<boolean> {
1285
1321
  const ethCallContext = {
1286
1322
  chainId: this.context.chainId,
1287
- blockTag: this.context.blockNumber.toString(16),
1323
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1288
1324
  address: this.context.address,
1289
1325
  };
1290
1326
  return await this.view.callStatic.increaseAllowance(
@@ -1301,7 +1337,7 @@ export class ERC20BoundContractView extends BoundContractView<
1301
1337
  async renounceOwnership(overrides?: Overrides): Promise<void> {
1302
1338
  const ethCallContext = {
1303
1339
  chainId: this.context.chainId,
1304
- blockTag: this.context.blockNumber.toString(16),
1340
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1305
1341
  address: this.context.address,
1306
1342
  };
1307
1343
  return await this.view.callStatic.renounceOwnership(
@@ -1316,7 +1352,7 @@ export class ERC20BoundContractView extends BoundContractView<
1316
1352
  async setLocker(_locker: string, overrides?: Overrides): Promise<void> {
1317
1353
  const ethCallContext = {
1318
1354
  chainId: this.context.chainId,
1319
- blockTag: this.context.blockNumber.toString(16),
1355
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1320
1356
  address: this.context.address,
1321
1357
  };
1322
1358
  return await this.view.callStatic.setLocker(
@@ -1336,7 +1372,7 @@ export class ERC20BoundContractView extends BoundContractView<
1336
1372
  ): Promise<boolean> {
1337
1373
  const ethCallContext = {
1338
1374
  chainId: this.context.chainId,
1339
- blockTag: this.context.blockNumber.toString(16),
1375
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1340
1376
  address: this.context.address,
1341
1377
  };
1342
1378
  return await this.view.callStatic.transfer(
@@ -1358,7 +1394,7 @@ export class ERC20BoundContractView extends BoundContractView<
1358
1394
  ): Promise<boolean> {
1359
1395
  const ethCallContext = {
1360
1396
  chainId: this.context.chainId,
1361
- blockTag: this.context.blockNumber.toString(16),
1397
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1362
1398
  address: this.context.address,
1363
1399
  };
1364
1400
  return await this.view.callStatic.transferFrom(
@@ -1379,7 +1415,7 @@ export class ERC20BoundContractView extends BoundContractView<
1379
1415
  ): Promise<void> {
1380
1416
  const ethCallContext = {
1381
1417
  chainId: this.context.chainId,
1382
- blockTag: this.context.blockNumber.toString(16),
1418
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1383
1419
  address: this.context.address,
1384
1420
  };
1385
1421
  return await this.view.callStatic.transferOwnership(
@@ -1405,10 +1441,14 @@ export class ERC20BoundContractView extends BoundContractView<
1405
1441
  ): EthCallParam {
1406
1442
  const chainId =
1407
1443
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1408
- const blockTag =
1409
- overrides?.blockTag?.toString() ??
1410
- this.context.blockNumber.toString(16);
1411
1444
  const address = this.context.address;
1445
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1446
+ if (overrides?.blockTag) {
1447
+ blockTag =
1448
+ typeof overrides.blockTag == "string"
1449
+ ? overrides.blockTag
1450
+ : "0x" + overrides.blockTag.toString(16);
1451
+ }
1412
1452
 
1413
1453
  return this.view.encodeCall.allowance(owner, spender, {
1414
1454
  chainId,
@@ -1423,10 +1463,14 @@ export class ERC20BoundContractView extends BoundContractView<
1423
1463
  ): EthCallParam {
1424
1464
  const chainId =
1425
1465
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1426
- const blockTag =
1427
- overrides?.blockTag?.toString() ??
1428
- this.context.blockNumber.toString(16);
1429
1466
  const address = this.context.address;
1467
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1468
+ if (overrides?.blockTag) {
1469
+ blockTag =
1470
+ typeof overrides.blockTag == "string"
1471
+ ? overrides.blockTag
1472
+ : "0x" + overrides.blockTag.toString(16);
1473
+ }
1430
1474
 
1431
1475
  return this.view.encodeCall.approve(spender, amount, {
1432
1476
  chainId,
@@ -1437,10 +1481,14 @@ export class ERC20BoundContractView extends BoundContractView<
1437
1481
  balanceOf(account: string, overrides?: Overrides): EthCallParam {
1438
1482
  const chainId =
1439
1483
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1440
- const blockTag =
1441
- overrides?.blockTag?.toString() ??
1442
- this.context.blockNumber.toString(16);
1443
1484
  const address = this.context.address;
1485
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1486
+ if (overrides?.blockTag) {
1487
+ blockTag =
1488
+ typeof overrides.blockTag == "string"
1489
+ ? overrides.blockTag
1490
+ : "0x" + overrides.blockTag.toString(16);
1491
+ }
1444
1492
 
1445
1493
  return this.view.encodeCall.balanceOf(account, {
1446
1494
  chainId,
@@ -1451,10 +1499,14 @@ export class ERC20BoundContractView extends BoundContractView<
1451
1499
  burn(amount: BigNumberish, overrides?: Overrides): EthCallParam {
1452
1500
  const chainId =
1453
1501
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1454
- const blockTag =
1455
- overrides?.blockTag?.toString() ??
1456
- this.context.blockNumber.toString(16);
1457
1502
  const address = this.context.address;
1503
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1504
+ if (overrides?.blockTag) {
1505
+ blockTag =
1506
+ typeof overrides.blockTag == "string"
1507
+ ? overrides.blockTag
1508
+ : "0x" + overrides.blockTag.toString(16);
1509
+ }
1458
1510
 
1459
1511
  return this.view.encodeCall.burn(amount, { chainId, address, blockTag });
1460
1512
  },
@@ -1465,10 +1517,14 @@ export class ERC20BoundContractView extends BoundContractView<
1465
1517
  ): EthCallParam {
1466
1518
  const chainId =
1467
1519
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1468
- const blockTag =
1469
- overrides?.blockTag?.toString() ??
1470
- this.context.blockNumber.toString(16);
1471
1520
  const address = this.context.address;
1521
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1522
+ if (overrides?.blockTag) {
1523
+ blockTag =
1524
+ typeof overrides.blockTag == "string"
1525
+ ? overrides.blockTag
1526
+ : "0x" + overrides.blockTag.toString(16);
1527
+ }
1472
1528
 
1473
1529
  return this.view.encodeCall.burnFrom(account, amount, {
1474
1530
  chainId,
@@ -1479,10 +1535,14 @@ export class ERC20BoundContractView extends BoundContractView<
1479
1535
  decimals(overrides?: Overrides): EthCallParam {
1480
1536
  const chainId =
1481
1537
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1482
- const blockTag =
1483
- overrides?.blockTag?.toString() ??
1484
- this.context.blockNumber.toString(16);
1485
1538
  const address = this.context.address;
1539
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1540
+ if (overrides?.blockTag) {
1541
+ blockTag =
1542
+ typeof overrides.blockTag == "string"
1543
+ ? overrides.blockTag
1544
+ : "0x" + overrides.blockTag.toString(16);
1545
+ }
1486
1546
 
1487
1547
  return this.view.encodeCall.decimals({ chainId, address, blockTag });
1488
1548
  },
@@ -1493,10 +1553,14 @@ export class ERC20BoundContractView extends BoundContractView<
1493
1553
  ): EthCallParam {
1494
1554
  const chainId =
1495
1555
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1496
- const blockTag =
1497
- overrides?.blockTag?.toString() ??
1498
- this.context.blockNumber.toString(16);
1499
1556
  const address = this.context.address;
1557
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1558
+ if (overrides?.blockTag) {
1559
+ blockTag =
1560
+ typeof overrides.blockTag == "string"
1561
+ ? overrides.blockTag
1562
+ : "0x" + overrides.blockTag.toString(16);
1563
+ }
1500
1564
 
1501
1565
  return this.view.encodeCall.decreaseAllowance(spender, subtractedValue, {
1502
1566
  chainId,
@@ -1511,10 +1575,14 @@ export class ERC20BoundContractView extends BoundContractView<
1511
1575
  ): EthCallParam {
1512
1576
  const chainId =
1513
1577
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1514
- const blockTag =
1515
- overrides?.blockTag?.toString() ??
1516
- this.context.blockNumber.toString(16);
1517
1578
  const address = this.context.address;
1579
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1580
+ if (overrides?.blockTag) {
1581
+ blockTag =
1582
+ typeof overrides.blockTag == "string"
1583
+ ? overrides.blockTag
1584
+ : "0x" + overrides.blockTag.toString(16);
1585
+ }
1518
1586
 
1519
1587
  return this.view.encodeCall.increaseAllowance(spender, addedValue, {
1520
1588
  chainId,
@@ -1525,40 +1593,56 @@ export class ERC20BoundContractView extends BoundContractView<
1525
1593
  locker(overrides?: Overrides): EthCallParam {
1526
1594
  const chainId =
1527
1595
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1528
- const blockTag =
1529
- overrides?.blockTag?.toString() ??
1530
- this.context.blockNumber.toString(16);
1531
1596
  const address = this.context.address;
1597
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1598
+ if (overrides?.blockTag) {
1599
+ blockTag =
1600
+ typeof overrides.blockTag == "string"
1601
+ ? overrides.blockTag
1602
+ : "0x" + overrides.blockTag.toString(16);
1603
+ }
1532
1604
 
1533
1605
  return this.view.encodeCall.locker({ chainId, address, blockTag });
1534
1606
  },
1535
1607
  name(overrides?: Overrides): EthCallParam {
1536
1608
  const chainId =
1537
1609
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1538
- const blockTag =
1539
- overrides?.blockTag?.toString() ??
1540
- this.context.blockNumber.toString(16);
1541
1610
  const address = this.context.address;
1611
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1612
+ if (overrides?.blockTag) {
1613
+ blockTag =
1614
+ typeof overrides.blockTag == "string"
1615
+ ? overrides.blockTag
1616
+ : "0x" + overrides.blockTag.toString(16);
1617
+ }
1542
1618
 
1543
1619
  return this.view.encodeCall.name({ chainId, address, blockTag });
1544
1620
  },
1545
1621
  owner(overrides?: Overrides): EthCallParam {
1546
1622
  const chainId =
1547
1623
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1548
- const blockTag =
1549
- overrides?.blockTag?.toString() ??
1550
- this.context.blockNumber.toString(16);
1551
1624
  const address = this.context.address;
1625
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1626
+ if (overrides?.blockTag) {
1627
+ blockTag =
1628
+ typeof overrides.blockTag == "string"
1629
+ ? overrides.blockTag
1630
+ : "0x" + overrides.blockTag.toString(16);
1631
+ }
1552
1632
 
1553
1633
  return this.view.encodeCall.owner({ chainId, address, blockTag });
1554
1634
  },
1555
1635
  renounceOwnership(overrides?: Overrides): EthCallParam {
1556
1636
  const chainId =
1557
1637
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1558
- const blockTag =
1559
- overrides?.blockTag?.toString() ??
1560
- this.context.blockNumber.toString(16);
1561
1638
  const address = this.context.address;
1639
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1640
+ if (overrides?.blockTag) {
1641
+ blockTag =
1642
+ typeof overrides.blockTag == "string"
1643
+ ? overrides.blockTag
1644
+ : "0x" + overrides.blockTag.toString(16);
1645
+ }
1562
1646
 
1563
1647
  return this.view.encodeCall.renounceOwnership({
1564
1648
  chainId,
@@ -1569,10 +1653,14 @@ export class ERC20BoundContractView extends BoundContractView<
1569
1653
  setLocker(_locker: string, overrides?: Overrides): EthCallParam {
1570
1654
  const chainId =
1571
1655
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1572
- const blockTag =
1573
- overrides?.blockTag?.toString() ??
1574
- this.context.blockNumber.toString(16);
1575
1656
  const address = this.context.address;
1657
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1658
+ if (overrides?.blockTag) {
1659
+ blockTag =
1660
+ typeof overrides.blockTag == "string"
1661
+ ? overrides.blockTag
1662
+ : "0x" + overrides.blockTag.toString(16);
1663
+ }
1576
1664
 
1577
1665
  return this.view.encodeCall.setLocker(_locker, {
1578
1666
  chainId,
@@ -1583,20 +1671,28 @@ export class ERC20BoundContractView extends BoundContractView<
1583
1671
  symbol(overrides?: Overrides): EthCallParam {
1584
1672
  const chainId =
1585
1673
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1586
- const blockTag =
1587
- overrides?.blockTag?.toString() ??
1588
- this.context.blockNumber.toString(16);
1589
1674
  const address = this.context.address;
1675
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1676
+ if (overrides?.blockTag) {
1677
+ blockTag =
1678
+ typeof overrides.blockTag == "string"
1679
+ ? overrides.blockTag
1680
+ : "0x" + overrides.blockTag.toString(16);
1681
+ }
1590
1682
 
1591
1683
  return this.view.encodeCall.symbol({ chainId, address, blockTag });
1592
1684
  },
1593
1685
  totalSupply(overrides?: Overrides): EthCallParam {
1594
1686
  const chainId =
1595
1687
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1596
- const blockTag =
1597
- overrides?.blockTag?.toString() ??
1598
- this.context.blockNumber.toString(16);
1599
1688
  const address = this.context.address;
1689
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1690
+ if (overrides?.blockTag) {
1691
+ blockTag =
1692
+ typeof overrides.blockTag == "string"
1693
+ ? overrides.blockTag
1694
+ : "0x" + overrides.blockTag.toString(16);
1695
+ }
1600
1696
 
1601
1697
  return this.view.encodeCall.totalSupply({ chainId, address, blockTag });
1602
1698
  },
@@ -1607,10 +1703,14 @@ export class ERC20BoundContractView extends BoundContractView<
1607
1703
  ): EthCallParam {
1608
1704
  const chainId =
1609
1705
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1610
- const blockTag =
1611
- overrides?.blockTag?.toString() ??
1612
- this.context.blockNumber.toString(16);
1613
1706
  const address = this.context.address;
1707
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1708
+ if (overrides?.blockTag) {
1709
+ blockTag =
1710
+ typeof overrides.blockTag == "string"
1711
+ ? overrides.blockTag
1712
+ : "0x" + overrides.blockTag.toString(16);
1713
+ }
1614
1714
 
1615
1715
  return this.view.encodeCall.transfer(recipient, amount, {
1616
1716
  chainId,
@@ -1626,10 +1726,14 @@ export class ERC20BoundContractView extends BoundContractView<
1626
1726
  ): EthCallParam {
1627
1727
  const chainId =
1628
1728
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1629
- const blockTag =
1630
- overrides?.blockTag?.toString() ??
1631
- this.context.blockNumber.toString(16);
1632
1729
  const address = this.context.address;
1730
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1731
+ if (overrides?.blockTag) {
1732
+ blockTag =
1733
+ typeof overrides.blockTag == "string"
1734
+ ? overrides.blockTag
1735
+ : "0x" + overrides.blockTag.toString(16);
1736
+ }
1633
1737
 
1634
1738
  return this.view.encodeCall.transferFrom(sender, recipient, amount, {
1635
1739
  chainId,
@@ -1640,10 +1744,14 @@ export class ERC20BoundContractView extends BoundContractView<
1640
1744
  transferOwnership(newOwner: string, overrides?: Overrides): EthCallParam {
1641
1745
  const chainId =
1642
1746
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1643
- const blockTag =
1644
- overrides?.blockTag?.toString() ??
1645
- this.context.blockNumber.toString(16);
1646
1747
  const address = this.context.address;
1748
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1749
+ if (overrides?.blockTag) {
1750
+ blockTag =
1751
+ typeof overrides.blockTag == "string"
1752
+ ? overrides.blockTag
1753
+ : "0x" + overrides.blockTag.toString(16);
1754
+ }
1647
1755
 
1648
1756
  return this.view.encodeCall.transferOwnership(newOwner, {
1649
1757
  chainId,