@apibara/evm 2.1.0-beta.22 → 2.1.0-beta.24
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 +403 -476
- package/dist/index.d.cts +1073 -2035
- package/dist/index.d.mts +1073 -2035
- package/dist/index.d.ts +1073 -2035
- package/dist/index.mjs +405 -467
- package/package.json +2 -4
- package/src/block.ts +312 -307
- package/src/common.ts +64 -101
- package/src/filter.ts +128 -138
- package/src/proto/data.ts +26 -1
- package/src/common.test.ts +0 -79
- package/src/filter.test.ts +0 -187
- package/src/helpers.ts +0 -8
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,98 +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
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const dv = new DataView(bytes.buffer);
|
|
31
|
-
const x0 = dv.getBigUint64(0);
|
|
32
|
-
const x1 = dv.getBigUint64(8);
|
|
33
|
-
const x2 = dv.getUint32(16);
|
|
34
|
-
return { 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) };
|
|
22
|
+
},
|
|
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);
|
|
100
|
-
|
|
101
|
-
function tag(tag2) {
|
|
102
|
-
return schema.Schema.Literal(tag2).pipe(
|
|
103
|
-
schema.Schema.propertySignature,
|
|
104
|
-
schema.Schema.fromKey("$case")
|
|
105
|
-
);
|
|
106
|
-
}
|
|
77
|
+
};
|
|
107
78
|
|
|
108
79
|
const protobufPackage$2 = "evm.v2";
|
|
109
80
|
function createBaseAddress() {
|
|
@@ -978,7 +949,8 @@ function createBaseBlockHeader() {
|
|
|
978
949
|
totalDifficulty: void 0,
|
|
979
950
|
blobGasUsed: void 0,
|
|
980
951
|
excessBlobGas: void 0,
|
|
981
|
-
parentBeaconBlockRoot: void 0
|
|
952
|
+
parentBeaconBlockRoot: void 0,
|
|
953
|
+
requestsHash: void 0
|
|
982
954
|
};
|
|
983
955
|
}
|
|
984
956
|
const BlockHeader$1 = {
|
|
@@ -1055,6 +1027,9 @@ const BlockHeader$1 = {
|
|
|
1055
1027
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
1056
1028
|
B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
|
|
1057
1029
|
}
|
|
1030
|
+
if (message.requestsHash !== void 0) {
|
|
1031
|
+
B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
|
|
1032
|
+
}
|
|
1058
1033
|
return writer;
|
|
1059
1034
|
},
|
|
1060
1035
|
decode(input, length) {
|
|
@@ -1196,6 +1171,12 @@ const BlockHeader$1 = {
|
|
|
1196
1171
|
}
|
|
1197
1172
|
message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
|
|
1198
1173
|
continue;
|
|
1174
|
+
case 23:
|
|
1175
|
+
if (tag !== 186) {
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
message.requestsHash = B256.decode(reader, reader.uint32());
|
|
1179
|
+
continue;
|
|
1199
1180
|
}
|
|
1200
1181
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1201
1182
|
break;
|
|
@@ -1227,7 +1208,8 @@ const BlockHeader$1 = {
|
|
|
1227
1208
|
totalDifficulty: isSet$1(object.totalDifficulty) ? U256.fromJSON(object.totalDifficulty) : void 0,
|
|
1228
1209
|
blobGasUsed: isSet$1(object.blobGasUsed) ? U128.fromJSON(object.blobGasUsed) : void 0,
|
|
1229
1210
|
excessBlobGas: isSet$1(object.excessBlobGas) ? U128.fromJSON(object.excessBlobGas) : void 0,
|
|
1230
|
-
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
|
|
1231
1213
|
};
|
|
1232
1214
|
},
|
|
1233
1215
|
toJSON(message) {
|
|
@@ -1298,6 +1280,9 @@ const BlockHeader$1 = {
|
|
|
1298
1280
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
1299
1281
|
obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
|
|
1300
1282
|
}
|
|
1283
|
+
if (message.requestsHash !== void 0) {
|
|
1284
|
+
obj.requestsHash = B256.toJSON(message.requestsHash);
|
|
1285
|
+
}
|
|
1301
1286
|
return obj;
|
|
1302
1287
|
},
|
|
1303
1288
|
create(base) {
|
|
@@ -1327,6 +1312,7 @@ const BlockHeader$1 = {
|
|
|
1327
1312
|
message.blobGasUsed = object.blobGasUsed !== void 0 && object.blobGasUsed !== null ? U128.fromPartial(object.blobGasUsed) : void 0;
|
|
1328
1313
|
message.excessBlobGas = object.excessBlobGas !== void 0 && object.excessBlobGas !== null ? U128.fromPartial(object.excessBlobGas) : void 0;
|
|
1329
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;
|
|
1330
1316
|
return message;
|
|
1331
1317
|
}
|
|
1332
1318
|
};
|
|
@@ -4053,416 +4039,368 @@ const index = {
|
|
|
4053
4039
|
filter: filter
|
|
4054
4040
|
};
|
|
4055
4041
|
|
|
4056
|
-
const Bloom =
|
|
4057
|
-
|
|
4058
|
-
value: protocol.BytesFromUint8Array
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
strict: false,
|
|
4063
|
-
encode(value) {
|
|
4064
|
-
throw new Error("Not implemented");
|
|
4065
|
-
},
|
|
4066
|
-
decode({ value }) {
|
|
4067
|
-
return value;
|
|
4068
|
-
}
|
|
4042
|
+
const Bloom = {
|
|
4043
|
+
encode(x) {
|
|
4044
|
+
return { value: protocol.BytesFromUint8Array.encode(x) };
|
|
4045
|
+
},
|
|
4046
|
+
decode({ value }) {
|
|
4047
|
+
return protocol.BytesFromUint8Array.decode(value);
|
|
4069
4048
|
}
|
|
4070
|
-
|
|
4071
|
-
const TransactionStatus =
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
}
|
|
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";
|
|
4087
4067
|
}
|
|
4088
|
-
|
|
4089
|
-
const BlockHeader =
|
|
4090
|
-
blockNumber:
|
|
4091
|
-
blockHash: B256$1,
|
|
4092
|
-
parentBlockHash: B256$1,
|
|
4093
|
-
unclesHash: B256$1,
|
|
4094
|
-
miner: Address$1,
|
|
4095
|
-
stateRoot: B256$1,
|
|
4096
|
-
transactionsRoot: B256$1,
|
|
4097
|
-
receiptsRoot: B256$1,
|
|
4098
|
-
logsBloom: Bloom,
|
|
4099
|
-
difficulty: U256$1,
|
|
4100
|
-
gasLimit: U128$1,
|
|
4101
|
-
gasUsed: U128$1,
|
|
4102
|
-
timestamp:
|
|
4103
|
-
extraData: protocol.BytesFromUint8Array,
|
|
4104
|
-
mixHash:
|
|
4105
|
-
nonce:
|
|
4106
|
-
baseFeePerGas:
|
|
4107
|
-
withdrawalsRoot:
|
|
4108
|
-
totalDifficulty:
|
|
4109
|
-
blobGasUsed:
|
|
4110
|
-
excessBlobGas:
|
|
4111
|
-
parentBeaconBlockRoot:
|
|
4068
|
+
};
|
|
4069
|
+
const BlockHeader = codec.MessageCodec({
|
|
4070
|
+
blockNumber: codec.RequiredCodec(codec.BigIntCodec),
|
|
4071
|
+
blockHash: codec.RequiredCodec(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)
|
|
4112
4093
|
});
|
|
4113
|
-
const Withdrawal =
|
|
4114
|
-
filterIds:
|
|
4115
|
-
withdrawalIndex:
|
|
4116
|
-
index:
|
|
4117
|
-
validatorIndex:
|
|
4118
|
-
address: Address$1,
|
|
4119
|
-
amount:
|
|
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)
|
|
4120
4101
|
});
|
|
4121
|
-
const AccessListItem =
|
|
4122
|
-
address: Address$1,
|
|
4123
|
-
storageKeys:
|
|
4102
|
+
const AccessListItem = codec.MessageCodec({
|
|
4103
|
+
address: codec.RequiredCodec(Address$1),
|
|
4104
|
+
storageKeys: codec.ArrayCodec(B256$1)
|
|
4124
4105
|
});
|
|
4125
|
-
const Signature =
|
|
4126
|
-
r: U256$1,
|
|
4127
|
-
s: U256$1,
|
|
4128
|
-
v: U256$1,
|
|
4129
|
-
YParity:
|
|
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)
|
|
4130
4111
|
});
|
|
4131
|
-
const Transaction =
|
|
4132
|
-
filterIds:
|
|
4133
|
-
transactionIndex:
|
|
4134
|
-
transactionHash: B256$1,
|
|
4135
|
-
nonce:
|
|
4136
|
-
from: Address$1,
|
|
4137
|
-
to:
|
|
4138
|
-
value: U256$1,
|
|
4139
|
-
gasPrice:
|
|
4140
|
-
gas: U128$1,
|
|
4141
|
-
maxFeePerGas:
|
|
4142
|
-
maxPriorityFeePerGas:
|
|
4143
|
-
input: protocol.BytesFromUint8Array,
|
|
4144
|
-
signature:
|
|
4145
|
-
chainId:
|
|
4146
|
-
accessList:
|
|
4147
|
-
transactionType:
|
|
4148
|
-
maxFeePerBlobGas:
|
|
4149
|
-
blobVersionedHashes:
|
|
4150
|
-
transactionStatus: TransactionStatus
|
|
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)
|
|
4151
4132
|
});
|
|
4152
|
-
const TransactionReceipt =
|
|
4153
|
-
filterIds:
|
|
4154
|
-
transactionIndex:
|
|
4155
|
-
transactionHash: B256$1,
|
|
4156
|
-
cumulativeGasUsed: U128$1,
|
|
4157
|
-
gasUsed: U128$1,
|
|
4158
|
-
effectiveGasPrice: U128$1,
|
|
4159
|
-
from: Address$1,
|
|
4160
|
-
to:
|
|
4161
|
-
contractAddress:
|
|
4162
|
-
logsBloom: Bloom,
|
|
4163
|
-
transactionType:
|
|
4164
|
-
blobGasUsed:
|
|
4165
|
-
blobGasPrice:
|
|
4166
|
-
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)
|
|
4167
4148
|
});
|
|
4168
|
-
const Log =
|
|
4169
|
-
filterIds:
|
|
4170
|
-
address: Address$1,
|
|
4171
|
-
topics:
|
|
4172
|
-
data: protocol.BytesFromUint8Array,
|
|
4173
|
-
logIndex:
|
|
4174
|
-
logIndexInTransaction:
|
|
4175
|
-
transactionIndex:
|
|
4176
|
-
transactionHash: B256$1,
|
|
4177
|
-
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)
|
|
4178
4159
|
});
|
|
4179
|
-
const CallType =
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
},
|
|
4203
|
-
encode(value) {
|
|
4204
|
-
throw new Error("encode: not implemented");
|
|
4205
|
-
}
|
|
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";
|
|
4206
4183
|
}
|
|
4207
|
-
|
|
4208
|
-
const CreationMethod =
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
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";
|
|
4225
4204
|
}
|
|
4226
|
-
|
|
4227
|
-
const CallAction =
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
toAddress: Address$1,
|
|
4235
|
-
value: U256$1
|
|
4236
|
-
})
|
|
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)
|
|
4237
4213
|
});
|
|
4238
|
-
const CreateAction =
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
value: U256$1,
|
|
4245
|
-
creationMethod: CreationMethod
|
|
4246
|
-
})
|
|
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)
|
|
4247
4220
|
});
|
|
4248
|
-
const SelfDestructAction =
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
balance: U256$1,
|
|
4253
|
-
refundAddress: Address$1
|
|
4254
|
-
})
|
|
4221
|
+
const SelfDestructAction = codec.MessageCodec({
|
|
4222
|
+
address: codec.RequiredCodec(Address$1),
|
|
4223
|
+
balance: codec.RequiredCodec(U256$1),
|
|
4224
|
+
refundAddress: codec.RequiredCodec(Address$1)
|
|
4255
4225
|
});
|
|
4256
|
-
const RewardType =
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
}
|
|
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";
|
|
4272
4243
|
}
|
|
4273
|
-
|
|
4274
|
-
const RewardAction =
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
type: RewardType,
|
|
4279
|
-
value: U256$1
|
|
4280
|
-
})
|
|
4244
|
+
};
|
|
4245
|
+
const RewardAction = codec.MessageCodec({
|
|
4246
|
+
author: codec.RequiredCodec(Address$1),
|
|
4247
|
+
type: codec.RequiredCodec(RewardType),
|
|
4248
|
+
value: codec.RequiredCodec(U256$1)
|
|
4281
4249
|
});
|
|
4282
|
-
const CallOutput =
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
gasUsed: schema.Schema.BigIntFromSelf,
|
|
4286
|
-
output: protocol.BytesFromUint8Array
|
|
4287
|
-
})
|
|
4250
|
+
const CallOutput = codec.MessageCodec({
|
|
4251
|
+
gasUsed: codec.RequiredCodec(codec.BigIntCodec),
|
|
4252
|
+
output: codec.RequiredCodec(protocol.BytesFromUint8Array)
|
|
4288
4253
|
});
|
|
4289
|
-
const CreateOutput =
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
code: protocol.BytesFromUint8Array,
|
|
4294
|
-
gasUsed: schema.Schema.BigIntFromSelf
|
|
4295
|
-
})
|
|
4254
|
+
const CreateOutput = codec.MessageCodec({
|
|
4255
|
+
address: codec.RequiredCodec(Address$1),
|
|
4256
|
+
code: codec.RequiredCodec(protocol.BytesFromUint8Array),
|
|
4257
|
+
gasUsed: codec.RequiredCodec(codec.BigIntCodec)
|
|
4296
4258
|
});
|
|
4297
|
-
const Trace =
|
|
4298
|
-
action:
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
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
|
+
})
|
|
4303
4274
|
),
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
subtraces: schema.Schema.Number,
|
|
4307
|
-
traceAddress: schema.Schema.Array(schema.Schema.Number)
|
|
4275
|
+
subtraces: codec.RequiredCodec(codec.NumberCodec),
|
|
4276
|
+
traceAddress: codec.ArrayCodec(codec.NumberCodec)
|
|
4308
4277
|
});
|
|
4309
|
-
const TransactionTrace =
|
|
4310
|
-
filterIds:
|
|
4311
|
-
transactionIndex:
|
|
4312
|
-
transactionHash: B256$1,
|
|
4313
|
-
traces:
|
|
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)
|
|
4314
4283
|
});
|
|
4315
|
-
const Block =
|
|
4316
|
-
header: BlockHeader,
|
|
4317
|
-
withdrawals:
|
|
4318
|
-
transactions:
|
|
4319
|
-
receipts:
|
|
4320
|
-
logs:
|
|
4321
|
-
traces:
|
|
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)
|
|
4322
4291
|
});
|
|
4323
|
-
const BlockFromBytes =
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
}
|
|
4332
|
-
return Block$1.decode(value);
|
|
4333
|
-
},
|
|
4334
|
-
encode(value) {
|
|
4335
|
-
if (value === null) {
|
|
4336
|
-
return new Uint8Array();
|
|
4337
|
-
}
|
|
4338
|
-
return Block$1.encode(value).finish();
|
|
4339
|
-
}
|
|
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);
|
|
4340
4300
|
}
|
|
4341
|
-
|
|
4301
|
+
};
|
|
4342
4302
|
|
|
4343
|
-
const
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
4366
|
-
default:
|
|
4367
|
-
return HeaderFilter$1.UNSPECIFIED;
|
|
4368
|
-
}
|
|
4369
|
-
}
|
|
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;
|
|
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";
|
|
4370
4325
|
}
|
|
4371
|
-
|
|
4372
|
-
const WithdrawalFilter =
|
|
4373
|
-
id:
|
|
4374
|
-
validatorIndex:
|
|
4375
|
-
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)
|
|
4376
4331
|
});
|
|
4377
|
-
const TransactionStatusFilter =
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
return TransactionStatusFilter$1.ALL;
|
|
4399
|
-
default:
|
|
4400
|
-
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
4401
|
-
}
|
|
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;
|
|
4402
4353
|
}
|
|
4403
4354
|
}
|
|
4404
|
-
|
|
4405
|
-
const Topic =
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
decode({ value }) {
|
|
4410
|
-
if (value === void 0) {
|
|
4411
|
-
return null;
|
|
4412
|
-
}
|
|
4413
|
-
return value;
|
|
4414
|
-
},
|
|
4415
|
-
encode(value) {
|
|
4416
|
-
if (value === null) {
|
|
4417
|
-
return { value: void 0 };
|
|
4418
|
-
}
|
|
4419
|
-
return { value };
|
|
4355
|
+
};
|
|
4356
|
+
const Topic = {
|
|
4357
|
+
encode(x) {
|
|
4358
|
+
if (x === null) {
|
|
4359
|
+
return { value: void 0 };
|
|
4420
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);
|
|
4421
4368
|
}
|
|
4422
|
-
|
|
4423
|
-
const LogFilter =
|
|
4424
|
-
id:
|
|
4425
|
-
address:
|
|
4426
|
-
topics:
|
|
4427
|
-
strict:
|
|
4428
|
-
transactionStatus:
|
|
4429
|
-
includeTransaction:
|
|
4430
|
-
includeReceipt:
|
|
4431
|
-
includeTransactionTrace:
|
|
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)
|
|
4432
4379
|
});
|
|
4433
|
-
const TransactionFilter =
|
|
4434
|
-
id:
|
|
4435
|
-
from:
|
|
4436
|
-
to:
|
|
4437
|
-
create:
|
|
4438
|
-
transactionStatus:
|
|
4439
|
-
includeReceipt:
|
|
4440
|
-
includeLogs:
|
|
4441
|
-
includeTransactionTrace:
|
|
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)
|
|
4442
4389
|
});
|
|
4443
|
-
const Filter =
|
|
4444
|
-
header:
|
|
4445
|
-
withdrawals:
|
|
4446
|
-
transactions:
|
|
4447
|
-
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))
|
|
4448
4395
|
});
|
|
4449
|
-
const
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
strict: false,
|
|
4456
|
-
decode(value) {
|
|
4457
|
-
return Filter$1.decode(value);
|
|
4458
|
-
},
|
|
4459
|
-
encode(value) {
|
|
4460
|
-
return Filter$1.encode(value).finish();
|
|
4461
|
-
}
|
|
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));
|
|
4462
4402
|
}
|
|
4463
|
-
|
|
4464
|
-
const filterToBytes = schema.Schema.encodeSync(FilterFromBytes);
|
|
4465
|
-
const filterFromBytes = schema.Schema.decodeSync(FilterFromBytes);
|
|
4403
|
+
};
|
|
4466
4404
|
function mergeFilter(a, b) {
|
|
4467
4405
|
const header = mergeHeaderFilter(a.header, b.header);
|
|
4468
4406
|
return {
|
|
@@ -4497,7 +4435,6 @@ const EvmStream = new protocol.StreamConfig(
|
|
|
4497
4435
|
exports.AccessListItem = AccessListItem;
|
|
4498
4436
|
exports.Address = Address$1;
|
|
4499
4437
|
exports.B256 = B256$1;
|
|
4500
|
-
exports.B256Proto = B256Proto;
|
|
4501
4438
|
exports.Block = Block;
|
|
4502
4439
|
exports.BlockFromBytes = BlockFromBytes;
|
|
4503
4440
|
exports.BlockHeader = BlockHeader;
|
|
@@ -4530,15 +4467,5 @@ exports.U128 = U128$1;
|
|
|
4530
4467
|
exports.U256 = U256$1;
|
|
4531
4468
|
exports.Withdrawal = Withdrawal;
|
|
4532
4469
|
exports.WithdrawalFilter = WithdrawalFilter;
|
|
4533
|
-
exports.b256FromProto = b256FromProto;
|
|
4534
|
-
exports.b256ToProto = b256ToProto;
|
|
4535
|
-
exports.filterFromBytes = filterFromBytes;
|
|
4536
|
-
exports.filterFromProto = filterFromProto;
|
|
4537
|
-
exports.filterToBytes = filterToBytes;
|
|
4538
|
-
exports.filterToProto = filterToProto;
|
|
4539
4470
|
exports.mergeFilter = mergeFilter;
|
|
4540
4471
|
exports.proto = index;
|
|
4541
|
-
exports.u128FromProto = u128FromProto;
|
|
4542
|
-
exports.u128ToProto = u128ToProto;
|
|
4543
|
-
exports.u256FromProto = u256FromProto;
|
|
4544
|
-
exports.u256ToProto = u256ToProto;
|