@apibara/starknet 2.1.0-beta.2 → 2.1.0-beta.21
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.cjs
CHANGED
|
@@ -441,6 +441,49 @@ function dataAvailabilityModeToJSON(object) {
|
|
|
441
441
|
return "UNRECOGNIZED";
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
+
var CallType$1 = /* @__PURE__ */ ((CallType2) => {
|
|
445
|
+
CallType2[CallType2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
446
|
+
CallType2[CallType2["LIBRARY_CALL"] = 1] = "LIBRARY_CALL";
|
|
447
|
+
CallType2[CallType2["CALL"] = 2] = "CALL";
|
|
448
|
+
CallType2[CallType2["DELEGATE"] = 3] = "DELEGATE";
|
|
449
|
+
CallType2[CallType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
450
|
+
return CallType2;
|
|
451
|
+
})(CallType$1 || {});
|
|
452
|
+
function callTypeFromJSON(object) {
|
|
453
|
+
switch (object) {
|
|
454
|
+
case 0:
|
|
455
|
+
case "CALL_TYPE_UNSPECIFIED":
|
|
456
|
+
return 0 /* UNSPECIFIED */;
|
|
457
|
+
case 1:
|
|
458
|
+
case "CALL_TYPE_LIBRARY_CALL":
|
|
459
|
+
return 1 /* LIBRARY_CALL */;
|
|
460
|
+
case 2:
|
|
461
|
+
case "CALL_TYPE_CALL":
|
|
462
|
+
return 2 /* CALL */;
|
|
463
|
+
case 3:
|
|
464
|
+
case "CALL_TYPE_DELEGATE":
|
|
465
|
+
return 3 /* DELEGATE */;
|
|
466
|
+
case -1:
|
|
467
|
+
case "UNRECOGNIZED":
|
|
468
|
+
default:
|
|
469
|
+
return -1 /* UNRECOGNIZED */;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function callTypeToJSON(object) {
|
|
473
|
+
switch (object) {
|
|
474
|
+
case 0 /* UNSPECIFIED */:
|
|
475
|
+
return "CALL_TYPE_UNSPECIFIED";
|
|
476
|
+
case 1 /* LIBRARY_CALL */:
|
|
477
|
+
return "CALL_TYPE_LIBRARY_CALL";
|
|
478
|
+
case 2 /* CALL */:
|
|
479
|
+
return "CALL_TYPE_CALL";
|
|
480
|
+
case 3 /* DELEGATE */:
|
|
481
|
+
return "CALL_TYPE_DELEGATE";
|
|
482
|
+
case -1 /* UNRECOGNIZED */:
|
|
483
|
+
default:
|
|
484
|
+
return "UNRECOGNIZED";
|
|
485
|
+
}
|
|
486
|
+
}
|
|
444
487
|
function createBaseBlock() {
|
|
445
488
|
return {
|
|
446
489
|
header: void 0,
|
|
@@ -450,7 +493,8 @@ function createBaseBlock() {
|
|
|
450
493
|
messages: [],
|
|
451
494
|
storageDiffs: [],
|
|
452
495
|
contractChanges: [],
|
|
453
|
-
nonceUpdates: []
|
|
496
|
+
nonceUpdates: [],
|
|
497
|
+
traces: []
|
|
454
498
|
};
|
|
455
499
|
}
|
|
456
500
|
const Block$1 = {
|
|
@@ -493,6 +537,11 @@ const Block$1 = {
|
|
|
493
537
|
NonceUpdate$1.encode(v, writer.uint32(66).fork()).ldelim();
|
|
494
538
|
}
|
|
495
539
|
}
|
|
540
|
+
if (message.traces !== void 0 && message.traces.length !== 0) {
|
|
541
|
+
for (const v of message.traces) {
|
|
542
|
+
TransactionTrace$1.encode(v, writer.uint32(74).fork()).ldelim();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
496
545
|
return writer;
|
|
497
546
|
},
|
|
498
547
|
decode(input, length) {
|
|
@@ -550,6 +599,12 @@ const Block$1 = {
|
|
|
550
599
|
}
|
|
551
600
|
message.nonceUpdates.push(NonceUpdate$1.decode(reader, reader.uint32()));
|
|
552
601
|
continue;
|
|
602
|
+
case 9:
|
|
603
|
+
if (tag !== 74) {
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
606
|
+
message.traces.push(TransactionTrace$1.decode(reader, reader.uint32()));
|
|
607
|
+
continue;
|
|
553
608
|
}
|
|
554
609
|
if ((tag & 7) === 4 || tag === 0) {
|
|
555
610
|
break;
|
|
@@ -567,7 +622,8 @@ const Block$1 = {
|
|
|
567
622
|
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1$1.fromJSON(e)) : [],
|
|
568
623
|
storageDiffs: globalThis.Array.isArray(object?.storageDiffs) ? object.storageDiffs.map((e) => StorageDiff$1.fromJSON(e)) : [],
|
|
569
624
|
contractChanges: globalThis.Array.isArray(object?.contractChanges) ? object.contractChanges.map((e) => ContractChange$1.fromJSON(e)) : [],
|
|
570
|
-
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdate$1.fromJSON(e)) : []
|
|
625
|
+
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdate$1.fromJSON(e)) : [],
|
|
626
|
+
traces: globalThis.Array.isArray(object?.traces) ? object.traces.map((e) => TransactionTrace$1.fromJSON(e)) : []
|
|
571
627
|
};
|
|
572
628
|
},
|
|
573
629
|
toJSON(message) {
|
|
@@ -596,6 +652,9 @@ const Block$1 = {
|
|
|
596
652
|
if (message.nonceUpdates?.length) {
|
|
597
653
|
obj.nonceUpdates = message.nonceUpdates.map((e) => NonceUpdate$1.toJSON(e));
|
|
598
654
|
}
|
|
655
|
+
if (message.traces?.length) {
|
|
656
|
+
obj.traces = message.traces.map((e) => TransactionTrace$1.toJSON(e));
|
|
657
|
+
}
|
|
599
658
|
return obj;
|
|
600
659
|
},
|
|
601
660
|
create(base) {
|
|
@@ -611,6 +670,7 @@ const Block$1 = {
|
|
|
611
670
|
message.storageDiffs = object.storageDiffs?.map((e) => StorageDiff$1.fromPartial(e)) || [];
|
|
612
671
|
message.contractChanges = object.contractChanges?.map((e) => ContractChange$1.fromPartial(e)) || [];
|
|
613
672
|
message.nonceUpdates = object.nonceUpdates?.map((e) => NonceUpdate$1.fromPartial(e)) || [];
|
|
673
|
+
message.traces = object.traces?.map((e) => TransactionTrace$1.fromPartial(e)) || [];
|
|
614
674
|
return message;
|
|
615
675
|
}
|
|
616
676
|
};
|
|
@@ -4926,232 +4986,1013 @@ const NonceUpdate$1 = {
|
|
|
4926
4986
|
return message;
|
|
4927
4987
|
}
|
|
4928
4988
|
};
|
|
4929
|
-
function
|
|
4930
|
-
|
|
4931
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
4932
|
-
} else {
|
|
4933
|
-
const bin = globalThis.atob(b64);
|
|
4934
|
-
const arr = new Uint8Array(bin.length);
|
|
4935
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
4936
|
-
arr[i] = bin.charCodeAt(i);
|
|
4937
|
-
}
|
|
4938
|
-
return arr;
|
|
4939
|
-
}
|
|
4940
|
-
}
|
|
4941
|
-
function base64FromBytes(arr) {
|
|
4942
|
-
if (globalThis.Buffer) {
|
|
4943
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
4944
|
-
} else {
|
|
4945
|
-
const bin = [];
|
|
4946
|
-
arr.forEach((byte) => {
|
|
4947
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
4948
|
-
});
|
|
4949
|
-
return globalThis.btoa(bin.join(""));
|
|
4950
|
-
}
|
|
4951
|
-
}
|
|
4952
|
-
function toTimestamp(date) {
|
|
4953
|
-
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
4954
|
-
const nanos = date.getTime() % 1e3 * 1e6;
|
|
4955
|
-
return { seconds, nanos };
|
|
4956
|
-
}
|
|
4957
|
-
function fromTimestamp(t) {
|
|
4958
|
-
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
4959
|
-
millis += (t.nanos || 0) / 1e6;
|
|
4960
|
-
return new globalThis.Date(millis);
|
|
4961
|
-
}
|
|
4962
|
-
function fromJsonTimestamp(o) {
|
|
4963
|
-
if (o instanceof globalThis.Date) {
|
|
4964
|
-
return o;
|
|
4965
|
-
} else if (typeof o === "string") {
|
|
4966
|
-
return new globalThis.Date(o);
|
|
4967
|
-
} else {
|
|
4968
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
4969
|
-
}
|
|
4970
|
-
}
|
|
4971
|
-
function longToBigint(long) {
|
|
4972
|
-
return BigInt(long.toString());
|
|
4973
|
-
}
|
|
4974
|
-
if (_m0__default.util.Long !== Long__default) {
|
|
4975
|
-
_m0__default.util.Long = Long__default;
|
|
4976
|
-
_m0__default.configure();
|
|
4977
|
-
}
|
|
4978
|
-
function isSet$1(value) {
|
|
4979
|
-
return value !== null && value !== void 0;
|
|
4980
|
-
}
|
|
4981
|
-
|
|
4982
|
-
const data = {
|
|
4983
|
-
__proto__: null,
|
|
4984
|
-
Block: Block$1,
|
|
4985
|
-
BlockHeader: BlockHeader$1,
|
|
4986
|
-
ComputationResources: ComputationResources$1,
|
|
4987
|
-
ContractChange: ContractChange$1,
|
|
4988
|
-
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
4989
|
-
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
4990
|
-
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
4991
|
-
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
4992
|
-
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
4993
|
-
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
4994
|
-
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
4995
|
-
DeclaredClass: DeclaredClass$1,
|
|
4996
|
-
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
4997
|
-
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
4998
|
-
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
4999
|
-
DeployTransaction: DeployTransaction$1,
|
|
5000
|
-
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
5001
|
-
DeployedContract: DeployedContract$1,
|
|
5002
|
-
Event: Event$1,
|
|
5003
|
-
ExecutionResources: ExecutionResources$1,
|
|
5004
|
-
ExecutionReverted: ExecutionReverted$1,
|
|
5005
|
-
ExecutionStatus: ExecutionStatus,
|
|
5006
|
-
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
5007
|
-
FeePayment: FeePayment$1,
|
|
5008
|
-
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
5009
|
-
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
5010
|
-
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
5011
|
-
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
5012
|
-
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
5013
|
-
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
5014
|
-
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
5015
|
-
MessageToL1: MessageToL1$1,
|
|
5016
|
-
NonceUpdate: NonceUpdate$1,
|
|
5017
|
-
PriceUnit: PriceUnit$1,
|
|
5018
|
-
ReplacedClass: ReplacedClass$1,
|
|
5019
|
-
ResourceBounds: ResourceBounds$1,
|
|
5020
|
-
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
5021
|
-
ResourcePrice: ResourcePrice$1,
|
|
5022
|
-
StorageDiff: StorageDiff$1,
|
|
5023
|
-
StorageEntry: StorageEntry$1,
|
|
5024
|
-
Transaction: Transaction$1,
|
|
5025
|
-
TransactionMeta: TransactionMeta$1,
|
|
5026
|
-
TransactionReceipt: TransactionReceipt$1,
|
|
5027
|
-
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
5028
|
-
TransactionStatus: TransactionStatus$1,
|
|
5029
|
-
Uint128: Uint128,
|
|
5030
|
-
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
5031
|
-
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
5032
|
-
executionStatusFromJSON: executionStatusFromJSON,
|
|
5033
|
-
executionStatusToJSON: executionStatusToJSON,
|
|
5034
|
-
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
5035
|
-
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
5036
|
-
priceUnitFromJSON: priceUnitFromJSON,
|
|
5037
|
-
priceUnitToJSON: priceUnitToJSON,
|
|
5038
|
-
protobufPackage: protobufPackage$1,
|
|
5039
|
-
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
5040
|
-
transactionStatusToJSON: transactionStatusToJSON
|
|
5041
|
-
};
|
|
5042
|
-
|
|
5043
|
-
const protobufPackage = "starknet.v2";
|
|
5044
|
-
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
5045
|
-
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5046
|
-
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
5047
|
-
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
5048
|
-
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
5049
|
-
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5050
|
-
return HeaderFilter2;
|
|
5051
|
-
})(HeaderFilter$1 || {});
|
|
5052
|
-
function headerFilterFromJSON(object) {
|
|
5053
|
-
switch (object) {
|
|
5054
|
-
case 0:
|
|
5055
|
-
case "HEADER_FILTER_UNSPECIFIED":
|
|
5056
|
-
return 0 /* UNSPECIFIED */;
|
|
5057
|
-
case 1:
|
|
5058
|
-
case "HEADER_FILTER_ALWAYS":
|
|
5059
|
-
return 1 /* ALWAYS */;
|
|
5060
|
-
case 2:
|
|
5061
|
-
case "HEADER_FILTER_ON_DATA":
|
|
5062
|
-
return 2 /* ON_DATA */;
|
|
5063
|
-
case 3:
|
|
5064
|
-
case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
|
|
5065
|
-
return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
|
|
5066
|
-
case -1:
|
|
5067
|
-
case "UNRECOGNIZED":
|
|
5068
|
-
default:
|
|
5069
|
-
return -1 /* UNRECOGNIZED */;
|
|
5070
|
-
}
|
|
5071
|
-
}
|
|
5072
|
-
function headerFilterToJSON(object) {
|
|
5073
|
-
switch (object) {
|
|
5074
|
-
case 0 /* UNSPECIFIED */:
|
|
5075
|
-
return "HEADER_FILTER_UNSPECIFIED";
|
|
5076
|
-
case 1 /* ALWAYS */:
|
|
5077
|
-
return "HEADER_FILTER_ALWAYS";
|
|
5078
|
-
case 2 /* ON_DATA */:
|
|
5079
|
-
return "HEADER_FILTER_ON_DATA";
|
|
5080
|
-
case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
|
|
5081
|
-
return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
|
|
5082
|
-
case -1 /* UNRECOGNIZED */:
|
|
5083
|
-
default:
|
|
5084
|
-
return "UNRECOGNIZED";
|
|
5085
|
-
}
|
|
5086
|
-
}
|
|
5087
|
-
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
5088
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5089
|
-
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
5090
|
-
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
5091
|
-
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
5092
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5093
|
-
return TransactionStatusFilter2;
|
|
5094
|
-
})(TransactionStatusFilter$1 || {});
|
|
5095
|
-
function transactionStatusFilterFromJSON(object) {
|
|
5096
|
-
switch (object) {
|
|
5097
|
-
case 0:
|
|
5098
|
-
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
5099
|
-
return 0 /* UNSPECIFIED */;
|
|
5100
|
-
case 1:
|
|
5101
|
-
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
5102
|
-
return 1 /* SUCCEEDED */;
|
|
5103
|
-
case 2:
|
|
5104
|
-
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
5105
|
-
return 2 /* REVERTED */;
|
|
5106
|
-
case 3:
|
|
5107
|
-
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
5108
|
-
return 3 /* ALL */;
|
|
5109
|
-
case -1:
|
|
5110
|
-
case "UNRECOGNIZED":
|
|
5111
|
-
default:
|
|
5112
|
-
return -1 /* UNRECOGNIZED */;
|
|
5113
|
-
}
|
|
5114
|
-
}
|
|
5115
|
-
function transactionStatusFilterToJSON(object) {
|
|
5116
|
-
switch (object) {
|
|
5117
|
-
case 0 /* UNSPECIFIED */:
|
|
5118
|
-
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
5119
|
-
case 1 /* SUCCEEDED */:
|
|
5120
|
-
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
5121
|
-
case 2 /* REVERTED */:
|
|
5122
|
-
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
5123
|
-
case 3 /* ALL */:
|
|
5124
|
-
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
5125
|
-
case -1 /* UNRECOGNIZED */:
|
|
5126
|
-
default:
|
|
5127
|
-
return "UNRECOGNIZED";
|
|
5128
|
-
}
|
|
5129
|
-
}
|
|
5130
|
-
function createBaseFilter() {
|
|
5131
|
-
return {
|
|
5132
|
-
header: 0,
|
|
5133
|
-
transactions: [],
|
|
5134
|
-
events: [],
|
|
5135
|
-
messages: [],
|
|
5136
|
-
storageDiffs: [],
|
|
5137
|
-
contractChanges: [],
|
|
5138
|
-
nonceUpdates: []
|
|
5139
|
-
};
|
|
4989
|
+
function createBaseTransactionTrace() {
|
|
4990
|
+
return { filterIds: [], transactionIndex: 0, transactionHash: void 0, traceRoot: void 0 };
|
|
5140
4991
|
}
|
|
5141
|
-
const
|
|
4992
|
+
const TransactionTrace$1 = {
|
|
5142
4993
|
encode(message, writer = _m0__default.Writer.create()) {
|
|
5143
|
-
if (message.
|
|
5144
|
-
writer.uint32(
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
for (const v of message.transactions) {
|
|
5148
|
-
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
4994
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
4995
|
+
writer.uint32(10).fork();
|
|
4996
|
+
for (const v of message.filterIds) {
|
|
4997
|
+
writer.uint32(v);
|
|
5149
4998
|
}
|
|
4999
|
+
writer.ldelim();
|
|
5150
5000
|
}
|
|
5151
|
-
if (message.
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5001
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
5002
|
+
writer.uint32(16).uint32(message.transactionIndex);
|
|
5003
|
+
}
|
|
5004
|
+
if (message.transactionHash !== void 0) {
|
|
5005
|
+
FieldElement.encode(message.transactionHash, writer.uint32(26).fork()).ldelim();
|
|
5006
|
+
}
|
|
5007
|
+
switch (message.traceRoot?.$case) {
|
|
5008
|
+
case "invoke":
|
|
5009
|
+
InvokeTransactionTrace$1.encode(message.traceRoot.invoke, writer.uint32(34).fork()).ldelim();
|
|
5010
|
+
break;
|
|
5011
|
+
case "declare":
|
|
5012
|
+
DeclareTransactionTrace$1.encode(message.traceRoot.declare, writer.uint32(42).fork()).ldelim();
|
|
5013
|
+
break;
|
|
5014
|
+
case "deployAccount":
|
|
5015
|
+
DeployAccountTransactionTrace$1.encode(message.traceRoot.deployAccount, writer.uint32(50).fork()).ldelim();
|
|
5016
|
+
break;
|
|
5017
|
+
case "l1Handler":
|
|
5018
|
+
L1HandlerTransactionTrace$1.encode(message.traceRoot.l1Handler, writer.uint32(58).fork()).ldelim();
|
|
5019
|
+
break;
|
|
5020
|
+
}
|
|
5021
|
+
return writer;
|
|
5022
|
+
},
|
|
5023
|
+
decode(input, length) {
|
|
5024
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5025
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5026
|
+
const message = createBaseTransactionTrace();
|
|
5027
|
+
while (reader.pos < end) {
|
|
5028
|
+
const tag = reader.uint32();
|
|
5029
|
+
switch (tag >>> 3) {
|
|
5030
|
+
case 1:
|
|
5031
|
+
if (tag === 8) {
|
|
5032
|
+
message.filterIds.push(reader.uint32());
|
|
5033
|
+
continue;
|
|
5034
|
+
}
|
|
5035
|
+
if (tag === 10) {
|
|
5036
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5037
|
+
while (reader.pos < end2) {
|
|
5038
|
+
message.filterIds.push(reader.uint32());
|
|
5039
|
+
}
|
|
5040
|
+
continue;
|
|
5041
|
+
}
|
|
5042
|
+
break;
|
|
5043
|
+
case 2:
|
|
5044
|
+
if (tag !== 16) {
|
|
5045
|
+
break;
|
|
5046
|
+
}
|
|
5047
|
+
message.transactionIndex = reader.uint32();
|
|
5048
|
+
continue;
|
|
5049
|
+
case 3:
|
|
5050
|
+
if (tag !== 26) {
|
|
5051
|
+
break;
|
|
5052
|
+
}
|
|
5053
|
+
message.transactionHash = FieldElement.decode(reader, reader.uint32());
|
|
5054
|
+
continue;
|
|
5055
|
+
case 4:
|
|
5056
|
+
if (tag !== 34) {
|
|
5057
|
+
break;
|
|
5058
|
+
}
|
|
5059
|
+
message.traceRoot = { $case: "invoke", invoke: InvokeTransactionTrace$1.decode(reader, reader.uint32()) };
|
|
5060
|
+
continue;
|
|
5061
|
+
case 5:
|
|
5062
|
+
if (tag !== 42) {
|
|
5063
|
+
break;
|
|
5064
|
+
}
|
|
5065
|
+
message.traceRoot = { $case: "declare", declare: DeclareTransactionTrace$1.decode(reader, reader.uint32()) };
|
|
5066
|
+
continue;
|
|
5067
|
+
case 6:
|
|
5068
|
+
if (tag !== 50) {
|
|
5069
|
+
break;
|
|
5070
|
+
}
|
|
5071
|
+
message.traceRoot = {
|
|
5072
|
+
$case: "deployAccount",
|
|
5073
|
+
deployAccount: DeployAccountTransactionTrace$1.decode(reader, reader.uint32())
|
|
5074
|
+
};
|
|
5075
|
+
continue;
|
|
5076
|
+
case 7:
|
|
5077
|
+
if (tag !== 58) {
|
|
5078
|
+
break;
|
|
5079
|
+
}
|
|
5080
|
+
message.traceRoot = {
|
|
5081
|
+
$case: "l1Handler",
|
|
5082
|
+
l1Handler: L1HandlerTransactionTrace$1.decode(reader, reader.uint32())
|
|
5083
|
+
};
|
|
5084
|
+
continue;
|
|
5085
|
+
}
|
|
5086
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5087
|
+
break;
|
|
5088
|
+
}
|
|
5089
|
+
reader.skipType(tag & 7);
|
|
5090
|
+
}
|
|
5091
|
+
return message;
|
|
5092
|
+
},
|
|
5093
|
+
fromJSON(object) {
|
|
5094
|
+
return {
|
|
5095
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
5096
|
+
transactionIndex: isSet$1(object.transactionIndex) ? globalThis.Number(object.transactionIndex) : 0,
|
|
5097
|
+
transactionHash: isSet$1(object.transactionHash) ? FieldElement.fromJSON(object.transactionHash) : void 0,
|
|
5098
|
+
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
|
|
5099
|
+
};
|
|
5100
|
+
},
|
|
5101
|
+
toJSON(message) {
|
|
5102
|
+
const obj = {};
|
|
5103
|
+
if (message.filterIds?.length) {
|
|
5104
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
5105
|
+
}
|
|
5106
|
+
if (message.transactionIndex !== void 0 && message.transactionIndex !== 0) {
|
|
5107
|
+
obj.transactionIndex = Math.round(message.transactionIndex);
|
|
5108
|
+
}
|
|
5109
|
+
if (message.transactionHash !== void 0) {
|
|
5110
|
+
obj.transactionHash = FieldElement.toJSON(message.transactionHash);
|
|
5111
|
+
}
|
|
5112
|
+
if (message.traceRoot?.$case === "invoke") {
|
|
5113
|
+
obj.invoke = InvokeTransactionTrace$1.toJSON(message.traceRoot.invoke);
|
|
5114
|
+
}
|
|
5115
|
+
if (message.traceRoot?.$case === "declare") {
|
|
5116
|
+
obj.declare = DeclareTransactionTrace$1.toJSON(message.traceRoot.declare);
|
|
5117
|
+
}
|
|
5118
|
+
if (message.traceRoot?.$case === "deployAccount") {
|
|
5119
|
+
obj.deployAccount = DeployAccountTransactionTrace$1.toJSON(message.traceRoot.deployAccount);
|
|
5120
|
+
}
|
|
5121
|
+
if (message.traceRoot?.$case === "l1Handler") {
|
|
5122
|
+
obj.l1Handler = L1HandlerTransactionTrace$1.toJSON(message.traceRoot.l1Handler);
|
|
5123
|
+
}
|
|
5124
|
+
return obj;
|
|
5125
|
+
},
|
|
5126
|
+
create(base) {
|
|
5127
|
+
return TransactionTrace$1.fromPartial(base ?? {});
|
|
5128
|
+
},
|
|
5129
|
+
fromPartial(object) {
|
|
5130
|
+
const message = createBaseTransactionTrace();
|
|
5131
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
5132
|
+
message.transactionIndex = object.transactionIndex ?? 0;
|
|
5133
|
+
message.transactionHash = object.transactionHash !== void 0 && object.transactionHash !== null ? FieldElement.fromPartial(object.transactionHash) : void 0;
|
|
5134
|
+
if (object.traceRoot?.$case === "invoke" && object.traceRoot?.invoke !== void 0 && object.traceRoot?.invoke !== null) {
|
|
5135
|
+
message.traceRoot = { $case: "invoke", invoke: InvokeTransactionTrace$1.fromPartial(object.traceRoot.invoke) };
|
|
5136
|
+
}
|
|
5137
|
+
if (object.traceRoot?.$case === "declare" && object.traceRoot?.declare !== void 0 && object.traceRoot?.declare !== null) {
|
|
5138
|
+
message.traceRoot = { $case: "declare", declare: DeclareTransactionTrace$1.fromPartial(object.traceRoot.declare) };
|
|
5139
|
+
}
|
|
5140
|
+
if (object.traceRoot?.$case === "deployAccount" && object.traceRoot?.deployAccount !== void 0 && object.traceRoot?.deployAccount !== null) {
|
|
5141
|
+
message.traceRoot = {
|
|
5142
|
+
$case: "deployAccount",
|
|
5143
|
+
deployAccount: DeployAccountTransactionTrace$1.fromPartial(object.traceRoot.deployAccount)
|
|
5144
|
+
};
|
|
5145
|
+
}
|
|
5146
|
+
if (object.traceRoot?.$case === "l1Handler" && object.traceRoot?.l1Handler !== void 0 && object.traceRoot?.l1Handler !== null) {
|
|
5147
|
+
message.traceRoot = {
|
|
5148
|
+
$case: "l1Handler",
|
|
5149
|
+
l1Handler: L1HandlerTransactionTrace$1.fromPartial(object.traceRoot.l1Handler)
|
|
5150
|
+
};
|
|
5151
|
+
}
|
|
5152
|
+
return message;
|
|
5153
|
+
}
|
|
5154
|
+
};
|
|
5155
|
+
function createBaseInvokeTransactionTrace() {
|
|
5156
|
+
return { validateInvocation: void 0, executeInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5157
|
+
}
|
|
5158
|
+
const InvokeTransactionTrace$1 = {
|
|
5159
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5160
|
+
if (message.validateInvocation !== void 0) {
|
|
5161
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5162
|
+
}
|
|
5163
|
+
switch (message.executeInvocation?.$case) {
|
|
5164
|
+
case "success":
|
|
5165
|
+
FunctionInvocation$1.encode(message.executeInvocation.success, writer.uint32(18).fork()).ldelim();
|
|
5166
|
+
break;
|
|
5167
|
+
case "reverted":
|
|
5168
|
+
ExecutionReverted$1.encode(message.executeInvocation.reverted, writer.uint32(26).fork()).ldelim();
|
|
5169
|
+
break;
|
|
5170
|
+
}
|
|
5171
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5172
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(34).fork()).ldelim();
|
|
5173
|
+
}
|
|
5174
|
+
return writer;
|
|
5175
|
+
},
|
|
5176
|
+
decode(input, length) {
|
|
5177
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5178
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5179
|
+
const message = createBaseInvokeTransactionTrace();
|
|
5180
|
+
while (reader.pos < end) {
|
|
5181
|
+
const tag = reader.uint32();
|
|
5182
|
+
switch (tag >>> 3) {
|
|
5183
|
+
case 1:
|
|
5184
|
+
if (tag !== 10) {
|
|
5185
|
+
break;
|
|
5186
|
+
}
|
|
5187
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5188
|
+
continue;
|
|
5189
|
+
case 2:
|
|
5190
|
+
if (tag !== 18) {
|
|
5191
|
+
break;
|
|
5192
|
+
}
|
|
5193
|
+
message.executeInvocation = { $case: "success", success: FunctionInvocation$1.decode(reader, reader.uint32()) };
|
|
5194
|
+
continue;
|
|
5195
|
+
case 3:
|
|
5196
|
+
if (tag !== 26) {
|
|
5197
|
+
break;
|
|
5198
|
+
}
|
|
5199
|
+
message.executeInvocation = {
|
|
5200
|
+
$case: "reverted",
|
|
5201
|
+
reverted: ExecutionReverted$1.decode(reader, reader.uint32())
|
|
5202
|
+
};
|
|
5203
|
+
continue;
|
|
5204
|
+
case 4:
|
|
5205
|
+
if (tag !== 34) {
|
|
5206
|
+
break;
|
|
5207
|
+
}
|
|
5208
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5209
|
+
continue;
|
|
5210
|
+
}
|
|
5211
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5212
|
+
break;
|
|
5213
|
+
}
|
|
5214
|
+
reader.skipType(tag & 7);
|
|
5215
|
+
}
|
|
5216
|
+
return message;
|
|
5217
|
+
},
|
|
5218
|
+
fromJSON(object) {
|
|
5219
|
+
return {
|
|
5220
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5221
|
+
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,
|
|
5222
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5223
|
+
};
|
|
5224
|
+
},
|
|
5225
|
+
toJSON(message) {
|
|
5226
|
+
const obj = {};
|
|
5227
|
+
if (message.validateInvocation !== void 0) {
|
|
5228
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5229
|
+
}
|
|
5230
|
+
if (message.executeInvocation?.$case === "success") {
|
|
5231
|
+
obj.success = FunctionInvocation$1.toJSON(message.executeInvocation.success);
|
|
5232
|
+
}
|
|
5233
|
+
if (message.executeInvocation?.$case === "reverted") {
|
|
5234
|
+
obj.reverted = ExecutionReverted$1.toJSON(message.executeInvocation.reverted);
|
|
5235
|
+
}
|
|
5236
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5237
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5238
|
+
}
|
|
5239
|
+
return obj;
|
|
5240
|
+
},
|
|
5241
|
+
create(base) {
|
|
5242
|
+
return InvokeTransactionTrace$1.fromPartial(base ?? {});
|
|
5243
|
+
},
|
|
5244
|
+
fromPartial(object) {
|
|
5245
|
+
const message = createBaseInvokeTransactionTrace();
|
|
5246
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5247
|
+
if (object.executeInvocation?.$case === "success" && object.executeInvocation?.success !== void 0 && object.executeInvocation?.success !== null) {
|
|
5248
|
+
message.executeInvocation = {
|
|
5249
|
+
$case: "success",
|
|
5250
|
+
success: FunctionInvocation$1.fromPartial(object.executeInvocation.success)
|
|
5251
|
+
};
|
|
5252
|
+
}
|
|
5253
|
+
if (object.executeInvocation?.$case === "reverted" && object.executeInvocation?.reverted !== void 0 && object.executeInvocation?.reverted !== null) {
|
|
5254
|
+
message.executeInvocation = {
|
|
5255
|
+
$case: "reverted",
|
|
5256
|
+
reverted: ExecutionReverted$1.fromPartial(object.executeInvocation.reverted)
|
|
5257
|
+
};
|
|
5258
|
+
}
|
|
5259
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5260
|
+
return message;
|
|
5261
|
+
}
|
|
5262
|
+
};
|
|
5263
|
+
function createBaseDeclareTransactionTrace() {
|
|
5264
|
+
return { validateInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5265
|
+
}
|
|
5266
|
+
const DeclareTransactionTrace$1 = {
|
|
5267
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5268
|
+
if (message.validateInvocation !== void 0) {
|
|
5269
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5270
|
+
}
|
|
5271
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5272
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(18).fork()).ldelim();
|
|
5273
|
+
}
|
|
5274
|
+
return writer;
|
|
5275
|
+
},
|
|
5276
|
+
decode(input, length) {
|
|
5277
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5278
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5279
|
+
const message = createBaseDeclareTransactionTrace();
|
|
5280
|
+
while (reader.pos < end) {
|
|
5281
|
+
const tag = reader.uint32();
|
|
5282
|
+
switch (tag >>> 3) {
|
|
5283
|
+
case 1:
|
|
5284
|
+
if (tag !== 10) {
|
|
5285
|
+
break;
|
|
5286
|
+
}
|
|
5287
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5288
|
+
continue;
|
|
5289
|
+
case 2:
|
|
5290
|
+
if (tag !== 18) {
|
|
5291
|
+
break;
|
|
5292
|
+
}
|
|
5293
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5294
|
+
continue;
|
|
5295
|
+
}
|
|
5296
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5297
|
+
break;
|
|
5298
|
+
}
|
|
5299
|
+
reader.skipType(tag & 7);
|
|
5300
|
+
}
|
|
5301
|
+
return message;
|
|
5302
|
+
},
|
|
5303
|
+
fromJSON(object) {
|
|
5304
|
+
return {
|
|
5305
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5306
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5307
|
+
};
|
|
5308
|
+
},
|
|
5309
|
+
toJSON(message) {
|
|
5310
|
+
const obj = {};
|
|
5311
|
+
if (message.validateInvocation !== void 0) {
|
|
5312
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5313
|
+
}
|
|
5314
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5315
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5316
|
+
}
|
|
5317
|
+
return obj;
|
|
5318
|
+
},
|
|
5319
|
+
create(base) {
|
|
5320
|
+
return DeclareTransactionTrace$1.fromPartial(base ?? {});
|
|
5321
|
+
},
|
|
5322
|
+
fromPartial(object) {
|
|
5323
|
+
const message = createBaseDeclareTransactionTrace();
|
|
5324
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5325
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5326
|
+
return message;
|
|
5327
|
+
}
|
|
5328
|
+
};
|
|
5329
|
+
function createBaseDeployAccountTransactionTrace() {
|
|
5330
|
+
return { validateInvocation: void 0, constructorInvocation: void 0, feeTransferInvocation: void 0 };
|
|
5331
|
+
}
|
|
5332
|
+
const DeployAccountTransactionTrace$1 = {
|
|
5333
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5334
|
+
if (message.validateInvocation !== void 0) {
|
|
5335
|
+
FunctionInvocation$1.encode(message.validateInvocation, writer.uint32(10).fork()).ldelim();
|
|
5336
|
+
}
|
|
5337
|
+
if (message.constructorInvocation !== void 0) {
|
|
5338
|
+
FunctionInvocation$1.encode(message.constructorInvocation, writer.uint32(18).fork()).ldelim();
|
|
5339
|
+
}
|
|
5340
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5341
|
+
FunctionInvocation$1.encode(message.feeTransferInvocation, writer.uint32(26).fork()).ldelim();
|
|
5342
|
+
}
|
|
5343
|
+
return writer;
|
|
5344
|
+
},
|
|
5345
|
+
decode(input, length) {
|
|
5346
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5347
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5348
|
+
const message = createBaseDeployAccountTransactionTrace();
|
|
5349
|
+
while (reader.pos < end) {
|
|
5350
|
+
const tag = reader.uint32();
|
|
5351
|
+
switch (tag >>> 3) {
|
|
5352
|
+
case 1:
|
|
5353
|
+
if (tag !== 10) {
|
|
5354
|
+
break;
|
|
5355
|
+
}
|
|
5356
|
+
message.validateInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5357
|
+
continue;
|
|
5358
|
+
case 2:
|
|
5359
|
+
if (tag !== 18) {
|
|
5360
|
+
break;
|
|
5361
|
+
}
|
|
5362
|
+
message.constructorInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5363
|
+
continue;
|
|
5364
|
+
case 3:
|
|
5365
|
+
if (tag !== 26) {
|
|
5366
|
+
break;
|
|
5367
|
+
}
|
|
5368
|
+
message.feeTransferInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5369
|
+
continue;
|
|
5370
|
+
}
|
|
5371
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5372
|
+
break;
|
|
5373
|
+
}
|
|
5374
|
+
reader.skipType(tag & 7);
|
|
5375
|
+
}
|
|
5376
|
+
return message;
|
|
5377
|
+
},
|
|
5378
|
+
fromJSON(object) {
|
|
5379
|
+
return {
|
|
5380
|
+
validateInvocation: isSet$1(object.validateInvocation) ? FunctionInvocation$1.fromJSON(object.validateInvocation) : void 0,
|
|
5381
|
+
constructorInvocation: isSet$1(object.constructorInvocation) ? FunctionInvocation$1.fromJSON(object.constructorInvocation) : void 0,
|
|
5382
|
+
feeTransferInvocation: isSet$1(object.feeTransferInvocation) ? FunctionInvocation$1.fromJSON(object.feeTransferInvocation) : void 0
|
|
5383
|
+
};
|
|
5384
|
+
},
|
|
5385
|
+
toJSON(message) {
|
|
5386
|
+
const obj = {};
|
|
5387
|
+
if (message.validateInvocation !== void 0) {
|
|
5388
|
+
obj.validateInvocation = FunctionInvocation$1.toJSON(message.validateInvocation);
|
|
5389
|
+
}
|
|
5390
|
+
if (message.constructorInvocation !== void 0) {
|
|
5391
|
+
obj.constructorInvocation = FunctionInvocation$1.toJSON(message.constructorInvocation);
|
|
5392
|
+
}
|
|
5393
|
+
if (message.feeTransferInvocation !== void 0) {
|
|
5394
|
+
obj.feeTransferInvocation = FunctionInvocation$1.toJSON(message.feeTransferInvocation);
|
|
5395
|
+
}
|
|
5396
|
+
return obj;
|
|
5397
|
+
},
|
|
5398
|
+
create(base) {
|
|
5399
|
+
return DeployAccountTransactionTrace$1.fromPartial(base ?? {});
|
|
5400
|
+
},
|
|
5401
|
+
fromPartial(object) {
|
|
5402
|
+
const message = createBaseDeployAccountTransactionTrace();
|
|
5403
|
+
message.validateInvocation = object.validateInvocation !== void 0 && object.validateInvocation !== null ? FunctionInvocation$1.fromPartial(object.validateInvocation) : void 0;
|
|
5404
|
+
message.constructorInvocation = object.constructorInvocation !== void 0 && object.constructorInvocation !== null ? FunctionInvocation$1.fromPartial(object.constructorInvocation) : void 0;
|
|
5405
|
+
message.feeTransferInvocation = object.feeTransferInvocation !== void 0 && object.feeTransferInvocation !== null ? FunctionInvocation$1.fromPartial(object.feeTransferInvocation) : void 0;
|
|
5406
|
+
return message;
|
|
5407
|
+
}
|
|
5408
|
+
};
|
|
5409
|
+
function createBaseL1HandlerTransactionTrace() {
|
|
5410
|
+
return { functionInvocation: void 0 };
|
|
5411
|
+
}
|
|
5412
|
+
const L1HandlerTransactionTrace$1 = {
|
|
5413
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5414
|
+
if (message.functionInvocation !== void 0) {
|
|
5415
|
+
FunctionInvocation$1.encode(message.functionInvocation, writer.uint32(18).fork()).ldelim();
|
|
5416
|
+
}
|
|
5417
|
+
return writer;
|
|
5418
|
+
},
|
|
5419
|
+
decode(input, length) {
|
|
5420
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5421
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5422
|
+
const message = createBaseL1HandlerTransactionTrace();
|
|
5423
|
+
while (reader.pos < end) {
|
|
5424
|
+
const tag = reader.uint32();
|
|
5425
|
+
switch (tag >>> 3) {
|
|
5426
|
+
case 2:
|
|
5427
|
+
if (tag !== 18) {
|
|
5428
|
+
break;
|
|
5429
|
+
}
|
|
5430
|
+
message.functionInvocation = FunctionInvocation$1.decode(reader, reader.uint32());
|
|
5431
|
+
continue;
|
|
5432
|
+
}
|
|
5433
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5434
|
+
break;
|
|
5435
|
+
}
|
|
5436
|
+
reader.skipType(tag & 7);
|
|
5437
|
+
}
|
|
5438
|
+
return message;
|
|
5439
|
+
},
|
|
5440
|
+
fromJSON(object) {
|
|
5441
|
+
return {
|
|
5442
|
+
functionInvocation: isSet$1(object.functionInvocation) ? FunctionInvocation$1.fromJSON(object.functionInvocation) : void 0
|
|
5443
|
+
};
|
|
5444
|
+
},
|
|
5445
|
+
toJSON(message) {
|
|
5446
|
+
const obj = {};
|
|
5447
|
+
if (message.functionInvocation !== void 0) {
|
|
5448
|
+
obj.functionInvocation = FunctionInvocation$1.toJSON(message.functionInvocation);
|
|
5449
|
+
}
|
|
5450
|
+
return obj;
|
|
5451
|
+
},
|
|
5452
|
+
create(base) {
|
|
5453
|
+
return L1HandlerTransactionTrace$1.fromPartial(base ?? {});
|
|
5454
|
+
},
|
|
5455
|
+
fromPartial(object) {
|
|
5456
|
+
const message = createBaseL1HandlerTransactionTrace();
|
|
5457
|
+
message.functionInvocation = object.functionInvocation !== void 0 && object.functionInvocation !== null ? FunctionInvocation$1.fromPartial(object.functionInvocation) : void 0;
|
|
5458
|
+
return message;
|
|
5459
|
+
}
|
|
5460
|
+
};
|
|
5461
|
+
function createBaseFunctionInvocation() {
|
|
5462
|
+
return {
|
|
5463
|
+
contractAddress: void 0,
|
|
5464
|
+
entryPointSelector: void 0,
|
|
5465
|
+
calldata: [],
|
|
5466
|
+
callerAddress: void 0,
|
|
5467
|
+
classHash: void 0,
|
|
5468
|
+
callType: 0,
|
|
5469
|
+
result: [],
|
|
5470
|
+
calls: [],
|
|
5471
|
+
events: [],
|
|
5472
|
+
messages: []
|
|
5473
|
+
};
|
|
5474
|
+
}
|
|
5475
|
+
const FunctionInvocation$1 = {
|
|
5476
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5477
|
+
if (message.contractAddress !== void 0) {
|
|
5478
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
5479
|
+
}
|
|
5480
|
+
if (message.entryPointSelector !== void 0) {
|
|
5481
|
+
FieldElement.encode(message.entryPointSelector, writer.uint32(18).fork()).ldelim();
|
|
5482
|
+
}
|
|
5483
|
+
if (message.calldata !== void 0 && message.calldata.length !== 0) {
|
|
5484
|
+
for (const v of message.calldata) {
|
|
5485
|
+
FieldElement.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5488
|
+
if (message.callerAddress !== void 0) {
|
|
5489
|
+
FieldElement.encode(message.callerAddress, writer.uint32(34).fork()).ldelim();
|
|
5490
|
+
}
|
|
5491
|
+
if (message.classHash !== void 0) {
|
|
5492
|
+
FieldElement.encode(message.classHash, writer.uint32(42).fork()).ldelim();
|
|
5493
|
+
}
|
|
5494
|
+
if (message.callType !== void 0 && message.callType !== 0) {
|
|
5495
|
+
writer.uint32(48).int32(message.callType);
|
|
5496
|
+
}
|
|
5497
|
+
if (message.result !== void 0 && message.result.length !== 0) {
|
|
5498
|
+
for (const v of message.result) {
|
|
5499
|
+
FieldElement.encode(v, writer.uint32(58).fork()).ldelim();
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
if (message.calls !== void 0 && message.calls.length !== 0) {
|
|
5503
|
+
for (const v of message.calls) {
|
|
5504
|
+
FunctionInvocation$1.encode(v, writer.uint32(66).fork()).ldelim();
|
|
5505
|
+
}
|
|
5506
|
+
}
|
|
5507
|
+
if (message.events !== void 0 && message.events.length !== 0) {
|
|
5508
|
+
writer.uint32(74).fork();
|
|
5509
|
+
for (const v of message.events) {
|
|
5510
|
+
writer.uint32(v);
|
|
5511
|
+
}
|
|
5512
|
+
writer.ldelim();
|
|
5513
|
+
}
|
|
5514
|
+
if (message.messages !== void 0 && message.messages.length !== 0) {
|
|
5515
|
+
writer.uint32(82).fork();
|
|
5516
|
+
for (const v of message.messages) {
|
|
5517
|
+
writer.uint32(v);
|
|
5518
|
+
}
|
|
5519
|
+
writer.ldelim();
|
|
5520
|
+
}
|
|
5521
|
+
return writer;
|
|
5522
|
+
},
|
|
5523
|
+
decode(input, length) {
|
|
5524
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5525
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5526
|
+
const message = createBaseFunctionInvocation();
|
|
5527
|
+
while (reader.pos < end) {
|
|
5528
|
+
const tag = reader.uint32();
|
|
5529
|
+
switch (tag >>> 3) {
|
|
5530
|
+
case 1:
|
|
5531
|
+
if (tag !== 10) {
|
|
5532
|
+
break;
|
|
5533
|
+
}
|
|
5534
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
5535
|
+
continue;
|
|
5536
|
+
case 2:
|
|
5537
|
+
if (tag !== 18) {
|
|
5538
|
+
break;
|
|
5539
|
+
}
|
|
5540
|
+
message.entryPointSelector = FieldElement.decode(reader, reader.uint32());
|
|
5541
|
+
continue;
|
|
5542
|
+
case 3:
|
|
5543
|
+
if (tag !== 26) {
|
|
5544
|
+
break;
|
|
5545
|
+
}
|
|
5546
|
+
message.calldata.push(FieldElement.decode(reader, reader.uint32()));
|
|
5547
|
+
continue;
|
|
5548
|
+
case 4:
|
|
5549
|
+
if (tag !== 34) {
|
|
5550
|
+
break;
|
|
5551
|
+
}
|
|
5552
|
+
message.callerAddress = FieldElement.decode(reader, reader.uint32());
|
|
5553
|
+
continue;
|
|
5554
|
+
case 5:
|
|
5555
|
+
if (tag !== 42) {
|
|
5556
|
+
break;
|
|
5557
|
+
}
|
|
5558
|
+
message.classHash = FieldElement.decode(reader, reader.uint32());
|
|
5559
|
+
continue;
|
|
5560
|
+
case 6:
|
|
5561
|
+
if (tag !== 48) {
|
|
5562
|
+
break;
|
|
5563
|
+
}
|
|
5564
|
+
message.callType = reader.int32();
|
|
5565
|
+
continue;
|
|
5566
|
+
case 7:
|
|
5567
|
+
if (tag !== 58) {
|
|
5568
|
+
break;
|
|
5569
|
+
}
|
|
5570
|
+
message.result.push(FieldElement.decode(reader, reader.uint32()));
|
|
5571
|
+
continue;
|
|
5572
|
+
case 8:
|
|
5573
|
+
if (tag !== 66) {
|
|
5574
|
+
break;
|
|
5575
|
+
}
|
|
5576
|
+
message.calls.push(FunctionInvocation$1.decode(reader, reader.uint32()));
|
|
5577
|
+
continue;
|
|
5578
|
+
case 9:
|
|
5579
|
+
if (tag === 72) {
|
|
5580
|
+
message.events.push(reader.uint32());
|
|
5581
|
+
continue;
|
|
5582
|
+
}
|
|
5583
|
+
if (tag === 74) {
|
|
5584
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5585
|
+
while (reader.pos < end2) {
|
|
5586
|
+
message.events.push(reader.uint32());
|
|
5587
|
+
}
|
|
5588
|
+
continue;
|
|
5589
|
+
}
|
|
5590
|
+
break;
|
|
5591
|
+
case 10:
|
|
5592
|
+
if (tag === 80) {
|
|
5593
|
+
message.messages.push(reader.uint32());
|
|
5594
|
+
continue;
|
|
5595
|
+
}
|
|
5596
|
+
if (tag === 82) {
|
|
5597
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5598
|
+
while (reader.pos < end2) {
|
|
5599
|
+
message.messages.push(reader.uint32());
|
|
5600
|
+
}
|
|
5601
|
+
continue;
|
|
5602
|
+
}
|
|
5603
|
+
break;
|
|
5604
|
+
}
|
|
5605
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5606
|
+
break;
|
|
5607
|
+
}
|
|
5608
|
+
reader.skipType(tag & 7);
|
|
5609
|
+
}
|
|
5610
|
+
return message;
|
|
5611
|
+
},
|
|
5612
|
+
fromJSON(object) {
|
|
5613
|
+
return {
|
|
5614
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
5615
|
+
entryPointSelector: isSet$1(object.entryPointSelector) ? FieldElement.fromJSON(object.entryPointSelector) : void 0,
|
|
5616
|
+
calldata: globalThis.Array.isArray(object?.calldata) ? object.calldata.map((e) => FieldElement.fromJSON(e)) : [],
|
|
5617
|
+
callerAddress: isSet$1(object.callerAddress) ? FieldElement.fromJSON(object.callerAddress) : void 0,
|
|
5618
|
+
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0,
|
|
5619
|
+
callType: isSet$1(object.callType) ? callTypeFromJSON(object.callType) : 0,
|
|
5620
|
+
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$1.fromJSON(e)) : [],
|
|
5622
|
+
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => globalThis.Number(e)) : [],
|
|
5623
|
+
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => globalThis.Number(e)) : []
|
|
5624
|
+
};
|
|
5625
|
+
},
|
|
5626
|
+
toJSON(message) {
|
|
5627
|
+
const obj = {};
|
|
5628
|
+
if (message.contractAddress !== void 0) {
|
|
5629
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
5630
|
+
}
|
|
5631
|
+
if (message.entryPointSelector !== void 0) {
|
|
5632
|
+
obj.entryPointSelector = FieldElement.toJSON(message.entryPointSelector);
|
|
5633
|
+
}
|
|
5634
|
+
if (message.calldata?.length) {
|
|
5635
|
+
obj.calldata = message.calldata.map((e) => FieldElement.toJSON(e));
|
|
5636
|
+
}
|
|
5637
|
+
if (message.callerAddress !== void 0) {
|
|
5638
|
+
obj.callerAddress = FieldElement.toJSON(message.callerAddress);
|
|
5639
|
+
}
|
|
5640
|
+
if (message.classHash !== void 0) {
|
|
5641
|
+
obj.classHash = FieldElement.toJSON(message.classHash);
|
|
5642
|
+
}
|
|
5643
|
+
if (message.callType !== void 0 && message.callType !== 0) {
|
|
5644
|
+
obj.callType = callTypeToJSON(message.callType);
|
|
5645
|
+
}
|
|
5646
|
+
if (message.result?.length) {
|
|
5647
|
+
obj.result = message.result.map((e) => FieldElement.toJSON(e));
|
|
5648
|
+
}
|
|
5649
|
+
if (message.calls?.length) {
|
|
5650
|
+
obj.calls = message.calls.map((e) => FunctionInvocation$1.toJSON(e));
|
|
5651
|
+
}
|
|
5652
|
+
if (message.events?.length) {
|
|
5653
|
+
obj.events = message.events.map((e) => Math.round(e));
|
|
5654
|
+
}
|
|
5655
|
+
if (message.messages?.length) {
|
|
5656
|
+
obj.messages = message.messages.map((e) => Math.round(e));
|
|
5657
|
+
}
|
|
5658
|
+
return obj;
|
|
5659
|
+
},
|
|
5660
|
+
create(base) {
|
|
5661
|
+
return FunctionInvocation$1.fromPartial(base ?? {});
|
|
5662
|
+
},
|
|
5663
|
+
fromPartial(object) {
|
|
5664
|
+
const message = createBaseFunctionInvocation();
|
|
5665
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5666
|
+
message.entryPointSelector = object.entryPointSelector !== void 0 && object.entryPointSelector !== null ? FieldElement.fromPartial(object.entryPointSelector) : void 0;
|
|
5667
|
+
message.calldata = object.calldata?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5668
|
+
message.callerAddress = object.callerAddress !== void 0 && object.callerAddress !== null ? FieldElement.fromPartial(object.callerAddress) : void 0;
|
|
5669
|
+
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
5670
|
+
message.callType = object.callType ?? 0;
|
|
5671
|
+
message.result = object.result?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5672
|
+
message.calls = object.calls?.map((e) => FunctionInvocation$1.fromPartial(e)) || [];
|
|
5673
|
+
message.events = object.events?.map((e) => e) || [];
|
|
5674
|
+
message.messages = object.messages?.map((e) => e) || [];
|
|
5675
|
+
return message;
|
|
5676
|
+
}
|
|
5677
|
+
};
|
|
5678
|
+
function createBaseFunctionCall() {
|
|
5679
|
+
return { contractAddress: void 0, entryPointSelector: void 0, calldata: [] };
|
|
5680
|
+
}
|
|
5681
|
+
const FunctionCall = {
|
|
5682
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5683
|
+
if (message.contractAddress !== void 0) {
|
|
5684
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
5685
|
+
}
|
|
5686
|
+
if (message.entryPointSelector !== void 0) {
|
|
5687
|
+
FieldElement.encode(message.entryPointSelector, writer.uint32(18).fork()).ldelim();
|
|
5688
|
+
}
|
|
5689
|
+
if (message.calldata !== void 0 && message.calldata.length !== 0) {
|
|
5690
|
+
for (const v of message.calldata) {
|
|
5691
|
+
FieldElement.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
return writer;
|
|
5695
|
+
},
|
|
5696
|
+
decode(input, length) {
|
|
5697
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5698
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5699
|
+
const message = createBaseFunctionCall();
|
|
5700
|
+
while (reader.pos < end) {
|
|
5701
|
+
const tag = reader.uint32();
|
|
5702
|
+
switch (tag >>> 3) {
|
|
5703
|
+
case 1:
|
|
5704
|
+
if (tag !== 10) {
|
|
5705
|
+
break;
|
|
5706
|
+
}
|
|
5707
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
5708
|
+
continue;
|
|
5709
|
+
case 2:
|
|
5710
|
+
if (tag !== 18) {
|
|
5711
|
+
break;
|
|
5712
|
+
}
|
|
5713
|
+
message.entryPointSelector = FieldElement.decode(reader, reader.uint32());
|
|
5714
|
+
continue;
|
|
5715
|
+
case 3:
|
|
5716
|
+
if (tag !== 26) {
|
|
5717
|
+
break;
|
|
5718
|
+
}
|
|
5719
|
+
message.calldata.push(FieldElement.decode(reader, reader.uint32()));
|
|
5720
|
+
continue;
|
|
5721
|
+
}
|
|
5722
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5723
|
+
break;
|
|
5724
|
+
}
|
|
5725
|
+
reader.skipType(tag & 7);
|
|
5726
|
+
}
|
|
5727
|
+
return message;
|
|
5728
|
+
},
|
|
5729
|
+
fromJSON(object) {
|
|
5730
|
+
return {
|
|
5731
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
5732
|
+
entryPointSelector: isSet$1(object.entryPointSelector) ? FieldElement.fromJSON(object.entryPointSelector) : void 0,
|
|
5733
|
+
calldata: globalThis.Array.isArray(object?.calldata) ? object.calldata.map((e) => FieldElement.fromJSON(e)) : []
|
|
5734
|
+
};
|
|
5735
|
+
},
|
|
5736
|
+
toJSON(message) {
|
|
5737
|
+
const obj = {};
|
|
5738
|
+
if (message.contractAddress !== void 0) {
|
|
5739
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
5740
|
+
}
|
|
5741
|
+
if (message.entryPointSelector !== void 0) {
|
|
5742
|
+
obj.entryPointSelector = FieldElement.toJSON(message.entryPointSelector);
|
|
5743
|
+
}
|
|
5744
|
+
if (message.calldata?.length) {
|
|
5745
|
+
obj.calldata = message.calldata.map((e) => FieldElement.toJSON(e));
|
|
5746
|
+
}
|
|
5747
|
+
return obj;
|
|
5748
|
+
},
|
|
5749
|
+
create(base) {
|
|
5750
|
+
return FunctionCall.fromPartial(base ?? {});
|
|
5751
|
+
},
|
|
5752
|
+
fromPartial(object) {
|
|
5753
|
+
const message = createBaseFunctionCall();
|
|
5754
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5755
|
+
message.entryPointSelector = object.entryPointSelector !== void 0 && object.entryPointSelector !== null ? FieldElement.fromPartial(object.entryPointSelector) : void 0;
|
|
5756
|
+
message.calldata = object.calldata?.map((e) => FieldElement.fromPartial(e)) || [];
|
|
5757
|
+
return message;
|
|
5758
|
+
}
|
|
5759
|
+
};
|
|
5760
|
+
function bytesFromBase64(b64) {
|
|
5761
|
+
if (globalThis.Buffer) {
|
|
5762
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
5763
|
+
} else {
|
|
5764
|
+
const bin = globalThis.atob(b64);
|
|
5765
|
+
const arr = new Uint8Array(bin.length);
|
|
5766
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
5767
|
+
arr[i] = bin.charCodeAt(i);
|
|
5768
|
+
}
|
|
5769
|
+
return arr;
|
|
5770
|
+
}
|
|
5771
|
+
}
|
|
5772
|
+
function base64FromBytes(arr) {
|
|
5773
|
+
if (globalThis.Buffer) {
|
|
5774
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
5775
|
+
} else {
|
|
5776
|
+
const bin = [];
|
|
5777
|
+
arr.forEach((byte) => {
|
|
5778
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
5779
|
+
});
|
|
5780
|
+
return globalThis.btoa(bin.join(""));
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5783
|
+
function toTimestamp(date) {
|
|
5784
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
5785
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
5786
|
+
return { seconds, nanos };
|
|
5787
|
+
}
|
|
5788
|
+
function fromTimestamp(t) {
|
|
5789
|
+
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
5790
|
+
millis += (t.nanos || 0) / 1e6;
|
|
5791
|
+
return new globalThis.Date(millis);
|
|
5792
|
+
}
|
|
5793
|
+
function fromJsonTimestamp(o) {
|
|
5794
|
+
if (o instanceof globalThis.Date) {
|
|
5795
|
+
return o;
|
|
5796
|
+
} else if (typeof o === "string") {
|
|
5797
|
+
return new globalThis.Date(o);
|
|
5798
|
+
} else {
|
|
5799
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
5800
|
+
}
|
|
5801
|
+
}
|
|
5802
|
+
function longToBigint(long) {
|
|
5803
|
+
return BigInt(long.toString());
|
|
5804
|
+
}
|
|
5805
|
+
if (_m0__default.util.Long !== Long__default) {
|
|
5806
|
+
_m0__default.util.Long = Long__default;
|
|
5807
|
+
_m0__default.configure();
|
|
5808
|
+
}
|
|
5809
|
+
function isSet$1(value) {
|
|
5810
|
+
return value !== null && value !== void 0;
|
|
5811
|
+
}
|
|
5812
|
+
|
|
5813
|
+
const data = {
|
|
5814
|
+
__proto__: null,
|
|
5815
|
+
Block: Block$1,
|
|
5816
|
+
BlockHeader: BlockHeader$1,
|
|
5817
|
+
CallType: CallType$1,
|
|
5818
|
+
ComputationResources: ComputationResources$1,
|
|
5819
|
+
ContractChange: ContractChange$1,
|
|
5820
|
+
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
5821
|
+
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
5822
|
+
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
5823
|
+
DeclareTransactionTrace: DeclareTransactionTrace$1,
|
|
5824
|
+
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
5825
|
+
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
5826
|
+
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
5827
|
+
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
5828
|
+
DeclaredClass: DeclaredClass$1,
|
|
5829
|
+
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
5830
|
+
DeployAccountTransactionTrace: DeployAccountTransactionTrace$1,
|
|
5831
|
+
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
5832
|
+
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
5833
|
+
DeployTransaction: DeployTransaction$1,
|
|
5834
|
+
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
5835
|
+
DeployedContract: DeployedContract$1,
|
|
5836
|
+
Event: Event$1,
|
|
5837
|
+
ExecutionResources: ExecutionResources$1,
|
|
5838
|
+
ExecutionReverted: ExecutionReverted$1,
|
|
5839
|
+
ExecutionStatus: ExecutionStatus,
|
|
5840
|
+
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
5841
|
+
FeePayment: FeePayment$1,
|
|
5842
|
+
FunctionCall: FunctionCall,
|
|
5843
|
+
FunctionInvocation: FunctionInvocation$1,
|
|
5844
|
+
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
5845
|
+
InvokeTransactionTrace: InvokeTransactionTrace$1,
|
|
5846
|
+
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
5847
|
+
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
5848
|
+
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
5849
|
+
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
5850
|
+
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
5851
|
+
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
5852
|
+
L1HandlerTransactionTrace: L1HandlerTransactionTrace$1,
|
|
5853
|
+
MessageToL1: MessageToL1$1,
|
|
5854
|
+
NonceUpdate: NonceUpdate$1,
|
|
5855
|
+
PriceUnit: PriceUnit$1,
|
|
5856
|
+
ReplacedClass: ReplacedClass$1,
|
|
5857
|
+
ResourceBounds: ResourceBounds$1,
|
|
5858
|
+
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
5859
|
+
ResourcePrice: ResourcePrice$1,
|
|
5860
|
+
StorageDiff: StorageDiff$1,
|
|
5861
|
+
StorageEntry: StorageEntry$1,
|
|
5862
|
+
Transaction: Transaction$1,
|
|
5863
|
+
TransactionMeta: TransactionMeta$1,
|
|
5864
|
+
TransactionReceipt: TransactionReceipt$1,
|
|
5865
|
+
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
5866
|
+
TransactionStatus: TransactionStatus$1,
|
|
5867
|
+
TransactionTrace: TransactionTrace$1,
|
|
5868
|
+
Uint128: Uint128,
|
|
5869
|
+
callTypeFromJSON: callTypeFromJSON,
|
|
5870
|
+
callTypeToJSON: callTypeToJSON,
|
|
5871
|
+
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
5872
|
+
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
5873
|
+
executionStatusFromJSON: executionStatusFromJSON,
|
|
5874
|
+
executionStatusToJSON: executionStatusToJSON,
|
|
5875
|
+
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
5876
|
+
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
5877
|
+
priceUnitFromJSON: priceUnitFromJSON,
|
|
5878
|
+
priceUnitToJSON: priceUnitToJSON,
|
|
5879
|
+
protobufPackage: protobufPackage$1,
|
|
5880
|
+
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
5881
|
+
transactionStatusToJSON: transactionStatusToJSON
|
|
5882
|
+
};
|
|
5883
|
+
|
|
5884
|
+
const protobufPackage = "starknet.v2";
|
|
5885
|
+
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
5886
|
+
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5887
|
+
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
5888
|
+
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
5889
|
+
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
5890
|
+
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5891
|
+
return HeaderFilter2;
|
|
5892
|
+
})(HeaderFilter$1 || {});
|
|
5893
|
+
function headerFilterFromJSON(object) {
|
|
5894
|
+
switch (object) {
|
|
5895
|
+
case 0:
|
|
5896
|
+
case "HEADER_FILTER_UNSPECIFIED":
|
|
5897
|
+
return 0 /* UNSPECIFIED */;
|
|
5898
|
+
case 1:
|
|
5899
|
+
case "HEADER_FILTER_ALWAYS":
|
|
5900
|
+
return 1 /* ALWAYS */;
|
|
5901
|
+
case 2:
|
|
5902
|
+
case "HEADER_FILTER_ON_DATA":
|
|
5903
|
+
return 2 /* ON_DATA */;
|
|
5904
|
+
case 3:
|
|
5905
|
+
case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
|
|
5906
|
+
return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
|
|
5907
|
+
case -1:
|
|
5908
|
+
case "UNRECOGNIZED":
|
|
5909
|
+
default:
|
|
5910
|
+
return -1 /* UNRECOGNIZED */;
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
function headerFilterToJSON(object) {
|
|
5914
|
+
switch (object) {
|
|
5915
|
+
case 0 /* UNSPECIFIED */:
|
|
5916
|
+
return "HEADER_FILTER_UNSPECIFIED";
|
|
5917
|
+
case 1 /* ALWAYS */:
|
|
5918
|
+
return "HEADER_FILTER_ALWAYS";
|
|
5919
|
+
case 2 /* ON_DATA */:
|
|
5920
|
+
return "HEADER_FILTER_ON_DATA";
|
|
5921
|
+
case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
|
|
5922
|
+
return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
|
|
5923
|
+
case -1 /* UNRECOGNIZED */:
|
|
5924
|
+
default:
|
|
5925
|
+
return "UNRECOGNIZED";
|
|
5926
|
+
}
|
|
5927
|
+
}
|
|
5928
|
+
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
5929
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5930
|
+
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
5931
|
+
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
5932
|
+
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
5933
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5934
|
+
return TransactionStatusFilter2;
|
|
5935
|
+
})(TransactionStatusFilter$1 || {});
|
|
5936
|
+
function transactionStatusFilterFromJSON(object) {
|
|
5937
|
+
switch (object) {
|
|
5938
|
+
case 0:
|
|
5939
|
+
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
5940
|
+
return 0 /* UNSPECIFIED */;
|
|
5941
|
+
case 1:
|
|
5942
|
+
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
5943
|
+
return 1 /* SUCCEEDED */;
|
|
5944
|
+
case 2:
|
|
5945
|
+
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
5946
|
+
return 2 /* REVERTED */;
|
|
5947
|
+
case 3:
|
|
5948
|
+
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
5949
|
+
return 3 /* ALL */;
|
|
5950
|
+
case -1:
|
|
5951
|
+
case "UNRECOGNIZED":
|
|
5952
|
+
default:
|
|
5953
|
+
return -1 /* UNRECOGNIZED */;
|
|
5954
|
+
}
|
|
5955
|
+
}
|
|
5956
|
+
function transactionStatusFilterToJSON(object) {
|
|
5957
|
+
switch (object) {
|
|
5958
|
+
case 0 /* UNSPECIFIED */:
|
|
5959
|
+
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
5960
|
+
case 1 /* SUCCEEDED */:
|
|
5961
|
+
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
5962
|
+
case 2 /* REVERTED */:
|
|
5963
|
+
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
5964
|
+
case 3 /* ALL */:
|
|
5965
|
+
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
5966
|
+
case -1 /* UNRECOGNIZED */:
|
|
5967
|
+
default:
|
|
5968
|
+
return "UNRECOGNIZED";
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5971
|
+
function createBaseFilter() {
|
|
5972
|
+
return {
|
|
5973
|
+
header: 0,
|
|
5974
|
+
transactions: [],
|
|
5975
|
+
events: [],
|
|
5976
|
+
messages: [],
|
|
5977
|
+
storageDiffs: [],
|
|
5978
|
+
contractChanges: [],
|
|
5979
|
+
nonceUpdates: []
|
|
5980
|
+
};
|
|
5981
|
+
}
|
|
5982
|
+
const Filter$1 = {
|
|
5983
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5984
|
+
if (message.header !== void 0 && message.header !== 0) {
|
|
5985
|
+
writer.uint32(8).int32(message.header);
|
|
5986
|
+
}
|
|
5987
|
+
if (message.transactions !== void 0 && message.transactions.length !== 0) {
|
|
5988
|
+
for (const v of message.transactions) {
|
|
5989
|
+
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
if (message.events !== void 0 && message.events.length !== 0) {
|
|
5993
|
+
for (const v of message.events) {
|
|
5994
|
+
EventFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5995
|
+
}
|
|
5155
5996
|
}
|
|
5156
5997
|
if (message.messages !== void 0 && message.messages.length !== 0) {
|
|
5157
5998
|
for (const v of message.messages) {
|
|
@@ -5293,7 +6134,8 @@ function createBaseEventFilter() {
|
|
|
5293
6134
|
includeTransaction: void 0,
|
|
5294
6135
|
includeReceipt: void 0,
|
|
5295
6136
|
includeMessages: void 0,
|
|
5296
|
-
includeSiblings: void 0
|
|
6137
|
+
includeSiblings: void 0,
|
|
6138
|
+
includeTransactionTrace: void 0
|
|
5297
6139
|
};
|
|
5298
6140
|
}
|
|
5299
6141
|
const EventFilter$1 = {
|
|
@@ -5327,6 +6169,9 @@ const EventFilter$1 = {
|
|
|
5327
6169
|
if (message.includeSiblings !== void 0) {
|
|
5328
6170
|
writer.uint32(72).bool(message.includeSiblings);
|
|
5329
6171
|
}
|
|
6172
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6173
|
+
writer.uint32(80).bool(message.includeTransactionTrace);
|
|
6174
|
+
}
|
|
5330
6175
|
return writer;
|
|
5331
6176
|
},
|
|
5332
6177
|
decode(input, length) {
|
|
@@ -5390,6 +6235,12 @@ const EventFilter$1 = {
|
|
|
5390
6235
|
}
|
|
5391
6236
|
message.includeSiblings = reader.bool();
|
|
5392
6237
|
continue;
|
|
6238
|
+
case 10:
|
|
6239
|
+
if (tag !== 80) {
|
|
6240
|
+
break;
|
|
6241
|
+
}
|
|
6242
|
+
message.includeTransactionTrace = reader.bool();
|
|
6243
|
+
continue;
|
|
5393
6244
|
}
|
|
5394
6245
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5395
6246
|
break;
|
|
@@ -5408,7 +6259,8 @@ const EventFilter$1 = {
|
|
|
5408
6259
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
|
|
5409
6260
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
5410
6261
|
includeMessages: isSet(object.includeMessages) ? globalThis.Boolean(object.includeMessages) : void 0,
|
|
5411
|
-
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
|
|
6262
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
|
|
6263
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
5412
6264
|
};
|
|
5413
6265
|
},
|
|
5414
6266
|
toJSON(message) {
|
|
@@ -5440,6 +6292,9 @@ const EventFilter$1 = {
|
|
|
5440
6292
|
if (message.includeSiblings !== void 0) {
|
|
5441
6293
|
obj.includeSiblings = message.includeSiblings;
|
|
5442
6294
|
}
|
|
6295
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6296
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
6297
|
+
}
|
|
5443
6298
|
return obj;
|
|
5444
6299
|
},
|
|
5445
6300
|
create(base) {
|
|
@@ -5456,6 +6311,7 @@ const EventFilter$1 = {
|
|
|
5456
6311
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
5457
6312
|
message.includeMessages = object.includeMessages ?? void 0;
|
|
5458
6313
|
message.includeSiblings = object.includeSiblings ?? void 0;
|
|
6314
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
5459
6315
|
return message;
|
|
5460
6316
|
}
|
|
5461
6317
|
};
|
|
@@ -5518,7 +6374,8 @@ function createBaseMessageToL1Filter() {
|
|
|
5518
6374
|
includeTransaction: void 0,
|
|
5519
6375
|
includeReceipt: void 0,
|
|
5520
6376
|
includeEvents: void 0,
|
|
5521
|
-
includeSiblings: void 0
|
|
6377
|
+
includeSiblings: void 0,
|
|
6378
|
+
includeTransactionTrace: void 0
|
|
5522
6379
|
};
|
|
5523
6380
|
}
|
|
5524
6381
|
const MessageToL1Filter$1 = {
|
|
@@ -5547,6 +6404,9 @@ const MessageToL1Filter$1 = {
|
|
|
5547
6404
|
if (message.includeSiblings !== void 0) {
|
|
5548
6405
|
writer.uint32(64).bool(message.includeSiblings);
|
|
5549
6406
|
}
|
|
6407
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6408
|
+
writer.uint32(72).bool(message.includeTransactionTrace);
|
|
6409
|
+
}
|
|
5550
6410
|
return writer;
|
|
5551
6411
|
},
|
|
5552
6412
|
decode(input, length) {
|
|
@@ -5604,6 +6464,12 @@ const MessageToL1Filter$1 = {
|
|
|
5604
6464
|
}
|
|
5605
6465
|
message.includeSiblings = reader.bool();
|
|
5606
6466
|
continue;
|
|
6467
|
+
case 9:
|
|
6468
|
+
if (tag !== 72) {
|
|
6469
|
+
break;
|
|
6470
|
+
}
|
|
6471
|
+
message.includeTransactionTrace = reader.bool();
|
|
6472
|
+
continue;
|
|
5607
6473
|
}
|
|
5608
6474
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5609
6475
|
break;
|
|
@@ -5621,7 +6487,8 @@ const MessageToL1Filter$1 = {
|
|
|
5621
6487
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : void 0,
|
|
5622
6488
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : void 0,
|
|
5623
6489
|
includeEvents: isSet(object.includeEvents) ? globalThis.Boolean(object.includeEvents) : void 0,
|
|
5624
|
-
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0
|
|
6490
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : void 0,
|
|
6491
|
+
includeTransactionTrace: isSet(object.includeTransactionTrace) ? globalThis.Boolean(object.includeTransactionTrace) : void 0
|
|
5625
6492
|
};
|
|
5626
6493
|
},
|
|
5627
6494
|
toJSON(message) {
|
|
@@ -5650,6 +6517,9 @@ const MessageToL1Filter$1 = {
|
|
|
5650
6517
|
if (message.includeSiblings !== void 0) {
|
|
5651
6518
|
obj.includeSiblings = message.includeSiblings;
|
|
5652
6519
|
}
|
|
6520
|
+
if (message.includeTransactionTrace !== void 0) {
|
|
6521
|
+
obj.includeTransactionTrace = message.includeTransactionTrace;
|
|
6522
|
+
}
|
|
5653
6523
|
return obj;
|
|
5654
6524
|
},
|
|
5655
6525
|
create(base) {
|
|
@@ -5665,6 +6535,7 @@ const MessageToL1Filter$1 = {
|
|
|
5665
6535
|
message.includeReceipt = object.includeReceipt ?? void 0;
|
|
5666
6536
|
message.includeEvents = object.includeEvents ?? void 0;
|
|
5667
6537
|
message.includeSiblings = object.includeSiblings ?? void 0;
|
|
6538
|
+
message.includeTransactionTrace = object.includeTransactionTrace ?? void 0;
|
|
5668
6539
|
return message;
|
|
5669
6540
|
}
|
|
5670
6541
|
};
|
|
@@ -5675,7 +6546,8 @@ function createBaseTransactionFilter() {
|
|
|
5675
6546
|
includeReceipt: void 0,
|
|
5676
6547
|
includeEvents: void 0,
|
|
5677
6548
|
includeMessages: void 0,
|
|
5678
|
-
inner: void 0
|
|
6549
|
+
inner: void 0,
|
|
6550
|
+
includeTrace: void 0
|
|
5679
6551
|
};
|
|
5680
6552
|
}
|
|
5681
6553
|
const TransactionFilter$1 = {
|
|
@@ -5730,6 +6602,9 @@ const TransactionFilter$1 = {
|
|
|
5730
6602
|
DeployAccountV3TransactionFilter$1.encode(message.inner.deployAccountV3, writer.uint32(130).fork()).ldelim();
|
|
5731
6603
|
break;
|
|
5732
6604
|
}
|
|
6605
|
+
if (message.includeTrace !== void 0) {
|
|
6606
|
+
writer.uint32(136).bool(message.includeTrace);
|
|
6607
|
+
}
|
|
5733
6608
|
return writer;
|
|
5734
6609
|
},
|
|
5735
6610
|
decode(input, length) {
|
|
@@ -5841,6 +6716,12 @@ const TransactionFilter$1 = {
|
|
|
5841
6716
|
deployAccountV3: DeployAccountV3TransactionFilter$1.decode(reader, reader.uint32())
|
|
5842
6717
|
};
|
|
5843
6718
|
continue;
|
|
6719
|
+
case 17:
|
|
6720
|
+
if (tag !== 136) {
|
|
6721
|
+
break;
|
|
6722
|
+
}
|
|
6723
|
+
message.includeTrace = reader.bool();
|
|
6724
|
+
continue;
|
|
5844
6725
|
}
|
|
5845
6726
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5846
6727
|
break;
|
|
@@ -5862,7 +6743,8 @@ const TransactionFilter$1 = {
|
|
|
5862
6743
|
} : isSet(object.deployAccountV3) ? {
|
|
5863
6744
|
$case: "deployAccountV3",
|
|
5864
6745
|
deployAccountV3: DeployAccountV3TransactionFilter$1.fromJSON(object.deployAccountV3)
|
|
5865
|
-
} : void 0
|
|
6746
|
+
} : void 0,
|
|
6747
|
+
includeTrace: isSet(object.includeTrace) ? globalThis.Boolean(object.includeTrace) : void 0
|
|
5866
6748
|
};
|
|
5867
6749
|
},
|
|
5868
6750
|
toJSON(message) {
|
|
@@ -5915,6 +6797,9 @@ const TransactionFilter$1 = {
|
|
|
5915
6797
|
if (message.inner?.$case === "deployAccountV3") {
|
|
5916
6798
|
obj.deployAccountV3 = DeployAccountV3TransactionFilter$1.toJSON(message.inner.deployAccountV3);
|
|
5917
6799
|
}
|
|
6800
|
+
if (message.includeTrace !== void 0) {
|
|
6801
|
+
obj.includeTrace = message.includeTrace;
|
|
6802
|
+
}
|
|
5918
6803
|
return obj;
|
|
5919
6804
|
},
|
|
5920
6805
|
create(base) {
|
|
@@ -5966,6 +6851,7 @@ const TransactionFilter$1 = {
|
|
|
5966
6851
|
deployAccountV3: DeployAccountV3TransactionFilter$1.fromPartial(object.inner.deployAccountV3)
|
|
5967
6852
|
};
|
|
5968
6853
|
}
|
|
6854
|
+
message.includeTrace = object.includeTrace ?? void 0;
|
|
5969
6855
|
return message;
|
|
5970
6856
|
}
|
|
5971
6857
|
};
|
|
@@ -7151,12 +8037,103 @@ const NonceUpdate = schema.Schema.Struct({
|
|
|
7151
8037
|
contractAddress: FieldElement$1,
|
|
7152
8038
|
nonce: FieldElement$1
|
|
7153
8039
|
});
|
|
8040
|
+
const CallType = schema.Schema.transform(
|
|
8041
|
+
schema.Schema.Enums(CallType$1),
|
|
8042
|
+
schema.Schema.Literal("libraryCall", "call", "delegate", "unknown"),
|
|
8043
|
+
{
|
|
8044
|
+
decode(value) {
|
|
8045
|
+
const enumMap = {
|
|
8046
|
+
[CallType$1.LIBRARY_CALL]: "libraryCall",
|
|
8047
|
+
[CallType$1.CALL]: "call",
|
|
8048
|
+
[CallType$1.DELEGATE]: "delegate",
|
|
8049
|
+
[CallType$1.UNSPECIFIED]: "unknown",
|
|
8050
|
+
[CallType$1.UNRECOGNIZED]: "unknown"
|
|
8051
|
+
};
|
|
8052
|
+
return enumMap[value] ?? "unknown";
|
|
8053
|
+
},
|
|
8054
|
+
encode(value) {
|
|
8055
|
+
throw new Error("encode: not implemented");
|
|
8056
|
+
}
|
|
8057
|
+
}
|
|
8058
|
+
);
|
|
8059
|
+
class FunctionInvocation extends schema.Schema.Class(
|
|
8060
|
+
"FunctionInvocation"
|
|
8061
|
+
)({
|
|
8062
|
+
contractAddress: FieldElement$1,
|
|
8063
|
+
entryPointSelector: FieldElement$1,
|
|
8064
|
+
calldata: schema.Schema.Array(FieldElement$1),
|
|
8065
|
+
callerAddress: FieldElement$1,
|
|
8066
|
+
classHash: FieldElement$1,
|
|
8067
|
+
callType: CallType,
|
|
8068
|
+
result: schema.Schema.Array(FieldElement$1),
|
|
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
|
|
8080
|
+
});
|
|
8081
|
+
const ExecuteInvocationReverted = schema.Schema.Struct({
|
|
8082
|
+
_tag: tag("reverted"),
|
|
8083
|
+
reverted: schema.Schema.Struct({
|
|
8084
|
+
reason: schema.Schema.optional(schema.Schema.String)
|
|
8085
|
+
})
|
|
8086
|
+
});
|
|
8087
|
+
const InvokeTransactionTrace = schema.Schema.Struct({
|
|
8088
|
+
_tag: tag("invoke"),
|
|
8089
|
+
invoke: schema.Schema.Struct({
|
|
8090
|
+
validateInvocation: schema.Schema.optional(FunctionInvocation),
|
|
8091
|
+
executeInvocation: schema.Schema.Union(
|
|
8092
|
+
ExecuteInvocationReverted,
|
|
8093
|
+
ExecuteInvocationSuccess
|
|
8094
|
+
),
|
|
8095
|
+
feeTransferInvocation: schema.Schema.optional(FunctionInvocation)
|
|
8096
|
+
})
|
|
8097
|
+
});
|
|
8098
|
+
const DeclareTransactionTrace = schema.Schema.Struct({
|
|
8099
|
+
_tag: tag("declare"),
|
|
8100
|
+
declare: schema.Schema.Struct({
|
|
8101
|
+
validateInvocation: schema.Schema.optional(FunctionInvocation),
|
|
8102
|
+
feeTransferInvocation: schema.Schema.optional(FunctionInvocation)
|
|
8103
|
+
})
|
|
8104
|
+
});
|
|
8105
|
+
const DeployAccountTransactionTrace = schema.Schema.Struct({
|
|
8106
|
+
_tag: tag("deployAccount"),
|
|
8107
|
+
deployAccount: schema.Schema.Struct({
|
|
8108
|
+
validateInvocation: schema.Schema.optional(FunctionInvocation),
|
|
8109
|
+
constructorInvocation: schema.Schema.optional(FunctionInvocation),
|
|
8110
|
+
feeTransferInvocation: schema.Schema.optional(FunctionInvocation)
|
|
8111
|
+
})
|
|
8112
|
+
});
|
|
8113
|
+
const L1HandlerTransactionTrace = schema.Schema.Struct({
|
|
8114
|
+
_tag: tag("l1Handler"),
|
|
8115
|
+
l1Handler: schema.Schema.Struct({
|
|
8116
|
+
functionInvocation: schema.Schema.optional(FunctionInvocation)
|
|
8117
|
+
})
|
|
8118
|
+
});
|
|
8119
|
+
const TransactionTrace = schema.Schema.Struct({
|
|
8120
|
+
filterIds: schema.Schema.Array(schema.Schema.Number),
|
|
8121
|
+
transactionIndex: schema.Schema.Number,
|
|
8122
|
+
transactionHash: FieldElement$1,
|
|
8123
|
+
traceRoot: schema.Schema.Union(
|
|
8124
|
+
InvokeTransactionTrace,
|
|
8125
|
+
DeclareTransactionTrace,
|
|
8126
|
+
DeployAccountTransactionTrace,
|
|
8127
|
+
L1HandlerTransactionTrace
|
|
8128
|
+
)
|
|
8129
|
+
});
|
|
7154
8130
|
const Block = schema.Schema.Struct({
|
|
7155
8131
|
header: BlockHeader,
|
|
7156
8132
|
transactions: schema.Schema.Array(Transaction),
|
|
7157
8133
|
receipts: schema.Schema.Array(TransactionReceipt),
|
|
7158
8134
|
events: schema.Schema.Array(Event),
|
|
7159
8135
|
messages: schema.Schema.Array(MessageToL1),
|
|
8136
|
+
traces: schema.Schema.Array(TransactionTrace),
|
|
7160
8137
|
storageDiffs: schema.Schema.Array(StorageDiff),
|
|
7161
8138
|
contractChanges: schema.Schema.Array(ContractChange),
|
|
7162
8139
|
nonceUpdates: schema.Schema.Array(NonceUpdate)
|
|
@@ -7264,7 +8241,8 @@ const EventFilter = schema.Schema.Struct({
|
|
|
7264
8241
|
includeTransaction: schema.Schema.optional(schema.Schema.Boolean),
|
|
7265
8242
|
includeReceipt: schema.Schema.optional(schema.Schema.Boolean),
|
|
7266
8243
|
includeMessages: schema.Schema.optional(schema.Schema.Boolean),
|
|
7267
|
-
includeSiblings: schema.Schema.optional(schema.Schema.Boolean)
|
|
8244
|
+
includeSiblings: schema.Schema.optional(schema.Schema.Boolean),
|
|
8245
|
+
includeTransactionTrace: schema.Schema.optional(schema.Schema.Boolean)
|
|
7268
8246
|
});
|
|
7269
8247
|
const MessageToL1Filter = schema.Schema.Struct({
|
|
7270
8248
|
id: schema.Schema.optional(schema.Schema.Number),
|
|
@@ -7273,7 +8251,8 @@ const MessageToL1Filter = schema.Schema.Struct({
|
|
|
7273
8251
|
transactionStatus: schema.Schema.optional(TransactionStatusFilter),
|
|
7274
8252
|
includeTransaction: schema.Schema.optional(schema.Schema.Boolean),
|
|
7275
8253
|
includeReceipt: schema.Schema.optional(schema.Schema.Boolean),
|
|
7276
|
-
includeEvents: schema.Schema.optional(schema.Schema.Boolean)
|
|
8254
|
+
includeEvents: schema.Schema.optional(schema.Schema.Boolean),
|
|
8255
|
+
includeTransactionTrace: schema.Schema.optional(schema.Schema.Boolean)
|
|
7277
8256
|
});
|
|
7278
8257
|
const InvokeTransactionV0Filter = schema.Schema.Struct({
|
|
7279
8258
|
_tag: tag("invokeV0"),
|
|
@@ -7325,6 +8304,7 @@ const TransactionFilter = schema.Schema.Struct({
|
|
|
7325
8304
|
includeReceipt: schema.Schema.optional(schema.Schema.Boolean),
|
|
7326
8305
|
includeMessages: schema.Schema.optional(schema.Schema.Boolean),
|
|
7327
8306
|
includeEvents: schema.Schema.optional(schema.Schema.Boolean),
|
|
8307
|
+
includeTrace: schema.Schema.optional(schema.Schema.Boolean),
|
|
7328
8308
|
transactionType: schema.Schema.optional(
|
|
7329
8309
|
schema.Schema.Union(
|
|
7330
8310
|
InvokeTransactionV0Filter,
|
|
@@ -7623,12 +8603,14 @@ const StarknetStream = new protocol.StreamConfig(
|
|
|
7623
8603
|
exports.Block = Block;
|
|
7624
8604
|
exports.BlockFromBytes = BlockFromBytes;
|
|
7625
8605
|
exports.BlockHeader = BlockHeader;
|
|
8606
|
+
exports.CallType = CallType;
|
|
7626
8607
|
exports.ComputationResources = ComputationResources;
|
|
7627
8608
|
exports.ContractChange = ContractChange;
|
|
7628
8609
|
exports.ContractChangeFilter = ContractChangeFilter;
|
|
7629
8610
|
exports.DataAvailabilityMode = DataAvailabilityMode;
|
|
7630
8611
|
exports.DataAvailabilityResources = DataAvailabilityResources;
|
|
7631
8612
|
exports.DeclareTransactionReceipt = DeclareTransactionReceipt;
|
|
8613
|
+
exports.DeclareTransactionTrace = DeclareTransactionTrace;
|
|
7632
8614
|
exports.DeclareTransactionV0 = DeclareTransactionV0;
|
|
7633
8615
|
exports.DeclareTransactionV1 = DeclareTransactionV1;
|
|
7634
8616
|
exports.DeclareTransactionV2 = DeclareTransactionV2;
|
|
@@ -7641,6 +8623,7 @@ exports.DeclaredClass = DeclaredClass;
|
|
|
7641
8623
|
exports.DeclaredClassFilter = DeclaredClassFilter;
|
|
7642
8624
|
exports.DecodeEventError = DecodeEventError;
|
|
7643
8625
|
exports.DeployAccountTransactionReceipt = DeployAccountTransactionReceipt;
|
|
8626
|
+
exports.DeployAccountTransactionTrace = DeployAccountTransactionTrace;
|
|
7644
8627
|
exports.DeployAccountTransactionV1 = DeployAccountTransactionV1;
|
|
7645
8628
|
exports.DeployAccountTransactionV3 = DeployAccountTransactionV3;
|
|
7646
8629
|
exports.DeployAccountV1TransactionFilter = DeployAccountV1TransactionFilter;
|
|
@@ -7652,6 +8635,8 @@ exports.DeployedContract = DeployedContract;
|
|
|
7652
8635
|
exports.DeployedContractFilter = DeployedContractFilter;
|
|
7653
8636
|
exports.Event = Event;
|
|
7654
8637
|
exports.EventFilter = EventFilter;
|
|
8638
|
+
exports.ExecuteInvocationReverted = ExecuteInvocationReverted;
|
|
8639
|
+
exports.ExecuteInvocationSuccess = ExecuteInvocationSuccess;
|
|
7655
8640
|
exports.ExecutionResources = ExecutionResources;
|
|
7656
8641
|
exports.ExecutionReverted = ExecutionReverted;
|
|
7657
8642
|
exports.ExecutionSucceeded = ExecutionSucceeded;
|
|
@@ -7660,8 +8645,10 @@ exports.FieldElement = FieldElement$1;
|
|
|
7660
8645
|
exports.FieldElementProto = FieldElementProto;
|
|
7661
8646
|
exports.Filter = Filter;
|
|
7662
8647
|
exports.FilterFromBytes = FilterFromBytes;
|
|
8648
|
+
exports.FunctionInvocation = FunctionInvocation;
|
|
7663
8649
|
exports.HeaderFilter = HeaderFilter;
|
|
7664
8650
|
exports.InvokeTransactionReceipt = InvokeTransactionReceipt;
|
|
8651
|
+
exports.InvokeTransactionTrace = InvokeTransactionTrace;
|
|
7665
8652
|
exports.InvokeTransactionV0 = InvokeTransactionV0;
|
|
7666
8653
|
exports.InvokeTransactionV0Filter = InvokeTransactionV0Filter;
|
|
7667
8654
|
exports.InvokeTransactionV1 = InvokeTransactionV1;
|
|
@@ -7673,6 +8660,7 @@ exports.L1DataAvailabilityMode = L1DataAvailabilityMode;
|
|
|
7673
8660
|
exports.L1HandlerTransaction = L1HandlerTransaction;
|
|
7674
8661
|
exports.L1HandlerTransactionFilter = L1HandlerTransactionFilter;
|
|
7675
8662
|
exports.L1HandlerTransactionReceipt = L1HandlerTransactionReceipt;
|
|
8663
|
+
exports.L1HandlerTransactionTrace = L1HandlerTransactionTrace;
|
|
7676
8664
|
exports.MessageToL1 = MessageToL1;
|
|
7677
8665
|
exports.MessageToL1Filter = MessageToL1Filter;
|
|
7678
8666
|
exports.NonceUpdate = NonceUpdate;
|
|
@@ -7694,6 +8682,7 @@ exports.TransactionReceipt = TransactionReceipt;
|
|
|
7694
8682
|
exports.TransactionReceiptMeta = TransactionReceiptMeta;
|
|
7695
8683
|
exports.TransactionStatus = TransactionStatus;
|
|
7696
8684
|
exports.TransactionStatusFilter = TransactionStatusFilter;
|
|
8685
|
+
exports.TransactionTrace = TransactionTrace;
|
|
7697
8686
|
exports.U128 = U128;
|
|
7698
8687
|
exports.decodeEvent = decodeEvent;
|
|
7699
8688
|
exports.feltFromProto = feltFromProto;
|