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