@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.mjs
CHANGED
|
@@ -1,102 +1,73 @@
|
|
|
1
|
-
import { BytesFromUint8Array,
|
|
2
|
-
import {
|
|
3
|
-
import { hexToBytes, pad } from 'viem';
|
|
1
|
+
import { BytesFromUint8Array, StreamConfig } from '@apibara/protocol';
|
|
2
|
+
import { MessageCodec, RequiredCodec, BigIntCodec, DateCodec, OptionalCodec, ArrayCodec, NumberCodec, BooleanCodec, OneOfCodec, StringCodec } from '@apibara/protocol/codec';
|
|
4
3
|
import Long from 'long';
|
|
5
4
|
import _m0 from 'protobufjs/minimal.js';
|
|
6
5
|
|
|
7
6
|
const MAX_U64 = 0xffffffffffffffffn;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const dv = new DataView(bytes.buffer);
|
|
24
|
-
const x0 = dv.getBigUint64(0);
|
|
25
|
-
const x1 = dv.getBigUint64(8);
|
|
26
|
-
const x2 = dv.getUint32(16);
|
|
27
|
-
return { x0, x1, x2 };
|
|
7
|
+
const MAX_U32 = 0xffffffffn;
|
|
8
|
+
const Address$1 = {
|
|
9
|
+
encode(x) {
|
|
10
|
+
const bn = BigInt(x);
|
|
11
|
+
const x2 = bn & MAX_U32;
|
|
12
|
+
const x1 = bn >> 32n & MAX_U64;
|
|
13
|
+
const x0 = bn >> 96n & MAX_U64;
|
|
14
|
+
return { x0, x1, x2: Number(x2) };
|
|
15
|
+
},
|
|
16
|
+
decode(p) {
|
|
17
|
+
const x0 = p.x0 ?? 0n;
|
|
18
|
+
const x1 = p.x1 ?? 0n;
|
|
19
|
+
const x2 = BigInt(p.x2 ?? 0);
|
|
20
|
+
const bn = x2 + (x1 << 32n) + (x0 << 96n);
|
|
21
|
+
return `0x${bn.toString(16).padStart(40, "0")}`;
|
|
28
22
|
}
|
|
29
|
-
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const B256$1 = Schema.transform(B256Proto, _B256, {
|
|
38
|
-
decode(value) {
|
|
39
|
-
const x0 = value.x0.toString(16).padStart(16, "0");
|
|
40
|
-
const x1 = value.x1.toString(16).padStart(16, "0");
|
|
41
|
-
const x2 = value.x2.toString(16).padStart(16, "0");
|
|
42
|
-
const x3 = value.x3.toString(16).padStart(16, "0");
|
|
43
|
-
return `0x${x0}${x1}${x2}${x3}`;
|
|
44
|
-
},
|
|
45
|
-
encode(value) {
|
|
46
|
-
const bytes = hexToBytes(pad(value, { size: 32, dir: "left" }));
|
|
47
|
-
const dv = new DataView(bytes.buffer);
|
|
48
|
-
const x0 = dv.getBigUint64(0);
|
|
49
|
-
const x1 = dv.getBigUint64(8);
|
|
50
|
-
const x2 = dv.getBigUint64(16);
|
|
51
|
-
const x3 = dv.getBigUint64(24);
|
|
23
|
+
};
|
|
24
|
+
const B256$1 = {
|
|
25
|
+
encode(x) {
|
|
26
|
+
const bn = BigInt(x);
|
|
27
|
+
const x3 = bn & MAX_U64;
|
|
28
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
29
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
30
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
52
31
|
return { x0, x1, x2, x3 };
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
const b256ToProto = Schema.encodeSync(B256$1);
|
|
56
|
-
const b256FromProto = Schema.decodeSync(B256$1);
|
|
57
|
-
const U256Proto = Schema.Struct({
|
|
58
|
-
x0: Schema.BigIntFromSelf,
|
|
59
|
-
x1: Schema.BigIntFromSelf,
|
|
60
|
-
x2: Schema.BigIntFromSelf,
|
|
61
|
-
x3: Schema.BigIntFromSelf
|
|
62
|
-
});
|
|
63
|
-
const U256$1 = Schema.transform(U256Proto, Schema.BigIntFromSelf, {
|
|
64
|
-
decode(value) {
|
|
65
|
-
return (value.x0 << 8n * 24n) + (value.x1 << 8n * 16n) + (value.x2 << 8n * 8n) + value.x3;
|
|
66
32
|
},
|
|
67
|
-
|
|
68
|
-
const x0 =
|
|
69
|
-
const x1 =
|
|
70
|
-
const x2 =
|
|
71
|
-
const x3 =
|
|
72
|
-
|
|
33
|
+
decode(p) {
|
|
34
|
+
const x0 = p.x0 ?? 0n;
|
|
35
|
+
const x1 = p.x1 ?? 0n;
|
|
36
|
+
const x2 = p.x2 ?? 0n;
|
|
37
|
+
const x3 = p.x3 ?? 0n;
|
|
38
|
+
const bn = x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
39
|
+
return `0x${bn.toString(16).padStart(64, "0")}`;
|
|
73
40
|
}
|
|
74
|
-
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
return (value.x0 << 8n * 8n) + value.x1;
|
|
41
|
+
};
|
|
42
|
+
const U256$1 = {
|
|
43
|
+
encode(x) {
|
|
44
|
+
const bn = BigInt(x);
|
|
45
|
+
const x3 = bn & MAX_U64;
|
|
46
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
47
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
48
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
49
|
+
return { x0, x1, x2, x3 };
|
|
84
50
|
},
|
|
85
|
-
|
|
86
|
-
const x0 =
|
|
87
|
-
const x1 =
|
|
51
|
+
decode(p) {
|
|
52
|
+
const x0 = p.x0 ?? 0n;
|
|
53
|
+
const x1 = p.x1 ?? 0n;
|
|
54
|
+
const x2 = p.x2 ?? 0n;
|
|
55
|
+
const x3 = p.x3 ?? 0n;
|
|
56
|
+
return x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const U128$1 = {
|
|
60
|
+
encode(x) {
|
|
61
|
+
const x1 = x & MAX_U64;
|
|
62
|
+
const x0 = x >> 64n & MAX_U64;
|
|
88
63
|
return { x0, x1 };
|
|
64
|
+
},
|
|
65
|
+
decode(p) {
|
|
66
|
+
const x0 = p.x0 ?? 0n;
|
|
67
|
+
const x1 = p.x1 ?? 0n;
|
|
68
|
+
return x1 + (x0 << 64n);
|
|
89
69
|
}
|
|
90
|
-
}
|
|
91
|
-
const u128ToProto = Schema.encodeSync(U128$1);
|
|
92
|
-
const u128FromProto = Schema.decodeSync(U128$1);
|
|
93
|
-
|
|
94
|
-
function tag(tag2) {
|
|
95
|
-
return Schema.Literal(tag2).pipe(
|
|
96
|
-
Schema.propertySignature,
|
|
97
|
-
Schema.fromKey("$case")
|
|
98
|
-
);
|
|
99
|
-
}
|
|
70
|
+
};
|
|
100
71
|
|
|
101
72
|
const protobufPackage$2 = "evm.v2";
|
|
102
73
|
function createBaseAddress() {
|
|
@@ -971,7 +942,8 @@ function createBaseBlockHeader() {
|
|
|
971
942
|
totalDifficulty: void 0,
|
|
972
943
|
blobGasUsed: void 0,
|
|
973
944
|
excessBlobGas: void 0,
|
|
974
|
-
parentBeaconBlockRoot: void 0
|
|
945
|
+
parentBeaconBlockRoot: void 0,
|
|
946
|
+
requestsHash: void 0
|
|
975
947
|
};
|
|
976
948
|
}
|
|
977
949
|
const BlockHeader$1 = {
|
|
@@ -1048,6 +1020,9 @@ const BlockHeader$1 = {
|
|
|
1048
1020
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
1049
1021
|
B256.encode(message.parentBeaconBlockRoot, writer.uint32(178).fork()).ldelim();
|
|
1050
1022
|
}
|
|
1023
|
+
if (message.requestsHash !== void 0) {
|
|
1024
|
+
B256.encode(message.requestsHash, writer.uint32(186).fork()).ldelim();
|
|
1025
|
+
}
|
|
1051
1026
|
return writer;
|
|
1052
1027
|
},
|
|
1053
1028
|
decode(input, length) {
|
|
@@ -1189,6 +1164,12 @@ const BlockHeader$1 = {
|
|
|
1189
1164
|
}
|
|
1190
1165
|
message.parentBeaconBlockRoot = B256.decode(reader, reader.uint32());
|
|
1191
1166
|
continue;
|
|
1167
|
+
case 23:
|
|
1168
|
+
if (tag !== 186) {
|
|
1169
|
+
break;
|
|
1170
|
+
}
|
|
1171
|
+
message.requestsHash = B256.decode(reader, reader.uint32());
|
|
1172
|
+
continue;
|
|
1192
1173
|
}
|
|
1193
1174
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1194
1175
|
break;
|
|
@@ -1220,7 +1201,8 @@ const BlockHeader$1 = {
|
|
|
1220
1201
|
totalDifficulty: isSet$1(object.totalDifficulty) ? U256.fromJSON(object.totalDifficulty) : void 0,
|
|
1221
1202
|
blobGasUsed: isSet$1(object.blobGasUsed) ? U128.fromJSON(object.blobGasUsed) : void 0,
|
|
1222
1203
|
excessBlobGas: isSet$1(object.excessBlobGas) ? U128.fromJSON(object.excessBlobGas) : void 0,
|
|
1223
|
-
parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0
|
|
1204
|
+
parentBeaconBlockRoot: isSet$1(object.parentBeaconBlockRoot) ? B256.fromJSON(object.parentBeaconBlockRoot) : void 0,
|
|
1205
|
+
requestsHash: isSet$1(object.requestsHash) ? B256.fromJSON(object.requestsHash) : void 0
|
|
1224
1206
|
};
|
|
1225
1207
|
},
|
|
1226
1208
|
toJSON(message) {
|
|
@@ -1291,6 +1273,9 @@ const BlockHeader$1 = {
|
|
|
1291
1273
|
if (message.parentBeaconBlockRoot !== void 0) {
|
|
1292
1274
|
obj.parentBeaconBlockRoot = B256.toJSON(message.parentBeaconBlockRoot);
|
|
1293
1275
|
}
|
|
1276
|
+
if (message.requestsHash !== void 0) {
|
|
1277
|
+
obj.requestsHash = B256.toJSON(message.requestsHash);
|
|
1278
|
+
}
|
|
1294
1279
|
return obj;
|
|
1295
1280
|
},
|
|
1296
1281
|
create(base) {
|
|
@@ -1320,6 +1305,7 @@ const BlockHeader$1 = {
|
|
|
1320
1305
|
message.blobGasUsed = object.blobGasUsed !== void 0 && object.blobGasUsed !== null ? U128.fromPartial(object.blobGasUsed) : void 0;
|
|
1321
1306
|
message.excessBlobGas = object.excessBlobGas !== void 0 && object.excessBlobGas !== null ? U128.fromPartial(object.excessBlobGas) : void 0;
|
|
1322
1307
|
message.parentBeaconBlockRoot = object.parentBeaconBlockRoot !== void 0 && object.parentBeaconBlockRoot !== null ? B256.fromPartial(object.parentBeaconBlockRoot) : void 0;
|
|
1308
|
+
message.requestsHash = object.requestsHash !== void 0 && object.requestsHash !== null ? B256.fromPartial(object.requestsHash) : void 0;
|
|
1323
1309
|
return message;
|
|
1324
1310
|
}
|
|
1325
1311
|
};
|
|
@@ -4046,416 +4032,368 @@ const index = {
|
|
|
4046
4032
|
filter: filter
|
|
4047
4033
|
};
|
|
4048
4034
|
|
|
4049
|
-
const Bloom =
|
|
4050
|
-
|
|
4051
|
-
value: BytesFromUint8Array
|
|
4052
|
-
}
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
strict: false,
|
|
4056
|
-
encode(value) {
|
|
4057
|
-
throw new Error("Not implemented");
|
|
4058
|
-
},
|
|
4059
|
-
decode({ value }) {
|
|
4060
|
-
return value;
|
|
4061
|
-
}
|
|
4035
|
+
const Bloom = {
|
|
4036
|
+
encode(x) {
|
|
4037
|
+
return { value: BytesFromUint8Array.encode(x) };
|
|
4038
|
+
},
|
|
4039
|
+
decode({ value }) {
|
|
4040
|
+
return BytesFromUint8Array.decode(value);
|
|
4062
4041
|
}
|
|
4063
|
-
|
|
4064
|
-
const TransactionStatus =
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
}
|
|
4042
|
+
};
|
|
4043
|
+
const TransactionStatus = {
|
|
4044
|
+
encode(x) {
|
|
4045
|
+
const enumMap = {
|
|
4046
|
+
unknown: TransactionStatus$1.UNSPECIFIED,
|
|
4047
|
+
succeeded: TransactionStatus$1.SUCCEEDED,
|
|
4048
|
+
reverted: TransactionStatus$1.REVERTED
|
|
4049
|
+
};
|
|
4050
|
+
return enumMap[x] ?? TransactionStatus$1.UNSPECIFIED;
|
|
4051
|
+
},
|
|
4052
|
+
decode(p) {
|
|
4053
|
+
const enumMap = {
|
|
4054
|
+
[TransactionStatus$1.SUCCEEDED]: "succeeded",
|
|
4055
|
+
[TransactionStatus$1.REVERTED]: "reverted",
|
|
4056
|
+
[TransactionStatus$1.UNSPECIFIED]: "unknown",
|
|
4057
|
+
[TransactionStatus$1.UNRECOGNIZED]: "unknown"
|
|
4058
|
+
};
|
|
4059
|
+
return enumMap[p] ?? "unknown";
|
|
4080
4060
|
}
|
|
4081
|
-
|
|
4082
|
-
const BlockHeader =
|
|
4083
|
-
blockNumber:
|
|
4084
|
-
blockHash: B256$1,
|
|
4085
|
-
parentBlockHash: B256$1,
|
|
4086
|
-
unclesHash: B256$1,
|
|
4087
|
-
miner: Address$1,
|
|
4088
|
-
stateRoot: B256$1,
|
|
4089
|
-
transactionsRoot: B256$1,
|
|
4090
|
-
receiptsRoot: B256$1,
|
|
4091
|
-
logsBloom: Bloom,
|
|
4092
|
-
difficulty: U256$1,
|
|
4093
|
-
gasLimit: U128$1,
|
|
4094
|
-
gasUsed: U128$1,
|
|
4095
|
-
timestamp:
|
|
4096
|
-
extraData: BytesFromUint8Array,
|
|
4097
|
-
mixHash:
|
|
4098
|
-
nonce:
|
|
4099
|
-
baseFeePerGas:
|
|
4100
|
-
withdrawalsRoot:
|
|
4101
|
-
totalDifficulty:
|
|
4102
|
-
blobGasUsed:
|
|
4103
|
-
excessBlobGas:
|
|
4104
|
-
parentBeaconBlockRoot:
|
|
4061
|
+
};
|
|
4062
|
+
const BlockHeader = MessageCodec({
|
|
4063
|
+
blockNumber: RequiredCodec(BigIntCodec),
|
|
4064
|
+
blockHash: RequiredCodec(B256$1),
|
|
4065
|
+
parentBlockHash: RequiredCodec(B256$1),
|
|
4066
|
+
unclesHash: RequiredCodec(B256$1),
|
|
4067
|
+
miner: RequiredCodec(Address$1),
|
|
4068
|
+
stateRoot: RequiredCodec(B256$1),
|
|
4069
|
+
transactionsRoot: RequiredCodec(B256$1),
|
|
4070
|
+
receiptsRoot: RequiredCodec(B256$1),
|
|
4071
|
+
logsBloom: RequiredCodec(Bloom),
|
|
4072
|
+
difficulty: RequiredCodec(U256$1),
|
|
4073
|
+
gasLimit: RequiredCodec(U128$1),
|
|
4074
|
+
gasUsed: RequiredCodec(U128$1),
|
|
4075
|
+
timestamp: RequiredCodec(DateCodec),
|
|
4076
|
+
extraData: RequiredCodec(BytesFromUint8Array),
|
|
4077
|
+
mixHash: OptionalCodec(B256$1),
|
|
4078
|
+
nonce: OptionalCodec(BigIntCodec),
|
|
4079
|
+
baseFeePerGas: OptionalCodec(U128$1),
|
|
4080
|
+
withdrawalsRoot: OptionalCodec(B256$1),
|
|
4081
|
+
totalDifficulty: OptionalCodec(U256$1),
|
|
4082
|
+
blobGasUsed: OptionalCodec(U128$1),
|
|
4083
|
+
excessBlobGas: OptionalCodec(U128$1),
|
|
4084
|
+
parentBeaconBlockRoot: OptionalCodec(B256$1),
|
|
4085
|
+
requestsHash: OptionalCodec(B256$1)
|
|
4105
4086
|
});
|
|
4106
|
-
const Withdrawal =
|
|
4107
|
-
filterIds:
|
|
4108
|
-
withdrawalIndex:
|
|
4109
|
-
index:
|
|
4110
|
-
validatorIndex:
|
|
4111
|
-
address: Address$1,
|
|
4112
|
-
amount:
|
|
4087
|
+
const Withdrawal = MessageCodec({
|
|
4088
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
4089
|
+
withdrawalIndex: RequiredCodec(NumberCodec),
|
|
4090
|
+
index: RequiredCodec(BigIntCodec),
|
|
4091
|
+
validatorIndex: RequiredCodec(NumberCodec),
|
|
4092
|
+
address: RequiredCodec(Address$1),
|
|
4093
|
+
amount: RequiredCodec(BigIntCodec)
|
|
4113
4094
|
});
|
|
4114
|
-
const AccessListItem =
|
|
4115
|
-
address: Address$1,
|
|
4116
|
-
storageKeys:
|
|
4095
|
+
const AccessListItem = MessageCodec({
|
|
4096
|
+
address: RequiredCodec(Address$1),
|
|
4097
|
+
storageKeys: ArrayCodec(B256$1)
|
|
4117
4098
|
});
|
|
4118
|
-
const Signature =
|
|
4119
|
-
r: U256$1,
|
|
4120
|
-
s: U256$1,
|
|
4121
|
-
v: U256$1,
|
|
4122
|
-
YParity:
|
|
4099
|
+
const Signature = MessageCodec({
|
|
4100
|
+
r: RequiredCodec(U256$1),
|
|
4101
|
+
s: RequiredCodec(U256$1),
|
|
4102
|
+
v: OptionalCodec(U256$1),
|
|
4103
|
+
YParity: OptionalCodec(BooleanCodec)
|
|
4123
4104
|
});
|
|
4124
|
-
const Transaction =
|
|
4125
|
-
filterIds:
|
|
4126
|
-
transactionIndex:
|
|
4127
|
-
transactionHash: B256$1,
|
|
4128
|
-
nonce:
|
|
4129
|
-
from: Address$1,
|
|
4130
|
-
to:
|
|
4131
|
-
value: U256$1,
|
|
4132
|
-
gasPrice:
|
|
4133
|
-
gas: U128$1,
|
|
4134
|
-
maxFeePerGas:
|
|
4135
|
-
maxPriorityFeePerGas:
|
|
4136
|
-
input: BytesFromUint8Array,
|
|
4137
|
-
signature:
|
|
4138
|
-
chainId:
|
|
4139
|
-
accessList:
|
|
4140
|
-
transactionType:
|
|
4141
|
-
maxFeePerBlobGas:
|
|
4142
|
-
blobVersionedHashes:
|
|
4143
|
-
transactionStatus: TransactionStatus
|
|
4105
|
+
const Transaction = MessageCodec({
|
|
4106
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
4107
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
4108
|
+
transactionHash: RequiredCodec(B256$1),
|
|
4109
|
+
nonce: RequiredCodec(BigIntCodec),
|
|
4110
|
+
from: RequiredCodec(Address$1),
|
|
4111
|
+
to: OptionalCodec(Address$1),
|
|
4112
|
+
value: RequiredCodec(U256$1),
|
|
4113
|
+
gasPrice: OptionalCodec(U128$1),
|
|
4114
|
+
gas: RequiredCodec(U128$1),
|
|
4115
|
+
maxFeePerGas: OptionalCodec(U128$1),
|
|
4116
|
+
maxPriorityFeePerGas: OptionalCodec(U128$1),
|
|
4117
|
+
input: RequiredCodec(BytesFromUint8Array),
|
|
4118
|
+
signature: OptionalCodec(Signature),
|
|
4119
|
+
chainId: OptionalCodec(BigIntCodec),
|
|
4120
|
+
accessList: ArrayCodec(AccessListItem),
|
|
4121
|
+
transactionType: RequiredCodec(BigIntCodec),
|
|
4122
|
+
maxFeePerBlobGas: OptionalCodec(U128$1),
|
|
4123
|
+
blobVersionedHashes: ArrayCodec(B256$1),
|
|
4124
|
+
transactionStatus: RequiredCodec(TransactionStatus)
|
|
4144
4125
|
});
|
|
4145
|
-
const TransactionReceipt =
|
|
4146
|
-
filterIds:
|
|
4147
|
-
transactionIndex:
|
|
4148
|
-
transactionHash: B256$1,
|
|
4149
|
-
cumulativeGasUsed: U128$1,
|
|
4150
|
-
gasUsed: U128$1,
|
|
4151
|
-
effectiveGasPrice: U128$1,
|
|
4152
|
-
from: Address$1,
|
|
4153
|
-
to:
|
|
4154
|
-
contractAddress:
|
|
4155
|
-
logsBloom: Bloom,
|
|
4156
|
-
transactionType:
|
|
4157
|
-
blobGasUsed:
|
|
4158
|
-
blobGasPrice:
|
|
4159
|
-
transactionStatus: TransactionStatus
|
|
4126
|
+
const TransactionReceipt = MessageCodec({
|
|
4127
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
4128
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
4129
|
+
transactionHash: RequiredCodec(B256$1),
|
|
4130
|
+
cumulativeGasUsed: RequiredCodec(U128$1),
|
|
4131
|
+
gasUsed: RequiredCodec(U128$1),
|
|
4132
|
+
effectiveGasPrice: RequiredCodec(U128$1),
|
|
4133
|
+
from: RequiredCodec(Address$1),
|
|
4134
|
+
to: OptionalCodec(Address$1),
|
|
4135
|
+
contractAddress: OptionalCodec(Address$1),
|
|
4136
|
+
logsBloom: RequiredCodec(Bloom),
|
|
4137
|
+
transactionType: RequiredCodec(BigIntCodec),
|
|
4138
|
+
blobGasUsed: OptionalCodec(U128$1),
|
|
4139
|
+
blobGasPrice: OptionalCodec(U128$1),
|
|
4140
|
+
transactionStatus: RequiredCodec(TransactionStatus)
|
|
4160
4141
|
});
|
|
4161
|
-
const Log =
|
|
4162
|
-
filterIds:
|
|
4163
|
-
address: Address$1,
|
|
4164
|
-
topics:
|
|
4165
|
-
data: BytesFromUint8Array,
|
|
4166
|
-
logIndex:
|
|
4167
|
-
logIndexInTransaction:
|
|
4168
|
-
transactionIndex:
|
|
4169
|
-
transactionHash: B256$1,
|
|
4170
|
-
transactionStatus: TransactionStatus
|
|
4142
|
+
const Log = MessageCodec({
|
|
4143
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
4144
|
+
address: RequiredCodec(Address$1),
|
|
4145
|
+
topics: ArrayCodec(B256$1),
|
|
4146
|
+
data: RequiredCodec(BytesFromUint8Array),
|
|
4147
|
+
logIndex: RequiredCodec(NumberCodec),
|
|
4148
|
+
logIndexInTransaction: RequiredCodec(NumberCodec),
|
|
4149
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
4150
|
+
transactionHash: RequiredCodec(B256$1),
|
|
4151
|
+
transactionStatus: RequiredCodec(TransactionStatus)
|
|
4171
4152
|
});
|
|
4172
|
-
const CallType =
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
},
|
|
4196
|
-
encode(value) {
|
|
4197
|
-
throw new Error("encode: not implemented");
|
|
4198
|
-
}
|
|
4153
|
+
const CallType = {
|
|
4154
|
+
encode(x) {
|
|
4155
|
+
const enumMap = {
|
|
4156
|
+
unknown: CallType$1.UNSPECIFIED,
|
|
4157
|
+
call: CallType$1.CALL,
|
|
4158
|
+
callCode: CallType$1.CALL_CODE,
|
|
4159
|
+
delegateCall: CallType$1.DELEGATE_CALL,
|
|
4160
|
+
staticCall: CallType$1.STATIC_CALL,
|
|
4161
|
+
authCall: CallType$1.AUTH_CALL
|
|
4162
|
+
};
|
|
4163
|
+
return enumMap[x] ?? CallType$1.UNSPECIFIED;
|
|
4164
|
+
},
|
|
4165
|
+
decode(p) {
|
|
4166
|
+
const enumMap = {
|
|
4167
|
+
[CallType$1.CALL]: "call",
|
|
4168
|
+
[CallType$1.CALL_CODE]: "callCode",
|
|
4169
|
+
[CallType$1.DELEGATE_CALL]: "delegateCall",
|
|
4170
|
+
[CallType$1.STATIC_CALL]: "staticCall",
|
|
4171
|
+
[CallType$1.AUTH_CALL]: "authCall",
|
|
4172
|
+
[CallType$1.UNSPECIFIED]: "unknown",
|
|
4173
|
+
[CallType$1.UNRECOGNIZED]: "unknown"
|
|
4174
|
+
};
|
|
4175
|
+
return enumMap[p] ?? "unknown";
|
|
4199
4176
|
}
|
|
4200
|
-
|
|
4201
|
-
const CreationMethod =
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4177
|
+
};
|
|
4178
|
+
const CreationMethod = {
|
|
4179
|
+
encode(x) {
|
|
4180
|
+
const enumMap = {
|
|
4181
|
+
unknown: CreationMethod$1.UNSPECIFIED,
|
|
4182
|
+
create: CreationMethod$1.CREATE,
|
|
4183
|
+
create2: CreationMethod$1.CREATE2,
|
|
4184
|
+
eofCreate: CreationMethod$1.EOF_CREATE
|
|
4185
|
+
};
|
|
4186
|
+
return enumMap[x] ?? CreationMethod$1.UNSPECIFIED;
|
|
4187
|
+
},
|
|
4188
|
+
decode(p) {
|
|
4189
|
+
const enumMap = {
|
|
4190
|
+
[CreationMethod$1.CREATE]: "create",
|
|
4191
|
+
[CreationMethod$1.CREATE2]: "create2",
|
|
4192
|
+
[CreationMethod$1.EOF_CREATE]: "eofCreate",
|
|
4193
|
+
[CreationMethod$1.UNSPECIFIED]: "unknown",
|
|
4194
|
+
[CreationMethod$1.UNRECOGNIZED]: "unknown"
|
|
4195
|
+
};
|
|
4196
|
+
return enumMap[p] ?? "unknown";
|
|
4218
4197
|
}
|
|
4219
|
-
|
|
4220
|
-
const CallAction =
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
toAddress: Address$1,
|
|
4228
|
-
value: U256$1
|
|
4229
|
-
})
|
|
4198
|
+
};
|
|
4199
|
+
const CallAction = MessageCodec({
|
|
4200
|
+
fromAddress: RequiredCodec(Address$1),
|
|
4201
|
+
type: RequiredCodec(CallType),
|
|
4202
|
+
gas: RequiredCodec(BigIntCodec),
|
|
4203
|
+
input: RequiredCodec(BytesFromUint8Array),
|
|
4204
|
+
toAddress: RequiredCodec(Address$1),
|
|
4205
|
+
value: RequiredCodec(U256$1)
|
|
4230
4206
|
});
|
|
4231
|
-
const CreateAction =
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
value: U256$1,
|
|
4238
|
-
creationMethod: CreationMethod
|
|
4239
|
-
})
|
|
4207
|
+
const CreateAction = MessageCodec({
|
|
4208
|
+
fromAddress: RequiredCodec(Address$1),
|
|
4209
|
+
gas: RequiredCodec(BigIntCodec),
|
|
4210
|
+
init: RequiredCodec(BytesFromUint8Array),
|
|
4211
|
+
value: RequiredCodec(U256$1),
|
|
4212
|
+
creationMethod: RequiredCodec(CreationMethod)
|
|
4240
4213
|
});
|
|
4241
|
-
const SelfDestructAction =
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
balance: U256$1,
|
|
4246
|
-
refundAddress: Address$1
|
|
4247
|
-
})
|
|
4214
|
+
const SelfDestructAction = MessageCodec({
|
|
4215
|
+
address: RequiredCodec(Address$1),
|
|
4216
|
+
balance: RequiredCodec(U256$1),
|
|
4217
|
+
refundAddress: RequiredCodec(Address$1)
|
|
4248
4218
|
});
|
|
4249
|
-
const RewardType =
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
}
|
|
4219
|
+
const RewardType = {
|
|
4220
|
+
encode(x) {
|
|
4221
|
+
const enumMap = {
|
|
4222
|
+
unknown: RewardType$1.UNSPECIFIED,
|
|
4223
|
+
block: RewardType$1.BLOCK,
|
|
4224
|
+
uncle: RewardType$1.UNCLE
|
|
4225
|
+
};
|
|
4226
|
+
return enumMap[x] ?? RewardType$1.UNSPECIFIED;
|
|
4227
|
+
},
|
|
4228
|
+
decode(p) {
|
|
4229
|
+
const enumMap = {
|
|
4230
|
+
[RewardType$1.BLOCK]: "block",
|
|
4231
|
+
[RewardType$1.UNCLE]: "uncle",
|
|
4232
|
+
[RewardType$1.UNSPECIFIED]: "unknown",
|
|
4233
|
+
[RewardType$1.UNRECOGNIZED]: "unknown"
|
|
4234
|
+
};
|
|
4235
|
+
return enumMap[p] ?? "unknown";
|
|
4265
4236
|
}
|
|
4266
|
-
|
|
4267
|
-
const RewardAction =
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
type: RewardType,
|
|
4272
|
-
value: U256$1
|
|
4273
|
-
})
|
|
4237
|
+
};
|
|
4238
|
+
const RewardAction = MessageCodec({
|
|
4239
|
+
author: RequiredCodec(Address$1),
|
|
4240
|
+
type: RequiredCodec(RewardType),
|
|
4241
|
+
value: RequiredCodec(U256$1)
|
|
4274
4242
|
});
|
|
4275
|
-
const CallOutput =
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
gasUsed: Schema.BigIntFromSelf,
|
|
4279
|
-
output: BytesFromUint8Array
|
|
4280
|
-
})
|
|
4243
|
+
const CallOutput = MessageCodec({
|
|
4244
|
+
gasUsed: RequiredCodec(BigIntCodec),
|
|
4245
|
+
output: RequiredCodec(BytesFromUint8Array)
|
|
4281
4246
|
});
|
|
4282
|
-
const CreateOutput =
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
code: BytesFromUint8Array,
|
|
4287
|
-
gasUsed: Schema.BigIntFromSelf
|
|
4288
|
-
})
|
|
4247
|
+
const CreateOutput = MessageCodec({
|
|
4248
|
+
address: RequiredCodec(Address$1),
|
|
4249
|
+
code: RequiredCodec(BytesFromUint8Array),
|
|
4250
|
+
gasUsed: RequiredCodec(BigIntCodec)
|
|
4289
4251
|
});
|
|
4290
|
-
const Trace =
|
|
4291
|
-
action:
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4252
|
+
const Trace = MessageCodec({
|
|
4253
|
+
action: RequiredCodec(
|
|
4254
|
+
OneOfCodec({
|
|
4255
|
+
call: CallAction,
|
|
4256
|
+
create: CreateAction,
|
|
4257
|
+
selfDestruct: SelfDestructAction,
|
|
4258
|
+
reward: RewardAction
|
|
4259
|
+
})
|
|
4260
|
+
),
|
|
4261
|
+
error: OptionalCodec(StringCodec),
|
|
4262
|
+
output: OptionalCodec(
|
|
4263
|
+
OneOfCodec({
|
|
4264
|
+
callOutput: CallOutput,
|
|
4265
|
+
createOutput: CreateOutput
|
|
4266
|
+
})
|
|
4296
4267
|
),
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
subtraces: Schema.Number,
|
|
4300
|
-
traceAddress: Schema.Array(Schema.Number)
|
|
4268
|
+
subtraces: RequiredCodec(NumberCodec),
|
|
4269
|
+
traceAddress: ArrayCodec(NumberCodec)
|
|
4301
4270
|
});
|
|
4302
|
-
const TransactionTrace =
|
|
4303
|
-
filterIds:
|
|
4304
|
-
transactionIndex:
|
|
4305
|
-
transactionHash: B256$1,
|
|
4306
|
-
traces:
|
|
4271
|
+
const TransactionTrace = MessageCodec({
|
|
4272
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
4273
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
4274
|
+
transactionHash: RequiredCodec(B256$1),
|
|
4275
|
+
traces: ArrayCodec(Trace)
|
|
4307
4276
|
});
|
|
4308
|
-
const Block =
|
|
4309
|
-
header: BlockHeader,
|
|
4310
|
-
withdrawals:
|
|
4311
|
-
transactions:
|
|
4312
|
-
receipts:
|
|
4313
|
-
logs:
|
|
4314
|
-
traces:
|
|
4277
|
+
const Block = MessageCodec({
|
|
4278
|
+
header: RequiredCodec(BlockHeader),
|
|
4279
|
+
withdrawals: ArrayCodec(Withdrawal),
|
|
4280
|
+
transactions: ArrayCodec(Transaction),
|
|
4281
|
+
receipts: ArrayCodec(TransactionReceipt),
|
|
4282
|
+
logs: ArrayCodec(Log),
|
|
4283
|
+
traces: ArrayCodec(TransactionTrace)
|
|
4315
4284
|
});
|
|
4316
|
-
const BlockFromBytes =
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
}
|
|
4325
|
-
return Block$1.decode(value);
|
|
4326
|
-
},
|
|
4327
|
-
encode(value) {
|
|
4328
|
-
if (value === null) {
|
|
4329
|
-
return new Uint8Array();
|
|
4330
|
-
}
|
|
4331
|
-
return Block$1.encode(value).finish();
|
|
4332
|
-
}
|
|
4285
|
+
const BlockFromBytes = {
|
|
4286
|
+
encode(x) {
|
|
4287
|
+
const block = Block.encode(x);
|
|
4288
|
+
return Block$1.encode(block).finish();
|
|
4289
|
+
},
|
|
4290
|
+
decode(p) {
|
|
4291
|
+
const block = Block$1.decode(p);
|
|
4292
|
+
return Block.decode(block);
|
|
4333
4293
|
}
|
|
4334
|
-
|
|
4294
|
+
};
|
|
4335
4295
|
|
|
4336
|
-
const
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
4359
|
-
default:
|
|
4360
|
-
return HeaderFilter$1.UNSPECIFIED;
|
|
4361
|
-
}
|
|
4362
|
-
}
|
|
4296
|
+
const HeaderFilter = {
|
|
4297
|
+
encode(x) {
|
|
4298
|
+
switch (x) {
|
|
4299
|
+
case "always":
|
|
4300
|
+
return HeaderFilter$1.ALWAYS;
|
|
4301
|
+
case "on_data":
|
|
4302
|
+
return HeaderFilter$1.ON_DATA;
|
|
4303
|
+
case "on_data_or_on_new_block":
|
|
4304
|
+
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
4305
|
+
default:
|
|
4306
|
+
return HeaderFilter$1.UNSPECIFIED;
|
|
4307
|
+
}
|
|
4308
|
+
},
|
|
4309
|
+
decode(p) {
|
|
4310
|
+
const enumMap = {
|
|
4311
|
+
[HeaderFilter$1.ALWAYS]: "always",
|
|
4312
|
+
[HeaderFilter$1.ON_DATA]: "on_data",
|
|
4313
|
+
[HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
|
|
4314
|
+
[HeaderFilter$1.UNSPECIFIED]: "unknown",
|
|
4315
|
+
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
4316
|
+
};
|
|
4317
|
+
return enumMap[p] ?? "unknown";
|
|
4363
4318
|
}
|
|
4364
|
-
|
|
4365
|
-
const WithdrawalFilter =
|
|
4366
|
-
id:
|
|
4367
|
-
validatorIndex:
|
|
4368
|
-
address:
|
|
4319
|
+
};
|
|
4320
|
+
const WithdrawalFilter = MessageCodec({
|
|
4321
|
+
id: OptionalCodec(NumberCodec),
|
|
4322
|
+
validatorIndex: OptionalCodec(NumberCodec),
|
|
4323
|
+
address: OptionalCodec(Address$1)
|
|
4369
4324
|
});
|
|
4370
|
-
const TransactionStatusFilter =
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
return TransactionStatusFilter$1.ALL;
|
|
4392
|
-
default:
|
|
4393
|
-
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
4394
|
-
}
|
|
4325
|
+
const TransactionStatusFilter = {
|
|
4326
|
+
decode(value) {
|
|
4327
|
+
const enumMap = {
|
|
4328
|
+
[TransactionStatusFilter$1.SUCCEEDED]: "succeeded",
|
|
4329
|
+
[TransactionStatusFilter$1.REVERTED]: "reverted",
|
|
4330
|
+
[TransactionStatusFilter$1.ALL]: "all",
|
|
4331
|
+
[TransactionStatusFilter$1.UNSPECIFIED]: "unknown",
|
|
4332
|
+
[TransactionStatusFilter$1.UNRECOGNIZED]: "unknown"
|
|
4333
|
+
};
|
|
4334
|
+
return enumMap[value] ?? "unknown";
|
|
4335
|
+
},
|
|
4336
|
+
encode(value) {
|
|
4337
|
+
switch (value) {
|
|
4338
|
+
case "succeeded":
|
|
4339
|
+
return TransactionStatusFilter$1.SUCCEEDED;
|
|
4340
|
+
case "reverted":
|
|
4341
|
+
return TransactionStatusFilter$1.REVERTED;
|
|
4342
|
+
case "all":
|
|
4343
|
+
return TransactionStatusFilter$1.ALL;
|
|
4344
|
+
default:
|
|
4345
|
+
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
4395
4346
|
}
|
|
4396
4347
|
}
|
|
4397
|
-
|
|
4398
|
-
const Topic =
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
decode({ value }) {
|
|
4403
|
-
if (value === void 0) {
|
|
4404
|
-
return null;
|
|
4405
|
-
}
|
|
4406
|
-
return value;
|
|
4407
|
-
},
|
|
4408
|
-
encode(value) {
|
|
4409
|
-
if (value === null) {
|
|
4410
|
-
return { value: void 0 };
|
|
4411
|
-
}
|
|
4412
|
-
return { value };
|
|
4348
|
+
};
|
|
4349
|
+
const Topic = {
|
|
4350
|
+
encode(x) {
|
|
4351
|
+
if (x === null) {
|
|
4352
|
+
return { value: void 0 };
|
|
4413
4353
|
}
|
|
4354
|
+
return { value: B256$1.encode(x) };
|
|
4355
|
+
},
|
|
4356
|
+
decode({ value }) {
|
|
4357
|
+
if (value === void 0) {
|
|
4358
|
+
return null;
|
|
4359
|
+
}
|
|
4360
|
+
return B256$1.decode(value);
|
|
4414
4361
|
}
|
|
4415
|
-
|
|
4416
|
-
const LogFilter =
|
|
4417
|
-
id:
|
|
4418
|
-
address:
|
|
4419
|
-
topics:
|
|
4420
|
-
strict:
|
|
4421
|
-
transactionStatus:
|
|
4422
|
-
includeTransaction:
|
|
4423
|
-
includeReceipt:
|
|
4424
|
-
includeTransactionTrace:
|
|
4362
|
+
};
|
|
4363
|
+
const LogFilter = MessageCodec({
|
|
4364
|
+
id: OptionalCodec(NumberCodec),
|
|
4365
|
+
address: OptionalCodec(Address$1),
|
|
4366
|
+
topics: OptionalCodec(ArrayCodec(Topic)),
|
|
4367
|
+
strict: OptionalCodec(BooleanCodec),
|
|
4368
|
+
transactionStatus: OptionalCodec(TransactionStatusFilter),
|
|
4369
|
+
includeTransaction: OptionalCodec(BooleanCodec),
|
|
4370
|
+
includeReceipt: OptionalCodec(BooleanCodec),
|
|
4371
|
+
includeTransactionTrace: OptionalCodec(BooleanCodec)
|
|
4425
4372
|
});
|
|
4426
|
-
const TransactionFilter =
|
|
4427
|
-
id:
|
|
4428
|
-
from:
|
|
4429
|
-
to:
|
|
4430
|
-
create:
|
|
4431
|
-
transactionStatus:
|
|
4432
|
-
includeReceipt:
|
|
4433
|
-
includeLogs:
|
|
4434
|
-
includeTransactionTrace:
|
|
4373
|
+
const TransactionFilter = MessageCodec({
|
|
4374
|
+
id: OptionalCodec(NumberCodec),
|
|
4375
|
+
from: OptionalCodec(Address$1),
|
|
4376
|
+
to: OptionalCodec(Address$1),
|
|
4377
|
+
create: OptionalCodec(BooleanCodec),
|
|
4378
|
+
transactionStatus: OptionalCodec(TransactionStatusFilter),
|
|
4379
|
+
includeReceipt: OptionalCodec(BooleanCodec),
|
|
4380
|
+
includeLogs: OptionalCodec(BooleanCodec),
|
|
4381
|
+
includeTransactionTrace: OptionalCodec(BooleanCodec)
|
|
4435
4382
|
});
|
|
4436
|
-
const Filter =
|
|
4437
|
-
header:
|
|
4438
|
-
withdrawals:
|
|
4439
|
-
transactions:
|
|
4440
|
-
logs:
|
|
4383
|
+
const Filter = MessageCodec({
|
|
4384
|
+
header: OptionalCodec(HeaderFilter),
|
|
4385
|
+
withdrawals: OptionalCodec(ArrayCodec(WithdrawalFilter)),
|
|
4386
|
+
transactions: OptionalCodec(ArrayCodec(TransactionFilter)),
|
|
4387
|
+
logs: OptionalCodec(ArrayCodec(LogFilter))
|
|
4441
4388
|
});
|
|
4442
|
-
const
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
strict: false,
|
|
4449
|
-
decode(value) {
|
|
4450
|
-
return Filter$1.decode(value);
|
|
4451
|
-
},
|
|
4452
|
-
encode(value) {
|
|
4453
|
-
return Filter$1.encode(value).finish();
|
|
4454
|
-
}
|
|
4389
|
+
const FilterFromBytes = {
|
|
4390
|
+
encode(x) {
|
|
4391
|
+
return Filter$1.encode(Filter.encode(x)).finish();
|
|
4392
|
+
},
|
|
4393
|
+
decode(p) {
|
|
4394
|
+
return Filter.decode(Filter$1.decode(p));
|
|
4455
4395
|
}
|
|
4456
|
-
|
|
4457
|
-
const filterToBytes = Schema.encodeSync(FilterFromBytes);
|
|
4458
|
-
const filterFromBytes = Schema.decodeSync(FilterFromBytes);
|
|
4396
|
+
};
|
|
4459
4397
|
function mergeFilter(a, b) {
|
|
4460
4398
|
const header = mergeHeaderFilter(a.header, b.header);
|
|
4461
4399
|
return {
|
|
@@ -4487,4 +4425,4 @@ const EvmStream = new StreamConfig(
|
|
|
4487
4425
|
mergeFilter
|
|
4488
4426
|
);
|
|
4489
4427
|
|
|
4490
|
-
export { AccessListItem, Address$1 as Address, B256$1 as B256,
|
|
4428
|
+
export { AccessListItem, Address$1 as Address, B256$1 as B256, Block, BlockFromBytes, BlockHeader, Bloom, CallAction, CallOutput, CallType, CreateAction, CreateOutput, CreationMethod, EvmStream, Filter, FilterFromBytes, HeaderFilter, Log, LogFilter, RewardAction, RewardType, SelfDestructAction, Signature, Topic, Trace, Transaction, TransactionFilter, TransactionReceipt, TransactionStatus, TransactionStatusFilter, TransactionTrace, U128$1 as U128, U256$1 as U256, Withdrawal, WithdrawalFilter, mergeFilter, index as proto };
|