@apibara/evm 2.1.0-beta.4 → 2.1.0-beta.41
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 +1554 -418
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1287 -1416
- package/dist/index.d.mts +1287 -1416
- package/dist/index.d.ts +1287 -1416
- package/dist/index.mjs +1545 -409
- package/dist/index.mjs.map +1 -0
- package/package.json +2 -4
- package/src/block.ts +358 -167
- package/src/common.ts +64 -95
- package/src/filter.ts +128 -134
- package/src/index.ts +1 -0
- package/src/proto/data.ts +1310 -3
- package/src/proto/filter.ts +46 -2
- package/src/common.test.ts +0 -79
- package/src/filter.test.ts +0 -187
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const protocol = require('@apibara/protocol');
|
|
4
|
-
const
|
|
5
|
-
const viem = require('viem');
|
|
4
|
+
const codec = require('@apibara/protocol/codec');
|
|
6
5
|
const Long = require('long');
|
|
7
6
|
const _m0 = require('protobufjs/minimal.js');
|
|
8
7
|
|
|
@@ -12,91 +11,70 @@ const Long__default = /*#__PURE__*/_interopDefaultCompat(Long);
|
|
|
12
11
|
const _m0__default = /*#__PURE__*/_interopDefaultCompat(_m0);
|
|
13
12
|
|
|
14
13
|
const MAX_U64 = 0xffffffffffffffffn;
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const x0 = value.x0.toString(16).padStart(16, "0");
|
|
24
|
-
const x1 = value.x1.toString(16).padStart(16, "0");
|
|
25
|
-
const x2 = value.x2.toString(16).padStart(8, "0");
|
|
26
|
-
return `0x${x0}${x1}${x2}`;
|
|
14
|
+
const MAX_U32 = 0xffffffffn;
|
|
15
|
+
const Address$1 = {
|
|
16
|
+
encode(x) {
|
|
17
|
+
const bn = BigInt(x);
|
|
18
|
+
const x2 = bn & MAX_U32;
|
|
19
|
+
const x1 = bn >> 32n & MAX_U64;
|
|
20
|
+
const x0 = bn >> 96n & MAX_U64;
|
|
21
|
+
return { x0, x1, x2: Number(x2) };
|
|
27
22
|
},
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
return { x0, x1, x2 };
|
|
23
|
+
decode(p) {
|
|
24
|
+
const x0 = p.x0 ?? 0n;
|
|
25
|
+
const x1 = p.x1 ?? 0n;
|
|
26
|
+
const x2 = BigInt(p.x2 ?? 0);
|
|
27
|
+
const bn = x2 + (x1 << 32n) + (x0 << 96n);
|
|
28
|
+
return `0x${bn.toString(16).padStart(40, "0")}`;
|
|
35
29
|
}
|
|
36
|
-
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const B256$1 = schema.Schema.transform(B256Proto, _B256, {
|
|
45
|
-
decode(value) {
|
|
46
|
-
const x0 = value.x0.toString(16).padStart(16, "0");
|
|
47
|
-
const x1 = value.x1.toString(16).padStart(16, "0");
|
|
48
|
-
const x2 = value.x2.toString(16).padStart(16, "0");
|
|
49
|
-
const x3 = value.x3.toString(16).padStart(16, "0");
|
|
50
|
-
return `0x${x0}${x1}${x2}${x3}`;
|
|
51
|
-
},
|
|
52
|
-
encode(value) {
|
|
53
|
-
const bytes = viem.hexToBytes(viem.pad(value, { size: 32, dir: "left" }));
|
|
54
|
-
const dv = new DataView(bytes.buffer);
|
|
55
|
-
const x0 = dv.getBigUint64(0);
|
|
56
|
-
const x1 = dv.getBigUint64(8);
|
|
57
|
-
const x2 = dv.getBigUint64(16);
|
|
58
|
-
const x3 = dv.getBigUint64(24);
|
|
30
|
+
};
|
|
31
|
+
const B256$1 = {
|
|
32
|
+
encode(x) {
|
|
33
|
+
const bn = BigInt(x);
|
|
34
|
+
const x3 = bn & MAX_U64;
|
|
35
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
36
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
37
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
59
38
|
return { x0, x1, x2, x3 };
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
const b256ToProto = schema.Schema.encodeSync(B256$1);
|
|
63
|
-
const b256FromProto = schema.Schema.decodeSync(B256$1);
|
|
64
|
-
const U256Proto = schema.Schema.Struct({
|
|
65
|
-
x0: schema.Schema.BigIntFromSelf,
|
|
66
|
-
x1: schema.Schema.BigIntFromSelf,
|
|
67
|
-
x2: schema.Schema.BigIntFromSelf,
|
|
68
|
-
x3: schema.Schema.BigIntFromSelf
|
|
69
|
-
});
|
|
70
|
-
const U256$1 = schema.Schema.transform(U256Proto, schema.Schema.BigIntFromSelf, {
|
|
71
|
-
decode(value) {
|
|
72
|
-
return (value.x0 << 8n * 24n) + (value.x1 << 8n * 16n) + (value.x2 << 8n * 8n) + value.x3;
|
|
73
39
|
},
|
|
74
|
-
|
|
75
|
-
const x0 =
|
|
76
|
-
const x1 =
|
|
77
|
-
const x2 =
|
|
78
|
-
const x3 =
|
|
79
|
-
|
|
40
|
+
decode(p) {
|
|
41
|
+
const x0 = p.x0 ?? 0n;
|
|
42
|
+
const x1 = p.x1 ?? 0n;
|
|
43
|
+
const x2 = p.x2 ?? 0n;
|
|
44
|
+
const x3 = p.x3 ?? 0n;
|
|
45
|
+
const bn = x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
46
|
+
return `0x${bn.toString(16).padStart(64, "0")}`;
|
|
80
47
|
}
|
|
81
|
-
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
return (value.x0 << 8n * 8n) + value.x1;
|
|
48
|
+
};
|
|
49
|
+
const U256$1 = {
|
|
50
|
+
encode(x) {
|
|
51
|
+
const bn = BigInt(x);
|
|
52
|
+
const x3 = bn & MAX_U64;
|
|
53
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
54
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
55
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
56
|
+
return { x0, x1, x2, x3 };
|
|
91
57
|
},
|
|
92
|
-
|
|
93
|
-
const x0 =
|
|
94
|
-
const x1 =
|
|
58
|
+
decode(p) {
|
|
59
|
+
const x0 = p.x0 ?? 0n;
|
|
60
|
+
const x1 = p.x1 ?? 0n;
|
|
61
|
+
const x2 = p.x2 ?? 0n;
|
|
62
|
+
const x3 = p.x3 ?? 0n;
|
|
63
|
+
return x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const U128$1 = {
|
|
67
|
+
encode(x) {
|
|
68
|
+
const x1 = x & MAX_U64;
|
|
69
|
+
const x0 = x >> 64n & MAX_U64;
|
|
95
70
|
return { x0, x1 };
|
|
71
|
+
},
|
|
72
|
+
decode(p) {
|
|
73
|
+
const x0 = p.x0 ?? 0n;
|
|
74
|
+
const x1 = p.x1 ?? 0n;
|
|
75
|
+
return x1 + (x0 << 64n);
|
|
96
76
|
}
|
|
97
|
-
}
|
|
98
|
-
const u128ToProto = schema.Schema.encodeSync(U128$1);
|
|
99
|
-
const u128FromProto = schema.Schema.decodeSync(U128$1);
|
|
77
|
+
};
|
|
100
78
|
|
|
101
79
|
const protobufPackage$2 = "evm.v2";
|
|
102
80
|
function createBaseAddress() {
|
|
@@ -681,8 +659,143 @@ function transactionStatusToJSON(object) {
|
|
|
681
659
|
return "UNRECOGNIZED";
|
|
682
660
|
}
|
|
683
661
|
}
|
|
662
|
+
var CallType$1 = /* @__PURE__ */ ((CallType2) => {
|
|
663
|
+
CallType2[CallType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
664
|
+
CallType2[CallType2["CALL"] = 1] = "CALL";
|
|
665
|
+
CallType2[CallType2["CALL_CODE"] = 2] = "CALL_CODE";
|
|
666
|
+
CallType2[CallType2["DELEGATE_CALL"] = 3] = "DELEGATE_CALL";
|
|
667
|
+
CallType2[CallType2["STATIC_CALL"] = 4] = "STATIC_CALL";
|
|
668
|
+
CallType2[CallType2["AUTH_CALL"] = 5] = "AUTH_CALL";
|
|
669
|
+
CallType2[CallType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
670
|
+
return CallType2;
|
|
671
|
+
})(CallType$1 || {});
|
|
672
|
+
function callTypeFromJSON(object) {
|
|
673
|
+
switch (object) {
|
|
674
|
+
case 0:
|
|
675
|
+
case "CALL_TYPE_UNSPECIFIED":
|
|
676
|
+
return 0 /* UNSPECIFIED */;
|
|
677
|
+
case 1:
|
|
678
|
+
case "CALL_TYPE_CALL":
|
|
679
|
+
return 1 /* CALL */;
|
|
680
|
+
case 2:
|
|
681
|
+
case "CALL_TYPE_CALL_CODE":
|
|
682
|
+
return 2 /* CALL_CODE */;
|
|
683
|
+
case 3:
|
|
684
|
+
case "CALL_TYPE_DELEGATE_CALL":
|
|
685
|
+
return 3 /* DELEGATE_CALL */;
|
|
686
|
+
case 4:
|
|
687
|
+
case "CALL_TYPE_STATIC_CALL":
|
|
688
|
+
return 4 /* STATIC_CALL */;
|
|
689
|
+
case 5:
|
|
690
|
+
case "CALL_TYPE_AUTH_CALL":
|
|
691
|
+
return 5 /* AUTH_CALL */;
|
|
692
|
+
case -1:
|
|
693
|
+
case "UNRECOGNIZED":
|
|
694
|
+
default:
|
|
695
|
+
return -1 /* UNRECOGNIZED */;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
function callTypeToJSON(object) {
|
|
699
|
+
switch (object) {
|
|
700
|
+
case 0 /* UNSPECIFIED */:
|
|
701
|
+
return "CALL_TYPE_UNSPECIFIED";
|
|
702
|
+
case 1 /* CALL */:
|
|
703
|
+
return "CALL_TYPE_CALL";
|
|
704
|
+
case 2 /* CALL_CODE */:
|
|
705
|
+
return "CALL_TYPE_CALL_CODE";
|
|
706
|
+
case 3 /* DELEGATE_CALL */:
|
|
707
|
+
return "CALL_TYPE_DELEGATE_CALL";
|
|
708
|
+
case 4 /* STATIC_CALL */:
|
|
709
|
+
return "CALL_TYPE_STATIC_CALL";
|
|
710
|
+
case 5 /* AUTH_CALL */:
|
|
711
|
+
return "CALL_TYPE_AUTH_CALL";
|
|
712
|
+
case -1 /* UNRECOGNIZED */:
|
|
713
|
+
default:
|
|
714
|
+
return "UNRECOGNIZED";
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
var CreationMethod$1 = /* @__PURE__ */ ((CreationMethod2) => {
|
|
718
|
+
CreationMethod2[CreationMethod2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
719
|
+
CreationMethod2[CreationMethod2["CREATE"] = 1] = "CREATE";
|
|
720
|
+
CreationMethod2[CreationMethod2["CREATE2"] = 2] = "CREATE2";
|
|
721
|
+
CreationMethod2[CreationMethod2["EOF_CREATE"] = 3] = "EOF_CREATE";
|
|
722
|
+
CreationMethod2[CreationMethod2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
723
|
+
return CreationMethod2;
|
|
724
|
+
})(CreationMethod$1 || {});
|
|
725
|
+
function creationMethodFromJSON(object) {
|
|
726
|
+
switch (object) {
|
|
727
|
+
case 0:
|
|
728
|
+
case "CREATION_METHOD_UNSPECIFIED":
|
|
729
|
+
return 0 /* UNSPECIFIED */;
|
|
730
|
+
case 1:
|
|
731
|
+
case "CREATION_METHOD_CREATE":
|
|
732
|
+
return 1 /* CREATE */;
|
|
733
|
+
case 2:
|
|
734
|
+
case "CREATION_METHOD_CREATE2":
|
|
735
|
+
return 2 /* CREATE2 */;
|
|
736
|
+
case 3:
|
|
737
|
+
case "CREATION_METHOD_EOF_CREATE":
|
|
738
|
+
return 3 /* EOF_CREATE */;
|
|
739
|
+
case -1:
|
|
740
|
+
case "UNRECOGNIZED":
|
|
741
|
+
default:
|
|
742
|
+
return -1 /* UNRECOGNIZED */;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
function creationMethodToJSON(object) {
|
|
746
|
+
switch (object) {
|
|
747
|
+
case 0 /* UNSPECIFIED */:
|
|
748
|
+
return "CREATION_METHOD_UNSPECIFIED";
|
|
749
|
+
case 1 /* CREATE */:
|
|
750
|
+
return "CREATION_METHOD_CREATE";
|
|
751
|
+
case 2 /* CREATE2 */:
|
|
752
|
+
return "CREATION_METHOD_CREATE2";
|
|
753
|
+
case 3 /* EOF_CREATE */:
|
|
754
|
+
return "CREATION_METHOD_EOF_CREATE";
|
|
755
|
+
case -1 /* UNRECOGNIZED */:
|
|
756
|
+
default:
|
|
757
|
+
return "UNRECOGNIZED";
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
var RewardType$1 = /* @__PURE__ */ ((RewardType2) => {
|
|
761
|
+
RewardType2[RewardType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
762
|
+
RewardType2[RewardType2["BLOCK"] = 1] = "BLOCK";
|
|
763
|
+
RewardType2[RewardType2["UNCLE"] = 2] = "UNCLE";
|
|
764
|
+
RewardType2[RewardType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
765
|
+
return RewardType2;
|
|
766
|
+
})(RewardType$1 || {});
|
|
767
|
+
function rewardTypeFromJSON(object) {
|
|
768
|
+
switch (object) {
|
|
769
|
+
case 0:
|
|
770
|
+
case "REWARD_TYPE_UNSPECIFIED":
|
|
771
|
+
return 0 /* UNSPECIFIED */;
|
|
772
|
+
case 1:
|
|
773
|
+
case "REWARD_TYPE_BLOCK":
|
|
774
|
+
return 1 /* BLOCK */;
|
|
775
|
+
case 2:
|
|
776
|
+
case "REWARD_TYPE_UNCLE":
|
|
777
|
+
return 2 /* UNCLE */;
|
|
778
|
+
case -1:
|
|
779
|
+
case "UNRECOGNIZED":
|
|
780
|
+
default:
|
|
781
|
+
return -1 /* UNRECOGNIZED */;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
function rewardTypeToJSON(object) {
|
|
785
|
+
switch (object) {
|
|
786
|
+
case 0 /* UNSPECIFIED */:
|
|
787
|
+
return "REWARD_TYPE_UNSPECIFIED";
|
|
788
|
+
case 1 /* BLOCK */:
|
|
789
|
+
return "REWARD_TYPE_BLOCK";
|
|
790
|
+
case 2 /* UNCLE */:
|
|
791
|
+
return "REWARD_TYPE_UNCLE";
|
|
792
|
+
case -1 /* UNRECOGNIZED */:
|
|
793
|
+
default:
|
|
794
|
+
return "UNRECOGNIZED";
|
|
795
|
+
}
|
|
796
|
+
}
|
|
684
797
|
function createBaseBlock() {
|
|
685
|
-
return { header: void 0, withdrawals: [], transactions: [], receipts: [], logs: [] };
|
|
798
|
+
return { header: void 0, withdrawals: [], transactions: [], receipts: [], logs: [], traces: [] };
|
|
686
799
|
}
|
|
687
800
|
const Block$1 = {
|
|
688
801
|
encode(message, writer = _m0__default.Writer.create()) {
|
|
@@ -709,6 +822,11 @@ const Block$1 = {
|
|
|
709
822
|
Log$1.encode(v, writer.uint32(42).fork()).ldelim();
|
|
710
823
|
}
|
|
711
824
|
}
|
|
825
|
+
if (message.traces !== void 0 && message.traces.length !== 0) {
|
|
826
|
+
for (const v of message.traces) {
|
|
827
|
+
TransactionTrace$1.encode(v, writer.uint32(50).fork()).ldelim();
|
|
828
|
+
}
|
|
829
|
+
}
|
|
712
830
|
return writer;
|
|
713
831
|
},
|
|
714
832
|
decode(input, length) {
|
|
@@ -748,6 +866,12 @@ const Block$1 = {
|
|
|
748
866
|
}
|
|
749
867
|
message.logs.push(Log$1.decode(reader, reader.uint32()));
|
|
750
868
|
continue;
|
|
869
|
+
case 6:
|
|
870
|
+
if (tag !== 50) {
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
message.traces.push(TransactionTrace$1.decode(reader, reader.uint32()));
|
|
874
|
+
continue;
|
|
751
875
|
}
|
|
752
876
|
if ((tag & 7) === 4 || tag === 0) {
|
|
753
877
|
break;
|
|
@@ -762,7 +886,8 @@ const Block$1 = {
|
|
|
762
886
|
withdrawals: globalThis.Array.isArray(object?.withdrawals) ? object.withdrawals.map((e) => Withdrawal$1.fromJSON(e)) : [],
|
|
763
887
|
transactions: globalThis.Array.isArray(object?.transactions) ? object.transactions.map((e) => Transaction$1.fromJSON(e)) : [],
|
|
764
888
|
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)) : []
|
|
889
|
+
logs: globalThis.Array.isArray(object?.logs) ? object.logs.map((e) => Log$1.fromJSON(e)) : [],
|
|
890
|
+
traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => TransactionTrace$1.fromJSON(e)) : []
|
|
766
891
|
};
|
|
767
892
|
},
|
|
768
893
|
toJSON(message) {
|
|
@@ -782,6 +907,9 @@ const Block$1 = {
|
|
|
782
907
|
if (message.logs?.length) {
|
|
783
908
|
obj.logs = message.logs.map((e) => Log$1.toJSON(e));
|
|
784
909
|
}
|
|
910
|
+
if (message.traces?.length) {
|
|
911
|
+
obj.traces = message.traces.map((e) => TransactionTrace$1.toJSON(e));
|
|
912
|
+
}
|
|
785
913
|
return obj;
|
|
786
914
|
},
|
|
787
915
|
create(base) {
|
|
@@ -794,6 +922,7 @@ const Block$1 = {
|
|
|
794
922
|
message.transactions = object.transactions?.map((e) => Transaction$1.fromPartial(e)) || [];
|
|
795
923
|
message.receipts = object.receipts?.map((e) => TransactionReceipt$1.fromPartial(e)) || [];
|
|
796
924
|
message.logs = object.logs?.map((e) => Log$1.fromPartial(e)) || [];
|
|
925
|
+
message.traces = object.traces?.map((e) => TransactionTrace$1.fromPartial(e)) || [];
|
|
797
926
|
return message;
|
|
798
927
|
}
|
|
799
928
|
};
|
|
@@ -820,7 +949,8 @@ function createBaseBlockHeader() {
|
|
|
820
949
|
totalDifficulty: void 0,
|
|
821
950
|
blobGasUsed: void 0,
|
|
822
951
|
excessBlobGas: void 0,
|
|
823
|
-
parentBeaconBlockRoot: void 0
|
|
952
|
+
parentBeaconBlockRoot: void 0,
|
|
953
|
+
requestsHash: void 0
|
|
824
954
|
};
|
|
825
955
|
}
|
|
826
956
|
const BlockHeader$1 = {
|
|
@@ -897,6 +1027,9 @@ const BlockHeader$1 = {
|
|
|
897
1027
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
898
1028
|
B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
|
|
899
1029
|
}
|
|
1030
|
+
if (message.requestsHash !== void 0) {
|
|
1031
|
+
B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
|
|
1032
|
+
}
|
|
900
1033
|
return writer;
|
|
901
1034
|
},
|
|
902
1035
|
decode(input, length) {
|
|
@@ -1038,6 +1171,12 @@ const BlockHeader$1 = {
|
|
|
1038
1171
|
}
|
|
1039
1172
|
message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
|
|
1040
1173
|
continue;
|
|
1174
|
+
case 23:
|
|
1175
|
+
if (tag !== 186) {
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
message.requestsHash = B256.decode(reader, reader.uint32());
|
|
1179
|
+
continue;
|
|
1041
1180
|
}
|
|
1042
1181
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1043
1182
|
break;
|
|
@@ -1069,7 +1208,8 @@ const BlockHeader$1 = {
|
|
|
1069
1208
|
totalDifficulty: isSet$1(object.totalDifficulty) ? U256.fromJSON(object.totalDifficulty) : void 0,
|
|
1070
1209
|
blobGasUsed: isSet$1(object.blobGasUsed) ? U128.fromJSON(object.blobGasUsed) : void 0,
|
|
1071
1210
|
excessBlobGas: isSet$1(object.excessBlobGas) ? U128.fromJSON(object.excessBlobGas) : void 0,
|
|
1072
|
-
parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0
|
|
1211
|
+
parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0,
|
|
1212
|
+
requestsHash: isSet$1(object.requestsHash) ? B256.fromJSON(object.requestsHash) : void 0
|
|
1073
1213
|
};
|
|
1074
1214
|
},
|
|
1075
1215
|
toJSON(message) {
|
|
@@ -1140,6 +1280,9 @@ const BlockHeader$1 = {
|
|
|
1140
1280
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
1141
1281
|
obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
|
|
1142
1282
|
}
|
|
1283
|
+
if (message.requestsHash !== void 0) {
|
|
1284
|
+
obj.requestsHash = B256.toJSON(message.requestsHash);
|
|
1285
|
+
}
|
|
1143
1286
|
return obj;
|
|
1144
1287
|
},
|
|
1145
1288
|
create(base) {
|
|
@@ -1169,6 +1312,7 @@ const BlockHeader$1 = {
|
|
|
1169
1312
|
message.blobGasUsed = object.blobGasUsed !== void 0 && object.blobGasUsed !== null ? U128.fromPartial(object.blobGasUsed) : void 0;
|
|
1170
1313
|
message.excessBlobGas = object.excessBlobGas !== void 0 && object.excessBlobGas !== null ? U128.fromPartial(object.excessBlobGas) : void 0;
|
|
1171
1314
|
message.parentBeaconBlockRoot = object.parentBeaconBlockRoot !== void 0 && object.parentBeaconBlockRoot !== null ? B256.fromPartial(object.parentBeaconBlockRoot) : void 0;
|
|
1315
|
+
message.requestsHash = object.requestsHash !== void 0 && object.requestsHash !== null ? B256.fromPartial(object.requestsHash) : void 0;
|
|
1172
1316
|
return message;
|
|
1173
1317
|
}
|
|
1174
1318
|
};
|
|
@@ -2278,80 +2422,949 @@ const AccessListItem$1 = {
|
|
|
2278
2422
|
return message;
|
|
2279
2423
|
}
|
|
2280
2424
|
};
|
|
2281
|
-
function
|
|
2282
|
-
|
|
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);
|
|
2425
|
+
function createBaseTransactionTrace() {
|
|
2426
|
+
return { filterIds: [], transactionIndex: 0, transactionHash: void 0, traces: [] };
|
|
2313
2427
|
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2428
|
+
const TransactionTrace$1 = {
|
|
2429
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
2430
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
2431
|
+
writer.uint32(10).fork();
|
|
2432
|
+
for (const v of message.filterIds) {
|
|
2433
|
+
writer.uint32(v);
|
|
2434
|
+
}
|
|
2435
|
+
writer.ldelim();
|
|
2436
|
+
}
|
|
2437
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
2438
|
+
writer.uint32(16).uint32(message.transactionIndex);
|
|
2439
|
+
}
|
|
2440
|
+
if (message.transactionHash !== void 0) {
|
|
2441
|
+
B256.encode(message.transactionHash, writer.uint32(26).fork()).ldelim();
|
|
2442
|
+
}
|
|
2443
|
+
if (message.traces !== void 0 && message.traces.length !== 0) {
|
|
2444
|
+
for (const v of message.traces) {
|
|
2445
|
+
Trace$1.encode(v, writer.uint32(34).fork()).ldelim();
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
return writer;
|
|
2449
|
+
},
|
|
2450
|
+
decode(input, length) {
|
|
2451
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
2452
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2453
|
+
const message = createBaseTransactionTrace();
|
|
2454
|
+
while (reader.pos < end) {
|
|
2455
|
+
const tag = reader.uint32();
|
|
2456
|
+
switch (tag >>> 3) {
|
|
2457
|
+
case 1:
|
|
2458
|
+
if (tag === 8) {
|
|
2459
|
+
message.filterIds.push(reader.uint32());
|
|
2460
|
+
continue;
|
|
2461
|
+
}
|
|
2462
|
+
if (tag === 10) {
|
|
2463
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2464
|
+
while (reader.pos < end2) {
|
|
2465
|
+
message.filterIds.push(reader.uint32());
|
|
2466
|
+
}
|
|
2467
|
+
continue;
|
|
2468
|
+
}
|
|
2469
|
+
break;
|
|
2470
|
+
case 2:
|
|
2471
|
+
if (tag !== 16) {
|
|
2472
|
+
break;
|
|
2473
|
+
}
|
|
2474
|
+
message.transactionIndex = reader.uint32();
|
|
2475
|
+
continue;
|
|
2476
|
+
case 3:
|
|
2477
|
+
if (tag !== 26) {
|
|
2478
|
+
break;
|
|
2479
|
+
}
|
|
2480
|
+
message.transactionHash = B256.decode(reader, reader.uint32());
|
|
2481
|
+
continue;
|
|
2482
|
+
case 4:
|
|
2483
|
+
if (tag !== 34) {
|
|
2484
|
+
break;
|
|
2485
|
+
}
|
|
2486
|
+
message.traces.push(Trace$1.decode(reader, reader.uint32()));
|
|
2487
|
+
continue;
|
|
2488
|
+
}
|
|
2489
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2490
|
+
break;
|
|
2491
|
+
}
|
|
2492
|
+
reader.skipType(tag & 7);
|
|
2493
|
+
}
|
|
2494
|
+
return message;
|
|
2495
|
+
},
|
|
2496
|
+
fromJSON(object) {
|
|
2497
|
+
return {
|
|
2498
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
2499
|
+
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
2500
|
+
transactionHash: isSet$1(object.transactionHash) ? B256.fromJSON(object.transactionHash) : void 0,
|
|
2501
|
+
traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => Trace$1.fromJSON(e)) : []
|
|
2502
|
+
};
|
|
2503
|
+
},
|
|
2504
|
+
toJSON(message) {
|
|
2505
|
+
const obj = {};
|
|
2506
|
+
if (message.filterIds?.length) {
|
|
2507
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
2508
|
+
}
|
|
2509
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
2510
|
+
obj.transactionIndex = Math.round(message.transactionIndex);
|
|
2511
|
+
}
|
|
2512
|
+
if (message.transactionHash !== void 0) {
|
|
2513
|
+
obj.transactionHash = B256.toJSON(message.transactionHash);
|
|
2514
|
+
}
|
|
2515
|
+
if (message.traces?.length) {
|
|
2516
|
+
obj.traces = message.traces.map((e) => Trace$1.toJSON(e));
|
|
2517
|
+
}
|
|
2518
|
+
return obj;
|
|
2519
|
+
},
|
|
2520
|
+
create(base) {
|
|
2521
|
+
return TransactionTrace$1.fromPartial(base ?? {});
|
|
2522
|
+
},
|
|
2523
|
+
fromPartial(object) {
|
|
2524
|
+
const message = createBaseTransactionTrace();
|
|
2525
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
2526
|
+
message.transactionIndex = object.transactionIndex ?? 0;
|
|
2527
|
+
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? B256.fromPartial(object.transactionHash) : void 0;
|
|
2528
|
+
message.traces = object.traces?.map((e) => Trace$1.fromPartial(e)) || [];
|
|
2529
|
+
return message;
|
|
2321
2530
|
}
|
|
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
2531
|
};
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2532
|
+
function createBaseTrace() {
|
|
2533
|
+
return { action: void 0, error: void 0, output: void 0, subtraces: 0, traceAddress: [] };
|
|
2534
|
+
}
|
|
2535
|
+
const Trace$1 = {
|
|
2536
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
2537
|
+
switch (message.action?.$case) {
|
|
2538
|
+
case "call":
|
|
2539
|
+
CallAction$1.encode(message.action.call, writer.uint32(10).fork()).ldelim();
|
|
2540
|
+
break;
|
|
2541
|
+
case "create":
|
|
2542
|
+
CreateAction$1.encode(message.action.create, writer.uint32(18).fork()).ldelim();
|
|
2543
|
+
break;
|
|
2544
|
+
case "selfDestruct":
|
|
2545
|
+
SelfDestructAction$1.encode(message.action.selfDestruct, writer.uint32(26).fork()).ldelim();
|
|
2546
|
+
break;
|
|
2547
|
+
case "reward":
|
|
2548
|
+
RewardAction$1.encode(message.action.reward, writer.uint32(34).fork()).ldelim();
|
|
2549
|
+
break;
|
|
2550
|
+
}
|
|
2551
|
+
if (message.error !== void 0) {
|
|
2552
|
+
writer.uint32(42).string(message.error);
|
|
2553
|
+
}
|
|
2554
|
+
switch (message.output?.$case) {
|
|
2555
|
+
case "callOutput":
|
|
2556
|
+
CallOutput$1.encode(message.output.callOutput, writer.uint32(50).fork()).ldelim();
|
|
2557
|
+
break;
|
|
2558
|
+
case "createOutput":
|
|
2559
|
+
CreateOutput$1.encode(message.output.createOutput, writer.uint32(58).fork()).ldelim();
|
|
2560
|
+
break;
|
|
2561
|
+
}
|
|
2562
|
+
if (message.subtraces !== void 0 && message.subtraces !== 0) {
|
|
2563
|
+
writer.uint32(64).uint32(message.subtraces);
|
|
2564
|
+
}
|
|
2565
|
+
if (message.traceAddress !== void 0 && message.traceAddress.length !== 0) {
|
|
2566
|
+
writer.uint32(74).fork();
|
|
2567
|
+
for (const v of message.traceAddress) {
|
|
2568
|
+
writer.uint32(v);
|
|
2569
|
+
}
|
|
2570
|
+
writer.ldelim();
|
|
2571
|
+
}
|
|
2572
|
+
return writer;
|
|
2573
|
+
},
|
|
2574
|
+
decode(input, length) {
|
|
2575
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
2576
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2577
|
+
const message = createBaseTrace();
|
|
2578
|
+
while (reader.pos < end) {
|
|
2579
|
+
const tag = reader.uint32();
|
|
2580
|
+
switch (tag >>> 3) {
|
|
2581
|
+
case 1:
|
|
2582
|
+
if (tag !== 10) {
|
|
2583
|
+
break;
|
|
2584
|
+
}
|
|
2585
|
+
message.action = { $case: "call", call: CallAction$1.decode(reader, reader.uint32()) };
|
|
2586
|
+
continue;
|
|
2587
|
+
case 2:
|
|
2588
|
+
if (tag !== 18) {
|
|
2589
|
+
break;
|
|
2590
|
+
}
|
|
2591
|
+
message.action = { $case: "create", create: CreateAction$1.decode(reader, reader.uint32()) };
|
|
2592
|
+
continue;
|
|
2593
|
+
case 3:
|
|
2594
|
+
if (tag !== 26) {
|
|
2595
|
+
break;
|
|
2596
|
+
}
|
|
2597
|
+
message.action = { $case: "selfDestruct", selfDestruct: SelfDestructAction$1.decode(reader, reader.uint32()) };
|
|
2598
|
+
continue;
|
|
2599
|
+
case 4:
|
|
2600
|
+
if (tag !== 34) {
|
|
2601
|
+
break;
|
|
2602
|
+
}
|
|
2603
|
+
message.action = { $case: "reward", reward: RewardAction$1.decode(reader, reader.uint32()) };
|
|
2604
|
+
continue;
|
|
2605
|
+
case 5:
|
|
2606
|
+
if (tag !== 42) {
|
|
2607
|
+
break;
|
|
2608
|
+
}
|
|
2609
|
+
message.error = reader.string();
|
|
2610
|
+
continue;
|
|
2611
|
+
case 6:
|
|
2612
|
+
if (tag !== 50) {
|
|
2613
|
+
break;
|
|
2614
|
+
}
|
|
2615
|
+
message.output = { $case: "callOutput", callOutput: CallOutput$1.decode(reader, reader.uint32()) };
|
|
2616
|
+
continue;
|
|
2617
|
+
case 7:
|
|
2618
|
+
if (tag !== 58) {
|
|
2619
|
+
break;
|
|
2620
|
+
}
|
|
2621
|
+
message.output = { $case: "createOutput", createOutput: CreateOutput$1.decode(reader, reader.uint32()) };
|
|
2622
|
+
continue;
|
|
2623
|
+
case 8:
|
|
2624
|
+
if (tag !== 64) {
|
|
2625
|
+
break;
|
|
2626
|
+
}
|
|
2627
|
+
message.subtraces = reader.uint32();
|
|
2628
|
+
continue;
|
|
2629
|
+
case 9:
|
|
2630
|
+
if (tag === 72) {
|
|
2631
|
+
message.traceAddress.push(reader.uint32());
|
|
2632
|
+
continue;
|
|
2633
|
+
}
|
|
2634
|
+
if (tag === 74) {
|
|
2635
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2636
|
+
while (reader.pos < end2) {
|
|
2637
|
+
message.traceAddress.push(reader.uint32());
|
|
2638
|
+
}
|
|
2639
|
+
continue;
|
|
2640
|
+
}
|
|
2641
|
+
break;
|
|
2642
|
+
}
|
|
2643
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2644
|
+
break;
|
|
2645
|
+
}
|
|
2646
|
+
reader.skipType(tag & 7);
|
|
2647
|
+
}
|
|
2648
|
+
return message;
|
|
2649
|
+
},
|
|
2650
|
+
fromJSON(object) {
|
|
2651
|
+
return {
|
|
2652
|
+
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,
|
|
2653
|
+
error: isSet$1(object.error) ? globalThis.String(object.error) : void 0,
|
|
2654
|
+
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,
|
|
2655
|
+
subtraces: isSet$1(object.subtraces) ? globalThis.Number(object.subtraces) : 0,
|
|
2656
|
+
traceAddress: globalThis.Array.isArray(object?.traceAddress) ? object.traceAddress.map((e) => globalThis.Number(e)) : []
|
|
2657
|
+
};
|
|
2658
|
+
},
|
|
2659
|
+
toJSON(message) {
|
|
2660
|
+
const obj = {};
|
|
2661
|
+
if (message.action?.$case === "call") {
|
|
2662
|
+
obj.call = CallAction$1.toJSON(message.action.call);
|
|
2663
|
+
}
|
|
2664
|
+
if (message.action?.$case === "create") {
|
|
2665
|
+
obj.create = CreateAction$1.toJSON(message.action.create);
|
|
2666
|
+
}
|
|
2667
|
+
if (message.action?.$case === "selfDestruct") {
|
|
2668
|
+
obj.selfDestruct = SelfDestructAction$1.toJSON(message.action.selfDestruct);
|
|
2669
|
+
}
|
|
2670
|
+
if (message.action?.$case === "reward") {
|
|
2671
|
+
obj.reward = RewardAction$1.toJSON(message.action.reward);
|
|
2672
|
+
}
|
|
2673
|
+
if (message.error !== void 0) {
|
|
2674
|
+
obj.error = message.error;
|
|
2675
|
+
}
|
|
2676
|
+
if (message.output?.$case === "callOutput") {
|
|
2677
|
+
obj.callOutput = CallOutput$1.toJSON(message.output.callOutput);
|
|
2678
|
+
}
|
|
2679
|
+
if (message.output?.$case === "createOutput") {
|
|
2680
|
+
obj.createOutput = CreateOutput$1.toJSON(message.output.createOutput);
|
|
2681
|
+
}
|
|
2682
|
+
if (message.subtraces !== void 0 && message.subtraces !== 0) {
|
|
2683
|
+
obj.subtraces = Math.round(message.subtraces);
|
|
2684
|
+
}
|
|
2685
|
+
if (message.traceAddress?.length) {
|
|
2686
|
+
obj.traceAddress = message.traceAddress.map((e) => Math.round(e));
|
|
2687
|
+
}
|
|
2688
|
+
return obj;
|
|
2689
|
+
},
|
|
2690
|
+
create(base) {
|
|
2691
|
+
return Trace$1.fromPartial(base ?? {});
|
|
2692
|
+
},
|
|
2693
|
+
fromPartial(object) {
|
|
2694
|
+
const message = createBaseTrace();
|
|
2695
|
+
if (object.action?.$case === "call" && object.action?.call !== void 0 && object.action?.call !== null) {
|
|
2696
|
+
message.action = { $case: "call", call: CallAction$1.fromPartial(object.action.call) };
|
|
2697
|
+
}
|
|
2698
|
+
if (object.action?.$case === "create" && object.action?.create !== void 0 && object.action?.create !== null) {
|
|
2699
|
+
message.action = { $case: "create", create: CreateAction$1.fromPartial(object.action.create) };
|
|
2700
|
+
}
|
|
2701
|
+
if (object.action?.$case === "selfDestruct" && object.action?.selfDestruct !== void 0 && object.action?.selfDestruct !== null) {
|
|
2702
|
+
message.action = {
|
|
2703
|
+
$case: "selfDestruct",
|
|
2704
|
+
selfDestruct: SelfDestructAction$1.fromPartial(object.action.selfDestruct)
|
|
2705
|
+
};
|
|
2706
|
+
}
|
|
2707
|
+
if (object.action?.$case === "reward" && object.action?.reward !== void 0 && object.action?.reward !== null) {
|
|
2708
|
+
message.action = { $case: "reward", reward: RewardAction$1.fromPartial(object.action.reward) };
|
|
2709
|
+
}
|
|
2710
|
+
message.error = object.error ?? void 0;
|
|
2711
|
+
if (object.output?.$case === "callOutput" && object.output?.callOutput !== void 0 && object.output?.callOutput !== null) {
|
|
2712
|
+
message.output = { $case: "callOutput", callOutput: CallOutput$1.fromPartial(object.output.callOutput) };
|
|
2713
|
+
}
|
|
2714
|
+
if (object.output?.$case === "createOutput" && object.output?.createOutput !== void 0 && object.output?.createOutput !== null) {
|
|
2715
|
+
message.output = { $case: "createOutput", createOutput: CreateOutput$1.fromPartial(object.output.createOutput) };
|
|
2716
|
+
}
|
|
2717
|
+
message.subtraces = object.subtraces ?? 0;
|
|
2718
|
+
message.traceAddress = object.traceAddress?.map((e) => e) || [];
|
|
2719
|
+
return message;
|
|
2720
|
+
}
|
|
2721
|
+
};
|
|
2722
|
+
function createBaseCallAction() {
|
|
2723
|
+
return {
|
|
2724
|
+
fromAddress: void 0,
|
|
2725
|
+
type: 0,
|
|
2726
|
+
gas: BigInt("0"),
|
|
2727
|
+
input: new Uint8Array(0),
|
|
2728
|
+
toAddress: void 0,
|
|
2729
|
+
value: void 0
|
|
2730
|
+
};
|
|
2731
|
+
}
|
|
2732
|
+
const CallAction$1 = {
|
|
2733
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
2734
|
+
if (message.fromAddress !== void 0) {
|
|
2735
|
+
Address.encode(message.fromAddress, writer.uint32(10).fork()).ldelim();
|
|
2736
|
+
}
|
|
2737
|
+
if (message.type !== void 0 && message.type !== 0) {
|
|
2738
|
+
writer.uint32(16).int32(message.type);
|
|
2739
|
+
}
|
|
2740
|
+
if (message.gas !== void 0 && message.gas !== BigInt("0")) {
|
|
2741
|
+
if (BigInt.asUintN(64, message.gas) !== message.gas) {
|
|
2742
|
+
throw new globalThis.Error("value provided for field message.gas of type uint64 too large");
|
|
2743
|
+
}
|
|
2744
|
+
writer.uint32(24).uint64(message.gas.toString());
|
|
2745
|
+
}
|
|
2746
|
+
if (message.input !== void 0 && message.input.length !== 0) {
|
|
2747
|
+
writer.uint32(34).bytes(message.input);
|
|
2748
|
+
}
|
|
2749
|
+
if (message.toAddress !== void 0) {
|
|
2750
|
+
Address.encode(message.toAddress, writer.uint32(42).fork()).ldelim();
|
|
2751
|
+
}
|
|
2752
|
+
if (message.value !== void 0) {
|
|
2753
|
+
U256.encode(message.value, writer.uint32(50).fork()).ldelim();
|
|
2754
|
+
}
|
|
2755
|
+
return writer;
|
|
2756
|
+
},
|
|
2757
|
+
decode(input, length) {
|
|
2758
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
2759
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2760
|
+
const message = createBaseCallAction();
|
|
2761
|
+
while (reader.pos < end) {
|
|
2762
|
+
const tag = reader.uint32();
|
|
2763
|
+
switch (tag >>> 3) {
|
|
2764
|
+
case 1:
|
|
2765
|
+
if (tag !== 10) {
|
|
2766
|
+
break;
|
|
2767
|
+
}
|
|
2768
|
+
message.fromAddress = Address.decode(reader, reader.uint32());
|
|
2769
|
+
continue;
|
|
2770
|
+
case 2:
|
|
2771
|
+
if (tag !== 16) {
|
|
2772
|
+
break;
|
|
2773
|
+
}
|
|
2774
|
+
message.type = reader.int32();
|
|
2775
|
+
continue;
|
|
2776
|
+
case 3:
|
|
2777
|
+
if (tag !== 24) {
|
|
2778
|
+
break;
|
|
2779
|
+
}
|
|
2780
|
+
message.gas = longToBigint(reader.uint64());
|
|
2781
|
+
continue;
|
|
2782
|
+
case 4:
|
|
2783
|
+
if (tag !== 34) {
|
|
2784
|
+
break;
|
|
2785
|
+
}
|
|
2786
|
+
message.input = reader.bytes();
|
|
2787
|
+
continue;
|
|
2788
|
+
case 5:
|
|
2789
|
+
if (tag !== 42) {
|
|
2790
|
+
break;
|
|
2791
|
+
}
|
|
2792
|
+
message.toAddress = Address.decode(reader, reader.uint32());
|
|
2793
|
+
continue;
|
|
2794
|
+
case 6:
|
|
2795
|
+
if (tag !== 50) {
|
|
2796
|
+
break;
|
|
2797
|
+
}
|
|
2798
|
+
message.value = U256.decode(reader, reader.uint32());
|
|
2799
|
+
continue;
|
|
2800
|
+
}
|
|
2801
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
reader.skipType(tag & 7);
|
|
2805
|
+
}
|
|
2806
|
+
return message;
|
|
2807
|
+
},
|
|
2808
|
+
fromJSON(object) {
|
|
2809
|
+
return {
|
|
2810
|
+
fromAddress: isSet$1(object.fromAddress) ? Address.fromJSON(object.fromAddress) : void 0,
|
|
2811
|
+
type: isSet$1(object.type) ? callTypeFromJSON(object.type) : 0,
|
|
2812
|
+
gas: isSet$1(object.gas) ? BigInt(object.gas) : BigInt("0"),
|
|
2813
|
+
input: isSet$1(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
|
|
2814
|
+
toAddress: isSet$1(object.toAddress) ? Address.fromJSON(object.toAddress) : void 0,
|
|
2815
|
+
value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0
|
|
2816
|
+
};
|
|
2817
|
+
},
|
|
2818
|
+
toJSON(message) {
|
|
2819
|
+
const obj = {};
|
|
2820
|
+
if (message.fromAddress !== void 0) {
|
|
2821
|
+
obj.fromAddress = Address.toJSON(message.fromAddress);
|
|
2822
|
+
}
|
|
2823
|
+
if (message.type !== void 0 && message.type !== 0) {
|
|
2824
|
+
obj.type = callTypeToJSON(message.type);
|
|
2825
|
+
}
|
|
2826
|
+
if (message.gas !== void 0 && message.gas !== BigInt("0")) {
|
|
2827
|
+
obj.gas = message.gas.toString();
|
|
2828
|
+
}
|
|
2829
|
+
if (message.input !== void 0 && message.input.length !== 0) {
|
|
2830
|
+
obj.input = base64FromBytes(message.input);
|
|
2831
|
+
}
|
|
2832
|
+
if (message.toAddress !== void 0) {
|
|
2833
|
+
obj.toAddress = Address.toJSON(message.toAddress);
|
|
2834
|
+
}
|
|
2835
|
+
if (message.value !== void 0) {
|
|
2836
|
+
obj.value = U256.toJSON(message.value);
|
|
2837
|
+
}
|
|
2838
|
+
return obj;
|
|
2839
|
+
},
|
|
2840
|
+
create(base) {
|
|
2841
|
+
return CallAction$1.fromPartial(base ?? {});
|
|
2842
|
+
},
|
|
2843
|
+
fromPartial(object) {
|
|
2844
|
+
const message = createBaseCallAction();
|
|
2845
|
+
message.fromAddress = object.fromAddress !== void 0 && object.fromAddress !== null ? Address.fromPartial(object.fromAddress) : void 0;
|
|
2846
|
+
message.type = object.type ?? 0;
|
|
2847
|
+
message.gas = object.gas ?? BigInt("0");
|
|
2848
|
+
message.input = object.input ?? new Uint8Array(0);
|
|
2849
|
+
message.toAddress = object.toAddress !== void 0 && object.toAddress !== null ? Address.fromPartial(object.toAddress) : void 0;
|
|
2850
|
+
message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
|
|
2851
|
+
return message;
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2854
|
+
function createBaseCreateAction() {
|
|
2855
|
+
return { fromAddress: void 0, gas: BigInt("0"), init: new Uint8Array(0), value: void 0, creationMethod: 0 };
|
|
2856
|
+
}
|
|
2857
|
+
const CreateAction$1 = {
|
|
2858
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
2859
|
+
if (message.fromAddress !== void 0) {
|
|
2860
|
+
Address.encode(message.fromAddress, writer.uint32(10).fork()).ldelim();
|
|
2861
|
+
}
|
|
2862
|
+
if (message.gas !== void 0 && message.gas !== BigInt("0")) {
|
|
2863
|
+
if (BigInt.asUintN(64, message.gas) !== message.gas) {
|
|
2864
|
+
throw new globalThis.Error("value provided for field message.gas of type uint64 too large");
|
|
2865
|
+
}
|
|
2866
|
+
writer.uint32(16).uint64(message.gas.toString());
|
|
2867
|
+
}
|
|
2868
|
+
if (message.init !== void 0 && message.init.length !== 0) {
|
|
2869
|
+
writer.uint32(26).bytes(message.init);
|
|
2870
|
+
}
|
|
2871
|
+
if (message.value !== void 0) {
|
|
2872
|
+
U256.encode(message.value, writer.uint32(34).fork()).ldelim();
|
|
2873
|
+
}
|
|
2874
|
+
if (message.creationMethod !== void 0 && message.creationMethod !== 0) {
|
|
2875
|
+
writer.uint32(40).int32(message.creationMethod);
|
|
2876
|
+
}
|
|
2877
|
+
return writer;
|
|
2878
|
+
},
|
|
2879
|
+
decode(input, length) {
|
|
2880
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
2881
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2882
|
+
const message = createBaseCreateAction();
|
|
2883
|
+
while (reader.pos < end) {
|
|
2884
|
+
const tag = reader.uint32();
|
|
2885
|
+
switch (tag >>> 3) {
|
|
2886
|
+
case 1:
|
|
2887
|
+
if (tag !== 10) {
|
|
2888
|
+
break;
|
|
2889
|
+
}
|
|
2890
|
+
message.fromAddress = Address.decode(reader, reader.uint32());
|
|
2891
|
+
continue;
|
|
2892
|
+
case 2:
|
|
2893
|
+
if (tag !== 16) {
|
|
2894
|
+
break;
|
|
2895
|
+
}
|
|
2896
|
+
message.gas = longToBigint(reader.uint64());
|
|
2897
|
+
continue;
|
|
2898
|
+
case 3:
|
|
2899
|
+
if (tag !== 26) {
|
|
2900
|
+
break;
|
|
2901
|
+
}
|
|
2902
|
+
message.init = reader.bytes();
|
|
2903
|
+
continue;
|
|
2904
|
+
case 4:
|
|
2905
|
+
if (tag !== 34) {
|
|
2906
|
+
break;
|
|
2907
|
+
}
|
|
2908
|
+
message.value = U256.decode(reader, reader.uint32());
|
|
2909
|
+
continue;
|
|
2910
|
+
case 5:
|
|
2911
|
+
if (tag !== 40) {
|
|
2912
|
+
break;
|
|
2913
|
+
}
|
|
2914
|
+
message.creationMethod = reader.int32();
|
|
2915
|
+
continue;
|
|
2916
|
+
}
|
|
2917
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2918
|
+
break;
|
|
2919
|
+
}
|
|
2920
|
+
reader.skipType(tag & 7);
|
|
2921
|
+
}
|
|
2922
|
+
return message;
|
|
2923
|
+
},
|
|
2924
|
+
fromJSON(object) {
|
|
2925
|
+
return {
|
|
2926
|
+
fromAddress: isSet$1(object.fromAddress) ? Address.fromJSON(object.fromAddress) : void 0,
|
|
2927
|
+
gas: isSet$1(object.gas) ? BigInt(object.gas) : BigInt("0"),
|
|
2928
|
+
init: isSet$1(object.init) ? bytesFromBase64(object.init) : new Uint8Array(0),
|
|
2929
|
+
value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0,
|
|
2930
|
+
creationMethod: isSet$1(object.creationMethod) ? creationMethodFromJSON(object.creationMethod) : 0
|
|
2931
|
+
};
|
|
2932
|
+
},
|
|
2933
|
+
toJSON(message) {
|
|
2934
|
+
const obj = {};
|
|
2935
|
+
if (message.fromAddress !== void 0) {
|
|
2936
|
+
obj.fromAddress = Address.toJSON(message.fromAddress);
|
|
2937
|
+
}
|
|
2938
|
+
if (message.gas !== void 0 && message.gas !== BigInt("0")) {
|
|
2939
|
+
obj.gas = message.gas.toString();
|
|
2940
|
+
}
|
|
2941
|
+
if (message.init !== void 0 && message.init.length !== 0) {
|
|
2942
|
+
obj.init = base64FromBytes(message.init);
|
|
2943
|
+
}
|
|
2944
|
+
if (message.value !== void 0) {
|
|
2945
|
+
obj.value = U256.toJSON(message.value);
|
|
2946
|
+
}
|
|
2947
|
+
if (message.creationMethod !== void 0 && message.creationMethod !== 0) {
|
|
2948
|
+
obj.creationMethod = creationMethodToJSON(message.creationMethod);
|
|
2949
|
+
}
|
|
2950
|
+
return obj;
|
|
2951
|
+
},
|
|
2952
|
+
create(base) {
|
|
2953
|
+
return CreateAction$1.fromPartial(base ?? {});
|
|
2954
|
+
},
|
|
2955
|
+
fromPartial(object) {
|
|
2956
|
+
const message = createBaseCreateAction();
|
|
2957
|
+
message.fromAddress = object.fromAddress !== void 0 && object.fromAddress !== null ? Address.fromPartial(object.fromAddress) : void 0;
|
|
2958
|
+
message.gas = object.gas ?? BigInt("0");
|
|
2959
|
+
message.init = object.init ?? new Uint8Array(0);
|
|
2960
|
+
message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
|
|
2961
|
+
message.creationMethod = object.creationMethod ?? 0;
|
|
2962
|
+
return message;
|
|
2963
|
+
}
|
|
2964
|
+
};
|
|
2965
|
+
function createBaseSelfDestructAction() {
|
|
2966
|
+
return { address: void 0, balance: void 0, refundAddress: void 0 };
|
|
2967
|
+
}
|
|
2968
|
+
const SelfDestructAction$1 = {
|
|
2969
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
2970
|
+
if (message.address !== void 0) {
|
|
2971
|
+
Address.encode(message.address, writer.uint32(10).fork()).ldelim();
|
|
2972
|
+
}
|
|
2973
|
+
if (message.balance !== void 0) {
|
|
2974
|
+
U256.encode(message.balance, writer.uint32(18).fork()).ldelim();
|
|
2975
|
+
}
|
|
2976
|
+
if (message.refundAddress !== void 0) {
|
|
2977
|
+
Address.encode(message.refundAddress, writer.uint32(26).fork()).ldelim();
|
|
2978
|
+
}
|
|
2979
|
+
return writer;
|
|
2980
|
+
},
|
|
2981
|
+
decode(input, length) {
|
|
2982
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
2983
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
2984
|
+
const message = createBaseSelfDestructAction();
|
|
2985
|
+
while (reader.pos < end) {
|
|
2986
|
+
const tag = reader.uint32();
|
|
2987
|
+
switch (tag >>> 3) {
|
|
2988
|
+
case 1:
|
|
2989
|
+
if (tag !== 10) {
|
|
2990
|
+
break;
|
|
2991
|
+
}
|
|
2992
|
+
message.address = Address.decode(reader, reader.uint32());
|
|
2993
|
+
continue;
|
|
2994
|
+
case 2:
|
|
2995
|
+
if (tag !== 18) {
|
|
2996
|
+
break;
|
|
2997
|
+
}
|
|
2998
|
+
message.balance = U256.decode(reader, reader.uint32());
|
|
2999
|
+
continue;
|
|
3000
|
+
case 3:
|
|
3001
|
+
if (tag !== 26) {
|
|
3002
|
+
break;
|
|
3003
|
+
}
|
|
3004
|
+
message.refundAddress = Address.decode(reader, reader.uint32());
|
|
3005
|
+
continue;
|
|
3006
|
+
}
|
|
3007
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3008
|
+
break;
|
|
3009
|
+
}
|
|
3010
|
+
reader.skipType(tag & 7);
|
|
3011
|
+
}
|
|
3012
|
+
return message;
|
|
3013
|
+
},
|
|
3014
|
+
fromJSON(object) {
|
|
3015
|
+
return {
|
|
3016
|
+
address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
|
|
3017
|
+
balance: isSet$1(object.balance) ? U256.fromJSON(object.balance) : void 0,
|
|
3018
|
+
refundAddress: isSet$1(object.refundAddress) ? Address.fromJSON(object.refundAddress) : void 0
|
|
3019
|
+
};
|
|
3020
|
+
},
|
|
3021
|
+
toJSON(message) {
|
|
3022
|
+
const obj = {};
|
|
3023
|
+
if (message.address !== void 0) {
|
|
3024
|
+
obj.address = Address.toJSON(message.address);
|
|
3025
|
+
}
|
|
3026
|
+
if (message.balance !== void 0) {
|
|
3027
|
+
obj.balance = U256.toJSON(message.balance);
|
|
3028
|
+
}
|
|
3029
|
+
if (message.refundAddress !== void 0) {
|
|
3030
|
+
obj.refundAddress = Address.toJSON(message.refundAddress);
|
|
3031
|
+
}
|
|
3032
|
+
return obj;
|
|
3033
|
+
},
|
|
3034
|
+
create(base) {
|
|
3035
|
+
return SelfDestructAction$1.fromPartial(base ?? {});
|
|
3036
|
+
},
|
|
3037
|
+
fromPartial(object) {
|
|
3038
|
+
const message = createBaseSelfDestructAction();
|
|
3039
|
+
message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
|
|
3040
|
+
message.balance = object.balance !== void 0 && object.balance !== null ? U256.fromPartial(object.balance) : void 0;
|
|
3041
|
+
message.refundAddress = object.refundAddress !== void 0 && object.refundAddress !== null ? Address.fromPartial(object.refundAddress) : void 0;
|
|
3042
|
+
return message;
|
|
3043
|
+
}
|
|
3044
|
+
};
|
|
3045
|
+
function createBaseRewardAction() {
|
|
3046
|
+
return { author: void 0, type: 0, value: void 0 };
|
|
3047
|
+
}
|
|
3048
|
+
const RewardAction$1 = {
|
|
3049
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
3050
|
+
if (message.author !== void 0) {
|
|
3051
|
+
Address.encode(message.author, writer.uint32(10).fork()).ldelim();
|
|
3052
|
+
}
|
|
3053
|
+
if (message.type !== void 0 && message.type !== 0) {
|
|
3054
|
+
writer.uint32(16).int32(message.type);
|
|
3055
|
+
}
|
|
3056
|
+
if (message.value !== void 0) {
|
|
3057
|
+
U256.encode(message.value, writer.uint32(26).fork()).ldelim();
|
|
3058
|
+
}
|
|
3059
|
+
return writer;
|
|
3060
|
+
},
|
|
3061
|
+
decode(input, length) {
|
|
3062
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
3063
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3064
|
+
const message = createBaseRewardAction();
|
|
3065
|
+
while (reader.pos < end) {
|
|
3066
|
+
const tag = reader.uint32();
|
|
3067
|
+
switch (tag >>> 3) {
|
|
3068
|
+
case 1:
|
|
3069
|
+
if (tag !== 10) {
|
|
3070
|
+
break;
|
|
3071
|
+
}
|
|
3072
|
+
message.author = Address.decode(reader, reader.uint32());
|
|
3073
|
+
continue;
|
|
3074
|
+
case 2:
|
|
3075
|
+
if (tag !== 16) {
|
|
3076
|
+
break;
|
|
3077
|
+
}
|
|
3078
|
+
message.type = reader.int32();
|
|
3079
|
+
continue;
|
|
3080
|
+
case 3:
|
|
3081
|
+
if (tag !== 26) {
|
|
3082
|
+
break;
|
|
3083
|
+
}
|
|
3084
|
+
message.value = U256.decode(reader, reader.uint32());
|
|
3085
|
+
continue;
|
|
3086
|
+
}
|
|
3087
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3088
|
+
break;
|
|
3089
|
+
}
|
|
3090
|
+
reader.skipType(tag & 7);
|
|
3091
|
+
}
|
|
3092
|
+
return message;
|
|
3093
|
+
},
|
|
3094
|
+
fromJSON(object) {
|
|
3095
|
+
return {
|
|
3096
|
+
author: isSet$1(object.author) ? Address.fromJSON(object.author) : void 0,
|
|
3097
|
+
type: isSet$1(object.type) ? rewardTypeFromJSON(object.type) : 0,
|
|
3098
|
+
value: isSet$1(object.value) ? U256.fromJSON(object.value) : void 0
|
|
3099
|
+
};
|
|
3100
|
+
},
|
|
3101
|
+
toJSON(message) {
|
|
3102
|
+
const obj = {};
|
|
3103
|
+
if (message.author !== void 0) {
|
|
3104
|
+
obj.author = Address.toJSON(message.author);
|
|
3105
|
+
}
|
|
3106
|
+
if (message.type !== void 0 && message.type !== 0) {
|
|
3107
|
+
obj.type = rewardTypeToJSON(message.type);
|
|
3108
|
+
}
|
|
3109
|
+
if (message.value !== void 0) {
|
|
3110
|
+
obj.value = U256.toJSON(message.value);
|
|
3111
|
+
}
|
|
3112
|
+
return obj;
|
|
3113
|
+
},
|
|
3114
|
+
create(base) {
|
|
3115
|
+
return RewardAction$1.fromPartial(base ?? {});
|
|
3116
|
+
},
|
|
3117
|
+
fromPartial(object) {
|
|
3118
|
+
const message = createBaseRewardAction();
|
|
3119
|
+
message.author = object.author !== void 0 && object.author !== null ? Address.fromPartial(object.author) : void 0;
|
|
3120
|
+
message.type = object.type ?? 0;
|
|
3121
|
+
message.value = object.value !== void 0 && object.value !== null ? U256.fromPartial(object.value) : void 0;
|
|
3122
|
+
return message;
|
|
3123
|
+
}
|
|
3124
|
+
};
|
|
3125
|
+
function createBaseCallOutput() {
|
|
3126
|
+
return { gasUsed: BigInt("0"), output: new Uint8Array(0) };
|
|
3127
|
+
}
|
|
3128
|
+
const CallOutput$1 = {
|
|
3129
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
3130
|
+
if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
|
|
3131
|
+
if (BigInt.asUintN(64, message.gasUsed) !== message.gasUsed) {
|
|
3132
|
+
throw new globalThis.Error("value provided for field message.gasUsed of type uint64 too large");
|
|
3133
|
+
}
|
|
3134
|
+
writer.uint32(8).uint64(message.gasUsed.toString());
|
|
3135
|
+
}
|
|
3136
|
+
if (message.output !== void 0 && message.output.length !== 0) {
|
|
3137
|
+
writer.uint32(18).bytes(message.output);
|
|
3138
|
+
}
|
|
3139
|
+
return writer;
|
|
3140
|
+
},
|
|
3141
|
+
decode(input, length) {
|
|
3142
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
3143
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3144
|
+
const message = createBaseCallOutput();
|
|
3145
|
+
while (reader.pos < end) {
|
|
3146
|
+
const tag = reader.uint32();
|
|
3147
|
+
switch (tag >>> 3) {
|
|
3148
|
+
case 1:
|
|
3149
|
+
if (tag !== 8) {
|
|
3150
|
+
break;
|
|
3151
|
+
}
|
|
3152
|
+
message.gasUsed = longToBigint(reader.uint64());
|
|
3153
|
+
continue;
|
|
3154
|
+
case 2:
|
|
3155
|
+
if (tag !== 18) {
|
|
3156
|
+
break;
|
|
3157
|
+
}
|
|
3158
|
+
message.output = reader.bytes();
|
|
3159
|
+
continue;
|
|
3160
|
+
}
|
|
3161
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3162
|
+
break;
|
|
3163
|
+
}
|
|
3164
|
+
reader.skipType(tag & 7);
|
|
3165
|
+
}
|
|
3166
|
+
return message;
|
|
3167
|
+
},
|
|
3168
|
+
fromJSON(object) {
|
|
3169
|
+
return {
|
|
3170
|
+
gasUsed: isSet$1(object.gasUsed) ? BigInt(object.gasUsed) : BigInt("0"),
|
|
3171
|
+
output: isSet$1(object.output) ? bytesFromBase64(object.output) : new Uint8Array(0)
|
|
3172
|
+
};
|
|
3173
|
+
},
|
|
3174
|
+
toJSON(message) {
|
|
3175
|
+
const obj = {};
|
|
3176
|
+
if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
|
|
3177
|
+
obj.gasUsed = message.gasUsed.toString();
|
|
3178
|
+
}
|
|
3179
|
+
if (message.output !== void 0 && message.output.length !== 0) {
|
|
3180
|
+
obj.output = base64FromBytes(message.output);
|
|
3181
|
+
}
|
|
3182
|
+
return obj;
|
|
3183
|
+
},
|
|
3184
|
+
create(base) {
|
|
3185
|
+
return CallOutput$1.fromPartial(base ?? {});
|
|
3186
|
+
},
|
|
3187
|
+
fromPartial(object) {
|
|
3188
|
+
const message = createBaseCallOutput();
|
|
3189
|
+
message.gasUsed = object.gasUsed ?? BigInt("0");
|
|
3190
|
+
message.output = object.output ?? new Uint8Array(0);
|
|
3191
|
+
return message;
|
|
3192
|
+
}
|
|
3193
|
+
};
|
|
3194
|
+
function createBaseCreateOutput() {
|
|
3195
|
+
return { address: void 0, code: new Uint8Array(0), gasUsed: BigInt("0") };
|
|
3196
|
+
}
|
|
3197
|
+
const CreateOutput$1 = {
|
|
3198
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
3199
|
+
if (message.address !== void 0) {
|
|
3200
|
+
Address.encode(message.address, writer.uint32(10).fork()).ldelim();
|
|
3201
|
+
}
|
|
3202
|
+
if (message.code !== void 0 && message.code.length !== 0) {
|
|
3203
|
+
writer.uint32(18).bytes(message.code);
|
|
3204
|
+
}
|
|
3205
|
+
if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
|
|
3206
|
+
if (BigInt.asUintN(64, message.gasUsed) !== message.gasUsed) {
|
|
3207
|
+
throw new globalThis.Error("value provided for field message.gasUsed of type uint64 too large");
|
|
3208
|
+
}
|
|
3209
|
+
writer.uint32(24).uint64(message.gasUsed.toString());
|
|
3210
|
+
}
|
|
3211
|
+
return writer;
|
|
3212
|
+
},
|
|
3213
|
+
decode(input, length) {
|
|
3214
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
3215
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3216
|
+
const message = createBaseCreateOutput();
|
|
3217
|
+
while (reader.pos < end) {
|
|
3218
|
+
const tag = reader.uint32();
|
|
3219
|
+
switch (tag >>> 3) {
|
|
3220
|
+
case 1:
|
|
3221
|
+
if (tag !== 10) {
|
|
3222
|
+
break;
|
|
3223
|
+
}
|
|
3224
|
+
message.address = Address.decode(reader, reader.uint32());
|
|
3225
|
+
continue;
|
|
3226
|
+
case 2:
|
|
3227
|
+
if (tag !== 18) {
|
|
3228
|
+
break;
|
|
3229
|
+
}
|
|
3230
|
+
message.code = reader.bytes();
|
|
3231
|
+
continue;
|
|
3232
|
+
case 3:
|
|
3233
|
+
if (tag !== 24) {
|
|
3234
|
+
break;
|
|
3235
|
+
}
|
|
3236
|
+
message.gasUsed = longToBigint(reader.uint64());
|
|
3237
|
+
continue;
|
|
3238
|
+
}
|
|
3239
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3240
|
+
break;
|
|
3241
|
+
}
|
|
3242
|
+
reader.skipType(tag & 7);
|
|
3243
|
+
}
|
|
3244
|
+
return message;
|
|
3245
|
+
},
|
|
3246
|
+
fromJSON(object) {
|
|
3247
|
+
return {
|
|
3248
|
+
address: isSet$1(object.address) ? Address.fromJSON(object.address) : void 0,
|
|
3249
|
+
code: isSet$1(object.code) ? bytesFromBase64(object.code) : new Uint8Array(0),
|
|
3250
|
+
gasUsed: isSet$1(object.gasUsed) ? BigInt(object.gasUsed) : BigInt("0")
|
|
3251
|
+
};
|
|
3252
|
+
},
|
|
3253
|
+
toJSON(message) {
|
|
3254
|
+
const obj = {};
|
|
3255
|
+
if (message.address !== void 0) {
|
|
3256
|
+
obj.address = Address.toJSON(message.address);
|
|
3257
|
+
}
|
|
3258
|
+
if (message.code !== void 0 && message.code.length !== 0) {
|
|
3259
|
+
obj.code = base64FromBytes(message.code);
|
|
3260
|
+
}
|
|
3261
|
+
if (message.gasUsed !== void 0 && message.gasUsed !== BigInt("0")) {
|
|
3262
|
+
obj.gasUsed = message.gasUsed.toString();
|
|
3263
|
+
}
|
|
3264
|
+
return obj;
|
|
3265
|
+
},
|
|
3266
|
+
create(base) {
|
|
3267
|
+
return CreateOutput$1.fromPartial(base ?? {});
|
|
3268
|
+
},
|
|
3269
|
+
fromPartial(object) {
|
|
3270
|
+
const message = createBaseCreateOutput();
|
|
3271
|
+
message.address = object.address !== void 0 && object.address !== null ? Address.fromPartial(object.address) : void 0;
|
|
3272
|
+
message.code = object.code ?? new Uint8Array(0);
|
|
3273
|
+
message.gasUsed = object.gasUsed ?? BigInt("0");
|
|
3274
|
+
return message;
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
function bytesFromBase64(b64) {
|
|
3278
|
+
if (globalThis.Buffer) {
|
|
3279
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
3280
|
+
} else {
|
|
3281
|
+
const bin = globalThis.atob(b64);
|
|
3282
|
+
const arr = new Uint8Array(bin.length);
|
|
3283
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
3284
|
+
arr[i] = bin.charCodeAt(i);
|
|
3285
|
+
}
|
|
3286
|
+
return arr;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
function base64FromBytes(arr) {
|
|
3290
|
+
if (globalThis.Buffer) {
|
|
3291
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
3292
|
+
} else {
|
|
3293
|
+
const bin = [];
|
|
3294
|
+
arr.forEach((byte) => {
|
|
3295
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
3296
|
+
});
|
|
3297
|
+
return globalThis.btoa(bin.join(""));
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
function toTimestamp(date) {
|
|
3301
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
3302
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
3303
|
+
return { seconds, nanos };
|
|
3304
|
+
}
|
|
3305
|
+
function fromTimestamp(t) {
|
|
3306
|
+
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
3307
|
+
millis += (t.nanos || 0) / 1e6;
|
|
3308
|
+
return new globalThis.Date(millis);
|
|
3309
|
+
}
|
|
3310
|
+
function fromJsonTimestamp(o) {
|
|
3311
|
+
if (o instanceof globalThis.Date) {
|
|
3312
|
+
return o;
|
|
3313
|
+
} else if (typeof o === "string") {
|
|
3314
|
+
return new globalThis.Date(o);
|
|
3315
|
+
} else {
|
|
3316
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
function longToBigint(long) {
|
|
3320
|
+
return BigInt(long.toString());
|
|
3321
|
+
}
|
|
3322
|
+
if (_m0__default.util.Long !== Long__default) {
|
|
3323
|
+
_m0__default.util.Long = Long__default;
|
|
3324
|
+
_m0__default.configure();
|
|
3325
|
+
}
|
|
3326
|
+
function isSet$1(value) {
|
|
3327
|
+
return value !== null && value !== void 0;
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
const data = {
|
|
3331
|
+
__proto__: null,
|
|
3332
|
+
AccessListItem: AccessListItem$1,
|
|
3333
|
+
Block: Block$1,
|
|
3334
|
+
BlockHeader: BlockHeader$1,
|
|
3335
|
+
CallAction: CallAction$1,
|
|
3336
|
+
CallOutput: CallOutput$1,
|
|
3337
|
+
CallType: CallType$1,
|
|
3338
|
+
CreateAction: CreateAction$1,
|
|
3339
|
+
CreateOutput: CreateOutput$1,
|
|
3340
|
+
CreationMethod: CreationMethod$1,
|
|
3341
|
+
Log: Log$1,
|
|
3342
|
+
RewardAction: RewardAction$1,
|
|
3343
|
+
RewardType: RewardType$1,
|
|
3344
|
+
SelfDestructAction: SelfDestructAction$1,
|
|
3345
|
+
Signature: Signature$1,
|
|
3346
|
+
Trace: Trace$1,
|
|
3347
|
+
Transaction: Transaction$1,
|
|
3348
|
+
TransactionReceipt: TransactionReceipt$1,
|
|
3349
|
+
TransactionStatus: TransactionStatus$1,
|
|
3350
|
+
TransactionTrace: TransactionTrace$1,
|
|
3351
|
+
Withdrawal: Withdrawal$1,
|
|
3352
|
+
callTypeFromJSON: callTypeFromJSON,
|
|
3353
|
+
callTypeToJSON: callTypeToJSON,
|
|
3354
|
+
creationMethodFromJSON: creationMethodFromJSON,
|
|
3355
|
+
creationMethodToJSON: creationMethodToJSON,
|
|
3356
|
+
protobufPackage: protobufPackage$1,
|
|
3357
|
+
rewardTypeFromJSON: rewardTypeFromJSON,
|
|
3358
|
+
rewardTypeToJSON: rewardTypeToJSON,
|
|
3359
|
+
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
3360
|
+
transactionStatusToJSON: transactionStatusToJSON
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3363
|
+
const protobufPackage = "evm.v2";
|
|
3364
|
+
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
3365
|
+
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
3366
|
+
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
3367
|
+
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
2355
3368
|
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
2356
3369
|
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
2357
3370
|
return HeaderFilter2;
|
|
@@ -2622,7 +3635,8 @@ function createBaseTransactionFilter() {
|
|
|
2622
3635
|
create: void 0,
|
|
2623
3636
|
transactionStatus: void 0,
|
|
2624
3637
|
includeReceipt: void 0,
|
|
2625
|
-
includeLogs: void 0
|
|
3638
|
+
includeLogs: void 0,
|
|
3639
|
+
includeTransactionTrace: void 0
|
|
2626
3640
|
};
|
|
2627
3641
|
}
|
|
2628
3642
|
const TransactionFilter$1 = {
|
|
@@ -2648,6 +3662,9 @@ const TransactionFilter$1 = {
|
|
|
2648
3662
|
if (message.includeLogs !== void 0) {
|
|
2649
3663
|
writer.uint32(56).bool(message.includeLogs);
|
|
2650
3664
|
}
|
|
3665
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
3666
|
+
writer.uint32(64).bool(message.includeTransactionTrace);
|
|
3667
|
+
}
|
|
2651
3668
|
return writer;
|
|
2652
3669
|
},
|
|
2653
3670
|
decode(input, length) {
|
|
@@ -2699,6 +3716,12 @@ const TransactionFilter$1 = {
|
|
|
2699
3716
|
}
|
|
2700
3717
|
message.includeLogs = reader.bool();
|
|
2701
3718
|
continue;
|
|
3719
|
+
case 8:
|
|
3720
|
+
if (tag !== 64) {
|
|
3721
|
+
break;
|
|
3722
|
+
}
|
|
3723
|
+
message.includeTransactionTrace = reader.bool();
|
|
3724
|
+
continue;
|
|
2702
3725
|
}
|
|
2703
3726
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2704
3727
|
break;
|
|
@@ -2715,7 +3738,8 @@ const TransactionFilter$1 = {
|
|
|
2715
3738
|
create: isSet(object.create) ? globalThis.Boolean(object.create) : void 0,
|
|
2716
3739
|
transactionStatus: isSet(object.transactionStatus) ? transactionStatusFilterFromJSON(object.transactionStatus) : void 0,
|
|
2717
3740
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
2718
|
-
includeLogs: isSet(object.includeLogs) ? globalThis.Boolean(object.includeLogs) : void 0
|
|
3741
|
+
includeLogs: isSet(object.includeLogs) ? globalThis.Boolean(object.includeLogs) : void 0,
|
|
3742
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
2719
3743
|
};
|
|
2720
3744
|
},
|
|
2721
3745
|
toJSON(message) {
|
|
@@ -2741,6 +3765,9 @@ const TransactionFilter$1 = {
|
|
|
2741
3765
|
if (message.includeLogs !== void 0) {
|
|
2742
3766
|
obj.includeLogs = message.includeLogs;
|
|
2743
3767
|
}
|
|
3768
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
3769
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
3770
|
+
}
|
|
2744
3771
|
return obj;
|
|
2745
3772
|
},
|
|
2746
3773
|
create(base) {
|
|
@@ -2755,6 +3782,7 @@ const TransactionFilter$1 = {
|
|
|
2755
3782
|
message.transactionStatus = object.transactionStatus ?? void 0;
|
|
2756
3783
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
2757
3784
|
message.includeLogs = object.includeLogs ?? void 0;
|
|
3785
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
2758
3786
|
return message;
|
|
2759
3787
|
}
|
|
2760
3788
|
};
|
|
@@ -2767,7 +3795,8 @@ function createBaseLogFilter() {
|
|
|
2767
3795
|
transactionStatus: void 0,
|
|
2768
3796
|
includeTransaction: void 0,
|
|
2769
3797
|
includeReceipt: void 0,
|
|
2770
|
-
includeSiblings: void 0
|
|
3798
|
+
includeSiblings: void 0,
|
|
3799
|
+
includeTransactionTrace: void 0
|
|
2771
3800
|
};
|
|
2772
3801
|
}
|
|
2773
3802
|
const LogFilter$1 = {
|
|
@@ -2798,6 +3827,9 @@ const LogFilter$1 = {
|
|
|
2798
3827
|
if (message.includeSiblings !== void 0) {
|
|
2799
3828
|
writer.uint32(64).bool(message.includeSiblings);
|
|
2800
3829
|
}
|
|
3830
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
3831
|
+
writer.uint32(72).bool(message.includeTransactionTrace);
|
|
3832
|
+
}
|
|
2801
3833
|
return writer;
|
|
2802
3834
|
},
|
|
2803
3835
|
decode(input, length) {
|
|
@@ -2855,6 +3887,12 @@ const LogFilter$1 = {
|
|
|
2855
3887
|
}
|
|
2856
3888
|
message.includeSiblings = reader.bool();
|
|
2857
3889
|
continue;
|
|
3890
|
+
case 9:
|
|
3891
|
+
if (tag !== 72) {
|
|
3892
|
+
break;
|
|
3893
|
+
}
|
|
3894
|
+
message.includeTransactionTrace = reader.bool();
|
|
3895
|
+
continue;
|
|
2858
3896
|
}
|
|
2859
3897
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2860
3898
|
break;
|
|
@@ -2872,7 +3910,8 @@ const LogFilter$1 = {
|
|
|
2872
3910
|
transactionStatus: isSet(object.transactionStatus) ? transactionStatusFilterFromJSON(object.transactionStatus) : void 0,
|
|
2873
3911
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
|
|
2874
3912
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
2875
|
-
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
|
|
3913
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
|
|
3914
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
2876
3915
|
};
|
|
2877
3916
|
},
|
|
2878
3917
|
toJSON(message) {
|
|
@@ -2901,6 +3940,9 @@ const LogFilter$1 = {
|
|
|
2901
3940
|
if (message.includeSiblings !== void 0) {
|
|
2902
3941
|
obj.includeSiblings = message.includeSiblings;
|
|
2903
3942
|
}
|
|
3943
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
3944
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
3945
|
+
}
|
|
2904
3946
|
return obj;
|
|
2905
3947
|
},
|
|
2906
3948
|
create(base) {
|
|
@@ -2916,6 +3958,7 @@ const LogFilter$1 = {
|
|
|
2916
3958
|
message.includeTransaction = object.includeTransaction ?? void 0;
|
|
2917
3959
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
2918
3960
|
message.includeSiblings = object.includeSiblings ?? void 0;
|
|
3961
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
2919
3962
|
return message;
|
|
2920
3963
|
}
|
|
2921
3964
|
};
|
|
@@ -2996,277 +4039,368 @@ const index = {
|
|
|
2996
4039
|
filter: filter
|
|
2997
4040
|
};
|
|
2998
4041
|
|
|
2999
|
-
const Bloom =
|
|
3000
|
-
|
|
3001
|
-
value: protocol.BytesFromUint8Array
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
strict: false,
|
|
3006
|
-
encode(value) {
|
|
3007
|
-
throw new Error("Not implemented");
|
|
3008
|
-
},
|
|
3009
|
-
decode({ value }) {
|
|
3010
|
-
return value;
|
|
3011
|
-
}
|
|
4042
|
+
const Bloom = {
|
|
4043
|
+
encode(x) {
|
|
4044
|
+
return { value: protocol.BytesFromUint8Array.encode(x) };
|
|
4045
|
+
},
|
|
4046
|
+
decode({ value }) {
|
|
4047
|
+
return protocol.BytesFromUint8Array.decode(value);
|
|
3012
4048
|
}
|
|
3013
|
-
|
|
3014
|
-
const TransactionStatus =
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
}
|
|
4049
|
+
};
|
|
4050
|
+
const TransactionStatus = {
|
|
4051
|
+
encode(x) {
|
|
4052
|
+
const enumMap = {
|
|
4053
|
+
unknown: TransactionStatus$1.UNSPECIFIED,
|
|
4054
|
+
succeeded: TransactionStatus$1.SUCCEEDED,
|
|
4055
|
+
reverted: TransactionStatus$1.REVERTED
|
|
4056
|
+
};
|
|
4057
|
+
return enumMap[x] ?? TransactionStatus$1.UNSPECIFIED;
|
|
4058
|
+
},
|
|
4059
|
+
decode(p) {
|
|
4060
|
+
const enumMap = {
|
|
4061
|
+
[TransactionStatus$1.SUCCEEDED]: "succeeded",
|
|
4062
|
+
[TransactionStatus$1.REVERTED]: "reverted",
|
|
4063
|
+
[TransactionStatus$1.UNSPECIFIED]: "unknown",
|
|
4064
|
+
[TransactionStatus$1.UNRECOGNIZED]: "unknown"
|
|
4065
|
+
};
|
|
4066
|
+
return enumMap[p] ?? "unknown";
|
|
3030
4067
|
}
|
|
3031
|
-
|
|
3032
|
-
const BlockHeader =
|
|
3033
|
-
blockNumber:
|
|
3034
|
-
blockHash: B256$1,
|
|
3035
|
-
parentBlockHash: B256$1,
|
|
3036
|
-
unclesHash: B256$1,
|
|
3037
|
-
miner: Address$1,
|
|
3038
|
-
stateRoot: B256$1,
|
|
3039
|
-
transactionsRoot: B256$1,
|
|
3040
|
-
receiptsRoot: B256$1,
|
|
3041
|
-
logsBloom: Bloom,
|
|
3042
|
-
difficulty: U256$1,
|
|
3043
|
-
gasLimit: U128$1,
|
|
3044
|
-
gasUsed: U128$1,
|
|
3045
|
-
timestamp:
|
|
3046
|
-
extraData: protocol.BytesFromUint8Array,
|
|
3047
|
-
mixHash:
|
|
3048
|
-
nonce:
|
|
3049
|
-
baseFeePerGas:
|
|
3050
|
-
withdrawalsRoot:
|
|
3051
|
-
totalDifficulty:
|
|
3052
|
-
blobGasUsed:
|
|
3053
|
-
excessBlobGas:
|
|
3054
|
-
parentBeaconBlockRoot:
|
|
4068
|
+
};
|
|
4069
|
+
const BlockHeader = codec.MessageCodec({
|
|
4070
|
+
blockNumber: codec.RequiredCodec(codec.BigIntCodec),
|
|
4071
|
+
blockHash: codec.OptionalCodec(B256$1),
|
|
4072
|
+
parentBlockHash: codec.RequiredCodec(B256$1),
|
|
4073
|
+
unclesHash: codec.RequiredCodec(B256$1),
|
|
4074
|
+
miner: codec.RequiredCodec(Address$1),
|
|
4075
|
+
stateRoot: codec.RequiredCodec(B256$1),
|
|
4076
|
+
transactionsRoot: codec.RequiredCodec(B256$1),
|
|
4077
|
+
receiptsRoot: codec.RequiredCodec(B256$1),
|
|
4078
|
+
logsBloom: codec.RequiredCodec(Bloom),
|
|
4079
|
+
difficulty: codec.RequiredCodec(U256$1),
|
|
4080
|
+
gasLimit: codec.RequiredCodec(U128$1),
|
|
4081
|
+
gasUsed: codec.RequiredCodec(U128$1),
|
|
4082
|
+
timestamp: codec.RequiredCodec(codec.DateCodec),
|
|
4083
|
+
extraData: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4084
|
+
mixHash: codec.OptionalCodec(B256$1),
|
|
4085
|
+
nonce: codec.OptionalCodec(codec.BigIntCodec),
|
|
4086
|
+
baseFeePerGas: codec.OptionalCodec(U128$1),
|
|
4087
|
+
withdrawalsRoot: codec.OptionalCodec(B256$1),
|
|
4088
|
+
totalDifficulty: codec.OptionalCodec(U256$1),
|
|
4089
|
+
blobGasUsed: codec.OptionalCodec(U128$1),
|
|
4090
|
+
excessBlobGas: codec.OptionalCodec(U128$1),
|
|
4091
|
+
parentBeaconBlockRoot: codec.OptionalCodec(B256$1),
|
|
4092
|
+
requestsHash: codec.OptionalCodec(B256$1)
|
|
4093
|
+
});
|
|
4094
|
+
const Withdrawal = codec.MessageCodec({
|
|
4095
|
+
filterIds: codec.ArrayCodec(codec.NumberCodec),
|
|
4096
|
+
withdrawalIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4097
|
+
index: codec.RequiredCodec(codec.BigIntCodec),
|
|
4098
|
+
validatorIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4099
|
+
address: codec.RequiredCodec(Address$1),
|
|
4100
|
+
amount: codec.RequiredCodec(codec.BigIntCodec)
|
|
3055
4101
|
});
|
|
3056
|
-
const
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
index: schema.Schema.BigIntFromSelf,
|
|
3060
|
-
validatorIndex: schema.Schema.Number,
|
|
3061
|
-
address: Address$1,
|
|
3062
|
-
amount: schema.Schema.BigIntFromSelf
|
|
4102
|
+
const AccessListItem = codec.MessageCodec({
|
|
4103
|
+
address: codec.RequiredCodec(Address$1),
|
|
4104
|
+
storageKeys: codec.ArrayCodec(B256$1)
|
|
3063
4105
|
});
|
|
3064
|
-
const
|
|
3065
|
-
|
|
3066
|
-
|
|
4106
|
+
const Signature = codec.MessageCodec({
|
|
4107
|
+
r: codec.RequiredCodec(U256$1),
|
|
4108
|
+
s: codec.RequiredCodec(U256$1),
|
|
4109
|
+
v: codec.OptionalCodec(U256$1),
|
|
4110
|
+
YParity: codec.OptionalCodec(codec.BooleanCodec)
|
|
3067
4111
|
});
|
|
3068
|
-
const
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
4112
|
+
const Transaction = codec.MessageCodec({
|
|
4113
|
+
filterIds: codec.ArrayCodec(codec.NumberCodec),
|
|
4114
|
+
transactionIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4115
|
+
transactionHash: codec.RequiredCodec(B256$1),
|
|
4116
|
+
nonce: codec.RequiredCodec(codec.BigIntCodec),
|
|
4117
|
+
from: codec.RequiredCodec(Address$1),
|
|
4118
|
+
to: codec.OptionalCodec(Address$1),
|
|
4119
|
+
value: codec.RequiredCodec(U256$1),
|
|
4120
|
+
gasPrice: codec.OptionalCodec(U128$1),
|
|
4121
|
+
gas: codec.RequiredCodec(U128$1),
|
|
4122
|
+
maxFeePerGas: codec.OptionalCodec(U128$1),
|
|
4123
|
+
maxPriorityFeePerGas: codec.OptionalCodec(U128$1),
|
|
4124
|
+
input: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4125
|
+
signature: codec.OptionalCodec(Signature),
|
|
4126
|
+
chainId: codec.OptionalCodec(codec.BigIntCodec),
|
|
4127
|
+
accessList: codec.ArrayCodec(AccessListItem),
|
|
4128
|
+
transactionType: codec.RequiredCodec(codec.BigIntCodec),
|
|
4129
|
+
maxFeePerBlobGas: codec.OptionalCodec(U128$1),
|
|
4130
|
+
blobVersionedHashes: codec.ArrayCodec(B256$1),
|
|
4131
|
+
transactionStatus: codec.RequiredCodec(TransactionStatus)
|
|
3073
4132
|
});
|
|
3074
|
-
const
|
|
3075
|
-
filterIds:
|
|
3076
|
-
transactionIndex:
|
|
3077
|
-
transactionHash: B256$1,
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
accessList: schema.Schema.Array(AccessListItem),
|
|
3090
|
-
transactionType: schema.Schema.BigIntFromSelf,
|
|
3091
|
-
maxFeePerBlobGas: schema.Schema.optional(U128$1),
|
|
3092
|
-
blobVersionedHashes: schema.Schema.Array(B256$1),
|
|
3093
|
-
transactionStatus: TransactionStatus
|
|
4133
|
+
const TransactionReceipt = codec.MessageCodec({
|
|
4134
|
+
filterIds: codec.ArrayCodec(codec.NumberCodec),
|
|
4135
|
+
transactionIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4136
|
+
transactionHash: codec.RequiredCodec(B256$1),
|
|
4137
|
+
cumulativeGasUsed: codec.RequiredCodec(U128$1),
|
|
4138
|
+
gasUsed: codec.RequiredCodec(U128$1),
|
|
4139
|
+
effectiveGasPrice: codec.RequiredCodec(U128$1),
|
|
4140
|
+
from: codec.RequiredCodec(Address$1),
|
|
4141
|
+
to: codec.OptionalCodec(Address$1),
|
|
4142
|
+
contractAddress: codec.OptionalCodec(Address$1),
|
|
4143
|
+
logsBloom: codec.RequiredCodec(Bloom),
|
|
4144
|
+
transactionType: codec.RequiredCodec(codec.BigIntCodec),
|
|
4145
|
+
blobGasUsed: codec.OptionalCodec(U128$1),
|
|
4146
|
+
blobGasPrice: codec.OptionalCodec(U128$1),
|
|
4147
|
+
transactionStatus: codec.RequiredCodec(TransactionStatus)
|
|
3094
4148
|
});
|
|
3095
|
-
const
|
|
3096
|
-
filterIds:
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
logsBloom: Bloom,
|
|
3106
|
-
transactionType: schema.Schema.BigIntFromSelf,
|
|
3107
|
-
blobGasUsed: schema.Schema.optional(U128$1),
|
|
3108
|
-
blobGasPrice: schema.Schema.optional(U128$1),
|
|
3109
|
-
transactionStatus: TransactionStatus
|
|
4149
|
+
const Log = codec.MessageCodec({
|
|
4150
|
+
filterIds: codec.ArrayCodec(codec.NumberCodec),
|
|
4151
|
+
address: codec.RequiredCodec(Address$1),
|
|
4152
|
+
topics: codec.ArrayCodec(B256$1),
|
|
4153
|
+
data: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4154
|
+
logIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4155
|
+
logIndexInTransaction: codec.RequiredCodec(codec.NumberCodec),
|
|
4156
|
+
transactionIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4157
|
+
transactionHash: codec.RequiredCodec(B256$1),
|
|
4158
|
+
transactionStatus: codec.RequiredCodec(TransactionStatus)
|
|
3110
4159
|
});
|
|
3111
|
-
const
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
4160
|
+
const CallType = {
|
|
4161
|
+
encode(x) {
|
|
4162
|
+
const enumMap = {
|
|
4163
|
+
unknown: CallType$1.UNSPECIFIED,
|
|
4164
|
+
call: CallType$1.CALL,
|
|
4165
|
+
callCode: CallType$1.CALL_CODE,
|
|
4166
|
+
delegateCall: CallType$1.DELEGATE_CALL,
|
|
4167
|
+
staticCall: CallType$1.STATIC_CALL,
|
|
4168
|
+
authCall: CallType$1.AUTH_CALL
|
|
4169
|
+
};
|
|
4170
|
+
return enumMap[x] ?? CallType$1.UNSPECIFIED;
|
|
4171
|
+
},
|
|
4172
|
+
decode(p) {
|
|
4173
|
+
const enumMap = {
|
|
4174
|
+
[CallType$1.CALL]: "call",
|
|
4175
|
+
[CallType$1.CALL_CODE]: "callCode",
|
|
4176
|
+
[CallType$1.DELEGATE_CALL]: "delegateCall",
|
|
4177
|
+
[CallType$1.STATIC_CALL]: "staticCall",
|
|
4178
|
+
[CallType$1.AUTH_CALL]: "authCall",
|
|
4179
|
+
[CallType$1.UNSPECIFIED]: "unknown",
|
|
4180
|
+
[CallType$1.UNRECOGNIZED]: "unknown"
|
|
4181
|
+
};
|
|
4182
|
+
return enumMap[p] ?? "unknown";
|
|
4183
|
+
}
|
|
4184
|
+
};
|
|
4185
|
+
const CreationMethod = {
|
|
4186
|
+
encode(x) {
|
|
4187
|
+
const enumMap = {
|
|
4188
|
+
unknown: CreationMethod$1.UNSPECIFIED,
|
|
4189
|
+
create: CreationMethod$1.CREATE,
|
|
4190
|
+
create2: CreationMethod$1.CREATE2,
|
|
4191
|
+
eofCreate: CreationMethod$1.EOF_CREATE
|
|
4192
|
+
};
|
|
4193
|
+
return enumMap[x] ?? CreationMethod$1.UNSPECIFIED;
|
|
4194
|
+
},
|
|
4195
|
+
decode(p) {
|
|
4196
|
+
const enumMap = {
|
|
4197
|
+
[CreationMethod$1.CREATE]: "create",
|
|
4198
|
+
[CreationMethod$1.CREATE2]: "create2",
|
|
4199
|
+
[CreationMethod$1.EOF_CREATE]: "eofCreate",
|
|
4200
|
+
[CreationMethod$1.UNSPECIFIED]: "unknown",
|
|
4201
|
+
[CreationMethod$1.UNRECOGNIZED]: "unknown"
|
|
4202
|
+
};
|
|
4203
|
+
return enumMap[p] ?? "unknown";
|
|
4204
|
+
}
|
|
4205
|
+
};
|
|
4206
|
+
const CallAction = codec.MessageCodec({
|
|
4207
|
+
fromAddress: codec.RequiredCodec(Address$1),
|
|
4208
|
+
type: codec.RequiredCodec(CallType),
|
|
4209
|
+
gas: codec.RequiredCodec(codec.BigIntCodec),
|
|
4210
|
+
input: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4211
|
+
toAddress: codec.RequiredCodec(Address$1),
|
|
4212
|
+
value: codec.RequiredCodec(U256$1)
|
|
3121
4213
|
});
|
|
3122
|
-
const
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
4214
|
+
const CreateAction = codec.MessageCodec({
|
|
4215
|
+
fromAddress: codec.RequiredCodec(Address$1),
|
|
4216
|
+
gas: codec.RequiredCodec(codec.BigIntCodec),
|
|
4217
|
+
init: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4218
|
+
value: codec.RequiredCodec(U256$1),
|
|
4219
|
+
creationMethod: codec.RequiredCodec(CreationMethod)
|
|
3128
4220
|
});
|
|
3129
|
-
const
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
4221
|
+
const SelfDestructAction = codec.MessageCodec({
|
|
4222
|
+
address: codec.RequiredCodec(Address$1),
|
|
4223
|
+
balance: codec.RequiredCodec(U256$1),
|
|
4224
|
+
refundAddress: codec.RequiredCodec(Address$1)
|
|
4225
|
+
});
|
|
4226
|
+
const RewardType = {
|
|
4227
|
+
encode(x) {
|
|
4228
|
+
const enumMap = {
|
|
4229
|
+
unknown: RewardType$1.UNSPECIFIED,
|
|
4230
|
+
block: RewardType$1.BLOCK,
|
|
4231
|
+
uncle: RewardType$1.UNCLE
|
|
4232
|
+
};
|
|
4233
|
+
return enumMap[x] ?? RewardType$1.UNSPECIFIED;
|
|
4234
|
+
},
|
|
4235
|
+
decode(p) {
|
|
4236
|
+
const enumMap = {
|
|
4237
|
+
[RewardType$1.BLOCK]: "block",
|
|
4238
|
+
[RewardType$1.UNCLE]: "uncle",
|
|
4239
|
+
[RewardType$1.UNSPECIFIED]: "unknown",
|
|
4240
|
+
[RewardType$1.UNRECOGNIZED]: "unknown"
|
|
4241
|
+
};
|
|
4242
|
+
return enumMap[p] ?? "unknown";
|
|
3146
4243
|
}
|
|
3147
|
-
|
|
4244
|
+
};
|
|
4245
|
+
const RewardAction = codec.MessageCodec({
|
|
4246
|
+
author: codec.RequiredCodec(Address$1),
|
|
4247
|
+
type: codec.RequiredCodec(RewardType),
|
|
4248
|
+
value: codec.RequiredCodec(U256$1)
|
|
4249
|
+
});
|
|
4250
|
+
const CallOutput = codec.MessageCodec({
|
|
4251
|
+
gasUsed: codec.RequiredCodec(codec.BigIntCodec),
|
|
4252
|
+
output: codec.RequiredCodec(protocol.BytesFromUint8Array)
|
|
4253
|
+
});
|
|
4254
|
+
const CreateOutput = codec.MessageCodec({
|
|
4255
|
+
address: codec.RequiredCodec(Address$1),
|
|
4256
|
+
code: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4257
|
+
gasUsed: codec.RequiredCodec(codec.BigIntCodec)
|
|
4258
|
+
});
|
|
4259
|
+
const Trace = codec.MessageCodec({
|
|
4260
|
+
action: codec.RequiredCodec(
|
|
4261
|
+
codec.OneOfCodec({
|
|
4262
|
+
call: CallAction,
|
|
4263
|
+
create: CreateAction,
|
|
4264
|
+
selfDestruct: SelfDestructAction,
|
|
4265
|
+
reward: RewardAction
|
|
4266
|
+
})
|
|
4267
|
+
),
|
|
4268
|
+
error: codec.OptionalCodec(codec.StringCodec),
|
|
4269
|
+
output: codec.OptionalCodec(
|
|
4270
|
+
codec.OneOfCodec({
|
|
4271
|
+
callOutput: CallOutput,
|
|
4272
|
+
createOutput: CreateOutput
|
|
4273
|
+
})
|
|
4274
|
+
),
|
|
4275
|
+
subtraces: codec.RequiredCodec(codec.NumberCodec),
|
|
4276
|
+
traceAddress: codec.ArrayCodec(codec.NumberCodec)
|
|
4277
|
+
});
|
|
4278
|
+
const TransactionTrace = codec.MessageCodec({
|
|
4279
|
+
filterIds: codec.ArrayCodec(codec.NumberCodec),
|
|
4280
|
+
transactionIndex: codec.RequiredCodec(codec.NumberCodec),
|
|
4281
|
+
transactionHash: codec.RequiredCodec(B256$1),
|
|
4282
|
+
traces: codec.ArrayCodec(Trace)
|
|
4283
|
+
});
|
|
4284
|
+
const Block = codec.MessageCodec({
|
|
4285
|
+
header: codec.RequiredCodec(BlockHeader),
|
|
4286
|
+
withdrawals: codec.ArrayCodec(Withdrawal),
|
|
4287
|
+
transactions: codec.ArrayCodec(Transaction),
|
|
4288
|
+
receipts: codec.ArrayCodec(TransactionReceipt),
|
|
4289
|
+
logs: codec.ArrayCodec(Log),
|
|
4290
|
+
traces: codec.ArrayCodec(TransactionTrace)
|
|
4291
|
+
});
|
|
4292
|
+
const BlockFromBytes = {
|
|
4293
|
+
encode(x) {
|
|
4294
|
+
const block = Block.encode(x);
|
|
4295
|
+
return Block$1.encode(block).finish();
|
|
4296
|
+
},
|
|
4297
|
+
decode(p) {
|
|
4298
|
+
const block = Block$1.decode(p);
|
|
4299
|
+
return Block.decode(block);
|
|
4300
|
+
}
|
|
4301
|
+
};
|
|
3148
4302
|
|
|
3149
|
-
const
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
3161
|
-
};
|
|
3162
|
-
return enumMap[value] ?? "unknown";
|
|
3163
|
-
},
|
|
3164
|
-
encode(value) {
|
|
3165
|
-
switch (value) {
|
|
3166
|
-
case "always":
|
|
3167
|
-
return HeaderFilter$1.ALWAYS;
|
|
3168
|
-
case "on_data":
|
|
3169
|
-
return HeaderFilter$1.ON_DATA;
|
|
3170
|
-
case "on_data_or_on_new_block":
|
|
3171
|
-
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
3172
|
-
default:
|
|
3173
|
-
return HeaderFilter$1.UNSPECIFIED;
|
|
3174
|
-
}
|
|
4303
|
+
const HeaderFilter = {
|
|
4304
|
+
encode(x) {
|
|
4305
|
+
switch (x) {
|
|
4306
|
+
case "always":
|
|
4307
|
+
return HeaderFilter$1.ALWAYS;
|
|
4308
|
+
case "on_data":
|
|
4309
|
+
return HeaderFilter$1.ON_DATA;
|
|
4310
|
+
case "on_data_or_on_new_block":
|
|
4311
|
+
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
4312
|
+
default:
|
|
4313
|
+
return HeaderFilter$1.UNSPECIFIED;
|
|
3175
4314
|
}
|
|
4315
|
+
},
|
|
4316
|
+
decode(p) {
|
|
4317
|
+
const enumMap = {
|
|
4318
|
+
[HeaderFilter$1.ALWAYS]: "always",
|
|
4319
|
+
[HeaderFilter$1.ON_DATA]: "on_data",
|
|
4320
|
+
[HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
|
|
4321
|
+
[HeaderFilter$1.UNSPECIFIED]: "unknown",
|
|
4322
|
+
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
4323
|
+
};
|
|
4324
|
+
return enumMap[p] ?? "unknown";
|
|
3176
4325
|
}
|
|
3177
|
-
|
|
3178
|
-
const WithdrawalFilter =
|
|
3179
|
-
id:
|
|
3180
|
-
validatorIndex:
|
|
3181
|
-
address:
|
|
4326
|
+
};
|
|
4327
|
+
const WithdrawalFilter = codec.MessageCodec({
|
|
4328
|
+
id: codec.OptionalCodec(codec.NumberCodec),
|
|
4329
|
+
validatorIndex: codec.OptionalCodec(codec.NumberCodec),
|
|
4330
|
+
address: codec.OptionalCodec(Address$1)
|
|
3182
4331
|
});
|
|
3183
|
-
const TransactionStatusFilter =
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
return TransactionStatusFilter$1.ALL;
|
|
3205
|
-
default:
|
|
3206
|
-
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
3207
|
-
}
|
|
4332
|
+
const TransactionStatusFilter = {
|
|
4333
|
+
decode(value) {
|
|
4334
|
+
const enumMap = {
|
|
4335
|
+
[TransactionStatusFilter$1.SUCCEEDED]: "succeeded",
|
|
4336
|
+
[TransactionStatusFilter$1.REVERTED]: "reverted",
|
|
4337
|
+
[TransactionStatusFilter$1.ALL]: "all",
|
|
4338
|
+
[TransactionStatusFilter$1.UNSPECIFIED]: "unknown",
|
|
4339
|
+
[TransactionStatusFilter$1.UNRECOGNIZED]: "unknown"
|
|
4340
|
+
};
|
|
4341
|
+
return enumMap[value] ?? "unknown";
|
|
4342
|
+
},
|
|
4343
|
+
encode(value) {
|
|
4344
|
+
switch (value) {
|
|
4345
|
+
case "succeeded":
|
|
4346
|
+
return TransactionStatusFilter$1.SUCCEEDED;
|
|
4347
|
+
case "reverted":
|
|
4348
|
+
return TransactionStatusFilter$1.REVERTED;
|
|
4349
|
+
case "all":
|
|
4350
|
+
return TransactionStatusFilter$1.ALL;
|
|
4351
|
+
default:
|
|
4352
|
+
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
3208
4353
|
}
|
|
3209
4354
|
}
|
|
3210
|
-
|
|
3211
|
-
const Topic =
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
decode({ value }) {
|
|
3216
|
-
if (value === void 0) {
|
|
3217
|
-
return null;
|
|
3218
|
-
}
|
|
3219
|
-
return value;
|
|
3220
|
-
},
|
|
3221
|
-
encode(value) {
|
|
3222
|
-
if (value === null) {
|
|
3223
|
-
return { value: void 0 };
|
|
3224
|
-
}
|
|
3225
|
-
return { value };
|
|
4355
|
+
};
|
|
4356
|
+
const Topic = {
|
|
4357
|
+
encode(x) {
|
|
4358
|
+
if (x === null) {
|
|
4359
|
+
return { value: void 0 };
|
|
3226
4360
|
}
|
|
4361
|
+
return { value: B256$1.encode(x) };
|
|
4362
|
+
},
|
|
4363
|
+
decode({ value }) {
|
|
4364
|
+
if (value === void 0) {
|
|
4365
|
+
return null;
|
|
4366
|
+
}
|
|
4367
|
+
return B256$1.decode(value);
|
|
3227
4368
|
}
|
|
3228
|
-
|
|
3229
|
-
const LogFilter =
|
|
3230
|
-
id:
|
|
3231
|
-
address:
|
|
3232
|
-
topics:
|
|
3233
|
-
strict:
|
|
3234
|
-
transactionStatus:
|
|
3235
|
-
includeTransaction:
|
|
3236
|
-
includeReceipt:
|
|
4369
|
+
};
|
|
4370
|
+
const LogFilter = codec.MessageCodec({
|
|
4371
|
+
id: codec.OptionalCodec(codec.NumberCodec),
|
|
4372
|
+
address: codec.OptionalCodec(Address$1),
|
|
4373
|
+
topics: codec.OptionalCodec(codec.ArrayCodec(Topic)),
|
|
4374
|
+
strict: codec.OptionalCodec(codec.BooleanCodec),
|
|
4375
|
+
transactionStatus: codec.OptionalCodec(TransactionStatusFilter),
|
|
4376
|
+
includeTransaction: codec.OptionalCodec(codec.BooleanCodec),
|
|
4377
|
+
includeReceipt: codec.OptionalCodec(codec.BooleanCodec),
|
|
4378
|
+
includeTransactionTrace: codec.OptionalCodec(codec.BooleanCodec)
|
|
3237
4379
|
});
|
|
3238
|
-
const TransactionFilter =
|
|
3239
|
-
id:
|
|
3240
|
-
from:
|
|
3241
|
-
to:
|
|
3242
|
-
create:
|
|
3243
|
-
transactionStatus:
|
|
3244
|
-
includeReceipt:
|
|
3245
|
-
includeLogs:
|
|
4380
|
+
const TransactionFilter = codec.MessageCodec({
|
|
4381
|
+
id: codec.OptionalCodec(codec.NumberCodec),
|
|
4382
|
+
from: codec.OptionalCodec(Address$1),
|
|
4383
|
+
to: codec.OptionalCodec(Address$1),
|
|
4384
|
+
create: codec.OptionalCodec(codec.BooleanCodec),
|
|
4385
|
+
transactionStatus: codec.OptionalCodec(TransactionStatusFilter),
|
|
4386
|
+
includeReceipt: codec.OptionalCodec(codec.BooleanCodec),
|
|
4387
|
+
includeLogs: codec.OptionalCodec(codec.BooleanCodec),
|
|
4388
|
+
includeTransactionTrace: codec.OptionalCodec(codec.BooleanCodec)
|
|
3246
4389
|
});
|
|
3247
|
-
const Filter =
|
|
3248
|
-
header:
|
|
3249
|
-
withdrawals:
|
|
3250
|
-
transactions:
|
|
3251
|
-
logs:
|
|
4390
|
+
const Filter = codec.MessageCodec({
|
|
4391
|
+
header: codec.OptionalCodec(HeaderFilter),
|
|
4392
|
+
withdrawals: codec.OptionalCodec(codec.ArrayCodec(WithdrawalFilter)),
|
|
4393
|
+
transactions: codec.OptionalCodec(codec.ArrayCodec(TransactionFilter)),
|
|
4394
|
+
logs: codec.OptionalCodec(codec.ArrayCodec(LogFilter))
|
|
3252
4395
|
});
|
|
3253
|
-
const
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
strict: false,
|
|
3260
|
-
decode(value) {
|
|
3261
|
-
return Filter$1.decode(value);
|
|
3262
|
-
},
|
|
3263
|
-
encode(value) {
|
|
3264
|
-
return Filter$1.encode(value).finish();
|
|
3265
|
-
}
|
|
4396
|
+
const FilterFromBytes = {
|
|
4397
|
+
encode(x) {
|
|
4398
|
+
return Filter$1.encode(Filter.encode(x)).finish();
|
|
4399
|
+
},
|
|
4400
|
+
decode(p) {
|
|
4401
|
+
return Filter.decode(Filter$1.decode(p));
|
|
3266
4402
|
}
|
|
3267
|
-
|
|
3268
|
-
const filterToBytes = schema.Schema.encodeSync(FilterFromBytes);
|
|
3269
|
-
const filterFromBytes = schema.Schema.decodeSync(FilterFromBytes);
|
|
4403
|
+
};
|
|
3270
4404
|
function mergeFilter(a, b) {
|
|
3271
4405
|
const header = mergeHeaderFilter(a.header, b.header);
|
|
3272
4406
|
return {
|
|
@@ -3295,43 +4429,45 @@ function mergeHeaderFilter(a, b) {
|
|
|
3295
4429
|
const EvmStream = new protocol.StreamConfig(
|
|
3296
4430
|
FilterFromBytes,
|
|
3297
4431
|
BlockFromBytes,
|
|
3298
|
-
mergeFilter
|
|
4432
|
+
mergeFilter,
|
|
4433
|
+
"evm"
|
|
3299
4434
|
);
|
|
3300
4435
|
|
|
3301
4436
|
exports.AccessListItem = AccessListItem;
|
|
3302
4437
|
exports.Address = Address$1;
|
|
3303
4438
|
exports.B256 = B256$1;
|
|
3304
|
-
exports.B256Proto = B256Proto;
|
|
3305
4439
|
exports.Block = Block;
|
|
3306
4440
|
exports.BlockFromBytes = BlockFromBytes;
|
|
3307
4441
|
exports.BlockHeader = BlockHeader;
|
|
3308
4442
|
exports.Bloom = Bloom;
|
|
4443
|
+
exports.CallAction = CallAction;
|
|
4444
|
+
exports.CallOutput = CallOutput;
|
|
4445
|
+
exports.CallType = CallType;
|
|
4446
|
+
exports.CreateAction = CreateAction;
|
|
4447
|
+
exports.CreateOutput = CreateOutput;
|
|
4448
|
+
exports.CreationMethod = CreationMethod;
|
|
3309
4449
|
exports.EvmStream = EvmStream;
|
|
3310
4450
|
exports.Filter = Filter;
|
|
3311
4451
|
exports.FilterFromBytes = FilterFromBytes;
|
|
3312
4452
|
exports.HeaderFilter = HeaderFilter;
|
|
3313
4453
|
exports.Log = Log;
|
|
3314
4454
|
exports.LogFilter = LogFilter;
|
|
4455
|
+
exports.RewardAction = RewardAction;
|
|
4456
|
+
exports.RewardType = RewardType;
|
|
4457
|
+
exports.SelfDestructAction = SelfDestructAction;
|
|
3315
4458
|
exports.Signature = Signature;
|
|
3316
4459
|
exports.Topic = Topic;
|
|
4460
|
+
exports.Trace = Trace;
|
|
3317
4461
|
exports.Transaction = Transaction;
|
|
3318
4462
|
exports.TransactionFilter = TransactionFilter;
|
|
3319
4463
|
exports.TransactionReceipt = TransactionReceipt;
|
|
3320
4464
|
exports.TransactionStatus = TransactionStatus;
|
|
3321
4465
|
exports.TransactionStatusFilter = TransactionStatusFilter;
|
|
4466
|
+
exports.TransactionTrace = TransactionTrace;
|
|
3322
4467
|
exports.U128 = U128$1;
|
|
3323
4468
|
exports.U256 = U256$1;
|
|
3324
4469
|
exports.Withdrawal = Withdrawal;
|
|
3325
4470
|
exports.WithdrawalFilter = WithdrawalFilter;
|
|
3326
|
-
exports.b256FromProto = b256FromProto;
|
|
3327
|
-
exports.b256ToProto = b256ToProto;
|
|
3328
|
-
exports.filterFromBytes = filterFromBytes;
|
|
3329
|
-
exports.filterFromProto = filterFromProto;
|
|
3330
|
-
exports.filterToBytes = filterToBytes;
|
|
3331
|
-
exports.filterToProto = filterToProto;
|
|
3332
4471
|
exports.mergeFilter = mergeFilter;
|
|
3333
4472
|
exports.proto = index;
|
|
3334
|
-
|
|
3335
|
-
exports.u128ToProto = u128ToProto;
|
|
3336
|
-
exports.u256FromProto = u256FromProto;
|
|
3337
|
-
exports.u256ToProto = u256ToProto;
|
|
4473
|
+
//# sourceMappingURL=index.cjs.map
|