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

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
@@ -172,8 +172,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
172
172
  context: ethCallContext,
173
173
  calldata,
174
174
  });
175
+ console.debug("looking up eth call key:", key);
175
176
  const ret = preparedData.ethCallResults[key];
176
177
  if (ret) {
178
+ console.debug("prepared eth call found:", key);
177
179
  const result = iface
178
180
  .decodeFunctionResult("totalSupply", ret)
179
181
  .toArray();
@@ -203,8 +205,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
203
205
  context: ethCallContext,
204
206
  calldata,
205
207
  });
208
+ console.debug("looking up eth call key:", key);
206
209
  const ret = preparedData.ethCallResults[key];
207
210
  if (ret) {
211
+ console.debug("prepared eth call found:", key);
208
212
  const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
209
213
  return result.length == 1 ? result[0] : result;
210
214
  }
@@ -235,8 +239,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
235
239
  context: ethCallContext,
236
240
  calldata,
237
241
  });
242
+ console.debug("looking up eth call key:", key);
238
243
  const ret = preparedData.ethCallResults[key];
239
244
  if (ret) {
245
+ console.debug("prepared eth call found:", key);
240
246
  const result = iface
241
247
  .decodeFunctionResult("getApproved", ret)
242
248
  .toArray();
@@ -273,8 +279,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
273
279
  context: ethCallContext,
274
280
  calldata,
275
281
  });
282
+ console.debug("looking up eth call key:", key);
276
283
  const ret = preparedData.ethCallResults[key];
277
284
  if (ret) {
285
+ console.debug("prepared eth call found:", key);
278
286
  const result = iface
279
287
  .decodeFunctionResult("isApprovedForAll", ret)
280
288
  .toArray();
@@ -303,8 +311,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
303
311
  context: ethCallContext,
304
312
  calldata,
305
313
  });
314
+ console.debug("looking up eth call key:", key);
306
315
  const ret = preparedData.ethCallResults[key];
307
316
  if (ret) {
317
+ console.debug("prepared eth call found:", key);
308
318
  const result = iface.decodeFunctionResult("name", ret).toArray();
309
319
  return result.length == 1 ? result[0] : result;
310
320
  }
@@ -332,8 +342,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
332
342
  context: ethCallContext,
333
343
  calldata,
334
344
  });
345
+ console.debug("looking up eth call key:", key);
335
346
  const ret = preparedData.ethCallResults[key];
336
347
  if (ret) {
348
+ console.debug("prepared eth call found:", key);
337
349
  const result = iface.decodeFunctionResult("ownerOf", ret).toArray();
338
350
  return result.length == 1 ? result[0] : result;
339
351
  }
@@ -366,8 +378,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
366
378
  context: ethCallContext,
367
379
  calldata,
368
380
  });
381
+ console.debug("looking up eth call key:", key);
369
382
  const ret = preparedData.ethCallResults[key];
370
383
  if (ret) {
384
+ console.debug("prepared eth call found:", key);
371
385
  const result = iface
372
386
  .decodeFunctionResult("supportsInterface", ret)
373
387
  .toArray();
@@ -399,8 +413,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
399
413
  context: ethCallContext,
400
414
  calldata,
401
415
  });
416
+ console.debug("looking up eth call key:", key);
402
417
  const ret = preparedData.ethCallResults[key];
403
418
  if (ret) {
419
+ console.debug("prepared eth call found:", key);
404
420
  const result = iface.decodeFunctionResult("symbol", ret).toArray();
405
421
  return result.length == 1 ? result[0] : result;
406
422
  }
@@ -428,8 +444,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
428
444
  context: ethCallContext,
429
445
  calldata,
430
446
  });
447
+ console.debug("looking up eth call key:", key);
431
448
  const ret = preparedData.ethCallResults[key];
432
449
  if (ret) {
450
+ console.debug("prepared eth call found:", key);
433
451
  const result = iface.decodeFunctionResult("tokenURI", ret).toArray();
434
452
  return result.length == 1 ? result[0] : result;
435
453
  }
