@apibara/starknet 2.1.0-beta.2 → 2.1.0-beta.20
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 +1221 -232
- package/dist/index.d.cts +2062 -1461
- package/dist/index.d.mts +2062 -1461
- package/dist/index.d.ts +2062 -1461
- package/dist/index.mjs +1213 -233
- package/package.json +2 -2
- package/src/block.ts +220 -0
- package/src/filter.ts +34 -0
- package/src/proto/data.ts +1081 -1
- package/src/proto/filter.ts +76 -2
package/dist/index.mjs
CHANGED
|
@@ -434,6 +434,49 @@ function dataAvailabilityModeToJSON(object) {
|
|
|
434
434
|
return "UNRECOGNIZED";
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
+
var CallType$1 = /* @__PURE__ */ ((CallType2) => {
|
|
438
|
+
CallType2[CallType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
439
|
+
CallType2[CallType2["LIBRARY_CALL"] = 1] = "LIBRARY_CALL";
|
|
440
|
+
CallType2[CallType2["CALL"] = 2] = "CALL";
|
|
441
|
+
CallType2[CallType2["DELEGATE"] = 3] = "DELEGATE";
|
|
442
|
+
CallType2[CallType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
443
|
+
return CallType2;
|
|
444
|
+
})(CallType$1 || {});
|
|
445
|
+
function callTypeFromJSON(object) {
|
|
446
|
+
switch (object) {
|
|
447
|
+
case 0:
|
|
448
|
+
case "CALL_TYPE_UNSPECIFIED":
|
|
449
|
+
return 0 /* UNSPECIFIED */;
|
|
450
|
+
case 1:
|
|
451
|
+
case "CALL_TYPE_LIBRARY_CALL":
|
|
452
|
+
return 1 /* LIBRARY_CALL */;
|
|
453
|
+
case 2:
|
|
454
|
+
case "CALL_TYPE_CALL":
|
|
455
|
+
return 2 /* CALL */;
|
|
456
|
+
case 3:
|
|
457
|
+
case "CALL_TYPE_DELEGATE":
|
|
458
|
+
return 3 /* DELEGATE */;
|
|
459
|
+
case -1:
|
|
460
|
+
case "UNRECOGNIZED":
|
|
461
|
+
default:
|
|
462
|
+
return -1 /* UNRECOGNIZED */;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
function callTypeToJSON(object) {
|
|
466
|
+
switch (object) {
|
|
467
|
+
case 0 /* UNSPECIFIED */:
|
|
468
|
+
return "CALL_TYPE_UNSPECIFIED";
|
|
469
|
+
case 1 /* LIBRARY_CALL */:
|
|
470
|
+
return "CALL_TYPE_LIBRARY_CALL";
|
|
471
|
+
case 2 /* CALL */:
|
|
472
|
+
return "CALL_TYPE_CALL";
|
|
473
|
+
case 3 /* DELEGATE */:
|
|
474
|
+
return "CALL_TYPE_DELEGATE";
|
|
475
|
+
case -1 /* UNRECOGNIZED */:
|
|
476
|
+
default:
|
|
477
|
+
return "UNRECOGNIZED";
|
|
478
|
+
}
|
|
479
|
+
}
|
|
437
480
|
function createBaseBlock() {
|
|
438
481
|
return {
|
|
439
482
|
header: void 0,
|
|
@@ -443,7 +486,8 @@ function createBaseBlock() {
|
|
|
443
486
|
messages: [],
|
|
444
487
|
storageDiffs: [],
|
|
445
488
|
contractChanges: [],
|
|
446
|
-
nonceUpdates: []
|
|
489
|
+
nonceUpdates: [],
|
|
490
|
+
traces: []
|
|
447
491
|
};
|
|
448
492
|
}
|
|
449
493
|
const Block$1 = {
|
|
@@ -486,6 +530,11 @@ const Block$1 = {
|
|
|
486
530
|
NonceUpdate$1.encode(v, writer.uint32(66).fork()).ldelim();
|
|
487
531
|
}
|
|
488
532
|
}
|
|
533
|
+
if (message.traces !== void 0 && message.traces.length !== 0) {
|
|
534
|
+
for (const v of message.traces) {
|
|
535
|
+
TransactionTrace$1.encode(v, writer.uint32(74).fork()).ldelim();
|
|
536
|
+
}
|
|
537
|
+
}
|
|
489
538
|
return writer;
|
|
490
539
|
},
|
|
491
540
|
decode(input, length) {
|
|
@@ -543,6 +592,12 @@ const Block$1 = {
|
|
|
543
592
|
}
|
|
544
593
|
message.nonceUpdates.push(NonceUpdate$1.decode(reader, reader.uint32()));
|
|
545
594
|
continue;
|
|
595
|
+
case 9:
|
|
596
|
+
if (tag !== 74) {
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
599
|
+
message.traces.push(TransactionTrace$1.decode(reader, reader.uint32()));
|
|
600
|
+
continue;
|
|
546
601
|
}
|
|
547
602
|
if ((tag & 7) === 4 || tag === 0) {
|
|
548
603
|
break;
|
|
@@ -560,7 +615,8 @@ const Block$1 = {
|
|
|
560
615
|
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1$1.fromJSON(e)) : [],
|
|
561
616
|
storageDiffs: globalThis.Array.isArray(object?.storageDiffs) ? object.storageDiffs.map((e) => StorageDiff$1.fromJSON(e)) : [],
|
|
562
617
|
contractChanges: globalThis.Array.isArray(object?.contractChanges) ? object.contractChanges.map((e) => ContractChange$1.fromJSON(e)) : [],
|
|
563
|
-
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdate$1.fromJSON(e)) : []
|
|
618
|
+
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdate$1.fromJSON(e)) : [],
|
|
619
|
+
traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => TransactionTrace$1.fromJSON(e)) : []
|
|
564
620
|
};
|
|
565
621
|
},
|
|
566
622
|
toJSON(message) {
|
|
@@ -589,6 +645,9 @@ const Block$1 = {
|
|
|
589
645
|
if (message.nonceUpdates?.length) {
|
|
590
646
|
obj.nonceUpdates = message.nonceUpdates.map((e) => NonceUpdate$1.toJSON(e));
|
|
591
647
|
}
|
|
648
|
+
if (message.traces?.length) {
|
|
649
|
+
obj.traces = message.traces.map((e) => TransactionTrace$1.toJSON(e));
|
|
650
|
+
}
|
|
592
651
|
return obj;
|
|
593
652
|
},
|
|
594
653
|
create(base) {
|
|
@@ -604,6 +663,7 @@ const Block$1 = {
|
|
|
604
663
|
message.storageDiffs = object.storageDiffs?.map((e) => StorageDiff$1.fromPartial(e)) || [];
|
|
605
664
|
message.contractChanges = object.contractChanges?.map((e) => ContractChange$1.fromPartial(e)) || [];
|
|
606
665
|
message.nonceUpdates = object.nonceUpdates?.map((e) => NonceUpdate$1.fromPartial(e)) || [];
|
|
666
|
+
message.traces = object.traces?.map((e) => TransactionTrace$1.fromPartial(e)) || [];
|
|
607
667
|
return message;
|
|
608
668
|
}
|
|
609
669
|
};
|
|
@@ -4919,232 +4979,1013 @@ const NonceUpdate$1 = {
|
|
|
4919
4979
|
return message;
|
|
4920
4980
|
}
|
|
4921
4981
|
};
|
|
4922
|
-
function
|
|
4923
|
-
|
|
4924
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
4925
|
-
} else {
|
|
4926
|
-
const bin = globalThis.atob(b64);
|
|
4927
|
-
const arr = new Uint8Array(bin.length);
|
|
4928
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
4929
|
-
arr[i] = bin.charCodeAt(i);
|
|
4930
|
-
}
|
|
4931
|
-
return arr;
|
|
4932
|
-
}
|
|
4933
|
-
}
|
|
4934
|
-
function base64FromBytes(arr) {
|
|
4935
|
-
if (globalThis.Buffer) {
|
|
4936
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
4937
|
-
} else {
|
|
4938
|
-
const bin = [];
|
|
4939
|
-
arr.forEach((byte) => {
|
|
4940
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
4941
|
-
});
|
|
4942
|
-
return globalThis.btoa(bin.join(""));
|
|
4943
|
-
}
|
|
4944
|
-
}
|
|
4945
|
-
function toTimestamp(date) {
|
|
4946
|
-
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
4947
|
-
const nanos = date.getTime() % 1e3 * 1e6;
|
|
4948
|
-
return { seconds, nanos };
|
|
4949
|
-
}
|
|
4950
|
-
function fromTimestamp(t) {
|
|
4951
|
-
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
4952
|
-
millis += (t.nanos || 0) / 1e6;
|
|
4953
|
-
return new globalThis.Date(millis);
|
|
4954
|
-
}
|
|
4955
|
-
function fromJsonTimestamp(o) {
|
|
4956
|
-
if (o instanceof globalThis.Date) {
|
|
4957
|
-
return o;
|
|
4958
|
-
} else if (typeof o === "string") {
|
|
4959
|
-
return new globalThis.Date(o);
|
|
4960
|
-
} else {
|
|
4961
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
4962
|
-
}
|
|
4963
|
-
}
|
|
4964
|
-
function longToBigint(long) {
|
|
4965
|
-
return BigInt(long.toString());
|
|
4966
|
-
}
|
|
4967
|
-
if (_m0.util.Long !== Long) {
|
|
4968
|
-
_m0.util.Long = Long;
|
|
4969
|
-
_m0.configure();
|
|
4970
|
-
}
|
|
4971
|
-
function isSet$1(value) {
|
|
4972
|
-
return value !== null && value !== void 0;
|
|
4973
|
-
}
|
|
4974
|
-
|
|
4975
|
-
const data = {
|
|
4976
|
-
__proto__: null,
|
|
4977
|
-
Block: Block$1,
|
|
4978
|
-
BlockHeader: BlockHeader$1,
|
|
4979
|
-
ComputationResources: ComputationResources$1,
|
|
4980
|
-
ContractChange: ContractChange$1,
|
|
4981
|
-
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
4982
|
-
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
4983
|
-
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
4984
|
-
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
4985
|
-
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
4986
|
-
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
4987
|
-
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
4988
|
-
DeclaredClass: DeclaredClass$1,
|
|
4989
|
-
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
4990
|
-
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
4991
|
-
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
4992
|
-
DeployTransaction: DeployTransaction$1,
|
|
4993
|
-
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
4994
|
-
DeployedContract: DeployedContract$1,
|
|
4995
|
-
Event: Event$1,
|
|
4996
|
-
ExecutionResources: ExecutionResources$1,
|
|
4997
|
-
ExecutionReverted: ExecutionReverted$1,
|
|
4998
|
-
ExecutionStatus: ExecutionStatus,
|
|
4999
|
-
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
5000
|
-
FeePayment: FeePayment$1,
|
|
5001
|
-
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
5002
|
-
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
5003
|
-
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
5004
|
-
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
5005
|
-
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
5006
|
-
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
5007
|
-
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
5008
|
-
MessageToL1: MessageToL1$1,
|
|
5009
|
-
NonceUpdate: NonceUpdate$1,
|
|
5010
|
-
PriceUnit: PriceUnit$1,
|
|
5011
|
-
ReplacedClass: ReplacedClass$1,
|
|
5012
|
-
ResourceBounds: ResourceBounds$1,
|
|
5013
|
-
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
5014
|
-
ResourcePrice: ResourcePrice$1,
|
|
5015
|
-
StorageDiff: StorageDiff$1,
|
|
5016
|
-
StorageEntry: StorageEntry$1,
|
|
5017
|
-
Transaction: Transaction$1,
|
|
5018
|
-
TransactionMeta: TransactionMeta$1,
|
|
5019
|
-
TransactionReceipt: TransactionReceipt$1,
|
|
5020
|
-
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
5021
|
-
TransactionStatus: TransactionStatus$1,
|
|
5022
|
-
Uint128: Uint128,
|
|
5023
|
-
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
5024
|
-
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
5025
|
-
executionStatusFromJSON: executionStatusFromJSON,
|
|
5026
|
-
executionStatusToJSON: executionStatusToJSON,
|
|
5027
|
-
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
5028
|
-
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
5029
|
-
priceUnitFromJSON: priceUnitFromJSON,
|
|
5030
|
-
priceUnitToJSON: priceUnitToJSON,
|
|
5031
|
-
protobufPackage: protobufPackage$1,
|
|
5032
|
-
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
5033
|
-
transactionStatusToJSON: transactionStatusToJSON
|
|
5034
|
-
};
|
|
5035
|
-
|
|
5036
|
-
const protobufPackage = "starknet.v2";
|
|
5037
|
-
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
5038
|
-
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5039
|
-
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
5040
|
-
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
5041
|
-
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
5042
|
-
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5043
|
-
return HeaderFilter2;
|
|
5044
|
-
})(HeaderFilter$1 || {});
|
|
5045
|
-
function headerFilterFromJSON(object) {
|
|
5046
|
-
switch (object) {
|
|
5047
|
-
case 0:
|
|
5048
|
-
case "HEADER_FILTER_UNSPECIFIED":
|
|
5049
|
-
return 0 /* UNSPECIFIED */;
|
|
5050
|
-
case 1:
|
|
5051
|
-
case "HEADER_FILTER_ALWAYS":
|
|
5052
|
-
return 1 /* ALWAYS */;
|
|
5053
|
-
case 2:
|
|
5054
|
-
case "HEADER_FILTER_ON_DATA":
|
|
5055
|
-
return 2 /* ON_DATA */;
|
|
5056
|
-
case 3:
|
|
5057
|
-
case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
|
|
5058
|
-
return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
|
|
5059
|
-
case -1:
|
|
5060
|
-
case "UNRECOGNIZED":
|
|
5061
|
-
default:
|
|
5062
|
-
return -1 /* UNRECOGNIZED */;
|
|
5063
|
-
}
|
|
5064
|
-
}
|
|
5065
|
-
function headerFilterToJSON(object) {
|
|
5066
|
-
switch (object) {
|
|
5067
|
-
case 0 /* UNSPECIFIED */:
|
|
5068
|
-
return "HEADER_FILTER_UNSPECIFIED";
|
|
5069
|
-
case 1 /* ALWAYS */:
|
|
5070
|
-
return "HEADER_FILTER_ALWAYS";
|
|
5071
|
-
case 2 /* ON_DATA */:
|
|
5072
|
-
return "HEADER_FILTER_ON_DATA";
|
|
5073
|
-
case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
|
|
5074
|
-
return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
|
|
5075
|
-
case -1 /* UNRECOGNIZED */:
|
|
5076
|
-
default:
|
|
5077
|
-
return "UNRECOGNIZED";
|
|
5078
|
-
}
|
|
5079
|
-
}
|
|
5080
|
-
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
5081
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5082
|
-
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
5083
|
-
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
5084
|
-
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
5085
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5086
|
-
return TransactionStatusFilter2;
|
|
5087
|
-
})(TransactionStatusFilter$1 || {});
|
|
5088
|
-
function transactionStatusFilterFromJSON(object) {
|
|
5089
|
-
switch (object) {
|
|
5090
|
-
case 0:
|
|
5091
|
-
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
5092
|
-
return 0 /* UNSPECIFIED */;
|
|
5093
|
-
case 1:
|
|
5094
|
-
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
5095
|
-
return 1 /* SUCCEEDED */;
|
|
5096
|
-
case 2:
|
|
5097
|
-
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
5098
|
-
return 2 /* REVERTED */;
|
|
5099
|
-
case 3:
|
|
5100
|
-
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
5101
|
-
return 3 /* ALL */;
|
|
5102
|
-
case -1:
|
|
5103
|
-
case "UNRECOGNIZED":
|
|
5104
|
-
default:
|
|
5105
|
-
return -1 /* UNRECOGNIZED */;
|
|
5106
|
-
}
|
|
5107
|
-
}
|
|
5108
|
-
function transactionStatusFilterToJSON(object) {
|
|
5109
|
-
switch (object) {
|
|
5110
|
-
case 0 /* UNSPECIFIED */:
|
|
5111
|
-
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
5112
|
-
case 1 /* SUCCEEDED */:
|
|
5113
|
-
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
5114
|
-
case 2 /* REVERTED */:
|
|
5115
|
-
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
5116
|
-
case 3 /* ALL */:
|
|
5117
|
-
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
5118
|
-
case -1 /* UNRECOGNIZED */:
|
|
5119
|
-
default:
|
|
5120
|
-
return "UNRECOGNIZED";
|
|
5121
|
-
}
|
|
5122
|
-
}
|
|
5123
|
-
function createBaseFilter() {
|
|
5124
|
-
return {
|
|
5125
|
-
header: 0,
|
|
5126
|
-
transactions: [],
|
|
5127
|
-
events: [],
|
|
5128
|
-
messages: [],
|
|
5129
|
-
storageDiffs: [],
|
|
5130
|
-
contractChanges: [],
|
|
5131
|
-
nonceUpdates: []
|
|
5132
|
-
};
|
|
4982
|
+
function createBaseTransactionTrace() {
|
|
4983
|
+
return { filterIds: [], transactionIndex: 0, transactionHash: void 0, traceRoot: void 0 };
|
|
5133
4984
|
}
|
|
5134
|
-
const
|
|
4985
|
+
const TransactionTrace$1 = {
|
|
5135
4986
|
encode(message, writer = _m0.Writer.create()) {
|
|
5136
|
-
if (message.
|
|
5137
|
-
writer.uint32(
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
for (const v of message.transactions) {
|
|
5141
|
-
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
4987
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
4988
|
+
writer.uint32(10).fork();
|
|
4989
|
+
for (const v of message.filterIds) {
|
|
4990
|
+
writer.uint32(v);
|
|
5142
4991
|
}
|
|
4992
|
+
writer.ldelim();
|
|
5143
4993
|
}
|
|
5144
|
-
if (message.
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
4994
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
4995
|
+
writer.uint32(16).uint32(message.transactionIndex);
|
|
4996
|
+
}
|
|
4997
|
+
if (message.transactionHash !== void 0) {
|
|
4998
|
+
FieldElement.encode(message.transactionHash, writer.uint32(26).fork()).ldelim();
|
|
4999
|
+
}
|
|
5000
|
+
switch (message.traceRoot?.$case) {
|
|
5001
|
+
case "invoke":
|
|
5002
|
+
InvokeTransactionTrace$1.encode(message.traceRoot.invoke, writer.uint32(34).fork()).ldelim();
|
|
5003
|
+
break;
|
|
5004
|
+
case "declare":
|
|
5005
|
+
DeclareTransactionTrace$1.encode(message.traceRoot.declare, writer.uint32(42).fork()).ldelim();
|
|
5006
|
+
break;
|
|
5007
|
+
case "deployAccount":
|
|
5008
|
+
DeployAccountTransactionTrace$1.encode(message.traceRoot.deployAccount, writer.uint32(50).fork()).ldelim();
|
|
5009
|
+
break;
|
|
5010
|
+
case "l1Handler":
|
|
5011
|
+
L1HandlerTransactionTrace$1.encode(message.traceRoot.l1Handler, writer.uint32(58).fork()).ldelim();
|
|
5012
|
+
break;
|
|
5013
|
+
}
|
|
5014
|
+
return writer;
|
|
5015
|
+
},
|
|
5016
|
+
decode(input, length) {
|
|
5017
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5018
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5019
|
+
const message = createBaseTransactionTrace();
|
|
5020
|
+
while (reader.pos < end) {
|
|
5021
|
+
const tag = reader.uint32();
|
|
5022
|
+
switch (tag >>> 3) {
|
|
5023
|
+
case 1:
|
|
5024
|
+
if (tag === 8) {
|
|
5025
|
+
message.filterIds.push(reader.uint32());
|
|
5026
|
+
continue;
|
|
5027
|
+
}
|
|
5028
|
+
if (tag === 10) {
|
|
5029
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5030
|
+
while (reader.pos < end2) {
|
|
5031
|
+
message.filterIds.push(reader.uint32());
|
|
5032
|
+
}
|
|
5033
|
+
continue;
|
|
5034
|
+
}
|
|
5035
|
+
break;
|
|
5036
|
+
case 2:
|
|
5037
|
+
if (tag !== 16) {
|
|
5038
|
+
break;
|
|
5039
|
+
}
|
|
5040
|
+
message.transactionIndex = reader.uint32();
|
|
5041
|
+
continue;
|
|
5042
|
+
case 3:
|
|
5043
|
+
if (tag !== 26) {
|
|
5044
|
+
break;
|
|
5045
|
+
}
|
|
5046
|
+
message.transactionHash = FieldElement.decode(reader, reader.uint32());
|
|
5047
|
+
continue;
|
|
5048
|
+
case 4:
|
|
5049
|
+
if (tag !== 34) {
|
|
5050
|
+
break;
|
|
5051
|
+
}
|
|
5052
|
+
message.traceRoot = { $case: "invoke", invoke: InvokeTransactionTrace$1.decode(reader, reader.uint32()) };
|
|
5053
|
+
continue;
|
|
5054
|
+
case 5:
|
|
5055
|
+
if (tag !== 42) {
|
|
5056
|
+
break;
|
|
5057
|
+
}
|
|
5058
|
+
message.traceRoot = { $case: "declare", declare: DeclareTransactionTrace$1.decode(reader, reader.uint32()) };
|
|
5059
|
+
continue;
|
|
5060
|
+
case 6:
|
|
5061
|
+
if (tag !== 50) {
|
|
5062
|
+
break;
|
|
5063
|
+
}
|
|
5064
|
+
message.traceRoot = {
|
|
5065
|
+
$case: "deployAccount",
|
|
5066
|
+
deployAccount: DeployAccountTransactionTrace$1.decode(reader, reader.uint32())
|
|
5067
|
+
};
|
|
5068
|
+
continue;
|
|
5069
|
+
case 7:
|
|
5070
|
+
if (tag !== 58) {
|
|
5071
|
+
break;
|
|
5072
|
+
}
|
|
5073
|
+
message.traceRoot = {
|
|
5074
|
+
$case: "l1Handler",
|
|
5075
|
+
l1Handler: L1HandlerTransactionTrace$1.decode(reader, reader.uint32())
|
|
5076
|
+
};
|
|
5077
|
+
continue;
|
|
5078
|
+
}
|
|
5079
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5080
|
+
break;
|
|
5081
|
+
}
|
|
5082
|
+
reader.skipType(tag & 7);
|
|
5083
|
+
}
|
|
5084
|
+
return message;
|
|
5085
|
+
},
|
|
5086
|
+
fromJSON(object) {
|
|
5087
|
+
return {
|
|
5088
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
5089
|
+
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
5090
|
+
transactionHash: isSet$1(object.transactionHash) ? FieldElement.fromJSON(object.transactionHash) : void 0,
|
|
5091
|
+
traceRoot: isSet$1(object.invoke) ? { $case: "invoke", invoke: InvokeTransactionTrace$1.fromJSON(object.invoke) } : isSet$1(object.declare) ? { $case: "declare", declare: DeclareTransactionTrace$1.fromJSON(object.declare) } : isSet$1(object.deployAccount) ? { $case: "deployAccount", deployAccount: DeployAccountTransactionTrace$1.fromJSON(object.deployAccount) } : isSet$1(object.l1Handler) ? { $case: "l1Handler", l1Handler: L1HandlerTransactionTrace$1.fromJSON(object.l1Handler) } : void 0
|
|
5092
|
+
};
|
|
5093
|
+
},
|
|
5094
|
+
toJSON(message) {
|
|
5095
|
+
const obj = {};
|
|
5096
|
+
if (message.filterIds?.length) {
|
|
5097
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
5098
|
+
}
|
|
5099
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
5100
|
+
obj.transactionIndex = Math.round(message.transactionIndex);
|
|
5101
|
+
}
|
|
5102
|
+
if (message.transactionHash !== void 0) {
|
|
5103
|
+
obj.transactionHash = FieldElement.toJSON(message.transactionHash);
|
|
5104
|
+
}
|
|
5105
|
+
if (message.traceRoot?.$case === "invoke") {
|
|
5106
|
+
obj.invoke = InvokeTransactionTrace$1.toJSON(message.traceRoot.invoke);
|
|
5107
|
+
}
|
|
5108
|
+
if (message.traceRoot?.$case === "declare") {
|
|
5109
|
+
obj.declare = DeclareTransactionTrace$1.toJSON(message.traceRoot.declare);
|
|
5110
|
+
}
|
|
5111
|
+
if (message.traceRoot?.$case === "deployAccount") {
|
|
5112
|
+
obj.deployAccount = DeployAccountTransactionTrace$1.toJSON(message.traceRoot.deployAccount);
|
|
5113
|
+
}
|
|
5114
|
+
if (message.traceRoot?.$case === "l1Handler") {
|
|
5115
|
+
obj.l1Handler = L1HandlerTransactionTrace$1.toJSON(message.traceRoot.l1Handler);
|
|
5116
|
+
}
|
|
5117
|
+
return obj;
|
|
5118
|
+
},
|
|
5119
|
+
create(base) {
|
|
5120
|
+
return TransactionTrace$1.fromPartial(base ?? {});
|
|
5121
|
+
},
|
|
5122
|
+
fromPartial(object) {
|
|
5123
|
+
const message = createBaseTransactionTrace();
|
|
5124
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
5125
|
+
message.transactionIndex = object.transactionIndex ?? 0;
|
|
5126
|
+
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? FieldElement.fromPartial(object.transactionHash) : void 0;
|
|
5127
|
+
if (object.traceRoot?.$case === "invoke" && object.traceRoot?.invoke !== void 0 && object.traceRoot?.invoke !== null) {
|
|
5128
|
+
message.traceRoot = { $case: "invoke", invoke: InvokeTransactionTrace$1.fromPartial(object.traceRoot.invoke) };
|
|
5129
|
+
}
|
|
5130
|
+
if (object.traceRoot?.$case === "declare" && object.traceRoot?.declare !== void 0 && object.traceRoot?.declare !== null) {
|
|
5131
|
+
message.traceRoot = { $case: "declare", declare: DeclareTransactionTrace$1.fromPartial(object.traceRoot.declare) };
|
|
5132
|
+
}
|
|
5133
|
+
if (object.traceRoot?.$case === "deployAccount" && object.traceRoot?.deployAccount !== void 0 && object.traceRoot?.deployAccount !== null) {
|
|
5134
|
+
message.traceRoot = {
|
|
5135
|
+
$case: "deployAccount",
|
|
5136
|
+
deployAccount: DeployAccountTransactionTrace$1.fromPartial(object.traceRoot.deployAccount)
|
|
5137
|
+
};
|
|
5138
|
+
}
|
|
5139
|
+
if (object.traceRoot?.$case === "l1Handler" && object.traceRoot?.l1Handler !== void 0 && object.traceRoot?.l1Handler !== null) {
|
|
5140
|
+
message.traceRoot = {
|
|
5141
|
+
$case: "l1Handler",
|
|
5142
|
+
l1Handler: L1HandlerTransactionTrace$1.fromPartial(object.traceRoot.l1Handler)
|
|
5143
|
+
};
|
|
5144
|
+
}
|
|
5145
|
+
return message;
|
|
5146
|
+
}
|
|
5147
|
+
};
|
|
5148
|
+
function createBaseInvokeTransactionTrace() {
|
|
5149
|
+
return { validateInvocation: void 0, executeInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5150
|
+
}
|
|
5151
|
+
const InvokeTransactionTrace$1 = {
|
|
5152
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5153
|
+
if (message.validateInvocation !== void 0) {
|
|
5154
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5155
|
+
}
|
|
5156
|
+
switch (message.executeInvocation?.$case) {
|
|
5157
|
+
case "success":
|
|
5158
|
+
FunctionInvocation$1.encode(message.executeInvocation.success, writer.uint32(18).fork()).ldelim();
|
|
5159
|
+
break;
|
|
5160
|
+
case "reverted":
|
|
5161
|
+
ExecutionReverted$1.encode(message.executeInvocation.reverted, writer.uint32(26).fork()).ldelim();
|
|
5162
|
+
break;
|
|
5163
|
+
}
|
|
5164
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5165
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(34).fork()).ldelim();
|
|
5166
|
+
}
|
|
5167
|
+
return writer;
|
|
5168
|
+
},
|
|
5169
|
+
decode(input, length) {
|
|
5170
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5171
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5172
|
+
const message = createBaseInvokeTransactionTrace();
|
|
5173
|
+
while (reader.pos < end) {
|
|
5174
|
+
const tag = reader.uint32();
|
|
5175
|
+
switch (tag >>> 3) {
|
|
5176
|
+
case 1:
|
|
5177
|
+
if (tag !== 10) {
|
|
5178
|
+
break;
|
|
5179
|
+
}
|
|
5180
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5181
|
+
continue;
|
|
5182
|
+
case 2:
|
|
5183
|
+
if (tag !== 18) {
|
|
5184
|
+
break;
|
|
5185
|
+
}
|
|
5186
|
+
message.executeInvocation = { $case: "success", success: FunctionInvocation$1.decode(reader, reader.uint32()) };
|
|
5187
|
+
continue;
|
|
5188
|
+
case 3:
|
|
5189
|
+
if (tag !== 26) {
|
|
5190
|
+
break;
|
|
5191
|
+
}
|
|
5192
|
+
message.executeInvocation = {
|
|
5193
|
+
$case: "reverted",
|
|
5194
|
+
reverted: ExecutionReverted$1.decode(reader, reader.uint32())
|
|
5195
|
+
};
|
|
5196
|
+
continue;
|
|
5197
|
+
case 4:
|
|
5198
|
+
if (tag !== 34) {
|
|
5199
|
+
break;
|
|
5200
|
+
}
|
|
5201
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5202
|
+
continue;
|
|
5203
|
+
}
|
|
5204
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5205
|
+
break;
|
|
5206
|
+
}
|
|
5207
|
+
reader.skipType(tag & 7);
|
|
5208
|
+
}
|
|
5209
|
+
return message;
|
|
5210
|
+
},
|
|
5211
|
+
fromJSON(object) {
|
|
5212
|
+
return {
|
|
5213
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5214
|
+
executeInvocation: isSet$1(object.success) ? { $case: "success", success: FunctionInvocation$1.fromJSON(object.success) } : isSet$1(object.reverted) ? { $case: "reverted", reverted: ExecutionReverted$1.fromJSON(object.reverted) } : void 0,
|
|
5215
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5216
|
+
};
|
|
5217
|
+
},
|
|
5218
|
+
toJSON(message) {
|
|
5219
|
+
const obj = {};
|
|
5220
|
+
if (message.validateInvocation !== void 0) {
|
|
5221
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5222
|
+
}
|
|
5223
|
+
if (message.executeInvocation?.$case === "success") {
|
|
5224
|
+
obj.success = FunctionInvocation$1.toJSON(message.executeInvocation.success);
|
|
5225
|
+
}
|
|
5226
|
+
if (message.executeInvocation?.$case === "reverted") {
|
|
5227
|
+
obj.reverted = ExecutionReverted$1.toJSON(message.executeInvocation.reverted);
|
|
5228
|
+
}
|
|
5229
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5230
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5231
|
+
}
|
|
5232
|
+
return obj;
|
|
5233
|
+
},
|
|
5234
|
+
create(base) {
|
|
5235
|
+
return InvokeTransactionTrace$1.fromPartial(base ?? {});
|
|
5236
|
+
},
|
|
5237
|
+
fromPartial(object) {
|
|
5238
|
+
const message = createBaseInvokeTransactionTrace();
|
|
5239
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5240
|
+
if (object.executeInvocation?.$case === "success" && object.executeInvocation?.success !== void 0 && object.executeInvocation?.success !== null) {
|
|
5241
|
+
message.executeInvocation = {
|
|
5242
|
+
$case: "success",
|
|
5243
|
+
success: FunctionInvocation$1.fromPartial(object.executeInvocation.success)
|
|
5244
|
+
};
|
|
5245
|
+
}
|
|
5246
|
+
if (object.executeInvocation?.$case === "reverted" && object.executeInvocation?.reverted !== void 0 && object.executeInvocation?.reverted !== null) {
|
|
5247
|
+
message.executeInvocation = {
|
|
5248
|
+
$case: "reverted",
|
|
5249
|
+
reverted: ExecutionReverted$1.fromPartial(object.executeInvocation.reverted)
|
|
5250
|
+
};
|
|
5251
|
+
}
|
|
5252
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5253
|
+
return message;
|
|
5254
|
+
}
|
|
5255
|
+
};
|
|
5256
|
+
function createBaseDeclareTransactionTrace() {
|
|
5257
|
+
return { validateInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5258
|
+
}
|
|
5259
|
+
const DeclareTransactionTrace$1 = {
|
|
5260
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5261
|
+
if (message.validateInvocation !== void 0) {
|
|
5262
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5263
|
+
}
|
|
5264
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5265
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(18).fork()).ldelim();
|
|
5266
|
+
}
|
|
5267
|
+
return writer;
|
|
5268
|
+
},
|
|
5269
|
+
decode(input, length) {
|
|
5270
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5271
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5272
|
+
const message = createBaseDeclareTransactionTrace();
|
|
5273
|
+
while (reader.pos < end) {
|
|
5274
|
+
const tag = reader.uint32();
|
|
5275
|
+
switch (tag >>> 3) {
|
|
5276
|
+
case 1:
|
|
5277
|
+
if (tag !== 10) {
|
|
5278
|
+
break;
|
|
5279
|
+
}
|
|
5280
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5281
|
+
continue;
|
|
5282
|
+
case 2:
|
|
5283
|
+
if (tag !== 18) {
|
|
5284
|
+
break;
|
|
5285
|
+
}
|
|
5286
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5287
|
+
continue;
|
|
5288
|
+
}
|
|
5289
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5290
|
+
break;
|
|
5291
|
+
}
|
|
5292
|
+
reader.skipType(tag & 7);
|
|
5293
|
+
}
|
|
5294
|
+
return message;
|
|
5295
|
+
},
|
|
5296
|
+
fromJSON(object) {
|
|
5297
|
+
return {
|
|
5298
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5299
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5300
|
+
};
|
|
5301
|
+
},
|
|
5302
|
+
toJSON(message) {
|
|
5303
|
+
const obj = {};
|
|
5304
|
+
if (message.validateInvocation !== void 0) {
|
|
5305
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5306
|
+
}
|
|
5307
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5308
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5309
|
+
}
|
|
5310
|
+
return obj;
|
|
5311
|
+
},
|
|
5312
|
+
create(base) {
|
|
5313
|
+
return DeclareTransactionTrace$1.fromPartial(base ?? {});
|
|
5314
|
+
},
|
|
5315
|
+
fromPartial(object) {
|
|
5316
|
+
const message = createBaseDeclareTransactionTrace();
|
|
5317
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5318
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5319
|
+
return message;
|
|
5320
|
+
}
|
|
5321
|
+
};
|
|
5322
|
+
function createBaseDeployAccountTransactionTrace() {
|
|
5323
|
+
return { validateInvocation: void 0, constructorInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5324
|
+
}
|
|
5325
|
+
const DeployAccountTransactionTrace$1 = {
|
|
5326
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5327
|
+
if (message.validateInvocation !== void 0) {
|
|
5328
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5329
|
+
}
|
|
5330
|
+
if (message.constructorInvocation !== void 0) {
|
|
5331
|
+
FunctionInvocation$1.encode(message.constructorInvocation, writer.uint32(18).fork()).ldelim();
|
|
5332
|
+
}
|
|
5333
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5334
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(26).fork()).ldelim();
|
|
5335
|
+
}
|
|
5336
|
+
return writer;
|
|
5337
|
+
},
|
|
5338
|
+
decode(input, length) {
|
|
5339
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5340
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5341
|
+
const message = createBaseDeployAccountTransactionTrace();
|
|
5342
|
+
while (reader.pos < end) {
|
|
5343
|
+
const tag = reader.uint32();
|
|
5344
|
+
switch (tag >>> 3) {
|
|
5345
|
+
case 1:
|
|
5346
|
+
if (tag !== 10) {
|
|
5347
|
+
break;
|
|
5348
|
+
}
|
|
5349
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5350
|
+
continue;
|
|
5351
|
+
case 2:
|
|
5352
|
+
if (tag !== 18) {
|
|
5353
|
+
break;
|
|
5354
|
+
}
|
|
5355
|
+
message.constructorInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5356
|
+
continue;
|
|
5357
|
+
case 3:
|
|
5358
|
+
if (tag !== 26) {
|
|
5359
|
+
break;
|
|
5360
|
+
}
|
|
5361
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5362
|
+
continue;
|
|
5363
|
+
}
|
|
5364
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5365
|
+
break;
|
|
5366
|
+
}
|
|
5367
|
+
reader.skipType(tag & 7);
|
|
5368
|
+
}
|
|
5369
|
+
return message;
|
|
5370
|
+
},
|
|
5371
|
+
fromJSON(object) {
|
|
5372
|
+
return {
|
|
5373
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5374
|
+
constructorInvocation: isSet$1(object.constructorInvocation) ? FunctionInvocation$1.fromJSON(object.constructorInvocation) : void 0,
|
|
5375
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5376
|
+
};
|
|
5377
|
+
},
|
|
5378
|
+
toJSON(message) {
|
|
5379
|
+
const obj = {};
|
|
5380
|
+
if (message.validateInvocation !== void 0) {
|
|
5381
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5382
|
+
}
|
|
5383
|
+
if (message.constructorInvocation !== void 0) {
|
|
5384
|
+
obj.constructorInvocation = FunctionInvocation$1.toJSON(message.constructorInvocation);
|
|
5385
|
+
}
|
|
5386
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5387
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5388
|
+
}
|
|
5389
|
+
return obj;
|
|
5390
|
+
},
|
|
5391
|
+
create(base) {
|
|
5392
|
+
return DeployAccountTransactionTrace$1.fromPartial(base ?? {});
|
|
5393
|
+
},
|
|
5394
|
+
fromPartial(object) {
|
|
5395
|
+
const message = createBaseDeployAccountTransactionTrace();
|
|
5396
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5397
|
+
message.constructorInvocation = object.constructorInvocation !== void 0 && object.constructorInvocation !== null ? FunctionInvocation$1.fromPartial(object.constructorInvocation) : void 0;
|
|
5398
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5399
|
+
return message;
|
|
5400
|
+
}
|
|
5401
|
+
};
|
|
5402
|
+
function createBaseL1HandlerTransactionTrace() {
|
|
5403
|
+
return { functionInvocation: void 0 };
|
|
5404
|
+
}
|
|
5405
|
+
const L1HandlerTransactionTrace$1 = {
|
|
5406
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5407
|
+
if (message.functionInvocation !== void 0) {
|
|
5408
|
+
FunctionInvocation$1.encode(message.functionInvocation, writer.uint32(18).fork()).ldelim();
|
|
5409
|
+
}
|
|
5410
|
+
return writer;
|
|
5411
|
+
},
|
|
5412
|
+
decode(input, length) {
|
|
5413
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5414
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5415
|
+
const message = createBaseL1HandlerTransactionTrace();
|
|
5416
|
+
while (reader.pos < end) {
|
|
5417
|
+
const tag = reader.uint32();
|
|
5418
|
+
switch (tag >>> 3) {
|
|
5419
|
+
case 2:
|
|
5420
|
+
if (tag !== 18) {
|
|
5421
|
+
break;
|
|
5422
|
+
}
|
|
5423
|
+
message.functionInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5424
|
+
continue;
|
|
5425
|
+
}
|
|
5426
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5427
|
+
break;
|
|
5428
|
+
}
|
|
5429
|
+
reader.skipType(tag & 7);
|
|
5430
|
+
}
|
|
5431
|
+
return message;
|
|
5432
|
+
},
|
|
5433
|
+
fromJSON(object) {
|
|
5434
|
+
return {
|
|
5435
|
+
functionInvocation: isSet$1(object.functionInvocation) ? FunctionInvocation$1.fromJSON(object.functionInvocation) : void 0
|
|
5436
|
+
};
|
|
5437
|
+
},
|
|
5438
|
+
toJSON(message) {
|
|
5439
|
+
const obj = {};
|
|
5440
|
+
if (message.functionInvocation !== void 0) {
|
|
5441
|
+
obj.functionInvocation = FunctionInvocation$1.toJSON(message.functionInvocation);
|
|
5442
|
+
}
|
|
5443
|
+
return obj;
|
|
5444
|
+
},
|
|
5445
|
+
create(base) {
|
|
5446
|
+
return L1HandlerTransactionTrace$1.fromPartial(base ?? {});
|
|
5447
|
+
},
|
|
5448
|
+
fromPartial(object) {
|
|
5449
|
+
const message = createBaseL1HandlerTransactionTrace();
|
|
5450
|
+
message.functionInvocation = object.functionInvocation !== void 0 && object.functionInvocation !== null ? FunctionInvocation$1.fromPartial(object.functionInvocation) : void 0;
|
|
5451
|
+
return message;
|
|
5452
|
+
}
|
|
5453
|
+
};
|
|
5454
|
+
function createBaseFunctionInvocation() {
|
|
5455
|
+
return {
|
|
5456
|
+
contractAddress: void 0,
|
|
5457
|
+
entryPointSelector: void 0,
|
|
5458
|
+
calldata: [],
|
|
5459
|
+
callerAddress: void 0,
|
|
5460
|
+
classHash: void 0,
|
|
5461
|
+
callType: 0,
|
|
5462
|
+
result: [],
|
|
5463
|
+
calls: [],
|
|
5464
|
+
events: [],
|
|
5465
|
+
messages: []
|
|
5466
|
+
};
|
|
5467
|
+
}
|
|
5468
|
+
const FunctionInvocation$1 = {
|
|
5469
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5470
|
+
if (message.contractAddress !== void 0) {
|
|
5471
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
5472
|
+
}
|
|
5473
|
+
if (message.entryPointSelector !== void 0) {
|
|
5474
|
+
FieldElement.encode(message.entryPointSelector, writer.uint32(18).fork()).ldelim();
|
|
5475
|
+
}
|
|
5476
|
+
if (message.calldata !== void 0 && message.calldata.length !== 0) {
|
|
5477
|
+
for (const v of message.calldata) {
|
|
5478
|
+
FieldElement.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
if (message.callerAddress !== void 0) {
|
|
5482
|
+
FieldElement.encode(message.callerAddress, writer.uint32(34).fork()).ldelim();
|
|
5483
|
+
}
|
|
5484
|
+
if (message.classHash !== void 0) {
|
|
5485
|
+
FieldElement.encode(message.classHash, writer.uint32(42).fork()).ldelim();
|
|
5486
|
+
}
|
|
5487
|
+
if (message.callType !== void 0 && message.callType !== 0) {
|
|
5488
|
+
writer.uint32(48).int32(message.callType);
|
|
5489
|
+
}
|
|
5490
|
+
if (message.result !== void 0 && message.result.length !== 0) {
|
|
5491
|
+
for (const v of message.result) {
|
|
5492
|
+
FieldElement.encode(v, writer.uint32(58).fork()).ldelim();
|
|
5493
|
+
}
|
|
5494
|
+
}
|
|
5495
|
+
if (message.calls !== void 0 && message.calls.length !== 0) {
|
|
5496
|
+
for (const v of message.calls) {
|
|
5497
|
+
FunctionInvocation$1.encode(v, writer.uint32(66).fork()).ldelim();
|
|
5498
|
+
}
|
|
5499
|
+
}
|
|
5500
|
+
if (message.events !== void 0 && message.events.length !== 0) {
|
|
5501
|
+
writer.uint32(74).fork();
|
|
5502
|
+
for (const v of message.events) {
|
|
5503
|
+
writer.uint32(v);
|
|
5504
|
+
}
|
|
5505
|
+
writer.ldelim();
|
|
5506
|
+
}
|
|
5507
|
+
if (message.messages !== void 0 && message.messages.length !== 0) {
|
|
5508
|
+
writer.uint32(82).fork();
|
|
5509
|
+
for (const v of message.messages) {
|
|
5510
|
+
writer.uint32(v);
|
|
5511
|
+
}
|
|
5512
|
+
writer.ldelim();
|
|
5513
|
+
}
|
|
5514
|
+
return writer;
|
|
5515
|
+
},
|
|
5516
|
+
decode(input, length) {
|
|
5517
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5518
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5519
|
+
const message = createBaseFunctionInvocation();
|
|
5520
|
+
while (reader.pos < end) {
|
|
5521
|
+
const tag = reader.uint32();
|
|
5522
|
+
switch (tag >>> 3) {
|
|
5523
|
+
case 1:
|
|
5524
|
+
if (tag !== 10) {
|
|
5525
|
+
break;
|
|
5526
|
+
}
|
|
5527
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
5528
|
+
continue;
|
|
5529
|
+
case 2:
|
|
5530
|
+
if (tag !== 18) {
|
|
5531
|
+
break;
|
|
5532
|
+
}
|
|
5533
|
+
message.entryPointSelector = FieldElement.decode(reader, reader.uint32());
|
|
5534
|
+
continue;
|
|
5535
|
+
case 3:
|
|
5536
|
+
if (tag !== 26) {
|
|
5537
|
+
break;
|
|
5538
|
+
}
|
|
5539
|
+
message.calldata.push(FieldElement.decode(reader, reader.uint32()));
|
|
5540
|
+
continue;
|
|
5541
|
+
case 4:
|
|
5542
|
+
if (tag !== 34) {
|
|
5543
|
+
break;
|
|
5544
|
+
}
|
|
5545
|
+
message.callerAddress = FieldElement.decode(reader, reader.uint32());
|
|
5546
|
+
continue;
|
|
5547
|
+
case 5:
|
|
5548
|
+
if (tag !== 42) {
|
|
5549
|
+
break;
|
|
5550
|
+
}
|
|
5551
|
+
message.classHash = FieldElement.decode(reader, reader.uint32());
|
|
5552
|
+
continue;
|
|
5553
|
+
case 6:
|
|
5554
|
+
if (tag !== 48) {
|
|
5555
|
+
break;
|
|
5556
|
+
}
|
|
5557
|
+
message.callType = reader.int32();
|
|
5558
|
+
continue;
|
|
5559
|
+
case 7:
|
|
5560
|
+
if (tag !== 58) {
|
|
5561
|
+
break;
|
|
5562
|
+
}
|
|
5563
|
+
message.result.push(FieldElement.decode(reader, reader.uint32()));
|
|
5564
|
+
continue;
|
|
5565
|
+
case 8:
|
|
5566
|
+
if (tag !== 66) {
|
|
5567
|
+
break;
|
|
5568
|
+
}
|
|
5569
|
+
message.calls.push(FunctionInvocation$1.decode(reader, reader.uint32()));
|
|
5570
|
+
continue;
|
|
5571
|
+
case 9:
|
|
5572
|
+
if (tag === 72) {
|
|
5573
|
+
message.events.push(reader.uint32());
|
|
5574
|
+
continue;
|
|
5575
|
+
}
|
|
5576
|
+
if (tag === 74) {
|
|
5577
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5578
|
+
while (reader.pos < end2) {
|
|
5579
|
+
message.events.push(reader.uint32());
|
|
5580
|
+
}
|
|
5581
|
+
continue;
|
|
5582
|
+
}
|
|
5583
|
+
break;
|
|
5584
|
+
case 10:
|
|
5585
|
+
if (tag === 80) {
|
|
5586
|
+
message.messages.push(reader.uint32());
|
|
5587
|
+
continue;
|
|
5588
|
+
}
|
|
5589
|
+
if (tag === 82) {
|
|
5590
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5591
|
+
while (reader.pos < end2) {
|
|
5592
|
+
message.messages.push(reader.uint32());
|
|
5593
|
+
}
|
|
5594
|
+
continue;
|
|
5595
|
+
}
|
|
5596
|
+
break;
|
|
5597
|
+
}
|
|
5598
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5599
|
+
break;
|
|
5600
|
+
}
|
|
5601
|
+
reader.skipType(tag & 7);
|
|
5602
|
+
}
|
|
5603
|
+
return message;
|
|
5604
|
+
},
|
|
5605
|
+
fromJSON(object) {
|
|
5606
|
+
return {
|
|
5607
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
5608
|
+
entryPointSelector: isSet$1(object.entryPointSelector) ? FieldElement.fromJSON(object.entryPointSelector) : void 0,
|
|
5609
|
+
calldata: globalThis.Array.isArray(object?.calldata) ? object.calldata.map((e) => FieldElement.fromJSON(e)) : [],
|
|
5610
|
+
callerAddress: isSet$1(object.callerAddress) ? FieldElement.fromJSON(object.callerAddress) : void 0,
|
|
5611
|
+
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0,
|
|
5612
|
+
callType: isSet$1(object.callType) ? callTypeFromJSON(object.callType) : 0,
|
|
5613
|
+
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$1.fromJSON(e)) : [],
|
|
5615
|
+
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => globalThis.Number(e)) : [],
|
|
5616
|
+
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => globalThis.Number(e)) : []
|
|
5617
|
+
};
|
|
5618
|
+
},
|
|
5619
|
+
toJSON(message) {
|
|
5620
|
+
const obj = {};
|
|
5621
|
+
if (message.contractAddress !== void 0) {
|
|
5622
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
5623
|
+
}
|
|
5624
|
+
if (message.entryPointSelector !== void 0) {
|
|
5625
|
+
obj.entryPointSelector = FieldElement.toJSON(message.entryPointSelector);
|
|
5626
|
+
}
|
|
5627
|
+
if (message.calldata?.length) {
|
|
5628
|
+
obj.calldata = message.calldata.map((e) => FieldElement.toJSON(e));
|
|
5629
|
+
}
|
|
5630
|
+
if (message.callerAddress !== void 0) {
|
|
5631
|
+
obj.callerAddress = FieldElement.toJSON(message.callerAddress);
|
|
5632
|
+
}
|
|
5633
|
+
if (message.classHash !== void 0) {
|
|
5634
|
+
obj.classHash = FieldElement.toJSON(message.classHash);
|
|
5635
|
+
}
|
|
5636
|
+
if (message.callType !== void 0 && message.callType !== 0) {
|
|
5637
|
+
obj.callType = callTypeToJSON(message.callType);
|
|
5638
|
+
}
|
|
5639
|
+
if (message.result?.length) {
|
|
5640
|
+
obj.result = message.result.map((e) => FieldElement.toJSON(e));
|
|
5641
|
+
}
|
|
5642
|
+
if (message.calls?.length) {
|
|
5643
|
+
obj.calls = message.calls.map((e) => FunctionInvocation$1.toJSON(e));
|
|
5644
|
+
}
|
|
5645
|
+
if (message.events?.length) {
|
|
5646
|
+
obj.events = message.events.map((e) => Math.round(e));
|
|
5647
|
+
}
|
|
5648
|
+
if (message.messages?.length) {
|
|
5649
|
+
obj.messages = message.messages.map((e) => Math.round(e));
|
|
5650
|
+
}
|
|
5651
|
+
return obj;
|
|
5652
|
+
},
|
|
5653
|
+
create(base) {
|
|
5654
|
+
return FunctionInvocation$1.fromPartial(base ?? {});
|
|
5655
|
+
},
|
|
5656
|
+
fromPartial(object) {
|
|
5657
|
+
const message = createBaseFunctionInvocation();
|
|
5658
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5659
|
+
message.entryPointSelector = object.entryPointSelector !== void 0 && object.entryPointSelector !== null ? FieldElement.fromPartial(object.entryPointSelector) : void 0;
|
|
5660
|
+
message.calldata = object.calldata?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5661
|
+
message.callerAddress = object.callerAddress !== void 0 && object.callerAddress !== null ? FieldElement.fromPartial(object.callerAddress) : void 0;
|
|
5662
|
+
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
5663
|
+
message.callType = object.callType ?? 0;
|
|
5664
|
+
message.result = object.result?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5665
|
+
message.calls = object.calls?.map((e) => FunctionInvocation$1.fromPartial(e)) || [];
|
|
5666
|
+
message.events = object.events?.map((e) => e) || [];
|
|
5667
|
+
message.messages = object.messages?.map((e) => e) || [];
|
|
5668
|
+
return message;
|
|
5669
|
+
}
|
|
5670
|
+
};
|
|
5671
|
+
function createBaseFunctionCall() {
|
|
5672
|
+
return { contractAddress: void 0, entryPointSelector: void 0, calldata: [] };
|
|
5673
|
+
}
|
|
5674
|
+
const FunctionCall = {
|
|
5675
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5676
|
+
if (message.contractAddress !== void 0) {
|
|
5677
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
5678
|
+
}
|
|
5679
|
+
if (message.entryPointSelector !== void 0) {
|
|
5680
|
+
FieldElement.encode(message.entryPointSelector, writer.uint32(18).fork()).ldelim();
|
|
5681
|
+
}
|
|
5682
|
+
if (message.calldata !== void 0 && message.calldata.length !== 0) {
|
|
5683
|
+
for (const v of message.calldata) {
|
|
5684
|
+
FieldElement.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
return writer;
|
|
5688
|
+
},
|
|
5689
|
+
decode(input, length) {
|
|
5690
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
5691
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5692
|
+
const message = createBaseFunctionCall();
|
|
5693
|
+
while (reader.pos < end) {
|
|
5694
|
+
const tag = reader.uint32();
|
|
5695
|
+
switch (tag >>> 3) {
|
|
5696
|
+
case 1:
|
|
5697
|
+
if (tag !== 10) {
|
|
5698
|
+
break;
|
|
5699
|
+
}
|
|
5700
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
5701
|
+
continue;
|
|
5702
|
+
case 2:
|
|
5703
|
+
if (tag !== 18) {
|
|
5704
|
+
break;
|
|
5705
|
+
}
|
|
5706
|
+
message.entryPointSelector = FieldElement.decode(reader, reader.uint32());
|
|
5707
|
+
continue;
|
|
5708
|
+
case 3:
|
|
5709
|
+
if (tag !== 26) {
|
|
5710
|
+
break;
|
|
5711
|
+
}
|
|
5712
|
+
message.calldata.push(FieldElement.decode(reader, reader.uint32()));
|
|
5713
|
+
continue;
|
|
5714
|
+
}
|
|
5715
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5716
|
+
break;
|
|
5717
|
+
}
|
|
5718
|
+
reader.skipType(tag & 7);
|
|
5719
|
+
}
|
|
5720
|
+
return message;
|
|
5721
|
+
},
|
|
5722
|
+
fromJSON(object) {
|
|
5723
|
+
return {
|
|
5724
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
5725
|
+
entryPointSelector: isSet$1(object.entryPointSelector) ? FieldElement.fromJSON(object.entryPointSelector) : void 0,
|
|
5726
|
+
calldata: globalThis.Array.isArray(object?.calldata) ? object.calldata.map((e) => FieldElement.fromJSON(e)) : []
|
|
5727
|
+
};
|
|
5728
|
+
},
|
|
5729
|
+
toJSON(message) {
|
|
5730
|
+
const obj = {};
|
|
5731
|
+
if (message.contractAddress !== void 0) {
|
|
5732
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
5733
|
+
}
|
|
5734
|
+
if (message.entryPointSelector !== void 0) {
|
|
5735
|
+
obj.entryPointSelector = FieldElement.toJSON(message.entryPointSelector);
|
|
5736
|
+
}
|
|
5737
|
+
if (message.calldata?.length) {
|
|
5738
|
+
obj.calldata = message.calldata.map((e) => FieldElement.toJSON(e));
|
|
5739
|
+
}
|
|
5740
|
+
return obj;
|
|
5741
|
+
},
|
|
5742
|
+
create(base) {
|
|
5743
|
+
return FunctionCall.fromPartial(base ?? {});
|
|
5744
|
+
},
|
|
5745
|
+
fromPartial(object) {
|
|
5746
|
+
const message = createBaseFunctionCall();
|
|
5747
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5748
|
+
message.entryPointSelector = object.entryPointSelector !== void 0 && object.entryPointSelector !== null ? FieldElement.fromPartial(object.entryPointSelector) : void 0;
|
|
5749
|
+
message.calldata = object.calldata?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5750
|
+
return message;
|
|
5751
|
+
}
|
|
5752
|
+
};
|
|
5753
|
+
function bytesFromBase64(b64) {
|
|
5754
|
+
if (globalThis.Buffer) {
|
|
5755
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
5756
|
+
} else {
|
|
5757
|
+
const bin = globalThis.atob(b64);
|
|
5758
|
+
const arr = new Uint8Array(bin.length);
|
|
5759
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
5760
|
+
arr[i] = bin.charCodeAt(i);
|
|
5761
|
+
}
|
|
5762
|
+
return arr;
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
function base64FromBytes(arr) {
|
|
5766
|
+
if (globalThis.Buffer) {
|
|
5767
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
5768
|
+
} else {
|
|
5769
|
+
const bin = [];
|
|
5770
|
+
arr.forEach((byte) => {
|
|
5771
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
5772
|
+
});
|
|
5773
|
+
return globalThis.btoa(bin.join(""));
|
|
5774
|
+
}
|
|
5775
|
+
}
|
|
5776
|
+
function toTimestamp(date) {
|
|
5777
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
5778
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
5779
|
+
return { seconds, nanos };
|
|
5780
|
+
}
|
|
5781
|
+
function fromTimestamp(t) {
|
|
5782
|
+
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
5783
|
+
millis += (t.nanos || 0) / 1e6;
|
|
5784
|
+
return new globalThis.Date(millis);
|
|
5785
|
+
}
|
|
5786
|
+
function fromJsonTimestamp(o) {
|
|
5787
|
+
if (o instanceof globalThis.Date) {
|
|
5788
|
+
return o;
|
|
5789
|
+
} else if (typeof o === "string") {
|
|
5790
|
+
return new globalThis.Date(o);
|
|
5791
|
+
} else {
|
|
5792
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
5793
|
+
}
|
|
5794
|
+
}
|
|
5795
|
+
function longToBigint(long) {
|
|
5796
|
+
return BigInt(long.toString());
|
|
5797
|
+
}
|
|
5798
|
+
if (_m0.util.Long !== Long) {
|
|
5799
|
+
_m0.util.Long = Long;
|
|
5800
|
+
_m0.configure();
|
|
5801
|
+
}
|
|
5802
|
+
function isSet$1(value) {
|
|
5803
|
+
return value !== null && value !== void 0;
|
|
5804
|
+
}
|
|
5805
|
+
|
|
5806
|
+
const data = {
|
|
5807
|
+
__proto__: null,
|
|
5808
|
+
Block: Block$1,
|
|
5809
|
+
BlockHeader: BlockHeader$1,
|
|
5810
|
+
CallType: CallType$1,
|
|
5811
|
+
ComputationResources: ComputationResources$1,
|
|
5812
|
+
ContractChange: ContractChange$1,
|
|
5813
|
+
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
5814
|
+
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
5815
|
+
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
5816
|
+
DeclareTransactionTrace: DeclareTransactionTrace$1,
|
|
5817
|
+
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
5818
|
+
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
5819
|
+
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
5820
|
+
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
5821
|
+
DeclaredClass: DeclaredClass$1,
|
|
5822
|
+
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
5823
|
+
DeployAccountTransactionTrace: DeployAccountTransactionTrace$1,
|
|
5824
|
+
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
5825
|
+
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
5826
|
+
DeployTransaction: DeployTransaction$1,
|
|
5827
|
+
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
5828
|
+
DeployedContract: DeployedContract$1,
|
|
5829
|
+
Event: Event$1,
|
|
5830
|
+
ExecutionResources: ExecutionResources$1,
|
|
5831
|
+
ExecutionReverted: ExecutionReverted$1,
|
|
5832
|
+
ExecutionStatus: ExecutionStatus,
|
|
5833
|
+
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
5834
|
+
FeePayment: FeePayment$1,
|
|
5835
|
+
FunctionCall: FunctionCall,
|
|
5836
|
+
FunctionInvocation: FunctionInvocation$1,
|
|
5837
|
+
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
5838
|
+
InvokeTransactionTrace: InvokeTransactionTrace$1,
|
|
5839
|
+
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
5840
|
+
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
5841
|
+
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
5842
|
+
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
5843
|
+
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
5844
|
+
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
5845
|
+
L1HandlerTransactionTrace: L1HandlerTransactionTrace$1,
|
|
5846
|
+
MessageToL1: MessageToL1$1,
|
|
5847
|
+
NonceUpdate: NonceUpdate$1,
|
|
5848
|
+
PriceUnit: PriceUnit$1,
|
|
5849
|
+
ReplacedClass: ReplacedClass$1,
|
|
5850
|
+
ResourceBounds: ResourceBounds$1,
|
|
5851
|
+
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
5852
|
+
ResourcePrice: ResourcePrice$1,
|
|
5853
|
+
StorageDiff: StorageDiff$1,
|
|
5854
|
+
StorageEntry: StorageEntry$1,
|
|
5855
|
+
Transaction: Transaction$1,
|
|
5856
|
+
TransactionMeta: TransactionMeta$1,
|
|
5857
|
+
TransactionReceipt: TransactionReceipt$1,
|
|
5858
|
+
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
5859
|
+
TransactionStatus: TransactionStatus$1,
|
|
5860
|
+
TransactionTrace: TransactionTrace$1,
|
|
5861
|
+
Uint128: Uint128,
|
|
5862
|
+
callTypeFromJSON: callTypeFromJSON,
|
|
5863
|
+
callTypeToJSON: callTypeToJSON,
|
|
5864
|
+
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
5865
|
+
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
5866
|
+
executionStatusFromJSON: executionStatusFromJSON,
|
|
5867
|
+
executionStatusToJSON: executionStatusToJSON,
|
|
5868
|
+
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
5869
|
+
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
5870
|
+
priceUnitFromJSON: priceUnitFromJSON,
|
|
5871
|
+
priceUnitToJSON: priceUnitToJSON,
|
|
5872
|
+
protobufPackage: protobufPackage$1,
|
|
5873
|
+
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
5874
|
+
transactionStatusToJSON: transactionStatusToJSON
|
|
5875
|
+
};
|
|
5876
|
+
|
|
5877
|
+
const protobufPackage = "starknet.v2";
|
|
5878
|
+
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
5879
|
+
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5880
|
+
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
5881
|
+
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
5882
|
+
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
5883
|
+
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5884
|
+
return HeaderFilter2;
|
|
5885
|
+
})(HeaderFilter$1 || {});
|
|
5886
|
+
function headerFilterFromJSON(object) {
|
|
5887
|
+
switch (object) {
|
|
5888
|
+
case 0:
|
|
5889
|
+
case "HEADER_FILTER_UNSPECIFIED":
|
|
5890
|
+
return 0 /* UNSPECIFIED */;
|
|
5891
|
+
case 1:
|
|
5892
|
+
case "HEADER_FILTER_ALWAYS":
|
|
5893
|
+
return 1 /* ALWAYS */;
|
|
5894
|
+
case 2:
|
|
5895
|
+
case "HEADER_FILTER_ON_DATA":
|
|
5896
|
+
return 2 /* ON_DATA */;
|
|
5897
|
+
case 3:
|
|
5898
|
+
case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
|
|
5899
|
+
return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
|
|
5900
|
+
case -1:
|
|
5901
|
+
case "UNRECOGNIZED":
|
|
5902
|
+
default:
|
|
5903
|
+
return -1 /* UNRECOGNIZED */;
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
function headerFilterToJSON(object) {
|
|
5907
|
+
switch (object) {
|
|
5908
|
+
case 0 /* UNSPECIFIED */:
|
|
5909
|
+
return "HEADER_FILTER_UNSPECIFIED";
|
|
5910
|
+
case 1 /* ALWAYS */:
|
|
5911
|
+
return "HEADER_FILTER_ALWAYS";
|
|
5912
|
+
case 2 /* ON_DATA */:
|
|
5913
|
+
return "HEADER_FILTER_ON_DATA";
|
|
5914
|
+
case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
|
|
5915
|
+
return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
|
|
5916
|
+
case -1 /* UNRECOGNIZED */:
|
|
5917
|
+
default:
|
|
5918
|
+
return "UNRECOGNIZED";
|
|
5919
|
+
}
|
|
5920
|
+
}
|
|
5921
|
+
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
5922
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5923
|
+
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
5924
|
+
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
5925
|
+
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
5926
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5927
|
+
return TransactionStatusFilter2;
|
|
5928
|
+
})(TransactionStatusFilter$1 || {});
|
|
5929
|
+
function transactionStatusFilterFromJSON(object) {
|
|
5930
|
+
switch (object) {
|
|
5931
|
+
case 0:
|
|
5932
|
+
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
5933
|
+
return 0 /* UNSPECIFIED */;
|
|
5934
|
+
case 1:
|
|
5935
|
+
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
5936
|
+
return 1 /* SUCCEEDED */;
|
|
5937
|
+
case 2:
|
|
5938
|
+
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
5939
|
+
return 2 /* REVERTED */;
|
|
5940
|
+
case 3:
|
|
5941
|
+
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
5942
|
+
return 3 /* ALL */;
|
|
5943
|
+
case -1:
|
|
5944
|
+
case "UNRECOGNIZED":
|
|
5945
|
+
default:
|
|
5946
|
+
return -1 /* UNRECOGNIZED */;
|
|
5947
|
+
}
|
|
5948
|
+
}
|
|
5949
|
+
function transactionStatusFilterToJSON(object) {
|
|
5950
|
+
switch (object) {
|
|
5951
|
+
case 0 /* UNSPECIFIED */:
|
|
5952
|
+
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
5953
|
+
case 1 /* SUCCEEDED */:
|
|
5954
|
+
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
5955
|
+
case 2 /* REVERTED */:
|
|
5956
|
+
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
5957
|
+
case 3 /* ALL */:
|
|
5958
|
+
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
5959
|
+
case -1 /* UNRECOGNIZED */:
|
|
5960
|
+
default:
|
|
5961
|
+
return "UNRECOGNIZED";
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
function createBaseFilter() {
|
|
5965
|
+
return {
|
|
5966
|
+
header: 0,
|
|
5967
|
+
transactions: [],
|
|
5968
|
+
events: [],
|
|
5969
|
+
messages: [],
|
|
5970
|
+
storageDiffs: [],
|
|
5971
|
+
contractChanges: [],
|
|
5972
|
+
nonceUpdates: []
|
|
5973
|
+
};
|
|
5974
|
+
}
|
|
5975
|
+
const Filter$1 = {
|
|
5976
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
5977
|
+
if (message.header !== void 0 && message.header !== 0) {
|
|
5978
|
+
writer.uint32(8).int32(message.header);
|
|
5979
|
+
}
|
|
5980
|
+
if (message.transactions !== void 0 && message.transactions.length !== 0) {
|
|
5981
|
+
for (const v of message.transactions) {
|
|
5982
|
+
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
if (message.events !== void 0 && message.events.length !== 0) {
|
|
5986
|
+
for (const v of message.events) {
|
|
5987
|
+
EventFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5988
|
+
}
|
|
5148
5989
|
}
|
|
5149
5990
|
if (message.messages !== void 0 && message.messages.length !== 0) {
|
|
5150
5991
|
for (const v of message.messages) {
|
|
@@ -5286,7 +6127,8 @@ function createBaseEventFilter() {
|
|
|
5286
6127
|
includeTransaction: void 0,
|
|
5287
6128
|
includeReceipt: void 0,
|
|
5288
6129
|
includeMessages: void 0,
|
|
5289
|
-
includeSiblings: void 0
|
|
6130
|
+
includeSiblings: void 0,
|
|
6131
|
+
includeTransactionTrace: void 0
|
|
5290
6132
|
};
|
|
5291
6133
|
}
|
|
5292
6134
|
const EventFilter$1 = {
|
|
@@ -5320,6 +6162,9 @@ const EventFilter$1 = {
|
|
|
5320
6162
|
if (message.includeSiblings !== void 0) {
|
|
5321
6163
|
writer.uint32(72).bool(message.includeSiblings);
|
|
5322
6164
|
}
|
|
6165
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6166
|
+
writer.uint32(80).bool(message.includeTransactionTrace);
|
|
6167
|
+
}
|
|
5323
6168
|
return writer;
|
|
5324
6169
|
},
|
|
5325
6170
|
decode(input, length) {
|
|
@@ -5383,6 +6228,12 @@ const EventFilter$1 = {
|
|
|
5383
6228
|
}
|
|
5384
6229
|
message.includeSiblings = reader.bool();
|
|
5385
6230
|
continue;
|
|
6231
|
+
case 10:
|
|
6232
|
+
if (tag !== 80) {
|
|
6233
|
+
break;
|
|
6234
|
+
}
|
|
6235
|
+
message.includeTransactionTrace = reader.bool();
|
|
6236
|
+
continue;
|
|
5386
6237
|
}
|
|
5387
6238
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5388
6239
|
break;
|
|
@@ -5401,7 +6252,8 @@ const EventFilter$1 = {
|
|
|
5401
6252
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
|
|
5402
6253
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
5403
6254
|
includeMessages: isSet(object.includeMessages) ? globalThis.Boolean(object.includeMessages) : void 0,
|
|
5404
|
-
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
|
|
6255
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
|
|
6256
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
5405
6257
|
};
|
|
5406
6258
|
},
|
|
5407
6259
|
toJSON(message) {
|
|
@@ -5433,6 +6285,9 @@ const EventFilter$1 = {
|
|
|
5433
6285
|
if (message.includeSiblings !== void 0) {
|
|
5434
6286
|
obj.includeSiblings = message.includeSiblings;
|
|
5435
6287
|
}
|
|
6288
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6289
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
6290
|
+
}
|
|
5436
6291
|
return obj;
|
|
5437
6292
|
},
|
|
5438
6293
|
create(base) {
|
|
@@ -5449,6 +6304,7 @@ const EventFilter$1 = {
|
|
|
5449
6304
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
5450
6305
|
message.includeMessages = object.includeMessages ?? void 0;
|
|
5451
6306
|
message.includeSiblings = object.includeSiblings ?? void 0;
|
|
6307
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
5452
6308
|
return message;
|
|
5453
6309
|
}
|
|
5454
6310
|
};
|
|
@@ -5511,7 +6367,8 @@ function createBaseMessageToL1Filter() {
|
|
|
5511
6367
|
includeTransaction: void 0,
|
|
5512
6368
|
includeReceipt: void 0,
|
|
5513
6369
|
includeEvents: void 0,
|
|
5514
|
-
includeSiblings: void 0
|
|
6370
|
+
includeSiblings: void 0,
|
|
6371
|
+
includeTransactionTrace: void 0
|
|
5515
6372
|
};
|
|
5516
6373
|
}
|
|
5517
6374
|
const MessageToL1Filter$1 = {
|
|
@@ -5540,6 +6397,9 @@ const MessageToL1Filter$1 = {
|
|
|
5540
6397
|
if (message.includeSiblings !== void 0) {
|
|
5541
6398
|
writer.uint32(64).bool(message.includeSiblings);
|
|
5542
6399
|
}
|
|
6400
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6401
|
+
writer.uint32(72).bool(message.includeTransactionTrace);
|
|
6402
|
+
}
|
|
5543
6403
|
return writer;
|
|
5544
6404
|
},
|
|
5545
6405
|
decode(input, length) {
|
|
@@ -5597,6 +6457,12 @@ const MessageToL1Filter$1 = {
|
|
|
5597
6457
|
}
|
|
5598
6458
|
message.includeSiblings = reader.bool();
|
|
5599
6459
|
continue;
|
|
6460
|
+
case 9:
|
|
6461
|
+
if (tag !== 72) {
|
|
6462
|
+
break;
|
|
6463
|
+
}
|
|
6464
|
+
message.includeTransactionTrace = reader.bool();
|
|
6465
|
+
continue;
|
|
5600
6466
|
}
|
|
5601
6467
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5602
6468
|
break;
|
|
@@ -5614,7 +6480,8 @@ const MessageToL1Filter$1 = {
|
|
|
5614
6480
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
|
|
5615
6481
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
5616
6482
|
includeEvents: isSet(object.includeEvents) ? globalThis.Boolean(object.includeEvents) : void 0,
|
|
5617
|
-
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
|
|
6483
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
|
|
6484
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
5618
6485
|
};
|
|
5619
6486
|
},
|
|
5620
6487
|
toJSON(message) {
|
|
@@ -5643,6 +6510,9 @@ const MessageToL1Filter$1 = {
|
|
|
5643
6510
|
if (message.includeSiblings !== void 0) {
|
|
5644
6511
|
obj.includeSiblings = message.includeSiblings;
|
|
5645
6512
|
}
|
|
6513
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6514
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
6515
|
+
}
|
|
5646
6516
|
return obj;
|
|
5647
6517
|
},
|
|
5648
6518
|
create(base) {
|
|
@@ -5658,6 +6528,7 @@ const MessageToL1Filter$1 = {
|
|
|
5658
6528
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
5659
6529
|
message.includeEvents = object.includeEvents ?? void 0;
|
|
5660
6530
|
message.includeSiblings = object.includeSiblings ?? void 0;
|
|
6531
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
5661
6532
|
return message;
|
|
5662
6533
|
}
|
|
5663
6534
|
};
|
|
@@ -5668,7 +6539,8 @@ function createBaseTransactionFilter() {
|
|
|
5668
6539
|
includeReceipt: void 0,
|
|
5669
6540
|
includeEvents: void 0,
|
|
5670
6541
|
includeMessages: void 0,
|
|
5671
|
-
inner: void 0
|
|
6542
|
+
inner: void 0,
|
|
6543
|
+
includeTrace: void 0
|
|
5672
6544
|
};
|
|
5673
6545
|
}
|
|
5674
6546
|
const TransactionFilter$1 = {
|
|
@@ -5723,6 +6595,9 @@ const TransactionFilter$1 = {
|
|
|
5723
6595
|
DeployAccountV3TransactionFilter$1.encode(message.inner.deployAccountV3, writer.uint32(130).fork()).ldelim();
|
|
5724
6596
|
break;
|
|
5725
6597
|
}
|
|
6598
|
+
if (message.includeTrace !== void 0) {
|
|
6599
|
+
writer.uint32(136).bool(message.includeTrace);
|
|
6600
|
+
}
|
|
5726
6601
|
return writer;
|
|
5727
6602
|
},
|
|
5728
6603
|
decode(input, length) {
|
|
@@ -5834,6 +6709,12 @@ const TransactionFilter$1 = {
|
|
|
5834
6709
|
deployAccountV3: DeployAccountV3TransactionFilter$1.decode(reader, reader.uint32())
|
|
5835
6710
|
};
|
|
5836
6711
|
continue;
|
|
6712
|
+
case 17:
|
|
6713
|
+
if (tag !== 136) {
|
|
6714
|
+
break;
|
|
6715
|
+
}
|
|
6716
|
+
message.includeTrace = reader.bool();
|
|
6717
|
+
continue;
|
|
5837
6718
|
}
|
|
5838
6719
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5839
6720
|
break;
|
|
@@ -5855,7 +6736,8 @@ const TransactionFilter$1 = {
|
|
|
5855
6736
|
} : isSet(object.deployAccountV3) ? {
|
|
5856
6737
|
$case: "deployAccountV3",
|
|
5857
6738
|
deployAccountV3: DeployAccountV3TransactionFilter$1.fromJSON(object.deployAccountV3)
|
|
5858
|
-
} : void 0
|
|
6739
|
+
} : void 0,
|
|
6740
|
+
includeTrace: isSet(object.includeTrace) ? globalThis.Boolean(object.includeTrace) : void 0
|
|
5859
6741
|
};
|
|
5860
6742
|
},
|
|
5861
6743
|
toJSON(message) {
|
|
@@ -5908,6 +6790,9 @@ const TransactionFilter$1 = {
|
|
|
5908
6790
|
if (message.inner?.$case === "deployAccountV3") {
|
|
5909
6791
|
obj.deployAccountV3 = DeployAccountV3TransactionFilter$1.toJSON(message.inner.deployAccountV3);
|
|
5910
6792
|
}
|
|
6793
|
+
if (message.includeTrace !== void 0) {
|
|
6794
|
+
obj.includeTrace = message.includeTrace;
|
|
6795
|
+
}
|
|
5911
6796
|
return obj;
|
|
5912
6797
|
},
|
|
5913
6798
|
create(base) {
|
|
@@ -5959,6 +6844,7 @@ const TransactionFilter$1 = {
|
|
|
5959
6844
|
deployAccountV3: DeployAccountV3TransactionFilter$1.fromPartial(object.inner.deployAccountV3)
|
|
5960
6845
|
};
|
|
5961
6846
|
}
|
|
6847
|
+
message.includeTrace = object.includeTrace ?? void 0;
|
|
5962
6848
|
return message;
|
|
5963
6849
|
}
|
|
5964
6850
|
};
|
|
@@ -7144,12 +8030,103 @@ const NonceUpdate = Schema.Struct({
|
|
|
7144
8030
|
contractAddress: FieldElement$1,
|
|
7145
8031
|
nonce: FieldElement$1
|
|
7146
8032
|
});
|
|
8033
|
+
const CallType = Schema.transform(
|
|
8034
|
+
Schema.Enums(CallType$1),
|
|
8035
|
+
Schema.Literal("libraryCall", "call", "delegate", "unknown"),
|
|
8036
|
+
{
|
|
8037
|
+
decode(value) {
|
|
8038
|
+
const enumMap = {
|
|
8039
|
+
[CallType$1.LIBRARY_CALL]: "libraryCall",
|
|
8040
|
+
[CallType$1.CALL]: "call",
|
|
8041
|
+
[CallType$1.DELEGATE]: "delegate",
|
|
8042
|
+
[CallType$1.UNSPECIFIED]: "unknown",
|
|
8043
|
+
[CallType$1.UNRECOGNIZED]: "unknown"
|
|
8044
|
+
};
|
|
8045
|
+
return enumMap[value] ?? "unknown";
|
|
8046
|
+
},
|
|
8047
|
+
encode(value) {
|
|
8048
|
+
throw new Error("encode: not implemented");
|
|
8049
|
+
}
|
|
8050
|
+
}
|
|
8051
|
+
);
|
|
8052
|
+
class FunctionInvocation extends Schema.Class(
|
|
8053
|
+
"FunctionInvocation"
|
|
8054
|
+
)({
|
|
8055
|
+
contractAddress: FieldElement$1,
|
|
8056
|
+
entryPointSelector: FieldElement$1,
|
|
8057
|
+
calldata: Schema.Array(FieldElement$1),
|
|
8058
|
+
callerAddress: FieldElement$1,
|
|
8059
|
+
classHash: FieldElement$1,
|
|
8060
|
+
callType: CallType,
|
|
8061
|
+
result: Schema.Array(FieldElement$1),
|
|
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
|
|
8073
|
+
});
|
|
8074
|
+
const ExecuteInvocationReverted = Schema.Struct({
|
|
8075
|
+
_tag: tag("reverted"),
|
|
8076
|
+
reverted: Schema.Struct({
|
|
8077
|
+
reason: Schema.optional(Schema.String)
|
|
8078
|
+
})
|
|
8079
|
+
});
|
|
8080
|
+
const InvokeTransactionTrace = Schema.Struct({
|
|
8081
|
+
_tag: tag("invoke"),
|
|
8082
|
+
invoke: Schema.Struct({
|
|
8083
|
+
validateInvocation: Schema.optional(FunctionInvocation),
|
|
8084
|
+
executeInvocation: Schema.Union(
|
|
8085
|
+
ExecuteInvocationReverted,
|
|
8086
|
+
ExecuteInvocationSuccess
|
|
8087
|
+
),
|
|
8088
|
+
feeTransferInvocation: Schema.optional(FunctionInvocation)
|
|
8089
|
+
})
|
|
8090
|
+
});
|
|
8091
|
+
const DeclareTransactionTrace = Schema.Struct({
|
|
8092
|
+
_tag: tag("declare"),
|
|
8093
|
+
declare: Schema.Struct({
|
|
8094
|
+
validateInvocation: Schema.optional(FunctionInvocation),
|
|
8095
|
+
feeTransferInvocation: Schema.optional(FunctionInvocation)
|
|
8096
|
+
})
|
|
8097
|
+
});
|
|
8098
|
+
const DeployAccountTransactionTrace = Schema.Struct({
|
|
8099
|
+
_tag: tag("deployAccount"),
|
|
8100
|
+
deployAccount: Schema.Struct({
|
|
8101
|
+
validateInvocation: Schema.optional(FunctionInvocation),
|
|
8102
|
+
constructorInvocation: Schema.optional(FunctionInvocation),
|
|
8103
|
+
feeTransferInvocation: Schema.optional(FunctionInvocation)
|
|
8104
|
+
})
|
|
8105
|
+
});
|
|
8106
|
+
const L1HandlerTransactionTrace = Schema.Struct({
|
|
8107
|
+
_tag: tag("l1Handler"),
|
|
8108
|
+
l1Handler: Schema.Struct({
|
|
8109
|
+
functionInvocation: Schema.optional(FunctionInvocation)
|
|
8110
|
+
})
|
|
8111
|
+
});
|
|
8112
|
+
const TransactionTrace = Schema.Struct({
|
|
8113
|
+
filterIds: Schema.Array(Schema.Number),
|
|
8114
|
+
transactionIndex: Schema.Number,
|
|
8115
|
+
transactionHash: FieldElement$1,
|
|
8116
|
+
traceRoot: Schema.Union(
|
|
8117
|
+
InvokeTransactionTrace,
|
|
8118
|
+
DeclareTransactionTrace,
|
|
8119
|
+
DeployAccountTransactionTrace,
|
|
8120
|
+
L1HandlerTransactionTrace
|
|
8121
|
+
)
|
|
8122
|
+
});
|
|
7147
8123
|
const Block = Schema.Struct({
|
|
7148
8124
|
header: BlockHeader,
|
|
7149
8125
|
transactions: Schema.Array(Transaction),
|
|
7150
8126
|
receipts: Schema.Array(TransactionReceipt),
|
|
7151
8127
|
events: Schema.Array(Event),
|
|
7152
8128
|
messages: Schema.Array(MessageToL1),
|
|
8129
|
+
traces: Schema.Array(TransactionTrace),
|
|
7153
8130
|
storageDiffs: Schema.Array(StorageDiff),
|
|
7154
8131
|
contractChanges: Schema.Array(ContractChange),
|
|
7155
8132
|
nonceUpdates: Schema.Array(NonceUpdate)
|
|
@@ -7257,7 +8234,8 @@ const EventFilter = Schema.Struct({
|
|
|
7257
8234
|
includeTransaction: Schema.optional(Schema.Boolean),
|
|
7258
8235
|
includeReceipt: Schema.optional(Schema.Boolean),
|
|
7259
8236
|
includeMessages: Schema.optional(Schema.Boolean),
|
|
7260
|
-
includeSiblings: Schema.optional(Schema.Boolean)
|
|
8237
|
+
includeSiblings: Schema.optional(Schema.Boolean),
|
|
8238
|
+
includeTransactionTrace: Schema.optional(Schema.Boolean)
|
|
7261
8239
|
});
|
|
7262
8240
|
const MessageToL1Filter = Schema.Struct({
|
|
7263
8241
|
id: Schema.optional(Schema.Number),
|
|
@@ -7266,7 +8244,8 @@ const MessageToL1Filter = Schema.Struct({
|
|
|
7266
8244
|
transactionStatus: Schema.optional(TransactionStatusFilter),
|
|
7267
8245
|
includeTransaction: Schema.optional(Schema.Boolean),
|
|
7268
8246
|
includeReceipt: Schema.optional(Schema.Boolean),
|
|
7269
|
-
includeEvents: Schema.optional(Schema.Boolean)
|
|
8247
|
+
includeEvents: Schema.optional(Schema.Boolean),
|
|
8248
|
+
includeTransactionTrace: Schema.optional(Schema.Boolean)
|
|
7270
8249
|
});
|
|
7271
8250
|
const InvokeTransactionV0Filter = Schema.Struct({
|
|
7272
8251
|
_tag: tag("invokeV0"),
|
|
@@ -7318,6 +8297,7 @@ const TransactionFilter = Schema.Struct({
|
|
|
7318
8297
|
includeReceipt: Schema.optional(Schema.Boolean),
|
|
7319
8298
|
includeMessages: Schema.optional(Schema.Boolean),
|
|
7320
8299
|
includeEvents: Schema.optional(Schema.Boolean),
|
|
8300
|
+
includeTrace: Schema.optional(Schema.Boolean),
|
|
7321
8301
|
transactionType: Schema.optional(
|
|
7322
8302
|
Schema.Union(
|
|
7323
8303
|
InvokeTransactionV0Filter,
|
|
@@ -7613,4 +8593,4 @@ const StarknetStream = new StreamConfig(
|
|
|
7613
8593
|
mergeFilter
|
|
7614
8594
|
);
|
|
7615
8595
|
|
|
7616
|
-
export { Block, BlockFromBytes, BlockHeader, ComputationResources, ContractChange, ContractChangeFilter, DataAvailabilityMode, DataAvailabilityResources, DeclareTransactionReceipt, DeclareTransactionV0, DeclareTransactionV1, DeclareTransactionV2, DeclareTransactionV3, DeclareV0TransactionFilter, DeclareV1TransactionFilter, DeclareV2TransactionFilter, DeclareV3TransactionFilter, DeclaredClass, DeclaredClassFilter, DecodeEventError, DeployAccountTransactionReceipt, DeployAccountTransactionV1, DeployAccountTransactionV3, DeployAccountV1TransactionFilter, DeployAccountV3TransactionFilter, DeployTransaction, DeployTransactionFilter, DeployTransactionReceipt, DeployedContract, DeployedContractFilter, Event, EventFilter, ExecutionResources, ExecutionReverted, ExecutionSucceeded, FeePayment, FieldElement$1 as FieldElement, FieldElementProto, Filter, FilterFromBytes, HeaderFilter, InvokeTransactionReceipt, InvokeTransactionV0, InvokeTransactionV0Filter, InvokeTransactionV1, InvokeTransactionV1Filter, InvokeTransactionV3, InvokeTransactionV3Filter, Key, L1DataAvailabilityMode, L1HandlerTransaction, L1HandlerTransactionFilter, L1HandlerTransactionReceipt, MessageToL1, MessageToL1Filter, NonceUpdate, NonceUpdateFilter, PriceUnit, ReplacedClass, ReplacedClassFilter, ResourceBounds, ResourceBoundsMapping, ResourcePrice, StarknetStream, StorageDiff, StorageDiffFilter, StorageEntry, Transaction, TransactionFilter, TransactionMeta, TransactionReceipt, TransactionReceiptMeta, TransactionStatus, TransactionStatusFilter, U128, decodeEvent, feltFromProto, feltToProto, filterFromBytes, filterFromProto, filterToBytes, filterToProto, getBigIntSelector, getEventSelector, getReceipt, getSelector, getTransaction, mergeFilter, index as proto };
|
|
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, FieldElementProto, Filter, FilterFromBytes, FunctionInvocation, 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, feltFromProto, feltToProto, filterFromBytes, filterFromProto, filterToBytes, filterToProto, getBigIntSelector, getEventSelector, getReceipt, getSelector, getTransaction, mergeFilter, index as proto };
|