@apibara/starknet 2.1.0-beta.23 → 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 +638 -768
- package/dist/index.d.cts +4994 -4857
- package/dist/index.d.mts +4994 -4857
- package/dist/index.d.ts +4994 -4857
- package/dist/index.mjs +639 -761
- package/dist/parser.d.cts +3 -3
- package/dist/parser.d.mts +3 -3
- package/dist/parser.d.ts +3 -3
- package/dist/shared/starknet.e649ecb1.d.cts +40 -0
- package/dist/shared/starknet.e649ecb1.d.mts +40 -0
- package/dist/shared/starknet.e649ecb1.d.ts +40 -0
- package/package.json +2 -3
- package/src/block.ts +827 -565
- package/src/common.ts +20 -35
- package/src/filter.ts +235 -268
- package/dist/shared/starknet.2b19268a.d.cts +0 -32
- package/dist/shared/starknet.2b19268a.d.mts +0 -32
- package/dist/shared/starknet.2b19268a.d.ts +0 -32
- package/src/common.test.ts +0 -21
- package/src/filter.test.ts +0 -832
- package/src/helpers.ts +0 -8
- package/src/parser.test.ts +0 -169
package/dist/index.mjs
CHANGED
|
@@ -1,48 +1,29 @@
|
|
|
1
1
|
import { StreamConfig } from '@apibara/protocol';
|
|
2
|
-
import {
|
|
2
|
+
import { MessageCodec, OptionalCodec, RequiredCodec, BigIntCodec, DateCodec, StringCodec, NumberCodec, ArrayCodec, OneOfCodec, Uint8ArrayCodec, BooleanCodec } from '@apibara/protocol/codec';
|
|
3
3
|
import Long from 'long';
|
|
4
4
|
import _m0 from 'protobufjs/minimal.js';
|
|
5
5
|
import { keccak } from '@scure/starknet';
|
|
6
6
|
import { parseBool, parseFelt252, parseU8, parseU16, parseU32, parseU64, parseU128, parseU256, parseContractAddress, ParseError, parseStruct, parseArray, parseSpan, parseOption, parseEmpty } from './parser.mjs';
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
x3: Schema.BigIntFromSelf
|
|
17
|
-
});
|
|
18
|
-
const FieldElement$1 = Schema.transform(FieldElementProto, _FieldElement, {
|
|
19
|
-
decode(value) {
|
|
20
|
-
const x0 = value.x0.toString(16).padStart(16, "0");
|
|
21
|
-
const x1 = value.x1.toString(16).padStart(16, "0");
|
|
22
|
-
const x2 = value.x2.toString(16).padStart(16, "0");
|
|
23
|
-
const x3 = value.x3.toString(16).padStart(16, "0");
|
|
24
|
-
return `0x${x0}${x1}${x2}${x3}`;
|
|
25
|
-
},
|
|
26
|
-
encode(value) {
|
|
27
|
-
const bn = BigInt(value);
|
|
28
|
-
const hex = bn.toString(16).padStart(64, "0");
|
|
29
|
-
const s = hex.length;
|
|
30
|
-
const x3 = BigInt(`0x${hex.slice(s - 16, s)}`);
|
|
31
|
-
const x2 = BigInt(`0x${hex.slice(s - 32, s - 16)}`);
|
|
32
|
-
const x1 = BigInt(`0x${hex.slice(s - 48, s - 32)}`);
|
|
33
|
-
const x0 = BigInt(`0x${hex.slice(s - 64, s - 48)}`);
|
|
8
|
+
const MAX_U64 = 0xffffffffffffffffn;
|
|
9
|
+
const FieldElement$1 = {
|
|
10
|
+
encode(x) {
|
|
11
|
+
const bn = BigInt(x);
|
|
12
|
+
const x3 = bn & MAX_U64;
|
|
13
|
+
const x2 = bn >> 64n & MAX_U64;
|
|
14
|
+
const x1 = bn >> 128n & MAX_U64;
|
|
15
|
+
const x0 = bn >> 192n & MAX_U64;
|
|
34
16
|
return { x0, x1, x2, x3 };
|
|
17
|
+
},
|
|
18
|
+
decode(p) {
|
|
19
|
+
const x0 = p.x0 ?? 0n;
|
|
20
|
+
const x1 = p.x1 ?? 0n;
|
|
21
|
+
const x2 = p.x2 ?? 0n;
|
|
22
|
+
const x3 = p.x3 ?? 0n;
|
|
23
|
+
const bn = x3 + (x2 << 64n) + (x1 << 128n) + (x0 << 192n);
|
|
24
|
+
return `0x${bn.toString(16).padStart(64, "0")}`;
|
|
35
25
|
}
|
|
36
|
-
}
|
|
37
|
-
const feltToProto = Schema.encodeSync(FieldElement$1);
|
|
38
|
-
const feltFromProto = Schema.decodeSync(FieldElement$1);
|
|
39
|
-
|
|
40
|
-
function tag(tag2) {
|
|
41
|
-
return Schema.Literal(tag2).pipe(
|
|
42
|
-
Schema.propertySignature,
|
|
43
|
-
Schema.fromKey("$case")
|
|
44
|
-
);
|
|
45
|
-
}
|
|
26
|
+
};
|
|
46
27
|
|
|
47
28
|
const protobufPackage$2 = "starknet.v2";
|
|
48
29
|
function createBaseFieldElement() {
|
|
@@ -5151,18 +5132,18 @@ function createBaseInvokeTransactionTrace() {
|
|
|
5151
5132
|
const InvokeTransactionTrace$1 = {
|
|
5152
5133
|
encode(message, writer = _m0.Writer.create()) {
|
|
5153
5134
|
if (message.validateInvocation !== void 0) {
|
|
5154
|
-
FunctionInvocation
|
|
5135
|
+
FunctionInvocation.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5155
5136
|
}
|
|
5156
5137
|
switch (message.executeInvocation?.$case) {
|
|
5157
5138
|
case "success":
|
|
5158
|
-
FunctionInvocation
|
|
5139
|
+
FunctionInvocation.encode(message.executeInvocation.success, writer.uint32(18).fork()).ldelim();
|
|
5159
5140
|
break;
|
|
5160
5141
|
case "reverted":
|
|
5161
5142
|
ExecutionReverted$1.encode(message.executeInvocation.reverted, writer.uint32(26).fork()).ldelim();
|
|
5162
5143
|
break;
|
|
5163
5144
|
}
|
|
5164
5145
|
if (message.feeTransferInvocation !== void 0) {
|
|
5165
|
-
FunctionInvocation
|
|
5146
|
+
FunctionInvocation.encode(message.feeTransferInvocation, writer.uint32(34).fork()).ldelim();
|
|
5166
5147
|
}
|
|
5167
5148
|
return writer;
|
|
5168
5149
|
},
|
|
@@ -5177,13 +5158,13 @@ const InvokeTransactionTrace$1 = {
|
|
|
5177
5158
|
if (tag !== 10) {
|
|
5178
5159
|
break;
|
|
5179
5160
|
}
|
|
5180
|
-
message.validateInvocation = FunctionInvocation
|
|
5161
|
+
message.validateInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5181
5162
|
continue;
|
|
5182
5163
|
case 2:
|
|
5183
5164
|
if (tag !== 18) {
|
|
5184
5165
|
break;
|
|
5185
5166
|
}
|
|
5186
|
-
message.executeInvocation = { $case: "success", success: FunctionInvocation
|
|
5167
|
+
message.executeInvocation = { $case: "success", success: FunctionInvocation.decode(reader, reader.uint32()) };
|
|
5187
5168
|
continue;
|
|
5188
5169
|
case 3:
|
|
5189
5170
|
if (tag !== 26) {
|
|
@@ -5198,7 +5179,7 @@ const InvokeTransactionTrace$1 = {
|
|
|
5198
5179
|
if (tag !== 34) {
|
|
5199
5180
|
break;
|
|
5200
5181
|
}
|
|
5201
|
-
message.feeTransferInvocation = FunctionInvocation
|
|
5182
|
+
message.feeTransferInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5202
5183
|
continue;
|
|
5203
5184
|
}
|
|
5204
5185
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5210,24 +5191,24 @@ const InvokeTransactionTrace$1 = {
|
|
|
5210
5191
|
},
|
|
5211
5192
|
fromJSON(object) {
|
|
5212
5193
|
return {
|
|
5213
|
-
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation
|
|
5214
|
-
executeInvocation: isSet$1(object.success) ? { $case: "success", success: FunctionInvocation
|
|
5215
|
-
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation
|
|
5194
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation.fromJSON(object.validateInvocation) : void 0,
|
|
5195
|
+
executeInvocation: isSet$1(object.success) ? { $case: "success", success: FunctionInvocation.fromJSON(object.success) } : isSet$1(object.reverted) ? { $case: "reverted", reverted: ExecutionReverted$1.fromJSON(object.reverted) } : void 0,
|
|
5196
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation.fromJSON(object.feeTransferInvocation) : void 0
|
|
5216
5197
|
};
|
|
5217
5198
|
},
|
|
5218
5199
|
toJSON(message) {
|
|
5219
5200
|
const obj = {};
|
|
5220
5201
|
if (message.validateInvocation !== void 0) {
|
|
5221
|
-
obj.validateInvocation = FunctionInvocation
|
|
5202
|
+
obj.validateInvocation = FunctionInvocation.toJSON(message.validateInvocation);
|
|
5222
5203
|
}
|
|
5223
5204
|
if (message.executeInvocation?.$case === "success") {
|
|
5224
|
-
obj.success = FunctionInvocation
|
|
5205
|
+
obj.success = FunctionInvocation.toJSON(message.executeInvocation.success);
|
|
5225
5206
|
}
|
|
5226
5207
|
if (message.executeInvocation?.$case === "reverted") {
|
|
5227
5208
|
obj.reverted = ExecutionReverted$1.toJSON(message.executeInvocation.reverted);
|
|
5228
5209
|
}
|
|
5229
5210
|
if (message.feeTransferInvocation !== void 0) {
|
|
5230
|
-
obj.feeTransferInvocation = FunctionInvocation
|
|
5211
|
+
obj.feeTransferInvocation = FunctionInvocation.toJSON(message.feeTransferInvocation);
|
|
5231
5212
|
}
|
|
5232
5213
|
return obj;
|
|
5233
5214
|
},
|
|
@@ -5236,11 +5217,11 @@ const InvokeTransactionTrace$1 = {
|
|
|
5236
5217
|
},
|
|
5237
5218
|
fromPartial(object) {
|
|
5238
5219
|
const message = createBaseInvokeTransactionTrace();
|
|
5239
|
-
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation
|
|
5220
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation.fromPartial(object.validateInvocation) : void 0;
|
|
5240
5221
|
if (object.executeInvocation?.$case === "success" && object.executeInvocation?.success !== void 0 && object.executeInvocation?.success !== null) {
|
|
5241
5222
|
message.executeInvocation = {
|
|
5242
5223
|
$case: "success",
|
|
5243
|
-
success: FunctionInvocation
|
|
5224
|
+
success: FunctionInvocation.fromPartial(object.executeInvocation.success)
|
|
5244
5225
|
};
|
|
5245
5226
|
}
|
|
5246
5227
|
if (object.executeInvocation?.$case === "reverted" && object.executeInvocation?.reverted !== void 0 && object.executeInvocation?.reverted !== null) {
|
|
@@ -5249,7 +5230,7 @@ const InvokeTransactionTrace$1 = {
|
|
|
5249
5230
|
reverted: ExecutionReverted$1.fromPartial(object.executeInvocation.reverted)
|
|
5250
5231
|
};
|
|
5251
5232
|
}
|
|
5252
|
-
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation
|
|
5233
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5253
5234
|
return message;
|
|
5254
5235
|
}
|
|
5255
5236
|
};
|
|
@@ -5259,10 +5240,10 @@ function createBaseDeclareTransactionTrace() {
|
|
|
5259
5240
|
const DeclareTransactionTrace$1 = {
|
|
5260
5241
|
encode(message, writer = _m0.Writer.create()) {
|
|
5261
5242
|
if (message.validateInvocation !== void 0) {
|
|
5262
|
-
FunctionInvocation
|
|
5243
|
+
FunctionInvocation.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5263
5244
|
}
|
|
5264
5245
|
if (message.feeTransferInvocation !== void 0) {
|
|
5265
|
-
FunctionInvocation
|
|
5246
|
+
FunctionInvocation.encode(message.feeTransferInvocation, writer.uint32(18).fork()).ldelim();
|
|
5266
5247
|
}
|
|
5267
5248
|
return writer;
|
|
5268
5249
|
},
|
|
@@ -5277,13 +5258,13 @@ const DeclareTransactionTrace$1 = {
|
|
|
5277
5258
|
if (tag !== 10) {
|
|
5278
5259
|
break;
|
|
5279
5260
|
}
|
|
5280
|
-
message.validateInvocation = FunctionInvocation
|
|
5261
|
+
message.validateInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5281
5262
|
continue;
|
|
5282
5263
|
case 2:
|
|
5283
5264
|
if (tag !== 18) {
|
|
5284
5265
|
break;
|
|
5285
5266
|
}
|
|
5286
|
-
message.feeTransferInvocation = FunctionInvocation
|
|
5267
|
+
message.feeTransferInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5287
5268
|
continue;
|
|
5288
5269
|
}
|
|
5289
5270
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5295,17 +5276,17 @@ const DeclareTransactionTrace$1 = {
|
|
|
5295
5276
|
},
|
|
5296
5277
|
fromJSON(object) {
|
|
5297
5278
|
return {
|
|
5298
|
-
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation
|
|
5299
|
-
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation
|
|
5279
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation.fromJSON(object.validateInvocation) : void 0,
|
|
5280
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation.fromJSON(object.feeTransferInvocation) : void 0
|
|
5300
5281
|
};
|
|
5301
5282
|
},
|
|
5302
5283
|
toJSON(message) {
|
|
5303
5284
|
const obj = {};
|
|
5304
5285
|
if (message.validateInvocation !== void 0) {
|
|
5305
|
-
obj.validateInvocation = FunctionInvocation
|
|
5286
|
+
obj.validateInvocation = FunctionInvocation.toJSON(message.validateInvocation);
|
|
5306
5287
|
}
|
|
5307
5288
|
if (message.feeTransferInvocation !== void 0) {
|
|
5308
|
-
obj.feeTransferInvocation = FunctionInvocation
|
|
5289
|
+
obj.feeTransferInvocation = FunctionInvocation.toJSON(message.feeTransferInvocation);
|
|
5309
5290
|
}
|
|
5310
5291
|
return obj;
|
|
5311
5292
|
},
|
|
@@ -5314,8 +5295,8 @@ const DeclareTransactionTrace$1 = {
|
|
|
5314
5295
|
},
|
|
5315
5296
|
fromPartial(object) {
|
|
5316
5297
|
const message = createBaseDeclareTransactionTrace();
|
|
5317
|
-
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation
|
|
5318
|
-
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation
|
|
5298
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation.fromPartial(object.validateInvocation) : void 0;
|
|
5299
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5319
5300
|
return message;
|
|
5320
5301
|
}
|
|
5321
5302
|
};
|
|
@@ -5325,13 +5306,13 @@ function createBaseDeployAccountTransactionTrace() {
|
|
|
5325
5306
|
const DeployAccountTransactionTrace$1 = {
|
|
5326
5307
|
encode(message, writer = _m0.Writer.create()) {
|
|
5327
5308
|
if (message.validateInvocation !== void 0) {
|
|
5328
|
-
FunctionInvocation
|
|
5309
|
+
FunctionInvocation.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5329
5310
|
}
|
|
5330
5311
|
if (message.constructorInvocation !== void 0) {
|
|
5331
|
-
FunctionInvocation
|
|
5312
|
+
FunctionInvocation.encode(message.constructorInvocation, writer.uint32(18).fork()).ldelim();
|
|
5332
5313
|
}
|
|
5333
5314
|
if (message.feeTransferInvocation !== void 0) {
|
|
5334
|
-
FunctionInvocation
|
|
5315
|
+
FunctionInvocation.encode(message.feeTransferInvocation, writer.uint32(26).fork()).ldelim();
|
|
5335
5316
|
}
|
|
5336
5317
|
return writer;
|
|
5337
5318
|
},
|
|
@@ -5346,19 +5327,19 @@ const DeployAccountTransactionTrace$1 = {
|
|
|
5346
5327
|
if (tag !== 10) {
|
|
5347
5328
|
break;
|
|
5348
5329
|
}
|
|
5349
|
-
message.validateInvocation = FunctionInvocation
|
|
5330
|
+
message.validateInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5350
5331
|
continue;
|
|
5351
5332
|
case 2:
|
|
5352
5333
|
if (tag !== 18) {
|
|
5353
5334
|
break;
|
|
5354
5335
|
}
|
|
5355
|
-
message.constructorInvocation = FunctionInvocation
|
|
5336
|
+
message.constructorInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5356
5337
|
continue;
|
|
5357
5338
|
case 3:
|
|
5358
5339
|
if (tag !== 26) {
|
|
5359
5340
|
break;
|
|
5360
5341
|
}
|
|
5361
|
-
message.feeTransferInvocation = FunctionInvocation
|
|
5342
|
+
message.feeTransferInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5362
5343
|
continue;
|
|
5363
5344
|
}
|
|
5364
5345
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5370,21 +5351,21 @@ const DeployAccountTransactionTrace$1 = {
|
|
|
5370
5351
|
},
|
|
5371
5352
|
fromJSON(object) {
|
|
5372
5353
|
return {
|
|
5373
|
-
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation
|
|
5374
|
-
constructorInvocation: isSet$1(object.constructorInvocation) ? FunctionInvocation
|
|
5375
|
-
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation
|
|
5354
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation.fromJSON(object.validateInvocation) : void 0,
|
|
5355
|
+
constructorInvocation: isSet$1(object.constructorInvocation) ? FunctionInvocation.fromJSON(object.constructorInvocation) : void 0,
|
|
5356
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation.fromJSON(object.feeTransferInvocation) : void 0
|
|
5376
5357
|
};
|
|
5377
5358
|
},
|
|
5378
5359
|
toJSON(message) {
|
|
5379
5360
|
const obj = {};
|
|
5380
5361
|
if (message.validateInvocation !== void 0) {
|
|
5381
|
-
obj.validateInvocation = FunctionInvocation
|
|
5362
|
+
obj.validateInvocation = FunctionInvocation.toJSON(message.validateInvocation);
|
|
5382
5363
|
}
|
|
5383
5364
|
if (message.constructorInvocation !== void 0) {
|
|
5384
|
-
obj.constructorInvocation = FunctionInvocation
|
|
5365
|
+
obj.constructorInvocation = FunctionInvocation.toJSON(message.constructorInvocation);
|
|
5385
5366
|
}
|
|
5386
5367
|
if (message.feeTransferInvocation !== void 0) {
|
|
5387
|
-
obj.feeTransferInvocation = FunctionInvocation
|
|
5368
|
+
obj.feeTransferInvocation = FunctionInvocation.toJSON(message.feeTransferInvocation);
|
|
5388
5369
|
}
|
|
5389
5370
|
return obj;
|
|
5390
5371
|
},
|
|
@@ -5393,9 +5374,9 @@ const DeployAccountTransactionTrace$1 = {
|
|
|
5393
5374
|
},
|
|
5394
5375
|
fromPartial(object) {
|
|
5395
5376
|
const message = createBaseDeployAccountTransactionTrace();
|
|
5396
|
-
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation
|
|
5397
|
-
message.constructorInvocation = object.constructorInvocation !== void 0 && object.constructorInvocation !== null ? FunctionInvocation
|
|
5398
|
-
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation
|
|
5377
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation.fromPartial(object.validateInvocation) : void 0;
|
|
5378
|
+
message.constructorInvocation = object.constructorInvocation !== void 0 && object.constructorInvocation !== null ? FunctionInvocation.fromPartial(object.constructorInvocation) : void 0;
|
|
5379
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5399
5380
|
return message;
|
|
5400
5381
|
}
|
|
5401
5382
|
};
|
|
@@ -5405,7 +5386,7 @@ function createBaseL1HandlerTransactionTrace() {
|
|
|
5405
5386
|
const L1HandlerTransactionTrace$1 = {
|
|
5406
5387
|
encode(message, writer = _m0.Writer.create()) {
|
|
5407
5388
|
if (message.functionInvocation !== void 0) {
|
|
5408
|
-
FunctionInvocation
|
|
5389
|
+
FunctionInvocation.encode(message.functionInvocation, writer.uint32(18).fork()).ldelim();
|
|
5409
5390
|
}
|
|
5410
5391
|
return writer;
|
|
5411
5392
|
},
|
|
@@ -5420,7 +5401,7 @@ const L1HandlerTransactionTrace$1 = {
|
|
|
5420
5401
|
if (tag !== 18) {
|
|
5421
5402
|
break;
|
|
5422
5403
|
}
|
|
5423
|
-
message.functionInvocation = FunctionInvocation
|
|
5404
|
+
message.functionInvocation = FunctionInvocation.decode(reader, reader.uint32());
|
|
5424
5405
|
continue;
|
|
5425
5406
|
}
|
|
5426
5407
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5432,13 +5413,13 @@ const L1HandlerTransactionTrace$1 = {
|
|
|
5432
5413
|
},
|
|
5433
5414
|
fromJSON(object) {
|
|
5434
5415
|
return {
|
|
5435
|
-
functionInvocation: isSet$1(object.functionInvocation) ? FunctionInvocation
|
|
5416
|
+
functionInvocation: isSet$1(object.functionInvocation) ? FunctionInvocation.fromJSON(object.functionInvocation) : void 0
|
|
5436
5417
|
};
|
|
5437
5418
|
},
|
|
5438
5419
|
toJSON(message) {
|
|
5439
5420
|
const obj = {};
|
|
5440
5421
|
if (message.functionInvocation !== void 0) {
|
|
5441
|
-
obj.functionInvocation = FunctionInvocation
|
|
5422
|
+
obj.functionInvocation = FunctionInvocation.toJSON(message.functionInvocation);
|
|
5442
5423
|
}
|
|
5443
5424
|
return obj;
|
|
5444
5425
|
},
|
|
@@ -5447,7 +5428,7 @@ const L1HandlerTransactionTrace$1 = {
|
|
|
5447
5428
|
},
|
|
5448
5429
|
fromPartial(object) {
|
|
5449
5430
|
const message = createBaseL1HandlerTransactionTrace();
|
|
5450
|
-
message.functionInvocation = object.functionInvocation !== void 0 && object.functionInvocation !== null ? FunctionInvocation
|
|
5431
|
+
message.functionInvocation = object.functionInvocation !== void 0 && object.functionInvocation !== null ? FunctionInvocation.fromPartial(object.functionInvocation) : void 0;
|
|
5451
5432
|
return message;
|
|
5452
5433
|
}
|
|
5453
5434
|
};
|
|
@@ -5465,7 +5446,7 @@ function createBaseFunctionInvocation() {
|
|
|
5465
5446
|
messages: []
|
|
5466
5447
|
};
|
|
5467
5448
|
}
|
|
5468
|
-
const FunctionInvocation
|
|
5449
|
+
const FunctionInvocation = {
|
|
5469
5450
|
encode(message, writer = _m0.Writer.create()) {
|
|
5470
5451
|
if (message.contractAddress !== void 0) {
|
|
5471
5452
|
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
@@ -5494,7 +5475,7 @@ const FunctionInvocation$1 = {
|
|
|
5494
5475
|
}
|
|
5495
5476
|
if (message.calls !== void 0 && message.calls.length !== 0) {
|
|
5496
5477
|
for (const v of message.calls) {
|
|
5497
|
-
FunctionInvocation
|
|
5478
|
+
FunctionInvocation.encode(v, writer.uint32(66).fork()).ldelim();
|
|
5498
5479
|
}
|
|
5499
5480
|
}
|
|
5500
5481
|
if (message.events !== void 0 && message.events.length !== 0) {
|
|
@@ -5566,7 +5547,7 @@ const FunctionInvocation$1 = {
|
|
|
5566
5547
|
if (tag !== 66) {
|
|
5567
5548
|
break;
|
|
5568
5549
|
}
|
|
5569
|
-
message.calls.push(FunctionInvocation
|
|
5550
|
+
message.calls.push(FunctionInvocation.decode(reader, reader.uint32()));
|
|
5570
5551
|
continue;
|
|
5571
5552
|
case 9:
|
|
5572
5553
|
if (tag === 72) {
|
|
@@ -5611,7 +5592,7 @@ const FunctionInvocation$1 = {
|
|
|
5611
5592
|
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0,
|
|
5612
5593
|
callType: isSet$1(object.callType) ? callTypeFromJSON(object.callType) : 0,
|
|
5613
5594
|
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => FieldElement.fromJSON(e)) : [],
|
|
5614
|
-
calls: globalThis.Array.isArray(object?.calls) ? object.calls.map((e) => FunctionInvocation
|
|
5595
|
+
calls: globalThis.Array.isArray(object?.calls) ? object.calls.map((e) => FunctionInvocation.fromJSON(e)) : [],
|
|
5615
5596
|
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => globalThis.Number(e)) : [],
|
|
5616
5597
|
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => globalThis.Number(e)) : []
|
|
5617
5598
|
};
|
|
@@ -5640,7 +5621,7 @@ const FunctionInvocation$1 = {
|
|
|
5640
5621
|
obj.result = message.result.map((e) => FieldElement.toJSON(e));
|
|
5641
5622
|
}
|
|
5642
5623
|
if (message.calls?.length) {
|
|
5643
|
-
obj.calls = message.calls.map((e) => FunctionInvocation
|
|
5624
|
+
obj.calls = message.calls.map((e) => FunctionInvocation.toJSON(e));
|
|
5644
5625
|
}
|
|
5645
5626
|
if (message.events?.length) {
|
|
5646
5627
|
obj.events = message.events.map((e) => Math.round(e));
|
|
@@ -5651,7 +5632,7 @@ const FunctionInvocation$1 = {
|
|
|
5651
5632
|
return obj;
|
|
5652
5633
|
},
|
|
5653
5634
|
create(base) {
|
|
5654
|
-
return FunctionInvocation
|
|
5635
|
+
return FunctionInvocation.fromPartial(base ?? {});
|
|
5655
5636
|
},
|
|
5656
5637
|
fromPartial(object) {
|
|
5657
5638
|
const message = createBaseFunctionInvocation();
|
|
@@ -5662,7 +5643,7 @@ const FunctionInvocation$1 = {
|
|
|
5662
5643
|
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
5663
5644
|
message.callType = object.callType ?? 0;
|
|
5664
5645
|
message.result = object.result?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5665
|
-
message.calls = object.calls?.map((e) => FunctionInvocation
|
|
5646
|
+
message.calls = object.calls?.map((e) => FunctionInvocation.fromPartial(e)) || [];
|
|
5666
5647
|
message.events = object.events?.map((e) => e) || [];
|
|
5667
5648
|
message.messages = object.messages?.map((e) => e) || [];
|
|
5668
5649
|
return message;
|
|
@@ -5833,7 +5814,7 @@ const data = {
|
|
|
5833
5814
|
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
5834
5815
|
FeePayment: FeePayment$1,
|
|
5835
5816
|
FunctionCall: FunctionCall,
|
|
5836
|
-
FunctionInvocation: FunctionInvocation
|
|
5817
|
+
FunctionInvocation: FunctionInvocation,
|
|
5837
5818
|
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
5838
5819
|
InvokeTransactionTrace: InvokeTransactionTrace$1,
|
|
5839
5820
|
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
@@ -7632,745 +7613,642 @@ const index = {
|
|
|
7632
7613
|
filter: filter
|
|
7633
7614
|
};
|
|
7634
7615
|
|
|
7635
|
-
const ResourcePrice =
|
|
7636
|
-
priceInFri:
|
|
7637
|
-
priceInWei:
|
|
7616
|
+
const ResourcePrice = MessageCodec({
|
|
7617
|
+
priceInFri: OptionalCodec(FieldElement$1),
|
|
7618
|
+
priceInWei: OptionalCodec(FieldElement$1)
|
|
7638
7619
|
});
|
|
7639
|
-
const L1DataAvailabilityMode =
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7620
|
+
const L1DataAvailabilityMode = {
|
|
7621
|
+
encode(x) {
|
|
7622
|
+
switch (x) {
|
|
7623
|
+
case "calldata":
|
|
7624
|
+
return L1DataAvailabilityMode$1.CALLDATA;
|
|
7625
|
+
case "blob":
|
|
7626
|
+
return L1DataAvailabilityMode$1.BLOB;
|
|
7627
|
+
case "unknown":
|
|
7628
|
+
return L1DataAvailabilityMode$1.UNSPECIFIED;
|
|
7629
|
+
default:
|
|
7630
|
+
return L1DataAvailabilityMode$1.UNRECOGNIZED;
|
|
7631
|
+
}
|
|
7632
|
+
},
|
|
7633
|
+
decode(p) {
|
|
7634
|
+
const enumMap = {
|
|
7635
|
+
[L1DataAvailabilityMode$1.CALLDATA]: "calldata",
|
|
7636
|
+
[L1DataAvailabilityMode$1.BLOB]: "blob",
|
|
7637
|
+
[L1DataAvailabilityMode$1.UNSPECIFIED]: "unknown",
|
|
7638
|
+
[L1DataAvailabilityMode$1.UNRECOGNIZED]: "unknown"
|
|
7639
|
+
};
|
|
7640
|
+
return enumMap[p] ?? "unknown";
|
|
7655
7641
|
}
|
|
7656
|
-
|
|
7657
|
-
const TransactionStatus =
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7642
|
+
};
|
|
7643
|
+
const TransactionStatus = {
|
|
7644
|
+
encode(x) {
|
|
7645
|
+
switch (x) {
|
|
7646
|
+
case "succeeded":
|
|
7647
|
+
return TransactionStatus$1.SUCCEEDED;
|
|
7648
|
+
case "reverted":
|
|
7649
|
+
return TransactionStatus$1.REVERTED;
|
|
7650
|
+
case "unknown":
|
|
7651
|
+
return TransactionStatus$1.UNSPECIFIED;
|
|
7652
|
+
default:
|
|
7653
|
+
return TransactionStatus$1.UNRECOGNIZED;
|
|
7654
|
+
}
|
|
7655
|
+
},
|
|
7656
|
+
decode(p) {
|
|
7657
|
+
const enumMap = {
|
|
7658
|
+
[TransactionStatus$1.SUCCEEDED]: "succeeded",
|
|
7659
|
+
[TransactionStatus$1.REVERTED]: "reverted",
|
|
7660
|
+
[TransactionStatus$1.UNSPECIFIED]: "unknown",
|
|
7661
|
+
[TransactionStatus$1.UNRECOGNIZED]: "unknown"
|
|
7662
|
+
};
|
|
7663
|
+
return enumMap[p] ?? "unknown";
|
|
7673
7664
|
}
|
|
7674
|
-
|
|
7675
|
-
const U128 =
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
},
|
|
7687
|
-
encode(value) {
|
|
7688
|
-
throw new Error("encode: not implemented");
|
|
7689
|
-
}
|
|
7665
|
+
};
|
|
7666
|
+
const U128 = {
|
|
7667
|
+
// TODO: double check if this is correct
|
|
7668
|
+
encode(x) {
|
|
7669
|
+
const low = x.toString(16).padStart(16, "0");
|
|
7670
|
+
const high = (x >> 128n).toString(16).padStart(16, "0");
|
|
7671
|
+
return { x0: BigInt(`0x${low}`), x1: BigInt(`0x${high}`) };
|
|
7672
|
+
},
|
|
7673
|
+
decode(p) {
|
|
7674
|
+
const low = (p.x0 ?? 0n).toString(16).padStart(16, "0");
|
|
7675
|
+
const high = (p.x1 ?? 0n).toString(16).padStart(16, "0");
|
|
7676
|
+
return BigInt(`0x${low}${high}`);
|
|
7690
7677
|
}
|
|
7691
|
-
|
|
7692
|
-
const ResourceBounds =
|
|
7693
|
-
maxAmount:
|
|
7694
|
-
maxPricePerUnit: U128
|
|
7678
|
+
};
|
|
7679
|
+
const ResourceBounds = MessageCodec({
|
|
7680
|
+
maxAmount: RequiredCodec(BigIntCodec),
|
|
7681
|
+
maxPricePerUnit: RequiredCodec(U128)
|
|
7695
7682
|
});
|
|
7696
|
-
const ResourceBoundsMapping =
|
|
7697
|
-
l1Gas: ResourceBounds,
|
|
7698
|
-
l2Gas: ResourceBounds
|
|
7683
|
+
const ResourceBoundsMapping = MessageCodec({
|
|
7684
|
+
l1Gas: RequiredCodec(ResourceBounds),
|
|
7685
|
+
l2Gas: RequiredCodec(ResourceBounds)
|
|
7699
7686
|
});
|
|
7700
|
-
const DataAvailabilityMode =
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7687
|
+
const DataAvailabilityMode = {
|
|
7688
|
+
encode(x) {
|
|
7689
|
+
switch (x) {
|
|
7690
|
+
case "l1":
|
|
7691
|
+
return DataAvailabilityMode$1.L1;
|
|
7692
|
+
case "l2":
|
|
7693
|
+
return DataAvailabilityMode$1.L2;
|
|
7694
|
+
case "unknown":
|
|
7695
|
+
return DataAvailabilityMode$1.UNSPECIFIED;
|
|
7696
|
+
default:
|
|
7697
|
+
return DataAvailabilityMode$1.UNRECOGNIZED;
|
|
7698
|
+
}
|
|
7699
|
+
},
|
|
7700
|
+
decode(p) {
|
|
7701
|
+
const enumMap = {
|
|
7702
|
+
[DataAvailabilityMode$1.L1]: "l1",
|
|
7703
|
+
[DataAvailabilityMode$1.L2]: "l2",
|
|
7704
|
+
[DataAvailabilityMode$1.UNSPECIFIED]: "unknown",
|
|
7705
|
+
[DataAvailabilityMode$1.UNRECOGNIZED]: "unknown"
|
|
7706
|
+
};
|
|
7707
|
+
return enumMap[p] ?? "unknown";
|
|
7716
7708
|
}
|
|
7717
|
-
|
|
7718
|
-
const BlockHeader =
|
|
7719
|
-
blockHash:
|
|
7720
|
-
parentBlockHash: FieldElement$1,
|
|
7721
|
-
blockNumber:
|
|
7722
|
-
sequencerAddress: FieldElement$1,
|
|
7723
|
-
newRoot:
|
|
7724
|
-
timestamp:
|
|
7725
|
-
starknetVersion:
|
|
7726
|
-
l1GasPrice: ResourcePrice,
|
|
7727
|
-
l1DataGasPrice: ResourcePrice,
|
|
7728
|
-
l1DataAvailabilityMode: L1DataAvailabilityMode
|
|
7709
|
+
};
|
|
7710
|
+
const BlockHeader = MessageCodec({
|
|
7711
|
+
blockHash: RequiredCodec(FieldElement$1),
|
|
7712
|
+
parentBlockHash: RequiredCodec(FieldElement$1),
|
|
7713
|
+
blockNumber: RequiredCodec(BigIntCodec),
|
|
7714
|
+
sequencerAddress: RequiredCodec(FieldElement$1),
|
|
7715
|
+
newRoot: OptionalCodec(FieldElement$1),
|
|
7716
|
+
timestamp: RequiredCodec(DateCodec),
|
|
7717
|
+
starknetVersion: RequiredCodec(StringCodec),
|
|
7718
|
+
l1GasPrice: RequiredCodec(ResourcePrice),
|
|
7719
|
+
l1DataGasPrice: RequiredCodec(ResourcePrice),
|
|
7720
|
+
l1DataAvailabilityMode: RequiredCodec(L1DataAvailabilityMode)
|
|
7729
7721
|
});
|
|
7730
|
-
const TransactionMeta =
|
|
7731
|
-
transactionIndex:
|
|
7732
|
-
transactionHash: FieldElement$1,
|
|
7733
|
-
transactionStatus: TransactionStatus
|
|
7722
|
+
const TransactionMeta = MessageCodec({
|
|
7723
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
7724
|
+
transactionHash: RequiredCodec(FieldElement$1),
|
|
7725
|
+
transactionStatus: RequiredCodec(TransactionStatus)
|
|
7734
7726
|
});
|
|
7735
|
-
const InvokeTransactionV0 =
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
entryPointSelector: FieldElement$1,
|
|
7742
|
-
calldata: Schema.Array(FieldElement$1)
|
|
7743
|
-
})
|
|
7727
|
+
const InvokeTransactionV0 = MessageCodec({
|
|
7728
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7729
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7730
|
+
contractAddress: RequiredCodec(FieldElement$1),
|
|
7731
|
+
entryPointSelector: RequiredCodec(FieldElement$1),
|
|
7732
|
+
calldata: ArrayCodec(FieldElement$1)
|
|
7744
7733
|
});
|
|
7745
|
-
const InvokeTransactionV1 =
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
signature: Schema.Array(FieldElement$1),
|
|
7752
|
-
nonce: FieldElement$1
|
|
7753
|
-
})
|
|
7734
|
+
const InvokeTransactionV1 = MessageCodec({
|
|
7735
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7736
|
+
calldata: ArrayCodec(FieldElement$1),
|
|
7737
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7738
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7739
|
+
nonce: RequiredCodec(FieldElement$1)
|
|
7754
7740
|
});
|
|
7755
|
-
const InvokeTransactionV3 =
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
nonceDataAvailabilityMode: DataAvailabilityMode,
|
|
7767
|
-
feeDataAvailabilityMode: DataAvailabilityMode
|
|
7768
|
-
})
|
|
7741
|
+
const InvokeTransactionV3 = MessageCodec({
|
|
7742
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7743
|
+
calldata: ArrayCodec(FieldElement$1),
|
|
7744
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7745
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7746
|
+
resourceBounds: RequiredCodec(ResourceBoundsMapping),
|
|
7747
|
+
tip: RequiredCodec(BigIntCodec),
|
|
7748
|
+
paymasterData: ArrayCodec(FieldElement$1),
|
|
7749
|
+
accountDeploymentData: ArrayCodec(FieldElement$1),
|
|
7750
|
+
nonceDataAvailabilityMode: RequiredCodec(DataAvailabilityMode),
|
|
7751
|
+
feeDataAvailabilityMode: RequiredCodec(DataAvailabilityMode)
|
|
7769
7752
|
});
|
|
7770
|
-
const L1HandlerTransaction =
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
entryPointSelector: FieldElement$1,
|
|
7776
|
-
calldata: Schema.Array(FieldElement$1)
|
|
7777
|
-
})
|
|
7753
|
+
const L1HandlerTransaction = MessageCodec({
|
|
7754
|
+
nonce: RequiredCodec(BigIntCodec),
|
|
7755
|
+
contractAddress: RequiredCodec(FieldElement$1),
|
|
7756
|
+
entryPointSelector: RequiredCodec(FieldElement$1),
|
|
7757
|
+
calldata: ArrayCodec(FieldElement$1)
|
|
7778
7758
|
});
|
|
7779
|
-
const DeployTransaction =
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
constructorCalldata: Schema.Array(FieldElement$1),
|
|
7784
|
-
classHash: FieldElement$1
|
|
7785
|
-
})
|
|
7759
|
+
const DeployTransaction = MessageCodec({
|
|
7760
|
+
contractAddressSalt: RequiredCodec(FieldElement$1),
|
|
7761
|
+
constructorCalldata: ArrayCodec(FieldElement$1),
|
|
7762
|
+
classHash: RequiredCodec(FieldElement$1)
|
|
7786
7763
|
});
|
|
7787
|
-
const DeclareTransactionV0 =
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
signature: Schema.Array(FieldElement$1),
|
|
7793
|
-
classHash: FieldElement$1
|
|
7794
|
-
})
|
|
7764
|
+
const DeclareTransactionV0 = MessageCodec({
|
|
7765
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7766
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7767
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7768
|
+
classHash: RequiredCodec(FieldElement$1)
|
|
7795
7769
|
});
|
|
7796
|
-
const DeclareTransactionV1 =
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
nonce: FieldElement$1,
|
|
7803
|
-
classHash: FieldElement$1
|
|
7804
|
-
})
|
|
7770
|
+
const DeclareTransactionV1 = MessageCodec({
|
|
7771
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7772
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7773
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7774
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7775
|
+
classHash: RequiredCodec(FieldElement$1)
|
|
7805
7776
|
});
|
|
7806
|
-
const DeclareTransactionV2 =
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
nonce: FieldElement$1,
|
|
7814
|
-
classHash: FieldElement$1
|
|
7815
|
-
})
|
|
7777
|
+
const DeclareTransactionV2 = MessageCodec({
|
|
7778
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7779
|
+
compiledClassHash: RequiredCodec(FieldElement$1),
|
|
7780
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7781
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7782
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7783
|
+
classHash: RequiredCodec(FieldElement$1)
|
|
7816
7784
|
});
|
|
7817
|
-
const DeclareTransactionV3 =
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
nonceDataAvailabilityMode: DataAvailabilityMode,
|
|
7830
|
-
feeDataAvailabilityMode: DataAvailabilityMode
|
|
7831
|
-
})
|
|
7785
|
+
const DeclareTransactionV3 = MessageCodec({
|
|
7786
|
+
senderAddress: RequiredCodec(FieldElement$1),
|
|
7787
|
+
compiledClassHash: RequiredCodec(FieldElement$1),
|
|
7788
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7789
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7790
|
+
classHash: RequiredCodec(FieldElement$1),
|
|
7791
|
+
resourceBounds: RequiredCodec(ResourceBoundsMapping),
|
|
7792
|
+
tip: RequiredCodec(BigIntCodec),
|
|
7793
|
+
paymasterData: ArrayCodec(FieldElement$1),
|
|
7794
|
+
accountDeploymentData: ArrayCodec(FieldElement$1),
|
|
7795
|
+
nonceDataAvailabilityMode: RequiredCodec(DataAvailabilityMode),
|
|
7796
|
+
feeDataAvailabilityMode: RequiredCodec(DataAvailabilityMode)
|
|
7832
7797
|
});
|
|
7833
|
-
const DeployAccountTransactionV1 =
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
constructorCalldata: Schema.Array(FieldElement$1),
|
|
7841
|
-
classHash: FieldElement$1
|
|
7842
|
-
})
|
|
7798
|
+
const DeployAccountTransactionV1 = MessageCodec({
|
|
7799
|
+
maxFee: RequiredCodec(FieldElement$1),
|
|
7800
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7801
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7802
|
+
contractAddressSalt: RequiredCodec(FieldElement$1),
|
|
7803
|
+
constructorCalldata: ArrayCodec(FieldElement$1),
|
|
7804
|
+
classHash: RequiredCodec(FieldElement$1)
|
|
7843
7805
|
});
|
|
7844
|
-
const DeployAccountTransactionV3 =
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
nonceDataAvailabilityMode: DataAvailabilityMode,
|
|
7856
|
-
feeDataAvailabilityMode: DataAvailabilityMode
|
|
7857
|
-
})
|
|
7806
|
+
const DeployAccountTransactionV3 = MessageCodec({
|
|
7807
|
+
signature: ArrayCodec(FieldElement$1),
|
|
7808
|
+
nonce: RequiredCodec(FieldElement$1),
|
|
7809
|
+
contractAddressSalt: RequiredCodec(FieldElement$1),
|
|
7810
|
+
constructorCalldata: ArrayCodec(FieldElement$1),
|
|
7811
|
+
classHash: RequiredCodec(FieldElement$1),
|
|
7812
|
+
resourceBounds: RequiredCodec(ResourceBoundsMapping),
|
|
7813
|
+
tip: RequiredCodec(BigIntCodec),
|
|
7814
|
+
paymasterData: ArrayCodec(FieldElement$1),
|
|
7815
|
+
nonceDataAvailabilityMode: RequiredCodec(DataAvailabilityMode),
|
|
7816
|
+
feeDataAvailabilityMode: RequiredCodec(DataAvailabilityMode)
|
|
7858
7817
|
});
|
|
7859
|
-
const Transaction =
|
|
7860
|
-
filterIds:
|
|
7861
|
-
meta: TransactionMeta,
|
|
7862
|
-
transaction:
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7818
|
+
const Transaction = MessageCodec({
|
|
7819
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7820
|
+
meta: RequiredCodec(TransactionMeta),
|
|
7821
|
+
transaction: RequiredCodec(
|
|
7822
|
+
OneOfCodec({
|
|
7823
|
+
invokeV0: InvokeTransactionV0,
|
|
7824
|
+
invokeV1: InvokeTransactionV1,
|
|
7825
|
+
invokeV3: InvokeTransactionV3,
|
|
7826
|
+
l1Handler: L1HandlerTransaction,
|
|
7827
|
+
deploy: DeployTransaction,
|
|
7828
|
+
declareV0: DeclareTransactionV0,
|
|
7829
|
+
declareV1: DeclareTransactionV1,
|
|
7830
|
+
declareV2: DeclareTransactionV2,
|
|
7831
|
+
declareV3: DeclareTransactionV3,
|
|
7832
|
+
deployAccountV1: DeployAccountTransactionV1,
|
|
7833
|
+
deployAccountV3: DeployAccountTransactionV3
|
|
7834
|
+
})
|
|
7874
7835
|
)
|
|
7875
7836
|
});
|
|
7876
|
-
const PriceUnit =
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7837
|
+
const PriceUnit = {
|
|
7838
|
+
encode(x) {
|
|
7839
|
+
switch (x) {
|
|
7840
|
+
case "wei":
|
|
7841
|
+
return PriceUnit$1.WEI;
|
|
7842
|
+
case "fri":
|
|
7843
|
+
return PriceUnit$1.FRI;
|
|
7844
|
+
case "unknown":
|
|
7845
|
+
return PriceUnit$1.UNSPECIFIED;
|
|
7846
|
+
default:
|
|
7847
|
+
return PriceUnit$1.UNRECOGNIZED;
|
|
7848
|
+
}
|
|
7849
|
+
},
|
|
7850
|
+
decode(p) {
|
|
7851
|
+
const enumMap = {
|
|
7852
|
+
[PriceUnit$1.WEI]: "wei",
|
|
7853
|
+
[PriceUnit$1.FRI]: "fri",
|
|
7854
|
+
[PriceUnit$1.UNSPECIFIED]: "unknown",
|
|
7855
|
+
[PriceUnit$1.UNRECOGNIZED]: "unknown"
|
|
7856
|
+
};
|
|
7857
|
+
return enumMap[p] ?? "unknown";
|
|
7892
7858
|
}
|
|
7893
|
-
|
|
7894
|
-
const FeePayment =
|
|
7895
|
-
amount: FieldElement$1,
|
|
7896
|
-
unit: PriceUnit
|
|
7897
|
-
});
|
|
7898
|
-
const ComputationResources = Schema.Struct({
|
|
7899
|
-
steps: Schema.BigIntFromSelf,
|
|
7900
|
-
memoryHoles: Schema.optional(Schema.BigIntFromSelf),
|
|
7901
|
-
rangeCheckBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7902
|
-
pedersenBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7903
|
-
poseidonBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7904
|
-
ecOpBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7905
|
-
ecdsaBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7906
|
-
bitwiseBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7907
|
-
keccakBuiltinApplications: Schema.optional(Schema.BigIntFromSelf),
|
|
7908
|
-
segmentArenaBuiltin: Schema.optional(Schema.BigIntFromSelf)
|
|
7909
|
-
});
|
|
7910
|
-
const DataAvailabilityResources = Schema.Struct({
|
|
7911
|
-
l1Gas: Schema.BigIntFromSelf,
|
|
7912
|
-
l1DataGas: Schema.BigIntFromSelf
|
|
7913
|
-
});
|
|
7914
|
-
const ExecutionResources = Schema.Struct({
|
|
7915
|
-
computation: ComputationResources,
|
|
7916
|
-
dataAvailability: DataAvailabilityResources
|
|
7859
|
+
};
|
|
7860
|
+
const FeePayment = MessageCodec({
|
|
7861
|
+
amount: RequiredCodec(FieldElement$1),
|
|
7862
|
+
unit: RequiredCodec(PriceUnit)
|
|
7917
7863
|
});
|
|
7918
|
-
const
|
|
7919
|
-
|
|
7920
|
-
|
|
7864
|
+
const ComputationResources = MessageCodec({
|
|
7865
|
+
steps: RequiredCodec(BigIntCodec),
|
|
7866
|
+
memoryHoles: OptionalCodec(BigIntCodec),
|
|
7867
|
+
rangeCheckBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7868
|
+
pedersenBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7869
|
+
poseidonBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7870
|
+
ecOpBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7871
|
+
ecdsaBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7872
|
+
bitwiseBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7873
|
+
keccakBuiltinApplications: OptionalCodec(BigIntCodec),
|
|
7874
|
+
segmentArenaBuiltin: OptionalCodec(BigIntCodec)
|
|
7921
7875
|
});
|
|
7922
|
-
const
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
reason: Schema.optional(Schema.String)
|
|
7926
|
-
})
|
|
7876
|
+
const DataAvailabilityResources = MessageCodec({
|
|
7877
|
+
l1Gas: RequiredCodec(BigIntCodec),
|
|
7878
|
+
l1DataGas: RequiredCodec(BigIntCodec)
|
|
7927
7879
|
});
|
|
7928
|
-
const
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
actualFee: FeePayment,
|
|
7932
|
-
executionResources: ExecutionResources,
|
|
7933
|
-
executionResult: Schema.Union(ExecutionSucceeded, ExecutionReverted)
|
|
7880
|
+
const ExecutionResources = MessageCodec({
|
|
7881
|
+
computation: RequiredCodec(ComputationResources),
|
|
7882
|
+
dataAvailability: RequiredCodec(DataAvailabilityResources)
|
|
7934
7883
|
});
|
|
7935
|
-
const
|
|
7936
|
-
|
|
7937
|
-
|
|
7884
|
+
const ExecutionSucceeded = MessageCodec({});
|
|
7885
|
+
const ExecutionReverted = MessageCodec({
|
|
7886
|
+
reason: OptionalCodec(StringCodec)
|
|
7938
7887
|
});
|
|
7939
|
-
const
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7888
|
+
const TransactionReceiptMeta = MessageCodec({
|
|
7889
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
7890
|
+
transactionHash: RequiredCodec(FieldElement$1),
|
|
7891
|
+
actualFee: RequiredCodec(FeePayment),
|
|
7892
|
+
executionResources: RequiredCodec(ExecutionResources),
|
|
7893
|
+
executionResult: RequiredCodec(
|
|
7894
|
+
OneOfCodec({
|
|
7895
|
+
succeeded: ExecutionSucceeded,
|
|
7896
|
+
reverted: ExecutionReverted
|
|
7897
|
+
})
|
|
7898
|
+
)
|
|
7944
7899
|
});
|
|
7945
|
-
const
|
|
7946
|
-
|
|
7947
|
-
|
|
7900
|
+
const InvokeTransactionReceipt = MessageCodec({});
|
|
7901
|
+
const L1HandlerTransactionReceipt = MessageCodec({
|
|
7902
|
+
messageHash: RequiredCodec(Uint8ArrayCodec)
|
|
7948
7903
|
});
|
|
7949
|
-
const
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
contractAddress: FieldElement$1
|
|
7953
|
-
})
|
|
7904
|
+
const DeclareTransactionReceipt = MessageCodec({});
|
|
7905
|
+
const DeployTransactionReceipt = MessageCodec({
|
|
7906
|
+
contractAddress: RequiredCodec(FieldElement$1)
|
|
7954
7907
|
});
|
|
7955
|
-
const DeployAccountTransactionReceipt =
|
|
7956
|
-
|
|
7957
|
-
deployAccount: Schema.Struct({
|
|
7958
|
-
contractAddress: FieldElement$1
|
|
7959
|
-
})
|
|
7908
|
+
const DeployAccountTransactionReceipt = MessageCodec({
|
|
7909
|
+
contractAddress: RequiredCodec(FieldElement$1)
|
|
7960
7910
|
});
|
|
7961
|
-
const TransactionReceipt =
|
|
7962
|
-
filterIds:
|
|
7963
|
-
meta: TransactionReceiptMeta,
|
|
7964
|
-
receipt:
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7911
|
+
const TransactionReceipt = MessageCodec({
|
|
7912
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7913
|
+
meta: RequiredCodec(TransactionReceiptMeta),
|
|
7914
|
+
receipt: RequiredCodec(
|
|
7915
|
+
OneOfCodec({
|
|
7916
|
+
invoke: InvokeTransactionReceipt,
|
|
7917
|
+
l1Handler: L1HandlerTransactionReceipt,
|
|
7918
|
+
declare: DeclareTransactionReceipt,
|
|
7919
|
+
deploy: DeployTransactionReceipt,
|
|
7920
|
+
deployAccount: DeployAccountTransactionReceipt
|
|
7921
|
+
})
|
|
7970
7922
|
)
|
|
7971
7923
|
});
|
|
7972
|
-
const Event =
|
|
7973
|
-
filterIds:
|
|
7974
|
-
address: FieldElement$1,
|
|
7975
|
-
keys:
|
|
7976
|
-
data:
|
|
7977
|
-
eventIndex:
|
|
7978
|
-
transactionIndex:
|
|
7979
|
-
transactionHash: FieldElement$1,
|
|
7980
|
-
transactionStatus: TransactionStatus,
|
|
7981
|
-
eventIndexInTransaction:
|
|
7924
|
+
const Event = MessageCodec({
|
|
7925
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7926
|
+
address: RequiredCodec(FieldElement$1),
|
|
7927
|
+
keys: ArrayCodec(FieldElement$1),
|
|
7928
|
+
data: ArrayCodec(FieldElement$1),
|
|
7929
|
+
eventIndex: RequiredCodec(NumberCodec),
|
|
7930
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
7931
|
+
transactionHash: RequiredCodec(FieldElement$1),
|
|
7932
|
+
transactionStatus: RequiredCodec(TransactionStatus),
|
|
7933
|
+
eventIndexInTransaction: RequiredCodec(NumberCodec)
|
|
7982
7934
|
});
|
|
7983
|
-
const MessageToL1 =
|
|
7984
|
-
filterIds:
|
|
7985
|
-
fromAddress: FieldElement$1,
|
|
7986
|
-
toAddress: FieldElement$1,
|
|
7987
|
-
payload:
|
|
7988
|
-
messageIndex:
|
|
7989
|
-
transactionIndex:
|
|
7990
|
-
transactionHash: FieldElement$1,
|
|
7991
|
-
transactionStatus: TransactionStatus,
|
|
7992
|
-
messageIndexInTransaction:
|
|
7935
|
+
const MessageToL1 = MessageCodec({
|
|
7936
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7937
|
+
fromAddress: RequiredCodec(FieldElement$1),
|
|
7938
|
+
toAddress: RequiredCodec(FieldElement$1),
|
|
7939
|
+
payload: ArrayCodec(FieldElement$1),
|
|
7940
|
+
messageIndex: RequiredCodec(NumberCodec),
|
|
7941
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
7942
|
+
transactionHash: RequiredCodec(FieldElement$1),
|
|
7943
|
+
transactionStatus: RequiredCodec(TransactionStatus),
|
|
7944
|
+
messageIndexInTransaction: RequiredCodec(NumberCodec)
|
|
7993
7945
|
});
|
|
7994
|
-
const StorageEntry =
|
|
7995
|
-
key: FieldElement$1,
|
|
7996
|
-
value: FieldElement$1
|
|
7946
|
+
const StorageEntry = MessageCodec({
|
|
7947
|
+
key: RequiredCodec(FieldElement$1),
|
|
7948
|
+
value: RequiredCodec(FieldElement$1)
|
|
7997
7949
|
});
|
|
7998
|
-
const StorageDiff =
|
|
7999
|
-
filterIds:
|
|
8000
|
-
contractAddress: FieldElement$1,
|
|
8001
|
-
storageEntries:
|
|
7950
|
+
const StorageDiff = MessageCodec({
|
|
7951
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7952
|
+
contractAddress: RequiredCodec(FieldElement$1),
|
|
7953
|
+
storageEntries: ArrayCodec(StorageEntry)
|
|
8002
7954
|
});
|
|
8003
|
-
const DeclaredClass =
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
classHash: Schema.optional(FieldElement$1),
|
|
8007
|
-
compiledClassHash: Schema.optional(FieldElement$1)
|
|
8008
|
-
})
|
|
7955
|
+
const DeclaredClass = MessageCodec({
|
|
7956
|
+
classHash: OptionalCodec(FieldElement$1),
|
|
7957
|
+
compiledClassHash: OptionalCodec(FieldElement$1)
|
|
8009
7958
|
});
|
|
8010
|
-
const ReplacedClass =
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
contractAddress: Schema.optional(FieldElement$1),
|
|
8014
|
-
classHash: Schema.optional(FieldElement$1)
|
|
8015
|
-
})
|
|
7959
|
+
const ReplacedClass = MessageCodec({
|
|
7960
|
+
contractAddress: OptionalCodec(FieldElement$1),
|
|
7961
|
+
classHash: OptionalCodec(FieldElement$1)
|
|
8016
7962
|
});
|
|
8017
|
-
const DeployedContract =
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
contractAddress: Schema.optional(FieldElement$1),
|
|
8021
|
-
classHash: Schema.optional(FieldElement$1)
|
|
8022
|
-
})
|
|
7963
|
+
const DeployedContract = MessageCodec({
|
|
7964
|
+
contractAddress: OptionalCodec(FieldElement$1),
|
|
7965
|
+
classHash: OptionalCodec(FieldElement$1)
|
|
8023
7966
|
});
|
|
8024
|
-
const ContractChange =
|
|
8025
|
-
filterIds:
|
|
8026
|
-
change:
|
|
7967
|
+
const ContractChange = MessageCodec({
|
|
7968
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7969
|
+
change: RequiredCodec(
|
|
7970
|
+
OneOfCodec({
|
|
7971
|
+
declaredClass: DeclaredClass,
|
|
7972
|
+
replacedClass: ReplacedClass,
|
|
7973
|
+
deployedContract: DeployedContract
|
|
7974
|
+
})
|
|
7975
|
+
)
|
|
8027
7976
|
});
|
|
8028
|
-
const NonceUpdate =
|
|
8029
|
-
filterIds:
|
|
8030
|
-
contractAddress: FieldElement$1,
|
|
8031
|
-
nonce: FieldElement$1
|
|
7977
|
+
const NonceUpdate = MessageCodec({
|
|
7978
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
7979
|
+
contractAddress: RequiredCodec(FieldElement$1),
|
|
7980
|
+
nonce: RequiredCodec(FieldElement$1)
|
|
8032
7981
|
});
|
|
8033
|
-
const CallType =
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
}
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
7982
|
+
const CallType = {
|
|
7983
|
+
encode(x) {
|
|
7984
|
+
switch (x) {
|
|
7985
|
+
case "libraryCall":
|
|
7986
|
+
return CallType$1.LIBRARY_CALL;
|
|
7987
|
+
case "call":
|
|
7988
|
+
return CallType$1.CALL;
|
|
7989
|
+
case "delegate":
|
|
7990
|
+
return CallType$1.DELEGATE;
|
|
7991
|
+
case "unknown":
|
|
7992
|
+
return CallType$1.UNSPECIFIED;
|
|
7993
|
+
default:
|
|
7994
|
+
return CallType$1.UNRECOGNIZED;
|
|
7995
|
+
}
|
|
7996
|
+
},
|
|
7997
|
+
decode(p) {
|
|
7998
|
+
const enumMap = {
|
|
7999
|
+
[CallType$1.LIBRARY_CALL]: "libraryCall",
|
|
8000
|
+
[CallType$1.CALL]: "call",
|
|
8001
|
+
[CallType$1.DELEGATE]: "delegate",
|
|
8002
|
+
[CallType$1.UNSPECIFIED]: "unknown",
|
|
8003
|
+
[CallType$1.UNRECOGNIZED]: "unknown"
|
|
8004
|
+
};
|
|
8005
|
+
return enumMap[p] ?? "unknown";
|
|
8050
8006
|
}
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
)
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
calls: Schema.suspend(
|
|
8063
|
-
// biome-ignore lint/suspicious/noExplicitAny: not possible otherwise
|
|
8064
|
-
() => Schema.Array(FunctionInvocation)
|
|
8065
|
-
),
|
|
8066
|
-
events: Schema.Array(Schema.Number),
|
|
8067
|
-
messages: Schema.Array(Schema.Number)
|
|
8068
|
-
}) {
|
|
8069
|
-
}
|
|
8070
|
-
const ExecuteInvocationSuccess = Schema.Struct({
|
|
8071
|
-
_tag: tag("success"),
|
|
8072
|
-
success: FunctionInvocation
|
|
8007
|
+
};
|
|
8008
|
+
const _FunctionInvocationCodec = MessageCodec({
|
|
8009
|
+
contractAddress: RequiredCodec(FieldElement$1),
|
|
8010
|
+
entryPointSelector: RequiredCodec(FieldElement$1),
|
|
8011
|
+
calldata: ArrayCodec(FieldElement$1),
|
|
8012
|
+
callerAddress: RequiredCodec(FieldElement$1),
|
|
8013
|
+
classHash: RequiredCodec(FieldElement$1),
|
|
8014
|
+
callType: RequiredCodec(CallType),
|
|
8015
|
+
result: ArrayCodec(FieldElement$1),
|
|
8016
|
+
events: ArrayCodec(NumberCodec),
|
|
8017
|
+
messages: ArrayCodec(NumberCodec)
|
|
8073
8018
|
});
|
|
8074
|
-
const
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8019
|
+
const FunctionInvocationCodec = {
|
|
8020
|
+
encode(x) {
|
|
8021
|
+
const { calls, ...rest } = x;
|
|
8022
|
+
const encodedCalls = calls.map(FunctionInvocationCodec.encode);
|
|
8023
|
+
const encodedRest = _FunctionInvocationCodec.encode(rest);
|
|
8024
|
+
return { calls: encodedCalls, ...encodedRest };
|
|
8025
|
+
},
|
|
8026
|
+
decode(p) {
|
|
8027
|
+
const { calls = [], ...rest } = p;
|
|
8028
|
+
const decodedCalls = calls.map(FunctionInvocationCodec.decode);
|
|
8029
|
+
const decodedRest = _FunctionInvocationCodec.decode(rest);
|
|
8030
|
+
return { ...decodedRest, calls: decodedCalls };
|
|
8031
|
+
}
|
|
8032
|
+
};
|
|
8033
|
+
const ExecuteInvocationSuccess = FunctionInvocationCodec;
|
|
8034
|
+
const ExecuteInvocationReverted = MessageCodec({
|
|
8035
|
+
reason: OptionalCodec(StringCodec)
|
|
8079
8036
|
});
|
|
8080
|
-
const InvokeTransactionTrace =
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
ExecuteInvocationReverted
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
})
|
|
8037
|
+
const InvokeTransactionTrace = MessageCodec({
|
|
8038
|
+
validateInvocation: OptionalCodec(FunctionInvocationCodec),
|
|
8039
|
+
executeInvocation: RequiredCodec(
|
|
8040
|
+
OneOfCodec({
|
|
8041
|
+
success: ExecuteInvocationSuccess,
|
|
8042
|
+
reverted: ExecuteInvocationReverted
|
|
8043
|
+
})
|
|
8044
|
+
),
|
|
8045
|
+
feeTransferInvocation: OptionalCodec(FunctionInvocationCodec)
|
|
8090
8046
|
});
|
|
8091
|
-
const DeclareTransactionTrace =
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
validateInvocation: Schema.optional(FunctionInvocation),
|
|
8095
|
-
feeTransferInvocation: Schema.optional(FunctionInvocation)
|
|
8096
|
-
})
|
|
8047
|
+
const DeclareTransactionTrace = MessageCodec({
|
|
8048
|
+
validateInvocation: OptionalCodec(FunctionInvocationCodec),
|
|
8049
|
+
feeTransferInvocation: OptionalCodec(FunctionInvocationCodec)
|
|
8097
8050
|
});
|
|
8098
|
-
const DeployAccountTransactionTrace =
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
constructorInvocation: Schema.optional(FunctionInvocation),
|
|
8103
|
-
feeTransferInvocation: Schema.optional(FunctionInvocation)
|
|
8104
|
-
})
|
|
8051
|
+
const DeployAccountTransactionTrace = MessageCodec({
|
|
8052
|
+
validateInvocation: OptionalCodec(FunctionInvocationCodec),
|
|
8053
|
+
constructorInvocation: OptionalCodec(FunctionInvocationCodec),
|
|
8054
|
+
feeTransferInvocation: OptionalCodec(FunctionInvocationCodec)
|
|
8105
8055
|
});
|
|
8106
|
-
const L1HandlerTransactionTrace =
|
|
8107
|
-
|
|
8108
|
-
l1Handler: Schema.Struct({
|
|
8109
|
-
functionInvocation: Schema.optional(FunctionInvocation)
|
|
8110
|
-
})
|
|
8056
|
+
const L1HandlerTransactionTrace = MessageCodec({
|
|
8057
|
+
functionInvocation: OptionalCodec(FunctionInvocationCodec)
|
|
8111
8058
|
});
|
|
8112
|
-
const TransactionTrace =
|
|
8113
|
-
filterIds:
|
|
8114
|
-
transactionIndex:
|
|
8115
|
-
transactionHash: FieldElement$1,
|
|
8116
|
-
traceRoot:
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8059
|
+
const TransactionTrace = MessageCodec({
|
|
8060
|
+
filterIds: ArrayCodec(NumberCodec),
|
|
8061
|
+
transactionIndex: RequiredCodec(NumberCodec),
|
|
8062
|
+
transactionHash: RequiredCodec(FieldElement$1),
|
|
8063
|
+
traceRoot: RequiredCodec(
|
|
8064
|
+
OneOfCodec({
|
|
8065
|
+
invoke: InvokeTransactionTrace,
|
|
8066
|
+
declare: DeclareTransactionTrace,
|
|
8067
|
+
deployAccount: DeployAccountTransactionTrace,
|
|
8068
|
+
l1Handler: L1HandlerTransactionTrace
|
|
8069
|
+
})
|
|
8121
8070
|
)
|
|
8122
8071
|
});
|
|
8123
|
-
const Block =
|
|
8124
|
-
header: BlockHeader,
|
|
8125
|
-
transactions:
|
|
8126
|
-
receipts:
|
|
8127
|
-
events:
|
|
8128
|
-
messages:
|
|
8129
|
-
traces:
|
|
8130
|
-
storageDiffs:
|
|
8131
|
-
contractChanges:
|
|
8132
|
-
nonceUpdates:
|
|
8072
|
+
const Block = MessageCodec({
|
|
8073
|
+
header: RequiredCodec(BlockHeader),
|
|
8074
|
+
transactions: ArrayCodec(Transaction),
|
|
8075
|
+
receipts: ArrayCodec(TransactionReceipt),
|
|
8076
|
+
events: ArrayCodec(Event),
|
|
8077
|
+
messages: ArrayCodec(MessageToL1),
|
|
8078
|
+
traces: ArrayCodec(TransactionTrace),
|
|
8079
|
+
storageDiffs: ArrayCodec(StorageDiff),
|
|
8080
|
+
contractChanges: ArrayCodec(ContractChange),
|
|
8081
|
+
nonceUpdates: ArrayCodec(NonceUpdate)
|
|
8133
8082
|
});
|
|
8134
|
-
const BlockFromBytes =
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
}
|
|
8143
|
-
return Block$1.decode(value);
|
|
8144
|
-
},
|
|
8145
|
-
encode(value) {
|
|
8146
|
-
if (value === null) {
|
|
8147
|
-
return new Uint8Array();
|
|
8148
|
-
}
|
|
8149
|
-
return Block$1.encode(value).finish();
|
|
8150
|
-
}
|
|
8083
|
+
const BlockFromBytes = {
|
|
8084
|
+
encode(x) {
|
|
8085
|
+
const block = Block.encode(x);
|
|
8086
|
+
return Block$1.encode(block).finish();
|
|
8087
|
+
},
|
|
8088
|
+
decode(p) {
|
|
8089
|
+
const block = Block$1.decode(p);
|
|
8090
|
+
return Block.decode(block);
|
|
8151
8091
|
}
|
|
8152
|
-
|
|
8092
|
+
};
|
|
8153
8093
|
|
|
8154
|
-
const HeaderFilter =
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
default:
|
|
8177
|
-
return HeaderFilter$1.UNSPECIFIED;
|
|
8178
|
-
}
|
|
8179
|
-
}
|
|
8094
|
+
const HeaderFilter = {
|
|
8095
|
+
encode(x) {
|
|
8096
|
+
switch (x) {
|
|
8097
|
+
case "always":
|
|
8098
|
+
return HeaderFilter$1.ALWAYS;
|
|
8099
|
+
case "on_data":
|
|
8100
|
+
return HeaderFilter$1.ON_DATA;
|
|
8101
|
+
case "on_data_or_on_new_block":
|
|
8102
|
+
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
8103
|
+
default:
|
|
8104
|
+
return HeaderFilter$1.UNSPECIFIED;
|
|
8105
|
+
}
|
|
8106
|
+
},
|
|
8107
|
+
decode(p) {
|
|
8108
|
+
const enumMap = {
|
|
8109
|
+
[HeaderFilter$1.ALWAYS]: "always",
|
|
8110
|
+
[HeaderFilter$1.ON_DATA]: "on_data",
|
|
8111
|
+
[HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
|
|
8112
|
+
[HeaderFilter$1.UNSPECIFIED]: "unknown",
|
|
8113
|
+
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
8114
|
+
};
|
|
8115
|
+
return enumMap[p] ?? "unknown";
|
|
8180
8116
|
}
|
|
8181
|
-
|
|
8182
|
-
const Key =
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
decode({ value }) {
|
|
8187
|
-
if (value === void 0) {
|
|
8188
|
-
return null;
|
|
8189
|
-
}
|
|
8190
|
-
return value;
|
|
8191
|
-
},
|
|
8192
|
-
encode(value) {
|
|
8193
|
-
if (value === null) {
|
|
8194
|
-
return { value: void 0 };
|
|
8195
|
-
}
|
|
8196
|
-
return { value };
|
|
8117
|
+
};
|
|
8118
|
+
const Key = {
|
|
8119
|
+
encode(x) {
|
|
8120
|
+
if (x === null) {
|
|
8121
|
+
return { value: void 0 };
|
|
8197
8122
|
}
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
{
|
|
8204
|
-
decode(value) {
|
|
8205
|
-
const enumMap = {
|
|
8206
|
-
[TransactionStatusFilter$1.SUCCEEDED]: "succeeded",
|
|
8207
|
-
[TransactionStatusFilter$1.REVERTED]: "reverted",
|
|
8208
|
-
[TransactionStatusFilter$1.ALL]: "all",
|
|
8209
|
-
[TransactionStatusFilter$1.UNSPECIFIED]: "unknown",
|
|
8210
|
-
[TransactionStatusFilter$1.UNRECOGNIZED]: "unknown"
|
|
8211
|
-
};
|
|
8212
|
-
return enumMap[value] ?? "unknown";
|
|
8213
|
-
},
|
|
8214
|
-
encode(value) {
|
|
8215
|
-
switch (value) {
|
|
8216
|
-
case "succeeded":
|
|
8217
|
-
return TransactionStatusFilter$1.SUCCEEDED;
|
|
8218
|
-
case "reverted":
|
|
8219
|
-
return TransactionStatusFilter$1.REVERTED;
|
|
8220
|
-
case "all":
|
|
8221
|
-
return TransactionStatusFilter$1.ALL;
|
|
8222
|
-
default:
|
|
8223
|
-
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
8224
|
-
}
|
|
8123
|
+
return { value: FieldElement$1.encode(x) };
|
|
8124
|
+
},
|
|
8125
|
+
decode(p) {
|
|
8126
|
+
if (p.value === void 0) {
|
|
8127
|
+
return null;
|
|
8225
8128
|
}
|
|
8129
|
+
return FieldElement$1.decode(p.value);
|
|
8226
8130
|
}
|
|
8227
|
-
|
|
8228
|
-
const
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
}
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
_tag: tag("deploy"),
|
|
8264
|
-
deploy: Schema.Struct({})
|
|
8265
|
-
});
|
|
8266
|
-
const DeclareV0TransactionFilter = Schema.Struct({
|
|
8267
|
-
_tag: tag("declareV0"),
|
|
8268
|
-
declareV0: Schema.Struct({})
|
|
8269
|
-
});
|
|
8270
|
-
const DeclareV1TransactionFilter = Schema.Struct({
|
|
8271
|
-
_tag: tag("declareV1"),
|
|
8272
|
-
declareV1: Schema.Struct({})
|
|
8273
|
-
});
|
|
8274
|
-
const DeclareV2TransactionFilter = Schema.Struct({
|
|
8275
|
-
_tag: tag("declareV2"),
|
|
8276
|
-
declareV2: Schema.Struct({})
|
|
8277
|
-
});
|
|
8278
|
-
const DeclareV3TransactionFilter = Schema.Struct({
|
|
8279
|
-
_tag: tag("declareV3"),
|
|
8280
|
-
declareV3: Schema.Struct({})
|
|
8281
|
-
});
|
|
8282
|
-
const L1HandlerTransactionFilter = Schema.Struct({
|
|
8283
|
-
_tag: tag("l1Handler"),
|
|
8284
|
-
l1Handler: Schema.Struct({})
|
|
8285
|
-
});
|
|
8286
|
-
const DeployAccountV1TransactionFilter = Schema.Struct({
|
|
8287
|
-
_tag: tag("deployAccountV1"),
|
|
8288
|
-
deployAccountV1: Schema.Struct({})
|
|
8131
|
+
};
|
|
8132
|
+
const TransactionStatusFilter = {
|
|
8133
|
+
encode(x) {
|
|
8134
|
+
switch (x) {
|
|
8135
|
+
case "succeeded":
|
|
8136
|
+
return TransactionStatusFilter$1.SUCCEEDED;
|
|
8137
|
+
case "reverted":
|
|
8138
|
+
return TransactionStatusFilter$1.REVERTED;
|
|
8139
|
+
case "all":
|
|
8140
|
+
return TransactionStatusFilter$1.ALL;
|
|
8141
|
+
default:
|
|
8142
|
+
return TransactionStatusFilter$1.UNSPECIFIED;
|
|
8143
|
+
}
|
|
8144
|
+
},
|
|
8145
|
+
decode(p) {
|
|
8146
|
+
const enumMap = {
|
|
8147
|
+
[TransactionStatusFilter$1.SUCCEEDED]: "succeeded",
|
|
8148
|
+
[TransactionStatusFilter$1.REVERTED]: "reverted",
|
|
8149
|
+
[TransactionStatusFilter$1.ALL]: "all",
|
|
8150
|
+
[TransactionStatusFilter$1.UNSPECIFIED]: "unknown",
|
|
8151
|
+
[TransactionStatusFilter$1.UNRECOGNIZED]: "unknown"
|
|
8152
|
+
};
|
|
8153
|
+
return enumMap[p] ?? "unknown";
|
|
8154
|
+
}
|
|
8155
|
+
};
|
|
8156
|
+
const EventFilter = MessageCodec({
|
|
8157
|
+
id: OptionalCodec(NumberCodec),
|
|
8158
|
+
address: OptionalCodec(FieldElement$1),
|
|
8159
|
+
keys: OptionalCodec(ArrayCodec(Key)),
|
|
8160
|
+
strict: OptionalCodec(BooleanCodec),
|
|
8161
|
+
transactionStatus: OptionalCodec(TransactionStatusFilter),
|
|
8162
|
+
includeTransaction: OptionalCodec(BooleanCodec),
|
|
8163
|
+
includeReceipt: OptionalCodec(BooleanCodec),
|
|
8164
|
+
includeMessages: OptionalCodec(BooleanCodec),
|
|
8165
|
+
includeSiblings: OptionalCodec(BooleanCodec),
|
|
8166
|
+
includeTransactionTrace: OptionalCodec(BooleanCodec)
|
|
8289
8167
|
});
|
|
8290
|
-
const
|
|
8291
|
-
|
|
8292
|
-
|
|
8168
|
+
const MessageToL1Filter = MessageCodec({
|
|
8169
|
+
id: OptionalCodec(NumberCodec),
|
|
8170
|
+
fromAddress: OptionalCodec(FieldElement$1),
|
|
8171
|
+
toAddress: OptionalCodec(FieldElement$1),
|
|
8172
|
+
transactionStatus: OptionalCodec(TransactionStatusFilter),
|
|
8173
|
+
includeTransaction: OptionalCodec(BooleanCodec),
|
|
8174
|
+
includeReceipt: OptionalCodec(BooleanCodec),
|
|
8175
|
+
includeEvents: OptionalCodec(BooleanCodec),
|
|
8176
|
+
includeTransactionTrace: OptionalCodec(BooleanCodec)
|
|
8293
8177
|
});
|
|
8294
|
-
const
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8178
|
+
const InvokeTransactionV0Filter = MessageCodec({});
|
|
8179
|
+
const InvokeTransactionV1Filter = MessageCodec({});
|
|
8180
|
+
const InvokeTransactionV3Filter = MessageCodec({});
|
|
8181
|
+
const DeployTransactionFilter = MessageCodec({});
|
|
8182
|
+
const DeclareV0TransactionFilter = MessageCodec({});
|
|
8183
|
+
const DeclareV1TransactionFilter = MessageCodec({});
|
|
8184
|
+
const DeclareV2TransactionFilter = MessageCodec({});
|
|
8185
|
+
const DeclareV3TransactionFilter = MessageCodec({});
|
|
8186
|
+
const L1HandlerTransactionFilter = MessageCodec({});
|
|
8187
|
+
const DeployAccountV1TransactionFilter = MessageCodec({});
|
|
8188
|
+
const DeployAccountV3TransactionFilter = MessageCodec({});
|
|
8189
|
+
const TransactionFilter = MessageCodec({
|
|
8190
|
+
id: OptionalCodec(NumberCodec),
|
|
8191
|
+
transactionStatus: OptionalCodec(TransactionStatusFilter),
|
|
8192
|
+
includeReceipt: OptionalCodec(BooleanCodec),
|
|
8193
|
+
includeMessages: OptionalCodec(BooleanCodec),
|
|
8194
|
+
includeEvents: OptionalCodec(BooleanCodec),
|
|
8195
|
+
includeTrace: OptionalCodec(BooleanCodec),
|
|
8196
|
+
transactionType: OptionalCodec(
|
|
8197
|
+
OneOfCodec({
|
|
8198
|
+
invokeV0: InvokeTransactionV0Filter,
|
|
8199
|
+
invokeV1: InvokeTransactionV1Filter,
|
|
8200
|
+
invokeV3: InvokeTransactionV3Filter,
|
|
8201
|
+
deploy: DeployTransactionFilter,
|
|
8202
|
+
declareV0: DeclareV0TransactionFilter,
|
|
8203
|
+
declareV1: DeclareV1TransactionFilter,
|
|
8204
|
+
declareV2: DeclareV2TransactionFilter,
|
|
8205
|
+
declareV3: DeclareV3TransactionFilter,
|
|
8206
|
+
l1Handler: L1HandlerTransactionFilter,
|
|
8207
|
+
deployAccountV1: DeployAccountV1TransactionFilter,
|
|
8208
|
+
deployAccountV3: DeployAccountV3TransactionFilter
|
|
8209
|
+
})
|
|
8316
8210
|
)
|
|
8317
8211
|
});
|
|
8318
|
-
const StorageDiffFilter =
|
|
8319
|
-
id:
|
|
8320
|
-
contractAddress:
|
|
8321
|
-
});
|
|
8322
|
-
const DeclaredClassFilter = Schema.Struct({
|
|
8323
|
-
_tag: tag("declaredClass"),
|
|
8324
|
-
declaredClass: Schema.Struct({})
|
|
8212
|
+
const StorageDiffFilter = MessageCodec({
|
|
8213
|
+
id: OptionalCodec(NumberCodec),
|
|
8214
|
+
contractAddress: OptionalCodec(FieldElement$1)
|
|
8325
8215
|
});
|
|
8326
|
-
const
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
Schema.Union(
|
|
8338
|
-
DeclaredClassFilter,
|
|
8339
|
-
ReplacedClassFilter,
|
|
8340
|
-
DeployedContractFilter
|
|
8341
|
-
)
|
|
8216
|
+
const DeclaredClassFilter = MessageCodec({});
|
|
8217
|
+
const ReplacedClassFilter = MessageCodec({});
|
|
8218
|
+
const DeployedContractFilter = MessageCodec({});
|
|
8219
|
+
const ContractChangeFilter = MessageCodec({
|
|
8220
|
+
id: OptionalCodec(NumberCodec),
|
|
8221
|
+
change: OptionalCodec(
|
|
8222
|
+
OneOfCodec({
|
|
8223
|
+
declaredClass: DeclaredClassFilter,
|
|
8224
|
+
replacedClass: ReplacedClassFilter,
|
|
8225
|
+
deployedContract: DeployedContractFilter
|
|
8226
|
+
})
|
|
8342
8227
|
)
|
|
8343
8228
|
});
|
|
8344
|
-
const NonceUpdateFilter =
|
|
8345
|
-
id:
|
|
8346
|
-
contractAddress:
|
|
8229
|
+
const NonceUpdateFilter = MessageCodec({
|
|
8230
|
+
id: OptionalCodec(NumberCodec),
|
|
8231
|
+
contractAddress: OptionalCodec(FieldElement$1)
|
|
8347
8232
|
});
|
|
8348
|
-
const Filter =
|
|
8349
|
-
header:
|
|
8350
|
-
transactions:
|
|
8351
|
-
events:
|
|
8352
|
-
messages:
|
|
8353
|
-
storageDiffs:
|
|
8354
|
-
contractChanges:
|
|
8355
|
-
nonceUpdates:
|
|
8233
|
+
const Filter = MessageCodec({
|
|
8234
|
+
header: OptionalCodec(HeaderFilter),
|
|
8235
|
+
transactions: OptionalCodec(ArrayCodec(TransactionFilter)),
|
|
8236
|
+
events: OptionalCodec(ArrayCodec(EventFilter)),
|
|
8237
|
+
messages: OptionalCodec(ArrayCodec(MessageToL1Filter)),
|
|
8238
|
+
storageDiffs: OptionalCodec(ArrayCodec(StorageDiffFilter)),
|
|
8239
|
+
contractChanges: OptionalCodec(ArrayCodec(ContractChangeFilter)),
|
|
8240
|
+
nonceUpdates: OptionalCodec(ArrayCodec(NonceUpdateFilter))
|
|
8356
8241
|
});
|
|
8357
|
-
const
|
|
8358
|
-
|
|
8359
|
-
const
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
{
|
|
8363
|
-
|
|
8364
|
-
decode(
|
|
8365
|
-
return Filter$1.decode(value);
|
|
8366
|
-
},
|
|
8367
|
-
encode(value) {
|
|
8368
|
-
return Filter$1.encode(value).finish();
|
|
8369
|
-
}
|
|
8242
|
+
const FilterFromBytes = {
|
|
8243
|
+
encode(x) {
|
|
8244
|
+
const filter = Filter.encode(x);
|
|
8245
|
+
return Filter$1.encode(filter).finish();
|
|
8246
|
+
},
|
|
8247
|
+
decode(p) {
|
|
8248
|
+
const filter = Filter$1.decode(p);
|
|
8249
|
+
return Filter.decode(filter);
|
|
8370
8250
|
}
|
|
8371
|
-
|
|
8372
|
-
const filterToBytes = Schema.encodeSync(FilterFromBytes);
|
|
8373
|
-
const filterFromBytes = Schema.decodeSync(FilterFromBytes);
|
|
8251
|
+
};
|
|
8374
8252
|
function mergeFilter(a, b) {
|
|
8375
8253
|
const header = mergeHeaderFilter(a.header, b.header);
|
|
8376
8254
|
return {
|
|
@@ -8593,4 +8471,4 @@ const StarknetStream = new StreamConfig(
|
|
|
8593
8471
|
mergeFilter
|
|
8594
8472
|
);
|
|
8595
8473
|
|
|
8596
|
-
export { Block, BlockFromBytes, BlockHeader, CallType, ComputationResources, ContractChange, ContractChangeFilter, DataAvailabilityMode, DataAvailabilityResources, DeclareTransactionReceipt, DeclareTransactionTrace, DeclareTransactionV0, DeclareTransactionV1, DeclareTransactionV2, DeclareTransactionV3, DeclareV0TransactionFilter, DeclareV1TransactionFilter, DeclareV2TransactionFilter, DeclareV3TransactionFilter, DeclaredClass, DeclaredClassFilter, DecodeEventError, DeployAccountTransactionReceipt, DeployAccountTransactionTrace, DeployAccountTransactionV1, DeployAccountTransactionV3, DeployAccountV1TransactionFilter, DeployAccountV3TransactionFilter, DeployTransaction, DeployTransactionFilter, DeployTransactionReceipt, DeployedContract, DeployedContractFilter, Event, EventFilter, ExecuteInvocationReverted, ExecuteInvocationSuccess, ExecutionResources, ExecutionReverted, ExecutionSucceeded, FeePayment, FieldElement$1 as FieldElement,
|
|
8474
|
+
export { Block, BlockFromBytes, BlockHeader, CallType, ComputationResources, ContractChange, ContractChangeFilter, DataAvailabilityMode, DataAvailabilityResources, DeclareTransactionReceipt, DeclareTransactionTrace, DeclareTransactionV0, DeclareTransactionV1, DeclareTransactionV2, DeclareTransactionV3, DeclareV0TransactionFilter, DeclareV1TransactionFilter, DeclareV2TransactionFilter, DeclareV3TransactionFilter, DeclaredClass, DeclaredClassFilter, DecodeEventError, DeployAccountTransactionReceipt, DeployAccountTransactionTrace, DeployAccountTransactionV1, DeployAccountTransactionV3, DeployAccountV1TransactionFilter, DeployAccountV3TransactionFilter, DeployTransaction, DeployTransactionFilter, DeployTransactionReceipt, DeployedContract, DeployedContractFilter, Event, EventFilter, ExecuteInvocationReverted, ExecuteInvocationSuccess, ExecutionResources, ExecutionReverted, ExecutionSucceeded, FeePayment, FieldElement$1 as FieldElement, Filter, FilterFromBytes, HeaderFilter, InvokeTransactionReceipt, InvokeTransactionTrace, InvokeTransactionV0, InvokeTransactionV0Filter, InvokeTransactionV1, InvokeTransactionV1Filter, InvokeTransactionV3, InvokeTransactionV3Filter, Key, L1DataAvailabilityMode, L1HandlerTransaction, L1HandlerTransactionFilter, L1HandlerTransactionReceipt, L1HandlerTransactionTrace, MessageToL1, MessageToL1Filter, NonceUpdate, NonceUpdateFilter, PriceUnit, ReplacedClass, ReplacedClassFilter, ResourceBounds, ResourceBoundsMapping, ResourcePrice, StarknetStream, StorageDiff, StorageDiffFilter, StorageEntry, Transaction, TransactionFilter, TransactionMeta, TransactionReceipt, TransactionReceiptMeta, TransactionStatus, TransactionStatusFilter, TransactionTrace, U128, decodeEvent, getBigIntSelector, getEventSelector, getReceipt, getSelector, getTransaction, mergeFilter, index as proto };
|