@@ -464,8 +482,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
464
482
  context: ethCallContext,
465
483
  calldata,
466
484
  });
485
+ console.debug("looking up eth call key:", key);
467
486
  const ret = preparedData.ethCallResults[key];
468
487
  if (ret) {
488
+ console.debug("prepared eth call found:", key);
469
489
  const result = iface.decodeFunctionResult("approve", ret).toArray();
470
490
  return result.length == 1 ? result[0] : result;
471
491
  }
@@ -500,8 +520,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
500
520
  context: ethCallContext,
501
521
  calldata,
502
522
  });
523
+ console.debug("looking up eth call key:", key);
503
524
  const ret = preparedData.ethCallResults[key];
504
525
  if (ret) {
526
+ console.debug("prepared eth call found:", key);
505
527
  const result = iface
506
528
  .decodeFunctionResult("safeTransferFrom", ret)
507
529
  .toArray();
@@ -540,8 +562,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
540
562
  context: ethCallContext,
541
563
  calldata,
542
564
  });
565
+ console.debug("looking up eth call key:", key);
543
566
  const ret = preparedData.ethCallResults[key];
544
567
  if (ret) {
568
+ console.debug("prepared eth call found:", key);
545
569
  const result = iface
546
570
  .decodeFunctionResult("safeTransferFrom", ret)
547
571
  .toArray();
@@ -576,8 +600,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
576
600
  context: ethCallContext,
577
601
  calldata,
578
602
  });
603
+ console.debug("looking up eth call key:", key);
579
604
  const ret = preparedData.ethCallResults[key];
580
605
  if (ret) {
606
+ console.debug("prepared eth call found:", key);
581
607
  const result = iface
582
608
  .decodeFunctionResult("setApprovalForAll", ret)
583
609
  .toArray();
@@ -614,8 +640,10 @@ export class ERC721ContractView extends ContractView<ERC721> {
614
640
  context: ethCallContext,
615
641
  calldata,
616
642
  });
643
+ console.debug("looking up eth call key:", key);
617
644
  const ret = preparedData.ethCallResults[key];
