@apibara/evm 2.1.0-beta.2 → 2.1.0-beta.20

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/dist/index.cjs CHANGED
@@ -98,6 +98,13 @@ const U128$1 = schema.Schema.transform(U128Proto, schema.Schema.BigIntFromSelf,
98
98
  const u128ToProto = schema.Schema.encodeSync(U128$1);
99
99
  const u128FromProto = schema.Schema.decodeSync(U128$1);
100
100
 
101
+ function tag(tag2) {
102
+ return schema.Schema.Literal(tag2).pipe(
103
+ schema.Schema.propertySignature,
104
+ schema.Schema.fromKey("$case")
105
+ );
106
+ }
107
+
101
108
  const protobufPackage$2 = "evm.v2";
102
109
  function createBaseAddress() {
103
110
  return { x0: BigInt("0"), x1: BigInt("0"), x2: 0 };
@@ -681,8 +688,143 @@ function transactionStatusToJSON(object) {
681
688
  return "UNRECOGNIZED";
682
689
  }
683
690
  }
691
+ var CallType$1 = /* @__PURE__ */ ((CallType2) => {
692
+ CallType2[CallType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
693
+ CallType2[CallType2["CALL"] = 1] = "CALL";
694
+ CallType2[CallType2["CALL_CODE"] = 2] = "CALL_CODE";
695
+ CallType2[CallType2["DELEGATE_CALL"] = 3] = "DELEGATE_CALL";
696
+ CallType2[CallType2["STATIC_CALL"] = 4] = "STATIC_CALL";
697
+ CallType2[CallType2["AUTH_CALL"] = 5] = "AUTH_CALL";
698
+ CallType2[CallType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
699
+ return CallType2;
700
+ })(CallType$1 || {});
701
+ function callTypeFromJSON(object) {
702
+ switch (object) {
703
+ case 0:
704
+ case "CALL_TYPE_UNSPECIFIED":
705
+ return 0 /* UNSPECIFIED */;
706
+ case 1:
707
+ case "CALL_TYPE_CALL":
708
+ return 1 /* CALL */;
709
+ case 2:
710
+ case "CALL_TYPE_CALL_CODE":
711
+ return 2 /* CALL_CODE */;
712
+ case 3:
713
+ case "CALL_TYPE_DELEGATE_CALL":
714
+ return 3 /* DELEGATE_CALL */;
715
+ case 4:
716
+ case "CALL_TYPE_STATIC_CALL":
717
+ return 4 /* STATIC_CALL */;
718
+ case 5:
719
+ case "CALL_TYPE_AUTH_CALL":
720
+ return 5 /* AUTH_CALL */;
721
+ case -1:
722
+ case "UNRECOGNIZED":
723
+ default:
724
+ return -1 /* UNRECOGNIZED */;
725
+ }
726
+ }
727
+ function callTypeToJSON(object) {
728
+ switch (object) {
729
+ case 0 /* UNSPECIFIED */:
730
+ return "CALL_TYPE_UNSPECIFIED";
731
+ case 1 /* CALL */:
732
+ return "CALL_TYPE_CALL";
733
+ case 2 /* CALL_CODE */:
734
+ return "CALL_TYPE_CALL_CODE";
735
+ case 3 /* DELEGATE_CALL */:
736
+ return "CALL_TYPE_DELEGATE_CALL";
737
+ case 4 /* STATIC_CALL */:
738
+ return "CALL_TYPE_STATIC_CALL";
739
+ case 5 /* AUTH_CALL */:
740
+ return "CALL_TYPE_AUTH_CALL";
741
+ case -1 /* UNRECOGNIZED */:
742
+ default:
743
+ return "UNRECOGNIZED";
744
+ }
745
+ }
746
+ var CreationMethod$1 = /* @__PURE__ */ ((CreationMethod2) => {
747
+ CreationMethod2[CreationMethod2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
748
+ CreationMethod2[CreationMethod2["CREATE"] = 1] = "CREATE";
749
+ CreationMethod2[CreationMethod2["CREATE2"] = 2] = "CREATE2";
750
+ CreationMethod2[CreationMethod2["EOF_CREATE"] = 3] = "EOF_CREATE";
751
+ CreationMethod2[CreationMethod2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
752
+ return CreationMethod2;
753
+ })(CreationMethod$1 || {});
754
+ function creationMethodFromJSON(object) {
755
+ switch (object) {
756
+ case 0:
757
+ case "CREATION_METHOD_UNSPECIFIED":
758
+ return 0 /* UNSPECIFIED */;
759
+ case 1:
760
+ case "CREATION_METHOD_CREATE":
761
+ return 1 /* CREATE */;
762
+ case 2:
763
+ case "CREATION_METHOD_CREATE2":
764
+ return 2 /* CREATE2 */;
765
+ case 3:
766
+ case "CREATION_METHOD_EOF_CREATE":
767
+ return 3 /* EOF_CREATE */;
768
+ case -1:
769
+ case "UNRECOGNIZED":
770
+ default:
771
+ return -1 /* UNRECOGNIZED */;
772
+ }
773
+ }
774
+ function creationMethodToJSON(object) {
775
+ switch (object) {
776
+ case 0 /* UNSPECIFIED */:
777
+ return "CREATION_METHOD_UNSPECIFIED";
778
+ case 1 /* CREATE */:
779
+ return "CREATION_METHOD_CREATE";
780
+ case 2 /* CREATE2 */:
781
+ return "CREATION_METHOD_CREATE2";
782
+ case 3 /* EOF_CREATE */:
783
+ return "CREATION_METHOD_EOF_CREATE";
784
+ case -1 /* UNRECOGNIZED */:
785
+ default:
786
+ return "UNRECOGNIZED";
787
+ }
788
+ }
789
+ var RewardType$1 = /* @__PURE__ */ ((RewardType2) => {
790
+ RewardType2[RewardType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
791
+ RewardType2[RewardType2["BLOCK"] = 1] = "BLOCK";
792
+ RewardType2[RewardType2["UNCLE"] = 2] = "UNCLE";
793
+ RewardType2[RewardType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
794
+ return RewardType2;
795
+ })(RewardType$1 || {});
796
+ function rewardTypeFromJSON(object) {
797
+ switch (object) {
798
+ case 0:
799
+ case "REWARD_TYPE_UNSPECIFIED":
800
+ return 0 /* UNSPECIFIED */;
801
+ case 1:
802
+ case "REWARD_TYPE_BLOCK":
803
+ return 1 /* BLOCK */;
804
+ case 2:
805
+ case "REWARD_TYPE_UNCLE":
806
+ return 2 /* UNCLE */;
807
+ case -1:
808
+ case "UNRECOGNIZED":
809
+ default:
810
+ return -1 /* UNRECOGNIZED */;
811
+ }
812
+ }
813
+ function rewardTypeToJSON(object) {
814
+ switch (object) {
815
+ case 0 /* UNSPECIFIED */:
816
+ return "REWARD_TYPE_UNSPECIFIED";
817
+ case 1 /* BLOCK */:
818
+ return "REWARD_TYPE_BLOCK";
819
+ case 2 /* UNCLE */:
820
+ return "REWARD_TYPE_UNCLE";
821
+ case -1 /* UNRECOGNIZED */:
822
+ default:
823
+ return "UNRECOGNIZED";
824
+ }
825
+ }
684
826
  function createBaseBlock() {
685
- return { header: void 0, withdrawals: [], transactions: [], receipts: [], logs: [] };
827
+ return { header: void 0, withdrawals: [], transactions: [], receipts: [], logs: [], traces: [] };
686
828
  }
687
829
  const Block$1 = {
688
830
  encode(message, writer = _m0__default.Writer.create()) {
@@ -709,6 +851,11 @@ const Block$1 = {
709
851
  Log$1.encode(v, writer.uint32(42).fork()).ldelim();
710
852
  }
711
853
  }
854
+ if (message.traces !== void 0 && message.traces.length !== 0) {
855
+ for (const v of message.traces) {
856
+ TransactionTrace$1.encode(v, writer.uint32(50).fork()).ldelim();
857
+ }
858
+ }
712
859
  return writer;
713
860
  },
714
861
  decode(input, length) {
@@ -748,6 +895,12 @@ const Block$1 = {
748
895
  }
749
896
  message.logs.push(Log$1.decode(reader, reader.uint32()));
750
897
  continue;
898
+ case 6:
899
+ if (tag !== 50) {
900
+ break;
901
+ }
902
+ message.traces.push(TransactionTrace$1.decode(reader, reader.uint32()));
903
+ continue;
751
904
  }
752
905
  if ((tag & 7) === 4 || tag === 0) {
753
906
  break;
@@ -762,7 +915,8 @@ const Block$1 = {
762
915
  withdrawals: globalThis.Array.isArray(object?.withdrawals) ? object.withdrawals.map((e) => Withdrawal$1.fromJSON(e)) : [],
763
916
  transactions: globalThis.Array.isArray(object?.transactions) ? object.transactions.map((e) => Transaction$1.fromJSON(e)) : [],
764
917
  receipts: globalThis.Array.isArray(object?.receipts) ? object.receipts.map((e) => TransactionReceipt$1.fromJSON(e)) : [],
765
- logs: globalThis.Array.isArray(object?.logs) ? object.logs.map((e) => Log$1.fromJSON(e)) : []
918
+ logs: globalThis.Array.isArray(object?.logs) ? object.logs.map((e) => Log$1.fromJSON(e)) : [],
919
+ traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => TransactionTrace$1.fromJSON(e)) : []
766
920
  };
767
921
  },
768
922
  toJSON(message) {
@@ -782,6 +936,9 @@ const Block$1 = {
782
936
  if (message.logs?.length) {
783
937
  obj.logs = message.logs.map((e) => Log$1.toJSON(e));
784
938
  }
939
+ if (message.traces?.length) {
940
+ obj.traces = message.traces.map((e) => TransactionTrace$1.toJSON(e));
941
+ }
785
942
  return obj;
786
943
  },
787
944
  create(base) {
@@ -794,6 +951,7 @@ const Block$1 = {
794
951
  message.transactions = object.transactions?.map((e) => Transaction$1.fromPartial(e)) || [];
795
952
  message.receipts = object.receipts?.map((e) => TransactionReceipt$1.fromPartial(e)) || [];
796
953
  message.logs = object.logs?.map((e) => Log$1.fromPartial(e)) || [];
954
+ message.traces = object.traces?.map((e) => TransactionTrace$1.fromPartial(e)) || [];
797
955
  return message;
798
956
  }
799
957
  };
@@ -2278,183 +2436,27 @@ const AccessListItem$1 = {
2278
2436
  return message;
2279
2437
  }
2280
2438
  };
2281
- function bytesFromBase64(b64) {
2282
- if (globalThis.Buffer) {
2283
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
2284
- } else {
2285
- const bin = globalThis.atob(b64);
2286
- const arr = new Uint8Array(bin.length);
2287
- for (let i = 0; i < bin.length; ++i) {
2288
- arr[i] = bin.charCodeAt(i);
2289
- }
2290
- return arr;
2291
- }
2292
- }
2293
- function base64FromBytes(arr) {
2294
- if (globalThis.Buffer) {
2295
- return globalThis.Buffer.from(arr).toString("base64");
2296
- } else {
2297
- const bin = [];
2298
- arr.forEach((byte) => {
2299
- bin.push(globalThis.String.fromCharCode(byte));
2300
- });
2301
- return globalThis.btoa(bin.join(""));
2302
- }
2303
- }
2304
- function toTimestamp(date) {
2305
- const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
2306
- const nanos = date.getTime() % 1e3 * 1e6;
2307
- return { seconds, nanos };
2308
- }
2309
- function fromTimestamp(t) {
2310
- let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
2311
- millis += (t.nanos || 0) / 1e6;
2312
- return new globalThis.Date(millis);
2313
- }
2314
- function fromJsonTimestamp(o) {
2315
- if (o instanceof globalThis.Date) {
2316
- return o;
2317
- } else if (typeof o === "string") {
2318
- return new globalThis.Date(o);
2319
- } else {
2320
- return fromTimestamp(Timestamp.fromJSON(o));
2321
- }
2322
- }
2323
- function longToBigint(long) {
2324
- return BigInt(long.toString());
2325
- }
2326
- if (_m0__default.util.Long !== Long__default) {
2327
- _m0__default.util.Long = Long__default;
2328
- _m0__default.configure();
2329
- }
2330
- function isSet$1(value) {
2331
- return value !== null && value !== void 0;
2332
- }
2333
-
2334
- const data = {
2335
- __proto__: null,
2336
- AccessListItem: AccessListItem$1,
2337
- Block: Block$1,
2338
- BlockHeader: BlockHeader$1,
2339
- Log: Log$1,
2340
- Signature: Signature$1,
2341
- Transaction: Transaction$1,
2342
- TransactionReceipt: TransactionReceipt$1,
2343
- TransactionStatus: TransactionStatus$1,
2344
- Withdrawal: Withdrawal$1,
2345
- protobufPackage: protobufPackage$1,
2346
- transactionStatusFromJSON: transactionStatusFromJSON,
2347
- transactionStatusToJSON: transactionStatusToJSON
2348
- };
2349
-
2350
- const protobufPackage = "evm.v2";
2351
- var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
2352
- HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
2353
- HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
2354
- HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
2355
- HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
2356
- HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
2357
- return HeaderFilter2;
2358
- })(HeaderFilter$1 || {});
2359
- function headerFilterFromJSON(object) {
2360
- switch (object) {
2361
- case 0:
2362
- case "HEADER_FILTER_UNSPECIFIED":
2363
- return 0 /* UNSPECIFIED */;
2364
- case 1:
2365
- case "HEADER_FILTER_ALWAYS":
2366
- return 1 /* ALWAYS */;
2367
- case 2:
2368
- case "HEADER_FILTER_ON_DATA":
2369
- return 2 /* ON_DATA */;
2370
- case 3:
2371
- case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
2372
- return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
2373
- case -1:
2374
- case "UNRECOGNIZED":
2375
- default:
2376
- return -1 /* UNRECOGNIZED */;
2377
- }
2378
- }
2379
- function headerFilterToJSON(object) {
2380
- switch (object) {
2381
- case 0 /* UNSPECIFIED */:
2382
- return "HEADER_FILTER_UNSPECIFIED";
2383
- case 1 /* ALWAYS */:
2384
- return "HEADER_FILTER_ALWAYS";
2385
- case 2 /* ON_DATA */:
2386
- return "HEADER_FILTER_ON_DATA";
2387
- case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
2388
- return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
2389
- case -1 /* UNRECOGNIZED */:
2390
- default:
2391
- return "UNRECOGNIZED";
2392
- }
2393
- }
2394
- var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
2395
- TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
2396
- TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
2397
- TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
2398
- TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
2399
- TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
2400
- return TransactionStatusFilter2;
2401
- })(TransactionStatusFilter$1 || {});
2402
- function transactionStatusFilterFromJSON(object) {
2403
- switch (object) {
2404
- case 0:
2405
- case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
2406
- return 0 /* UNSPECIFIED */;
2407
- case 1:
2408
- case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
2409
- return 1 /* SUCCEEDED */;
2410
- case 2:
2411
- case "TRANSACTION_STATUS_FILTER_REVERTED":
2412
- return 2 /* REVERTED */;
2413
- case 3:
2414
- case "TRANSACTION_STATUS_FILTER_ALL":
2415
- return 3 /* ALL */;
2416
- case -1:
2417
- case "UNRECOGNIZED":
2418
- default:
2419
- return -1 /* UNRECOGNIZED */;
2420
- }
2421
- }
2422
- function transactionStatusFilterToJSON(object) {
2423
- switch (object) {
2424
- case 0 /* UNSPECIFIED */:
2425
- return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
2426
- case 1 /* SUCCEEDED */:
2427
- return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
2428
- case 2 /* REVERTED */:
2429
- return "TRANSACTION_STATUS_FILTER_REVERTED";
2430
- case 3 /* ALL */:
2431
- return "TRANSACTION_STATUS_FILTER_ALL";
2432
- case -1 /* UNRECOGNIZED */:
2433
- default:
2434
- return "UNRECOGNIZED";
2435
- }
2436
- }
2437
- function createBaseFilter() {
2438
- return { header: 0, withdrawals: [], transactions: [], logs: [] };
2439
+ function createBaseTransactionTrace() {
2440
+ return { filterIds: [], transactionIndex: 0, transactionHash: void 0, traces: [] };
2439
2441
  }
2440
- const Filter$1 = {
2442
+ const TransactionTrace$1 = {
2441
2443
  encode(message, writer = _m0__default.Writer.create()) {
2442
- if (message.header !== void 0 && message.header !== 0) {
2443
- writer.uint32(8).int32(message.header);
2444
- }
2445
- if (message.withdrawals !== void 0 && message.withdrawals.length !== 0) {
2446
- for (const v of message.withdrawals) {
2447
- WithdrawalFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
2444
+ if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
2445
+ writer.uint32(10).fork();
2446
+ for (const v of message.filterIds) {
2447
+ writer.uint32(v);
2448
2448
  }
2449
+ writer.ldelim();
2449
2450
  }
2450
- if (message.transactions !== void 0 && message.transactions.length !== 0) {
2451
- for (const v of message.transactions) {
2452
- TransactionFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
2453
- }
2451
+ if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
2452
+ writer.uint32(16).uint32(message.transactionIndex);
2454
2453
  }
2455
- if (message.logs !== void 0 && message.logs.length !== 0) {
2456
- for (const v of message.logs) {
2457
- LogFilter$1.encode(v, writer.uint32(34).fork()).ldelim();
2454
+ if (message.transactionHash !== void 0) {
2455
+ B256.encode(message.transactionHash, writer.uint32(26).fork()).ldelim();
2456
+ }
2457
+ if (message.traces !== void 0 && message.traces.length !== 0) {
2458
+ for (const v of message.traces) {
2459
+ Trace$1.encode(v, writer.uint32(34).fork()).ldelim();
2458
2460
  }
2459
2461
  }
2460
2462
  return writer;
@@ -2462,16 +2464,1041 @@ const Filter$1 = {
2462
2464
  decode(input, length) {
2463
2465
  const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
2464
2466
  let end = length === void 0 ? reader.len : reader.pos + length;
2465
- const message = createBaseFilter();
2467
+ const message = createBaseTransactionTrace();
2466
2468
  while (reader.pos < end) {
2467
2469
  const tag = reader.uint32();
2468
2470
  switch (tag >>> 3) {
2469
2471
  case 1:
2470
- if (tag !== 8) {
2471
- break;
2472
+ if (tag === 8) {
2473
+ message.filterIds.push(reader.uint32());
2474
+ continue;
2472
2475
  }
2473
- message.header = reader.int32();
2474
- continue;
2476
+ if (tag === 10) {
2477
+ const end2 = reader.uint32() + reader.pos;
2478
+ while (reader.pos < end2) {
2479
+ message.filterIds.push(reader.uint32());
2480
+ }
2481
+ continue;
2482
+ }
2483
+ break;
2484
+ case 2:
2485
+ if (tag !== 16) {
2486
+ break;
2487
+ }
2488
+ message.transactionIndex = reader.uint32();
2489
+ continue;
2490
+ case 3:
2491
+ if (tag !== 26) {
2492
+ break;
2493
+ }
2494
+ message.transactionHash = B256.decode(reader, reader.uint32());
2495
+ continue;
2496
+ case 4:
2497
+ if (tag !== 34) {
2498
+ break;
2499
+ }
2500
+ message.traces.push(Trace$1.decode(reader, reader.uint32()));
2501
+ continue;
2502
+ }
2503
+ if ((tag & 7) === 4 || tag === 0) {
2504
+ break;
2505
+ }
2506
+ reader.skipType(tag & 7);
2507
+ }
2508
+ return message;
2509
+ },
2510
+ fromJSON(object) {
2511
+ return {
2512
+ filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
2513
+ transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
2514
+ transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0,
2515
+ traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => Trace$1.fromJSON(e)) : []
2516
+ };
2517
+ },
2518
+ toJSON(message) {
2519
+ const obj = {};
2520
+ if (message.filterIds?.length) {
2521
+ obj.filterIds = message.filterIds.map((e) => Math.round(e));
2522
+ }
2523
+ if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
2524
+ obj.transactionIndex = Math.round(message.transactionIndex);
2525
+ }
2526
+ if (message.transactionHash !== void 0) {
2527
+ obj.transactionHash = B256.toJSON(message.transactionHash);
2528
+ }
2529
+ if (message.traces?.length) {
2530
+ obj.traces = message.traces.map((e) => Trace$1.toJSON(e));
2531
+ }
2532
+ return obj;
2533
+ },
2534
+ create(base) {
2535
+ return TransactionTrace$1.fromPartial(base ?? {});
2536
+ },
2537
+ fromPartial(object) {
2538
+ const message = createBaseTransactionTrace();
2539
+ message.filterIds = object.filterIds?.map((e) => e) || [];
2540
+ message.transactionIndex = object.transactionIndex ?? 0;
2541
+ message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
2542
+ message.traces = object.traces?.map((e) => Trace$1.fromPartial(e)) || [];
2543
+ return message;
2544
+ }
2545
+ };
2546
+ function createBaseTrace() {
2547
+ return { action: void 0, error: void 0, output: void 0, subtraces: 0, traceAddress: [] };
2548
+ }
2549
+ const Trace$1 = {
2550
+ encode(message, writer = _m0__default.Writer.create()) {
2551
+ switch (message.action?.$case) {
2552
+ case "call":
2553
+ CallAction$1.encode(message.action.call, writer.uint32(10).fork()).ldelim();
2554
+ break;
2555
+ case "create":
2556
+ CreateAction$1.encode(message.action.create, writer.uint32(18).fork()).ldelim();
2557
+ break;
2558
+ case "selfDestruct":
2559
+ SelfDestructAction$1.encode(message.action.selfDestruct, writer.uint32(26).fork()).ldelim();
2560
+ break;
2561
+ case "reward":
2562
+ RewardAction$1.encode(message.action.reward, writer.uint32(34).fork()).ldelim();
2563
+ break;
2564
+ }
2565
+ if (message.error !== void 0) {
2566
+ writer.uint32(42).string(message.error);
2567
+ }
2568
+ switch (message.output?.$case) {
2569
+ case "callOutput":
2570
+ CallOutput$1.encode(message.output.callOutput, writer.uint32(50).fork()).ldelim();
2571
+ break;
2572
+ case "createOutput":
2573
+ CreateOutput$1.encode(message.output.createOutput, writer.uint32(58).fork()).ldelim();
2574
+ break;
2575
+ }
2576
+ if (message.subtraces !== void 0 && message.subtraces !== 0) {
2577
+ writer.uint32(64).uint32(message.subtraces);
2578
+ }
2579
+ if (message.traceAddress !== void 0 && message.traceAddress.length !== 0) {
2580
+ writer.uint32(74).fork();
2581
+ for (const v of message.traceAddress) {
2582
+ writer.uint32(v);
2583
+ }
2584
+ writer.ldelim();
2585
+ }
2586
+ return writer;
2587
+ },
2588
+ decode(input, length) {
2589
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
2590
+ let end = length === void 0 ? reader.len : reader.pos + length;
2591
+ const message = createBaseTrace();
2592
+ while (reader.pos < end) {
2593
+ const tag = reader.uint32();
2594
+ switch (tag >>> 3) {
2595
+ case 1:
2596
+ if (tag !== 10) {
2597
+ break;
2598
+ }
2599
+ message.action = { $case: "call", call: CallAction$1.decode(reader, reader.uint32()) };
2600
+ continue;
2601
+ case 2:
2602
+ if (tag !== 18) {
2603
+ break;
2604
+ }
2605
+ message.action = { $case: "create", create: CreateAction$1.decode(reader, reader.uint32()) };
2606
+ continue;
2607
+ case 3:
2608
+ if (tag !== 26) {
2609
+ break;
2610
+ }
2611
+ message.action = { $case: "selfDestruct", selfDestruct: SelfDestructAction$1.decode(reader, reader.uint32()) };
2612
+ continue;
2613
+ case 4:
2614
+ if (tag !== 34) {
2615
+ break;
2616
+ }
2617
+ message.action = { $case: "reward", reward: RewardAction$1.decode(reader, reader.uint32()) };
2618
+ continue;
2619
+ case 5:
2620
+ if (tag !== 42) {
2621
+ break;
2622
+ }
2623
+ message.error = reader.string();
2624
+ continue;
2625
+ case 6:
2626
+ if (tag !== 50) {
2627
+ break;
2628
+ }
2629
+ message.output = { $case: "callOutput", callOutput: CallOutput$1.decode(reader, reader.uint32()) };
2630
+ continue;
2631
+ case 7:
2632
+ if (tag !== 58) {
2633
+ break;
2634
+ }
2635
+ message.output = { $case: "createOutput", createOutput: CreateOutput$1.decode(reader, reader.uint32()) };
2636
+ continue;
2637
+ case 8:
2638
+ if (tag !== 64) {
2639
+ break;
2640
+ }
2641
+ message.subtraces = reader.uint32();
2642
+ continue;
2643
+ case 9:
2644
+ if (tag === 72) {
2645
+ message.traceAddress.push(reader.uint32());
2646
+ continue;
2647
+ }
2648
+ if (tag === 74) {
2649
+ const end2 = reader.uint32() + reader.pos;
2650
+ while (reader.pos < end2) {
2651
+ message.traceAddress.push(reader.uint32());
2652
+ }
2653
+ continue;
2654
+ }
2655
+ break;
2656
+ }
2657
+ if ((tag & 7) === 4 || tag === 0) {
2658
+ break;
2659
+ }
2660
+ reader.skipType(tag & 7);
2661
+ }
2662
+ return message;
2663
+ },
2664
+ fromJSON(object) {
2665
+ return {
2666
+ action: isSet$1(object.call) ? { $case: "call", call: CallAction$1.fromJSON(object.call) } : isSet$1(object.create) ? { $case: "create", create: CreateAction$1.fromJSON(object.create) } : isSet$1(object.selfDestruct) ? { $case: "selfDestruct", selfDestruct: SelfDestructAction$1.fromJSON(object.selfDestruct) } : isSet$1(object.reward) ? { $case: "reward", reward: RewardAction$1.fromJSON(object.reward) } : void 0,
2667
+ error: isSet$1(object.error) ? globalThis.String(object.error) : void 0,
2668
+ output: isSet$1(object.callOutput) ? { $case: "callOutput", callOutput: CallOutput$1.fromJSON(object.callOutput) } : isSet$1(object.createOutput) ? { $case: "createOutput", createOutput: CreateOutput$1.fromJSON(object.createOutput) } : void 0,
2669
+ subtraces: isSet$1(object.subtraces) ? globalThis.Number(object.subtraces) : 0,
2670
+ traceAddress: globalThis.Array.isArray(object?.traceAddress) ? object.traceAddress.map((e) => globalThis.Number(e)) : []
2671
+ };
2672
+ },
2673
+ toJSON(message) {
2674
+ const obj = {};
2675
+ if (message.action?.$case === "call") {
2676
+ obj.call = CallAction$1.toJSON(message.action.call);
2677
+ }
2678
+ if (message.action?.$case === "create") {
2679
+ obj.create = CreateAction$1.toJSON(message.action.create);
2680
+ }
2681
+ if (message.action?.$case === "selfDestruct") {
2682
+ obj.selfDestruct = SelfDestructAction$1.toJSON(message.action.selfDestruct);
2683
+ }
2684
+ if (message.action?.$case === "reward") {
2685
+ obj.reward = RewardAction$1.toJSON(message.action.reward);
2686
+ }
2687
+ if (message.error !== void 0) {
2688
+ obj.error = message.error;
2689
+ }
2690
+ if (message.output?.$case === "callOutput") {
2691
+ obj.callOutput = CallOutput$1.toJSON(message.output.callOutput);
2692
+ }
2693
+ if (message.output?.$case === "createOutput") {
2694
+ obj.createOutput = CreateOutput$1.toJSON(message.output.createOutput);
2695
+ }
2696
+ if (message.subtraces !== void 0 && message.subtraces !== 0) {
2697
+ obj.subtraces = Math.round(message.subtraces);
2698
+ }
2699
+ if (message.traceAddress?.length) {
2700
+ obj.traceAddress = message.traceAddress.map((e) => Math.round(e));
2701
+ }
2702
+ return obj;
2703
+ },
2704
+ create(base) {
2705
+ return Trace$1.fromPartial(base ?? {});
2706
+ },
2707
+ fromPartial(object) {
2708
+ const message = createBaseTrace();
2709
+ if (object.action?.$case === "call" && object.action?.call !== void 0 && object.action?.call !== null) {
2710
+ message.action = { $case: "call", call: CallAction$1.fromPartial(object.action.call) };
2711
+ }
2712
+ if (object.action?.$case === "create" && object.action?.create !== void 0 && object.action?.create !== null) {
2713
+ message.action = { $case: "create", create: CreateAction$1.fromPartial(object.action.create) };
2714
+ }
2715
+ if (object.action?.$case === "selfDestruct" && object.action?.selfDestruct !== void 0 && object.action?.selfDestruct !== null) {
2716
+ message.action = {
2717
+ $case: "selfDestruct",
2718
+ selfDestruct: SelfDestructAction$1.fromPartial(object.action.selfDestruct)
2719
+ };
2720
+ }
2721
+ if (object.action?.$case === "reward" && object.action?.reward !== void 0 && object.action?.reward !== null) {
2722
+ message.action = { $case: "reward", reward: RewardAction$1.fromPartial(object.action.reward) };
2723
+ }
2724
+ message.error = object.error ?? void 0;
2725
+ if (object.output?.$case === "callOutput" && object.output?.callOutput !== void 0 && object.output?.callOutput !== null) {
2726
+ message.output = { $case: "callOutput", callOutput: CallOutput$1.fromPartial(object.output.callOutput) };
2727
+ }
2728
+ if (object.output?.$case === "createOutput" && object.output?.createOutput !== void 0 && object.output?.createOutput !== null) {
2729
+ message.output = { $case: "createOutput", createOutput: CreateOutput$1.fromPartial(object.output.createOutput) };
2730
+ }
2731
+ message.subtraces = object.subtraces ?? 0;
2732
+ message.traceAddress = object.traceAddress?.map((e) => e) || [];
2733
+ return message;
2734
+ }
2735
+ };
2736
+ function createBaseCallAction() {
2737
+ return {
2738
+ fromAddress: void 0,
2739
+ type: 0,
2740
+ gas: BigInt("0"),
2741
+ input: new Uint8Array(0),
2742
+ toAddress: void 0,
2743
+ value: void 0
2744
+ };
2745
+ }
2746
+ const CallAction$1 = {
2747
+ encode(message, writer = _m0__default.Writer.create()) {
2748
+ if (message.fromAddress !== void 0) {
2749
+ Address.encode(message.fromAddress, writer.uint32(10).fork()).ldelim();
2750
+ }
2751
+ if (message.type !== void 0 && message.type !== 0) {
2752
+ writer.uint32(16).int32(message.type);
2753
+ }
2754
+ if (message.gas !== void 0 && message.gas !== BigInt("0")) {
2755
+ if (BigInt.asUintN(64, message.gas) !== message.gas) {
2756
+ throw new globalThis.Error("value provided for field message.gas of type uint64 too large");
2757
+ }
2758
+ writer.uint32(24).uint64(message.gas.toString());
2759
+ }
2760
+ if (message.input !== void 0 && message.input.length !== 0) {
2761
+ writer.uint32(34).bytes(message.input);
2762
+ }
2763
+ if (message.toAddress !== void 0) {
2764
+ Address.encode(message.toAddress, writer.uint32(42).fork()).ldelim();
2765
+ }
2766
+ if (message.value !== void 0) {
2767
+ U256.encode(message.value, writer.uint32(50).fork()).ldelim();
2768
+ }
2769
+ return writer;
2770
+ },
2771
+ decode(input, length) {
2772
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
2773
+ let end = length === void 0 ? reader.len : reader.pos + length;
2774
+ const message = createBaseCallAction();
2775
+ while (reader.pos < end) {
2776
+ const tag = reader.uint32();
2777
+ switch (tag >>> 3) {
2778
+ case 1:
2779
+ if (tag !== 10) {
2780
+ break;
2781
+ }
2782
+ message.fromAddress = Address.decode(reader, reader.uint32());
2783
+ continue;
2784
+ case 2:
2785
+ if (tag !== 16) {
2786
+ break;
2787
+ }
2788
+ message.type = reader.int32();
2789
+ continue;
2790
+ case 3:
2791
+ if (tag !== 24) {
2792
+ break;
2793
+ }
2794
+ message.gas = longToBigint(reader.uint64());
2795
+ continue;
2796
+ case 4:
2797
+ if (tag !== 34) {
2798
+ break;
2799
+ }
2800
+ message.input = reader.bytes();
2801
+ continue;
2802
+ case 5:
2803
+ if (tag !== 42) {
2804
+ break;
2805
+ }
2806
+ message.toAddress = Address.decode(reader, reader.uint32());
2807
+ continue;
2808
+ case 6:
2809
+ if (tag !== 50) {
2810
+ break;
2811
+ }
2812
+ message.value = U256.decode(reader, reader.uint32());
2813
+ continue;
2814
+ }
2815
+ if ((tag & 7) === 4 || tag === 0) {
2816
+ break;
2817
+ }
2818
+ reader.skipType(tag & 7);
2819
+ }
2820
+ return message;
2821
+ },
2822
+ fromJSON(object) {
2823
+ return {
2824
+ fromAddress: isSet$1(object.fromAddress) ? Address.fromJSON(object.fromAddress) : void 0,
2825
+ type: isSet$1(object.type) ? callTypeFromJSON(object.type) : 0,
2826
+ gas: isSet$1(object.gas) ? BigInt(object.gas) : BigInt("0"),
2827
+ input: isSet$1(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
2828
+ toAddress: isSet$1(object.toAddress) ? Address.fromJSON(object.toAddress) : void 0,
2829
+ value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0
2830
+ };
2831
+ },
2832
+ toJSON(message) {
2833
+ const obj = {};
2834
+ if (message.fromAddress !== void 0) {
2835
+ obj.fromAddress = Address.toJSON(message.fromAddress);
2836
+ }
2837
+ if (message.type !== void 0 && message.type !== 0) {
2838
+ obj.type = callTypeToJSON(message.type);
2839
+ }
2840
+ if (message.gas !== void 0 && message.gas !== BigInt("0")) {
2841
+ obj.gas = message.gas.toString();
2842
+ }
2843
+ if (message.input !== void 0 && message.input.length !== 0) {
2844
+ obj.input = base64FromBytes(message.input);
2845
+ }
2846
+ if (message.toAddress !== void 0) {
2847
+ obj.toAddress = Address.toJSON(message.toAddress);
2848
+ }
2849
+ if (message.value !== void 0) {
2850
+ obj.value = U256.toJSON(message.value);
2851
+ }
2852
+ return obj;
2853
+ },
2854
+ create(base) {
2855
+ return CallAction$1.fromPartial(base ?? {});
2856
+ },
2857
+ fromPartial(object) {
2858
+ const message = createBaseCallAction();
2859
+ message.fromAddress = object.fromAddress !== void 0 && object.fromAddress !== null ? Address.fromPartial(object.fromAddress) : void 0;
2860
+ message.type = object.type ?? 0;
2861
+ message.gas = object.gas ?? BigInt("0");
2862
+ message.input = object.input ?? new Uint8Array(0);
2863
+ message.toAddress = object.toAddress !== void 0 && object.toAddress !== null ? Address.fromPartial(object.toAddress) : void 0;
2864
+ message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
2865
+ return message;
2866
+ }
2867
+ };
2868
+ function createBaseCreateAction() {
2869
+ return { fromAddress: void 0, gas: BigInt("0"), init: new Uint8Array(0), value: void 0, creationMethod: 0 };
2870
+ }
2871
+ const CreateAction$1 = {
2872
+ encode(message, writer = _m0__default.Writer.create()) {
2873
+ if (message.fromAddress !== void 0) {
2874
+ Address.encode(message.fromAddress, writer.uint32(10).fork()).ldelim();
2875
+ }
2876
+ if (message.gas !== void 0 && message.gas !== BigInt("0")) {
2877
+ if (BigInt.asUintN(64, message.gas) !== message.gas) {
2878
+ throw new globalThis.Error("value provided for field message.gas of type uint64 too large");
2879
+ }
2880
+ writer.uint32(16).uint64(message.gas.toString());
2881
+ }
2882
+ if (message.init !== void 0 && message.init.length !== 0) {
2883
+ writer.uint32(26).bytes(message.init);
2884
+ }
2885
+ if (message.value !== void 0) {
2886
+ U256.encode(message.value, writer.uint32(34).fork()).ldelim();
2887
+ }
2888
+ if (message.creationMethod !== void 0 && message.creationMethod !== 0) {
2889
+ writer.uint32(40).int32(message.creationMethod);
2890
+ }
2891
+ return writer;
2892
+ },
2893
+ decode(input, length) {
2894
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
2895
+ let end = length === void 0 ? reader.len : reader.pos + length;
2896
+ const message = createBaseCreateAction();
2897
+ while (reader.pos < end) {
2898
+ const tag = reader.uint32();
2899
+ switch (tag >>> 3) {
2900
+ case 1:
2901
+ if (tag !== 10) {
2902
+ break;
2903
+ }
2904
+ message.fromAddress = Address.decode(reader, reader.uint32());
2905
+ continue;
2906
+ case 2:
2907
+ if (tag !== 16) {
2908
+ break;
2909
+ }
2910
+ message.gas = longToBigint(reader.uint64());
2911
+ continue;
2912
+ case 3:
2913
+ if (tag !== 26) {
2914
+ break;
2915
+ }
2916
+ message.init = reader.bytes();
2917
+ continue;
2918
+ case 4:
2919
+ if (tag !== 34) {
2920
+ break;
2921
+ }
2922
+ message.value = U256.decode(reader, reader.uint32());
2923
+ continue;
2924
+ case 5:
2925
+ if (tag !== 40) {
2926
+ break;
2927
+ }
2928
+ message.creationMethod = reader.int32();
2929
+ continue;
2930
+ }
2931
+ if ((tag & 7) === 4 || tag === 0) {
2932
+ break;
2933
+ }
2934
+ reader.skipType(tag & 7);
2935
+ }
2936
+ return message;
2937
+ },
2938
+ fromJSON(object) {
2939
+ return {
2940
+ fromAddress: isSet$1(object.fromAddress) ? Address.fromJSON(object.fromAddress) : void 0,
2941
+ gas: isSet$1(object.gas) ? BigInt(object.gas) : BigInt("0"),
2942
+ init: isSet$1(object.init) ? bytesFromBase64(object.init) : new Uint8Array(0),
2943
+ value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0,
2944
+ creationMethod: isSet$1(object.creationMethod) ? creationMethodFromJSON(object.creationMethod) : 0
2945
+ };
2946
+ },
2947
+ toJSON(message) {
2948
+ const obj = {};
2949
+ if (message.fromAddress !== void 0) {
2950
+ obj.fromAddress = Address.toJSON(message.fromAddress);
2951
+ }
2952
+ if (message.gas !== void 0 && message.gas !== BigInt("0")) {
2953
+ obj.gas = message.gas.toString();
2954
+ }
2955
+ if (message.init !== void 0 && message.init.length !== 0) {
2956
+ obj.init = base64FromBytes(message.init);
2957
+ }
2958
+ if (message.value !== void 0) {
2959
+ obj.value = U256.toJSON(message.value);
2960
+ }
2961
+ if (message.creationMethod !== void 0 && message.creationMethod !== 0) {
2962
+ obj.creationMethod = creationMethodToJSON(message.creationMethod);
2963
+ }
2964
+ return obj;
2965
+ },
2966
+ create(base) {
2967
+ return CreateAction$1.fromPartial(base ?? {});
2968
+ },
2969
+ fromPartial(object) {
2970
+ const message = createBaseCreateAction();
2971
+ message.fromAddress = object.fromAddress !== void 0 && object.fromAddress !== null ? Address.fromPartial(object.fromAddress) : void 0;
2972
+ message.gas = object.gas ?? BigInt("0");
2973
+ message.init = object.init ?? new Uint8Array(0);
2974
+ message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
2975
+ message.creationMethod = object.creationMethod ?? 0;
2976
+ return message;
2977
+ }
2978
+ };
2979
+ function createBaseSelfDestructAction() {
2980
+ return { address: void 0, balance: void 0, refundAddress: void 0 };
2981
+ }
2982
+ const SelfDestructAction$1 = {
2983
+ encode(message, writer = _m0__default.Writer.create()) {
2984
+ if (message.address !== void 0) {
2985
+ Address.encode(message.address, writer.uint32(10).fork()).ldelim();
2986
+ }
2987
+ if (message.balance !== void 0) {
2988
+ U256.encode(message.balance, writer.uint32(18).fork()).ldelim();
2989
+ }
2990
+ if (message.refundAddress !== void 0) {
2991
+ Address.encode(message.refundAddress, writer.uint32(26).fork()).ldelim();
2992
+ }
2993
+ return writer;
2994
+ },
2995
+ decode(input, length) {
2996
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
2997
+ let end = length === void 0 ? reader.len : reader.pos + length;
2998
+ const message = createBaseSelfDestructAction();
2999
+ while (reader.pos < end) {
3000
+ const tag = reader.uint32();
3001
+ switch (tag >>> 3) {
3002
+ case 1:
3003
+ if (tag !== 10) {
3004
+ break;
3005
+ }
3006
+ message.address = Address.decode(reader, reader.uint32());
3007
+ continue;
3008
+ case 2:
3009
+ if (tag !== 18) {
3010
+ break;
3011
+ }
3012
+ message.balance = U256.decode(reader, reader.uint32());
3013
+ continue;
3014
+ case 3:
3015
+ if (tag !== 26) {
3016
+ break;
3017
+ }
3018
+ message.refundAddress = Address.decode(reader, reader.uint32());
3019
+ continue;
3020
+ }
3021
+ if ((tag & 7) === 4 || tag === 0) {
3022
+ break;
3023
+ }
3024
+ reader.skipType(tag & 7);
3025
+ }
3026
+ return message;
3027
+ },
3028
+ fromJSON(object) {
3029
+ return {
3030
+ address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
3031
+ balance: isSet$1(object.balance) ? U256.fromJSON(object.balance) : void 0,
3032
+ refundAddress: isSet$1(object.refundAddress) ? Address.fromJSON(object.refundAddress) : void 0
3033
+ };
3034
+ },
3035
+ toJSON(message) {
3036
+ const obj = {};
3037
+ if (message.address !== void 0) {
3038
+ obj.address = Address.toJSON(message.address);
3039
+ }
3040
+ if (message.balance !== void 0) {
3041
+ obj.balance = U256.toJSON(message.balance);
3042
+ }
3043
+ if (message.refundAddress !== void 0) {
3044
+ obj.refundAddress = Address.toJSON(message.refundAddress);
3045
+ }
3046
+ return obj;
3047
+ },
3048
+ create(base) {
3049
+ return SelfDestructAction$1.fromPartial(base ?? {});
3050
+ },
3051
+ fromPartial(object) {
3052
+ const message = createBaseSelfDestructAction();
3053
+ message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
3054
+ message.balance = object.balance !== void 0 && object.balance !== null ? U256.fromPartial(object.balance) : void 0;
3055
+ message.refundAddress = object.refundAddress !== void 0 && object.refundAddress !== null ? Address.fromPartial(object.refundAddress) : void 0;
3056
+ return message;
3057
+ }
3058
+ };
3059
+ function createBaseRewardAction() {
3060
+ return { author: void 0, type: 0, value: void 0 };
3061
+ }
3062
+ const RewardAction$1 = {
3063
+ encode(message, writer = _m0__default.Writer.create()) {
3064
+ if (message.author !== void 0) {
3065
+ Address.encode(message.author, writer.uint32(10).fork()).ldelim();
3066
+ }
3067
+ if (message.type !== void 0 && message.type !== 0) {
3068
+ writer.uint32(16).int32(message.type);
3069
+ }
3070
+ if (message.value !== void 0) {
3071
+ U256.encode(message.value, writer.uint32(26).fork()).ldelim();
3072
+ }
3073
+ return writer;
3074
+ },
3075
+ decode(input, length) {
3076
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
3077
+ let end = length === void 0 ? reader.len : reader.pos + length;
3078
+ const message = createBaseRewardAction();
3079
+ while (reader.pos < end) {
3080
+ const tag = reader.uint32();
3081
+ switch (tag >>> 3) {
3082
+ case 1:
3083
+ if (tag !== 10) {
3084
+ break;
3085
+ }
3086
+ message.author = Address.decode(reader, reader.uint32());
3087
+ continue;
3088
+ case 2:
3089
+ if (tag !== 16) {
3090
+ break;
3091
+ }
3092
+ message.type = reader.int32();
3093
+ continue;
3094
+ case 3:
3095
+ if (tag !== 26) {
3096
+ break;
3097
+ }
3098
+ message.value = U256.decode(reader, reader.uint32());
3099
+ continue;
3100
+ }
3101
+ if ((tag & 7) === 4 || tag === 0) {
3102
+ break;
3103
+ }
3104
+ reader.skipType(tag & 7);
3105
+ }
3106
+ return message;
3107
+ },
3108
+ fromJSON(object) {
3109
+ return {
3110
+ author: isSet$1(object.author) ? Address.fromJSON(object.author) : void 0,
3111
+ type: isSet$1(object.type) ? rewardTypeFromJSON(object.type) : 0,
3112
+ value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0
3113
+ };
3114
+ },
3115
+ toJSON(message) {
3116
+ const obj = {};
3117
+ if (message.author !== void 0) {
3118
+ obj.author = Address.toJSON(message.author);
3119
+ }
3120
+ if (message.type !== void 0 && message.type !== 0) {
3121
+ obj.type = rewardTypeToJSON(message.type);
3122
+ }
3123
+ if (message.value !== void 0) {
3124
+ obj.value = U256.toJSON(message.value);
3125
+ }
3126
+ return obj;
3127
+ },
3128
+ create(base) {
3129
+ return RewardAction$1.fromPartial(base ?? {});
3130
+ },
3131
+ fromPartial(object) {
3132
+ const message = createBaseRewardAction();
3133
+ message.author = object.author !== void 0 && object.author !== null ? Address.fromPartial(object.author) : void 0;
3134
+ message.type = object.type ?? 0;
3135
+ message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
3136
+ return message;
3137
+ }
3138
+ };
3139
+ function createBaseCallOutput() {
3140
+ return { gasUsed: BigInt("0"), output: new Uint8Array(0) };
3141
+ }
3142
+ const CallOutput$1 = {
3143
+ encode(message, writer = _m0__default.Writer.create()) {
3144
+ if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
3145
+ if (BigInt.asUintN(64, message.gasUsed) !== message.gasUsed) {
3146
+ throw new globalThis.Error("value provided for field message.gasUsed of type uint64 too large");
3147
+ }
3148
+ writer.uint32(8).uint64(message.gasUsed.toString());
3149
+ }
3150
+ if (message.output !== void 0 && message.output.length !== 0) {
3151
+ writer.uint32(18).bytes(message.output);
3152
+ }
3153
+ return writer;
3154
+ },
3155
+ decode(input, length) {
3156
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
3157
+ let end = length === void 0 ? reader.len : reader.pos + length;
3158
+ const message = createBaseCallOutput();
3159
+ while (reader.pos < end) {
3160
+ const tag = reader.uint32();
3161
+ switch (tag >>> 3) {
3162
+ case 1:
3163
+ if (tag !== 8) {
3164
+ break;
3165
+ }
3166
+ message.gasUsed = longToBigint(reader.uint64());
3167
+ continue;
3168
+ case 2:
3169
+ if (tag !== 18) {
3170
+ break;
3171
+ }
3172
+ message.output = reader.bytes();
3173
+ continue;
3174
+ }
3175
+ if ((tag & 7) === 4 || tag === 0) {
3176
+ break;
3177
+ }
3178
+ reader.skipType(tag & 7);
3179
+ }
3180
+ return message;
3181
+ },
3182
+ fromJSON(object) {
3183
+ return {
3184
+ gasUsed: isSet$1(object.gasUsed) ? BigInt(object.gasUsed) : BigInt("0"),
3185
+ output: isSet$1(object.output) ? bytesFromBase64(object.output) : new Uint8Array(0)
3186
+ };
3187
+ },
3188
+ toJSON(message) {
3189
+ const obj = {};
3190
+ if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
3191
+ obj.gasUsed = message.gasUsed.toString();
3192
+ }
3193
+ if (message.output !== void 0 && message.output.length !== 0) {
3194
+ obj.output = base64FromBytes(message.output);
3195
+ }
3196
+ return obj;
3197
+ },
3198
+ create(base) {
3199
+ return CallOutput$1.fromPartial(base ?? {});
3200
+ },
3201
+ fromPartial(object) {
3202
+ const message = createBaseCallOutput();
3203
+ message.gasUsed = object.gasUsed ?? BigInt("0");
3204
+ message.output = object.output ?? new Uint8Array(0);
3205
+ return message;
3206
+ }
3207
+ };
3208
+ function createBaseCreateOutput() {
3209
+ return { address: void 0, code: new Uint8Array(0), gasUsed: BigInt("0") };
3210
+ }
3211
+ const CreateOutput$1 = {
3212
+ encode(message, writer = _m0__default.Writer.create()) {
3213
+ if (message.address !== void 0) {
3214
+ Address.encode(message.address, writer.uint32(10).fork()).ldelim();
3215
+ }
3216
+ if (message.code !== void 0 && message.code.length !== 0) {
3217
+ writer.uint32(18).bytes(message.code);
3218
+ }
3219
+ if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
3220
+ if (BigInt.asUintN(64, message.gasUsed) !== message.gasUsed) {
3221
+ throw new globalThis.Error("value provided for field message.gasUsed of type uint64 too large");
3222
+ }
3223
+ writer.uint32(24).uint64(message.gasUsed.toString());
3224
+ }
3225
+ return writer;
3226
+ },
3227
+ decode(input, length) {
3228
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
3229
+ let end = length === void 0 ? reader.len : reader.pos + length;
3230
+ const message = createBaseCreateOutput();
3231
+ while (reader.pos < end) {
3232
+ const tag = reader.uint32();
3233
+ switch (tag >>> 3) {
3234
+ case 1:
3235
+ if (tag !== 10) {
3236
+ break;
3237
+ }
3238
+ message.address = Address.decode(reader, reader.uint32());
3239
+ continue;
3240
+ case 2:
3241
+ if (tag !== 18) {
3242
+ break;
3243
+ }
3244
+ message.code = reader.bytes();
3245
+ continue;
3246
+ case 3:
3247
+ if (tag !== 24) {
3248
+ break;
3249
+ }
3250
+ message.gasUsed = longToBigint(reader.uint64());
3251
+ continue;
3252
+ }
3253
+ if ((tag & 7) === 4 || tag === 0) {
3254
+ break;
3255
+ }
3256
+ reader.skipType(tag & 7);
3257
+ }
3258
+ return message;
3259
+ },
3260
+ fromJSON(object) {
3261
+ return {
3262
+ address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
3263
+ code: isSet$1(object.code) ? bytesFromBase64(object.code) : new Uint8Array(0),
3264
+ gasUsed: isSet$1(object.gasUsed) ? BigInt(object.gasUsed) : BigInt("0")
3265
+ };
3266
+ },
3267
+ toJSON(message) {
3268
+ const obj = {};
3269
+ if (message.address !== void 0) {
3270
+ obj.address = Address.toJSON(message.address);
3271
+ }
3272
+ if (message.code !== void 0 && message.code.length !== 0) {
3273
+ obj.code = base64FromBytes(message.code);
3274
+ }
3275
+ if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
3276
+ obj.gasUsed = message.gasUsed.toString();
3277
+ }
3278
+ return obj;
3279
+ },
3280
+ create(base) {
3281
+ return CreateOutput$1.fromPartial(base ?? {});
3282
+ },
3283
+ fromPartial(object) {
3284
+ const message = createBaseCreateOutput();
3285
+ message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
3286
+ message.code = object.code ?? new Uint8Array(0);
3287
+ message.gasUsed = object.gasUsed ?? BigInt("0");
3288
+ return message;
3289
+ }
3290
+ };
3291
+ function bytesFromBase64(b64) {
3292
+ if (globalThis.Buffer) {
3293
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
3294
+ } else {
3295
+ const bin = globalThis.atob(b64);
3296
+ const arr = new Uint8Array(bin.length);
3297
+ for (let i = 0; i < bin.length; ++i) {
3298
+ arr[i] = bin.charCodeAt(i);
3299
+ }
3300
+ return arr;
3301
+ }
3302
+ }
3303
+ function base64FromBytes(arr) {
3304
+ if (globalThis.Buffer) {
3305
+ return globalThis.Buffer.from(arr).toString("base64");
3306
+ } else {
3307
+ const bin = [];
3308
+ arr.forEach((byte) => {
3309
+ bin.push(globalThis.String.fromCharCode(byte));
3310
+ });
3311
+ return globalThis.btoa(bin.join(""));
3312
+ }
3313
+ }
3314
+ function toTimestamp(date) {
3315
+ const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
3316
+ const nanos = date.getTime() % 1e3 * 1e6;
3317
+ return { seconds, nanos };
3318
+ }
3319
+ function fromTimestamp(t) {
3320
+ let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
3321
+ millis += (t.nanos || 0) / 1e6;
3322
+ return new globalThis.Date(millis);
3323
+ }
3324
+ function fromJsonTimestamp(o) {
3325
+ if (o instanceof globalThis.Date) {
3326
+ return o;
3327
+ } else if (typeof o === "string") {
3328
+ return new globalThis.Date(o);
3329
+ } else {
3330
+ return fromTimestamp(Timestamp.fromJSON(o));
3331
+ }
3332
+ }
3333
+ function longToBigint(long) {
3334
+ return BigInt(long.toString());
3335
+ }
3336
+ if (_m0__default.util.Long !== Long__default) {
3337
+ _m0__default.util.Long = Long__default;
3338
+ _m0__default.configure();
3339
+ }
3340
+ function isSet$1(value) {
3341
+ return value !== null && value !== void 0;
3342
+ }
3343
+
3344
+ const data = {
3345
+ __proto__: null,
3346
+ AccessListItem: AccessListItem$1,
3347
+ Block: Block$1,
3348
+ BlockHeader: BlockHeader$1,
3349
+ CallAction: CallAction$1,
3350
+ CallOutput: CallOutput$1,
3351
+ CallType: CallType$1,
3352
+ CreateAction: CreateAction$1,
3353
+ CreateOutput: CreateOutput$1,
3354
+ CreationMethod: CreationMethod$1,
3355
+ Log: Log$1,
3356
+ RewardAction: RewardAction$1,
3357
+ RewardType: RewardType$1,
3358
+ SelfDestructAction: SelfDestructAction$1,
3359
+ Signature: Signature$1,
3360
+ Trace: Trace$1,
3361
+ Transaction: Transaction$1,
3362
+ TransactionReceipt: TransactionReceipt$1,
3363
+ TransactionStatus: TransactionStatus$1,
3364
+ TransactionTrace: TransactionTrace$1,
3365
+ Withdrawal: Withdrawal$1,
3366
+ callTypeFromJSON: callTypeFromJSON,
3367
+ callTypeToJSON: callTypeToJSON,
3368
+ creationMethodFromJSON: creationMethodFromJSON,
3369
+ creationMethodToJSON: creationMethodToJSON,
3370
+ protobufPackage: protobufPackage$1,
3371
+ rewardTypeFromJSON: rewardTypeFromJSON,
3372
+ rewardTypeToJSON: rewardTypeToJSON,
3373
+ transactionStatusFromJSON: transactionStatusFromJSON,
3374
+ transactionStatusToJSON: transactionStatusToJSON
3375
+ };
3376
+
3377
+ const protobufPackage = "evm.v2";
3378
+ var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
3379
+ HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
3380
+ HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
3381
+ HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
3382
+ HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
3383
+ HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
3384
+ return HeaderFilter2;
3385
+ })(HeaderFilter$1 || {});
3386
+ function headerFilterFromJSON(object) {
3387
+ switch (object) {
3388
+ case 0:
3389
+ case "HEADER_FILTER_UNSPECIFIED":
3390
+ return 0 /* UNSPECIFIED */;
3391
+ case 1:
3392
+ case "HEADER_FILTER_ALWAYS":
3393
+ return 1 /* ALWAYS */;
3394
+ case 2:
3395
+ case "HEADER_FILTER_ON_DATA":
3396
+ return 2 /* ON_DATA */;
3397
+ case 3:
3398
+ case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
3399
+ return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
3400
+ case -1:
3401
+ case "UNRECOGNIZED":
3402
+ default:
3403
+ return -1 /* UNRECOGNIZED */;
3404
+ }
3405
+ }
3406
+ function headerFilterToJSON(object) {
3407
+ switch (object) {
3408
+ case 0 /* UNSPECIFIED */:
3409
+ return "HEADER_FILTER_UNSPECIFIED";
3410
+ case 1 /* ALWAYS */:
3411
+ return "HEADER_FILTER_ALWAYS";
3412
+ case 2 /* ON_DATA */:
3413
+ return "HEADER_FILTER_ON_DATA";
3414
+ case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
3415
+ return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
3416
+ case -1 /* UNRECOGNIZED */:
3417
+ default:
3418
+ return "UNRECOGNIZED";
3419
+ }
3420
+ }
3421
+ var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
3422
+ TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
3423
+ TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
3424
+ TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
3425
+ TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
3426
+ TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
3427
+ return TransactionStatusFilter2;
3428
+ })(TransactionStatusFilter$1 || {});
3429
+ function transactionStatusFilterFromJSON(object) {
3430
+ switch (object) {
3431
+ case 0:
3432
+ case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
3433
+ return 0 /* UNSPECIFIED */;
3434
+ case 1:
3435
+ case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
3436
+ return 1 /* SUCCEEDED */;
3437
+ case 2:
3438
+ case "TRANSACTION_STATUS_FILTER_REVERTED":
3439
+ return 2 /* REVERTED */;
3440
+ case 3:
3441
+ case "TRANSACTION_STATUS_FILTER_ALL":
3442
+ return 3 /* ALL */;
3443
+ case -1:
3444
+ case "UNRECOGNIZED":
3445
+ default:
3446
+ return -1 /* UNRECOGNIZED */;
3447
+ }
3448
+ }
3449
+ function transactionStatusFilterToJSON(object) {
3450
+ switch (object) {
3451
+ case 0 /* UNSPECIFIED */:
3452
+ return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
3453
+ case 1 /* SUCCEEDED */:
3454
+ return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
3455
+ case 2 /* REVERTED */:
3456
+ return "TRANSACTION_STATUS_FILTER_REVERTED";
3457
+ case 3 /* ALL */:
3458
+ return "TRANSACTION_STATUS_FILTER_ALL";
3459
+ case -1 /* UNRECOGNIZED */:
3460
+ default:
3461
+ return "UNRECOGNIZED";
3462
+ }
3463
+ }
3464
+ function createBaseFilter() {
3465
+ return { header: 0, withdrawals: [], transactions: [], logs: [] };
3466
+ }
3467
+ const Filter$1 = {
3468
+ encode(message, writer = _m0__default.Writer.create()) {
3469
+ if (message.header !== void 0 && message.header !== 0) {
3470
+ writer.uint32(8).int32(message.header);
3471
+ }
3472
+ if (message.withdrawals !== void 0 && message.withdrawals.length !== 0) {
3473
+ for (const v of message.withdrawals) {
3474
+ WithdrawalFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
3475
+ }
3476
+ }
3477
+ if (message.transactions !== void 0 && message.transactions.length !== 0) {
3478
+ for (const v of message.transactions) {
3479
+ TransactionFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
3480
+ }
3481
+ }
3482
+ if (message.logs !== void 0 && message.logs.length !== 0) {
3483
+ for (const v of message.logs) {
3484
+ LogFilter$1.encode(v, writer.uint32(34).fork()).ldelim();
3485
+ }
3486
+ }
3487
+ return writer;
3488
+ },
3489
+ decode(input, length) {
3490
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
3491
+ let end = length === void 0 ? reader.len : reader.pos + length;
3492
+ const message = createBaseFilter();
3493
+ while (reader.pos < end) {
3494
+ const tag = reader.uint32();
3495
+ switch (tag >>> 3) {
3496
+ case 1:
3497
+ if (tag !== 8) {
3498
+ break;
3499
+ }
3500
+ message.header = reader.int32();
3501
+ continue;
2475
3502
  case 2:
2476
3503
  if (tag !== 18) {
2477
3504
  break;
@@ -2622,7 +3649,8 @@ function createBaseTransactionFilter() {
2622
3649
  create: void 0,
2623
3650
  transactionStatus: void 0,
2624
3651
  includeReceipt: void 0,
2625
- includeLogs: void 0
3652
+ includeLogs: void 0,
3653
+ includeTransactionTrace: void 0
2626
3654
  };
2627
3655
  }
2628
3656
  const TransactionFilter$1 = {
@@ -2648,6 +3676,9 @@ const TransactionFilter$1 = {
2648
3676
  if (message.includeLogs !== void 0) {
2649
3677
  writer.uint32(56).bool(message.includeLogs);
2650
3678
  }
3679
+ if (message.includeTransactionTrace !== void 0) {
3680
+ writer.uint32(64).bool(message.includeTransactionTrace);
3681
+ }
2651
3682
  return writer;
2652
3683
  },
2653
3684
  decode(input, length) {
@@ -2699,6 +3730,12 @@ const TransactionFilter$1 = {
2699
3730
  }
2700
3731
  message.includeLogs = reader.bool();
2701
3732
  continue;
3733
+ case 8:
3734
+ if (tag !== 64) {
3735
+ break;
3736
+ }
3737
+ message.includeTransactionTrace = reader.bool();
3738
+ continue;
2702
3739
  }
2703
3740
  if ((tag & 7) === 4 || tag === 0) {
2704
3741
  break;
@@ -2715,7 +3752,8 @@ const TransactionFilter$1 = {
2715
3752
  create: isSet(object.create) ? globalThis.Boolean(object.create) : void 0,
2716
3753
  transactionStatus: isSet(object.transactionStatus) ? transactionStatusFilterFromJSON(object.transactionStatus) : void 0,
2717
3754
  includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
2718
- includeLogs: isSet(object.includeLogs) ? globalThis.Boolean(object.includeLogs) : void 0
3755
+ includeLogs: isSet(object.includeLogs) ? globalThis.Boolean(object.includeLogs) : void 0,
3756
+ includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
2719
3757
  };
2720
3758
  },
2721
3759
  toJSON(message) {
@@ -2741,6 +3779,9 @@ const TransactionFilter$1 = {
2741
3779
  if (message.includeLogs !== void 0) {
2742
3780
  obj.includeLogs = message.includeLogs;
2743
3781
  }
3782
+ if (message.includeTransactionTrace !== void 0) {
3783
+ obj.includeTransactionTrace = message.includeTransactionTrace;
3784
+ }
2744
3785
  return obj;
2745
3786
  },
2746
3787
  create(base) {
@@ -2755,6 +3796,7 @@ const TransactionFilter$1 = {
2755
3796
  message.transactionStatus = object.transactionStatus ?? void 0;
2756
3797
  message.includeReceipt = object.includeReceipt ?? void 0;
2757
3798
  message.includeLogs = object.includeLogs ?? void 0;
3799
+ message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
2758
3800
  return message;
2759
3801
  }
2760
3802
  };
@@ -2767,7 +3809,8 @@ function createBaseLogFilter() {
2767
3809
  transactionStatus: void 0,
2768
3810
  includeTransaction: void 0,
2769
3811
  includeReceipt: void 0,
2770
- includeSiblings: void 0
3812
+ includeSiblings: void 0,
3813
+ includeTransactionTrace: void 0
2771
3814
  };
2772
3815
  }
2773
3816
  const LogFilter$1 = {
@@ -2798,6 +3841,9 @@ const LogFilter$1 = {
2798
3841
  if (message.includeSiblings !== void 0) {
2799
3842
  writer.uint32(64).bool(message.includeSiblings);
2800
3843
  }
3844
+ if (message.includeTransactionTrace !== void 0) {
3845
+ writer.uint32(72).bool(message.includeTransactionTrace);
3846
+ }
2801
3847
  return writer;
2802
3848
  },
2803
3849
  decode(input, length) {
@@ -2855,6 +3901,12 @@ const LogFilter$1 = {
2855
3901
  }
2856
3902
  message.includeSiblings = reader.bool();
2857
3903
  continue;
3904
+ case 9:
3905
+ if (tag !== 72) {
3906
+ break;
3907
+ }
3908
+ message.includeTransactionTrace = reader.bool();
3909
+ continue;
2858
3910
  }
2859
3911
  if ((tag & 7) === 4 || tag === 0) {
2860
3912
  break;
@@ -2872,7 +3924,8 @@ const LogFilter$1 = {
2872
3924
  transactionStatus: isSet(object.transactionStatus) ? transactionStatusFilterFromJSON(object.transactionStatus) : void 0,
2873
3925
  includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
2874
3926
  includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
2875
- includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
3927
+ includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
3928
+ includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
2876
3929
  };
2877
3930
  },
2878
3931
  toJSON(message) {
@@ -2901,6 +3954,9 @@ const LogFilter$1 = {
2901
3954
  if (message.includeSiblings !== void 0) {
2902
3955
  obj.includeSiblings = message.includeSiblings;
2903
3956
  }
3957
+ if (message.includeTransactionTrace !== void 0) {
3958
+ obj.includeTransactionTrace = message.includeTransactionTrace;
3959
+ }
2904
3960
  return obj;
2905
3961
  },
2906
3962
  create(base) {
@@ -2916,6 +3972,7 @@ const LogFilter$1 = {
2916
3972
  message.includeTransaction = object.includeTransaction ?? void 0;
2917
3973
  message.includeReceipt = object.includeReceipt ?? void 0;
2918
3974
  message.includeSiblings = object.includeSiblings ?? void 0;
3975
+ message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
2919
3976
  return message;
2920
3977
  }
2921
3978
  };
@@ -3119,12 +4176,149 @@ const Log = schema.Schema.Struct({
3119
4176
  transactionHash: B256$1,
3120
4177
  transactionStatus: TransactionStatus
3121
4178
  });
4179
+ const CallType = schema.Schema.transform(
4180
+ schema.Schema.Enums(CallType$1),
4181
+ schema.Schema.Literal(
4182
+ "unknown",
4183
+ "call",
4184
+ "delegateCall",
4185
+ "callCode",
4186
+ "delegateCall",
4187
+ "staticCall",
4188
+ "authCall"
4189
+ ),
4190
+ {
4191
+ decode(value) {
4192
+ const enumMap = {
4193
+ [CallType$1.CALL]: "call",
4194
+ [CallType$1.CALL_CODE]: "callCode",
4195
+ [CallType$1.DELEGATE_CALL]: "delegateCall",
4196
+ [CallType$1.STATIC_CALL]: "staticCall",
4197
+ [CallType$1.AUTH_CALL]: "authCall",
4198
+ [CallType$1.UNSPECIFIED]: "unknown",
4199
+ [CallType$1.UNRECOGNIZED]: "unknown"
4200
+ };
4201
+ return enumMap[value] ?? "unknown";
4202
+ },
4203
+ encode(value) {
4204
+ throw new Error("encode: not implemented");
4205
+ }
4206
+ }
4207
+ );
4208
+ const CreationMethod = schema.Schema.transform(
4209
+ schema.Schema.Enums(CreationMethod$1),
4210
+ schema.Schema.Literal("unknown", "create", "create2", "eofCreate"),
4211
+ {
4212
+ decode(value) {
4213
+ const enumMap = {
4214
+ [CreationMethod$1.CREATE]: "create",
4215
+ [CreationMethod$1.CREATE2]: "create2",
4216
+ [CreationMethod$1.EOF_CREATE]: "eofCreate",
4217
+ [CallType$1.UNSPECIFIED]: "unknown",
4218
+ [CallType$1.UNRECOGNIZED]: "unknown"
4219
+ };
4220
+ return enumMap[value] ?? "unknown";
4221
+ },
4222
+ encode(value) {
4223
+ throw new Error("encode: not implemented");
4224
+ }
4225
+ }
4226
+ );
4227
+ const CallAction = schema.Schema.Struct({
4228
+ _tag: tag("call"),
4229
+ call: schema.Schema.Struct({
4230
+ fromAddress: Address$1,
4231
+ type: CallType,
4232
+ gas: schema.Schema.BigIntFromSelf,
4233
+ input: protocol.BytesFromUint8Array,
4234
+ toAddress: Address$1,
4235
+ value: U256$1
4236
+ })
4237
+ });
4238
+ const CreateAction = schema.Schema.Struct({
4239
+ _tag: tag("create"),
4240
+ create: schema.Schema.Struct({
4241
+ fromAddress: Address$1,
4242
+ gas: schema.Schema.BigIntFromSelf,
4243
+ init: protocol.BytesFromUint8Array,
4244
+ value: U256$1,
4245
+ creationMethod: CreationMethod
4246
+ })
4247
+ });
4248
+ const SelfDestructAction = schema.Schema.Struct({
4249
+ _tag: tag("selfDestruct"),
4250
+ selfDestruct: schema.Schema.Struct({
4251
+ address: Address$1,
4252
+ balance: U256$1,
4253
+ refundAddress: Address$1
4254
+ })
4255
+ });
4256
+ const RewardType = schema.Schema.transform(
4257
+ schema.Schema.Enums(RewardType$1),
4258
+ schema.Schema.Literal("unknown", "block", "uncle"),
4259
+ {
4260
+ decode(value) {
4261
+ const enumMap = {
4262
+ [RewardType$1.BLOCK]: "block",
4263
+ [RewardType$1.UNCLE]: "uncle",
4264
+ [RewardType$1.UNSPECIFIED]: "unknown",
4265
+ [RewardType$1.UNRECOGNIZED]: "unknown"
4266
+ };
4267
+ return enumMap[value] ?? "unknown";
4268
+ },
4269
+ encode(value) {
4270
+ throw new Error("encode: not implemented");
4271
+ }
4272
+ }
4273
+ );
4274
+ const RewardAction = schema.Schema.Struct({
4275
+ _tag: tag("reward"),
4276
+ reward: schema.Schema.Struct({
4277
+ author: Address$1,
4278
+ type: RewardType,
4279
+ value: U256$1
4280
+ })
4281
+ });
4282
+ const CallOutput = schema.Schema.Struct({
4283
+ _tag: tag("callOutput"),
4284
+ callOutput: schema.Schema.Struct({
4285
+ gasUsed: schema.Schema.BigIntFromSelf,
4286
+ output: protocol.BytesFromUint8Array
4287
+ })
4288
+ });
4289
+ const CreateOutput = schema.Schema.Struct({
4290
+ _tag: tag("createOutput"),
4291
+ createOutput: schema.Schema.Struct({
4292
+ address: Address$1,
4293
+ code: protocol.BytesFromUint8Array,
4294
+ gasUsed: schema.Schema.BigIntFromSelf
4295
+ })
4296
+ });
4297
+ const Trace = schema.Schema.Struct({
4298
+ action: schema.Schema.Union(
4299
+ CallAction,
4300
+ CreateAction,
4301
+ SelfDestructAction,
4302
+ RewardAction
4303
+ ),
4304
+ error: schema.Schema.optional(schema.Schema.String),
4305
+ output: schema.Schema.optional(schema.Schema.Union(CallOutput, CreateOutput)),
4306
+ subtraces: schema.Schema.Number,
4307
+ traceAddress: schema.Schema.Array(schema.Schema.Number)
4308
+ });
4309
+ const TransactionTrace = schema.Schema.Struct({
4310
+ filterIds: schema.Schema.Array(schema.Schema.Number),
4311
+ transactionIndex: schema.Schema.Number,
4312
+ transactionHash: B256$1,
4313
+ traces: schema.Schema.Array(Trace)
4314
+ });
3122
4315
  const Block = schema.Schema.Struct({
3123
4316
  header: BlockHeader,
3124
4317
  withdrawals: schema.Schema.Array(Withdrawal),
3125
4318
  transactions: schema.Schema.Array(Transaction),
3126
4319
  receipts: schema.Schema.Array(TransactionReceipt),
3127
- logs: schema.Schema.Array(Log)
4320
+ logs: schema.Schema.Array(Log),
4321
+ traces: schema.Schema.Array(TransactionTrace)
3128
4322
  });
3129
4323
  const BlockFromBytes = schema.Schema.transform(
3130
4324
  schema.Schema.Uint8ArrayFromSelf,
@@ -3233,7 +4427,8 @@ const LogFilter = schema.Schema.Struct({
3233
4427
  strict: schema.Schema.optional(schema.Schema.Boolean),
3234
4428
  transactionStatus: schema.Schema.optional(TransactionStatusFilter),
3235
4429
  includeTransaction: schema.Schema.optional(schema.Schema.Boolean),
3236
- includeReceipt: schema.Schema.optional(schema.Schema.Boolean)
4430
+ includeReceipt: schema.Schema.optional(schema.Schema.Boolean),
4431
+ includeTransactionTrace: schema.Schema.optional(schema.Schema.Boolean)
3237
4432
  });
3238
4433
  const TransactionFilter = schema.Schema.Struct({
3239
4434
  id: schema.Schema.optional(schema.Schema.Number),
@@ -3242,7 +4437,8 @@ const TransactionFilter = schema.Schema.Struct({
3242
4437
  create: schema.Schema.optional(schema.Schema.Boolean),
3243
4438
  transactionStatus: schema.Schema.optional(TransactionStatusFilter),
3244
4439
  includeReceipt: schema.Schema.optional(schema.Schema.Boolean),
3245
- includeLogs: schema.Schema.optional(schema.Schema.Boolean)
4440
+ includeLogs: schema.Schema.optional(schema.Schema.Boolean),
4441
+ includeTransactionTrace: schema.Schema.optional(schema.Schema.Boolean)
3246
4442
  });
3247
4443
  const Filter = schema.Schema.Struct({
3248
4444
  header: schema.Schema.optional(HeaderFilter),
@@ -3306,19 +4502,30 @@ exports.Block = Block;
3306
4502
  exports.BlockFromBytes = BlockFromBytes;
3307
4503
  exports.BlockHeader = BlockHeader;
3308
4504
  exports.Bloom = Bloom;
4505
+ exports.CallAction = CallAction;
4506
+ exports.CallOutput = CallOutput;
4507
+ exports.CallType = CallType;
4508
+ exports.CreateAction = CreateAction;
4509
+ exports.CreateOutput = CreateOutput;
4510
+ exports.CreationMethod = CreationMethod;
3309
4511
  exports.EvmStream = EvmStream;
3310
4512
  exports.Filter = Filter;
3311
4513
  exports.FilterFromBytes = FilterFromBytes;
3312
4514
  exports.HeaderFilter = HeaderFilter;
3313
4515
  exports.Log = Log;
3314
4516
  exports.LogFilter = LogFilter;
4517
+ exports.RewardAction = RewardAction;
4518
+ exports.RewardType = RewardType;
4519
+ exports.SelfDestructAction = SelfDestructAction;
3315
4520
  exports.Signature = Signature;
3316
4521
  exports.Topic = Topic;
4522
+ exports.Trace = Trace;
3317
4523
  exports.Transaction = Transaction;
3318
4524
  exports.TransactionFilter = TransactionFilter;
3319
4525
  exports.TransactionReceipt = TransactionReceipt;
3320
4526
  exports.TransactionStatus = TransactionStatus;
3321
4527
  exports.TransactionStatusFilter = TransactionStatusFilter;
4528
+ exports.TransactionTrace = TransactionTrace;
3322
4529
  exports.U128 = U128$1;
3323
4530
  exports.U256 = U256$1;
3324
4531
  exports.Withdrawal = Withdrawal;