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