618
645
  if (ret) {
646
+ console.debug("prepared eth call found:", key);
619
647
  const result = iface
620
648
  .decodeFunctionResult("transferFrom", ret)
621
649
  .toArray();
@@ -896,7 +924,7 @@ export class ERC721BoundContractView extends BoundContractView<
896
924
  async totalSupply(overrides?: Overrides): Promise<bigint> {
897
925
  const ethCallContext = {
898
926
  chainId: this.context.chainId,
899
- blockTag: this.context.blockNumber.toString(16),
927
+ blockTag: "0x" + this.context.blockNumber.toString(16),
900
928
  address: this.context.address,
901
929
  };
902
930
  return await this.view.totalSupply(
@@ -912,7 +940,7 @@ export class ERC721BoundContractView extends BoundContractView<
912
940
  async balanceOf(owner: string, overrides?: Overrides): Promise<bigint> {
913
941
  const ethCallContext = {
914
942
  chainId: this.context.chainId,
915
- blockTag: this.context.blockNumber.toString(16),
943
+ blockTag: "0x" + this.context.blockNumber.toString(16),
916
944
  address: this.context.address,
917
945
  };
918
946
  return await this.view.balanceOf(
@@ -932,7 +960,7 @@ export class ERC721BoundContractView extends BoundContractView<
932
960
  ): Promise<string> {
933
961
  const ethCallContext = {
934
962
  chainId: this.context.chainId,
935
- blockTag: this.context.blockNumber.toString(16),
963
+ blockTag: "0x" + this.context.blockNumber.toString(16),
936
964
  address: this.context.address,
937
965
  };
938
966
  return await this.view.getApproved(
@@ -953,7 +981,7 @@ export class ERC721BoundContractView extends BoundContractView<
953
981
  ): Promise<boolean> {
954
982
  const ethCallContext = {
955
983
  chainId: this.context.chainId,
956
- blockTag: this.context.blockNumber.toString(16),
984
+ blockTag: "0x" + this.context.blockNumber.toString(16),
957
985
  address: this.context.address,
958
986
  };
959
987
  return await this.view.isApprovedForAll(
@@ -971,7 +999,7 @@ export class ERC721BoundContractView extends BoundContractView<
971
999
  async name(overrides?: Overrides): Promise<string> {
972
1000
  const ethCallContext = {
973
1001
  chainId: this.context.chainId,
974
- blockTag: this.context.blockNumber.toString(16),
1002
+ blockTag: "0x" + this.context.blockNumber.toString(16),
975
1003
  address: this.context.address,
976
1004
  };
977
1005
  return await this.view.name(
@@ -987,7 +1015,7 @@ export class ERC721BoundContractView extends BoundContractView<
987
1015
  async ownerOf(tokenId: BigNumberish, overrides?: Overrides): Promise<string> {
988
1016
  const ethCallContext = {
989
1017
  chainId: this.context.chainId,
990
- blockTag: this.context.blockNumber.toString(16),
1018
+ blockTag: "0x" + this.context.blockNumber.toString(16),
991
1019
  address: this.context.address,
992
1020
  };
993
1021
  return await this.view.ownerOf(
@@ -1007,7 +1035,7 @@ export class ERC721BoundContractView extends BoundContractView<
1007
1035
  ): Promise<boolean> {
1008
1036
  const ethCallContext = {
1009
1037
  chainId: this.context.chainId,
1010
- blockTag: this.context.blockNumber.toString(16),
1038
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1011
1039
  address: this.context.address,
1012
1040
  };
1013
1041
  return await this.view.supportsInterface(
@@ -1024,7 +1052,7 @@ export class ERC721BoundContractView extends BoundContractView<
1024
1052
  async symbol(overrides?: Overrides): Promise<string> {
1025
1053
  const ethCallContext = {
1026
1054
  chainId: this.context.chainId,
1027
- blockTag: this.context.blockNumber.toString(16),
1055
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1028
1056
  address: this.context.address,
1029
1057
  };
1030
1058
  return await this.view.symbol(
@@ -1043,7 +1071,7 @@ export class ERC721BoundContractView extends BoundContractView<
1043
1071
  ): Promise<string> {
1044
1072
  const ethCallContext = {
1045
1073
  chainId: this.context.chainId,
1046
- blockTag: this.context.blockNumber.toString(16),
1074
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1047
1075
  address: this.context.address,
1048
1076
  };
1049
1077
  return await this.view.tokenURI(
@@ -1068,7 +1096,7 @@ export class ERC721BoundContractView extends BoundContractView<
1068
1096
  ): Promise<void> {
1069
1097
  const ethCallContext = {
1070
1098
  chainId: this.context.chainId,
1071
- blockTag: this.context.blockNumber.toString(16),
1099
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1072
1100
  address: this.context.address,
1073
1101
  };
1074
1102
  return await this.view.callStatic.approve(
@@ -1090,7 +1118,7 @@ export class ERC721BoundContractView extends BoundContractView<
1090
1118
  ): Promise<void> {
1091
1119
  const ethCallContext = {
1092
1120
  chainId: this.context.chainId,
1093
- blockTag: this.context.blockNumber.toString(16),
1121
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1094
1122
  address: this.context.address,
1095
1123
  };
1096
1124
  return await this.view.callStatic.safeTransferFrom_address_address_uint256(
@@ -1114,7 +1142,7 @@ export class ERC721BoundContractView extends BoundContractView<
1114
1142
  ): Promise<void> {
1115
1143
  const ethCallContext = {
1116
1144
  chainId: this.context.chainId,
1117
- blockTag: this.context.blockNumber.toString(16),
1145
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1118
1146
  address: this.context.address,
1119
1147
  };
1120
1148
  return await this.view.callStatic.safeTransferFrom_address_address_uint256_bytes(
@@ -1137,7 +1165,7 @@ export class ERC721BoundContractView extends BoundContractView<
1137
1165
  ): Promise<void> {
1138
1166
  const ethCallContext = {
1139
1167
  chainId: this.context.chainId,
1140
- blockTag: this.context.blockNumber.toString(16),
1168
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1141
1169
  address: this.context.address,
1142
1170
  };
1143
1171
  return await this.view.callStatic.setApprovalForAll(
@@ -1159,7 +1187,7 @@ export class ERC721BoundContractView extends BoundContractView<
1159
1187
  ): Promise<void> {
1160
1188
  const ethCallContext = {
1161
1189
  chainId: this.context.chainId,
1162
- blockTag: this.context.blockNumber.toString(16),
1190
+ blockTag: "0x" + this.context.blockNumber.toString(16),
1163
1191
  address: this.context.address,
1164
1192
  };
1165
1193
  return await this.view.callStatic.transferFrom(
@@ -1187,10 +1215,14 @@ export class ERC721BoundContractView extends BoundContractView<
1187
1215
  ): EthCallParam {
1188
1216
  const chainId =
1189
1217
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1190
- const blockTag =
1191
- overrides?.blockTag?.toString() ??
1192
- this.context.blockNumber.toString(16);
1193
1218
  const address = this.context.address;
1219
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1220
+ if (overrides?.blockTag) {
1221
+ blockTag =
1222
+ typeof overrides.blockTag == "string"
1223
+ ? overrides.blockTag
1224
+ : "0x" + overrides.blockTag.toString(16);
1225
+ }
1194
1226
 
1195
1227
  return this.view.encodeCall.approve(to, tokenId, {
1196
1228
  chainId,
@@ -1201,20 +1233,28 @@ export class ERC721BoundContractView extends BoundContractView<
1201
1233
  totalSupply(overrides?: Overrides): EthCallParam {
1202
1234
  const chainId =
1203
1235
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1204
- const blockTag =
1205
- overrides?.blockTag?.toString() ??
1206
- this.context.blockNumber.toString(16);
1207
1236
  const address = this.context.address;
1237
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1238
+ if (overrides?.blockTag) {
1239
+ blockTag =
1240
+ typeof overrides.blockTag == "string"
1241
+ ? overrides.blockTag
1242
+ : "0x" + overrides.blockTag.toString(16);
1243
+ }
1208
1244
 
1209
1245
  return this.view.encodeCall.totalSupply({ chainId, address, blockTag });
1210
1246
  },
1211
1247
  balanceOf(owner: string, overrides?: Overrides): EthCallParam {
1212
1248
  const chainId =
1213
1249
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1214
- const blockTag =
1215
- overrides?.blockTag?.toString() ??
1216
- this.context.blockNumber.toString(16);
1217
1250
  const address = this.context.address;
1251
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1252
+ if (overrides?.blockTag) {
1253
+ blockTag =
1254
+ typeof overrides.blockTag == "string"
1255
+ ? overrides.blockTag
1256
+ : "0x" + overrides.blockTag.toString(16);
1257
+ }
1218
1258
 
1219
1259
  return this.view.encodeCall.balanceOf(owner, {
1220
1260
  chainId,
@@ -1225,10 +1265,14 @@ export class ERC721BoundContractView extends BoundContractView<
1225
1265
  getApproved(tokenId: BigNumberish, overrides?: Overrides): EthCallParam {
1226
1266
  const chainId =
1227
1267
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1228
- const blockTag =
1229
- overrides?.blockTag?.toString() ??
1230
- this.context.blockNumber.toString(16);
1231
1268
  const address = this.context.address;
1269
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1270
+ if (overrides?.blockTag) {
1271
+ blockTag =
1272
+ typeof overrides.blockTag == "string"
1273
+ ? overrides.blockTag
1274
+ : "0x" + overrides.blockTag.toString(16);
1275
+ }
1232
1276
 
1233
1277
  return this.view.encodeCall.getApproved(tokenId, {
1234
1278
  chainId,
@@ -1243,10 +1287,14 @@ export class ERC721BoundContractView extends BoundContractView<
1243
1287
  ): EthCallParam {
1244
1288
  const chainId =
1245
1289
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1246
- const blockTag =
1247
- overrides?.blockTag?.toString() ??
1248
- this.context.blockNumber.toString(16);
1249
1290
  const address = this.context.address;
1291
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1292
+ if (overrides?.blockTag) {
1293
+ blockTag =
1294
+ typeof overrides.blockTag == "string"
1295
+ ? overrides.blockTag
1296
+ : "0x" + overrides.blockTag.toString(16);
1297
+ }
1250
1298
 
1251
1299
  return this.view.encodeCall.isApprovedForAll(owner, operator, {
1252
1300
  chainId,
@@ -1257,20 +1305,28 @@ export class ERC721BoundContractView extends BoundContractView<
1257
1305
  name(overrides?: Overrides): EthCallParam {
1258
1306
  const chainId =
1259
1307
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1260
- const blockTag =
1261
- overrides?.blockTag?.toString() ??
1262
- this.context.blockNumber.toString(16);
1263
1308
  const address = this.context.address;
1309
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1310
+ if (overrides?.blockTag) {
1311
+ blockTag =
1312
+ typeof overrides.blockTag == "string"
1313
+ ? overrides.blockTag
1314
+ : "0x" + overrides.blockTag.toString(16);
1315
+ }
1264
1316
 
1265
1317
  return this.view.encodeCall.name({ chainId, address, blockTag });
1266
1318
  },
1267
1319
  ownerOf(tokenId: BigNumberish, overrides?: Overrides): EthCallParam {
1268
1320
  const chainId =
1269
1321
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1270
- const blockTag =
1271
- overrides?.blockTag?.toString() ??
1272
- this.context.blockNumber.toString(16);
1273
1322
  const address = this.context.address;
1323
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1324
+ if (overrides?.blockTag) {
1325
+ blockTag =
1326
+ typeof overrides.blockTag == "string"
1327
+ ? overrides.blockTag
1328
+ : "0x" + overrides.blockTag.toString(16);
1329
+ }
1274
1330
 
1275
1331
  return this.view.encodeCall.ownerOf(tokenId, {
1276
1332
  chainId,
@@ -1286,10 +1342,14 @@ export class ERC721BoundContractView extends BoundContractView<
1286
1342
  ): EthCallParam {
1287
1343
  const chainId =
1288
1344
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1289
- const blockTag =
1290
- overrides?.blockTag?.toString() ??
1291
- this.context.blockNumber.toString(16);
1292
1345
  const address = this.context.address;
1346
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1347
+ if (overrides?.blockTag) {
1348
+ blockTag =
1349
+ typeof overrides.blockTag == "string"
1350
+ ? overrides.blockTag
1351
+ : "0x" + overrides.blockTag.toString(16);
1352
+ }
1293
1353
 
1294
1354
  return this.view.encodeCall.safeTransferFrom_address_address_uint256(
1295
1355
  from,
@@ -1307,10 +1367,14 @@ export class ERC721BoundContractView extends BoundContractView<
1307
1367
  ): EthCallParam {
1308
1368
  const chainId =
1309
1369
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1310
- const blockTag =
1311
- overrides?.blockTag?.toString() ??
1312
- this.context.blockNumber.toString(16);
1313
1370
  const address = this.context.address;
1371
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1372
+ if (overrides?.blockTag) {
1373
+ blockTag =
1374
+ typeof overrides.blockTag == "string"
1375
+ ? overrides.blockTag
1376
+ : "0x" + overrides.blockTag.toString(16);
1377
+ }
1314
1378
 
1315
1379
  return this.view.encodeCall.safeTransferFrom_address_address_uint256_bytes(
1316
1380
  from,
@@ -1327,10 +1391,14 @@ export class ERC721BoundContractView extends BoundContractView<
1327
1391
  ): EthCallParam {
1328
1392
  const chainId =
1329
1393
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1330
- const blockTag =
1331
- overrides?.blockTag?.toString() ??
1332
- this.context.blockNumber.toString(16);
1333
1394
  const address = this.context.address;
1395
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1396
+ if (overrides?.blockTag) {
1397
+ blockTag =
1398
+ typeof overrides.blockTag == "string"
1399
+ ? overrides.blockTag
1400
+ : "0x" + overrides.blockTag.toString(16);
1401
+ }
1334
1402
 
1335
1403
  return this.view.encodeCall.setApprovalForAll(operator, _approved, {
1336
1404
  chainId,
@@ -1344,10 +1412,14 @@ export class ERC721BoundContractView extends BoundContractView<
1344
1412
  ): EthCallParam {
1345
1413
  const chainId =
1346
1414
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1347
- const blockTag =
1348
- overrides?.blockTag?.toString() ??
1349
- this.context.blockNumber.toString(16);
1350
1415
  const address = this.context.address;
1416
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1417
+ if (overrides?.blockTag) {
1418
+ blockTag =
1419
+ typeof overrides.blockTag == "string"
1420
+ ? overrides.blockTag
1421
+ : "0x" + overrides.blockTag.toString(16);
1422
+ }
1351
1423
 
1352
1424
  return this.view.encodeCall.supportsInterface(interfaceId, {
1353
1425
  chainId,
@@ -1358,20 +1430,28 @@ export class ERC721BoundContractView extends BoundContractView<
1358
1430
  symbol(overrides?: Overrides): EthCallParam {
1359
1431
  const chainId =
1360
1432
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1361
- const blockTag =
1362
- overrides?.blockTag?.toString() ??
1363
- this.context.blockNumber.toString(16);
1364
1433
  const address = this.context.address;
1434
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1435
+ if (overrides?.blockTag) {
1436
+ blockTag =
1437
+ typeof overrides.blockTag == "string"
1438
+ ? overrides.blockTag
1439
+ : "0x" + overrides.blockTag.toString(16);
1440
+ }
1365
1441
 
1366
1442
  return this.view.encodeCall.symbol({ chainId, address, blockTag });
1367
1443
  },
1368
1444
  tokenURI(tokenId: BigNumberish, overrides?: Overrides): EthCallParam {
1369
1445
  const chainId =
1370
1446
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1371
- const blockTag =
1372
- overrides?.blockTag?.toString() ??
1373
- this.context.blockNumber.toString(16);
1374
1447
  const address = this.context.address;
1448
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1449
+ if (overrides?.blockTag) {
1450
+ blockTag =
1451
+ typeof overrides.blockTag == "string"
1452
+ ? overrides.blockTag
1453
+ : "0x" + overrides.blockTag.toString(16);
1454
+ }
1375
1455
 
1376
1456
  return this.view.encodeCall.tokenURI(tokenId, {
1377
1457
  chainId,
@@ -1387,10 +1467,14 @@ export class ERC721BoundContractView extends BoundContractView<
1387
1467
  ): EthCallParam {
1388
1468
  const chainId =
1389
1469
  overrides?.chainId?.toString() ?? this.context.chainId.toString();
1390
- const blockTag =
1391
- overrides?.blockTag?.toString() ??
1392
- this.context.blockNumber.toString(16);
1393
1470
  const address = this.context.address;
1471
+ let blockTag = "0x" + this.context.blockNumber.toString(16);
1472
+ if (overrides?.blockTag) {
1473
+ blockTag =
1474
+ typeof overrides.blockTag == "string"
1475
+ ? overrides.blockTag
1476
+ : "0x" + overrides.blockTag.toString(16);
1477
+ }
1394
1478
 
1395
1479
  return this.view.encodeCall.transferFrom(from, to, tokenId, {
1396
1480
  chainId,