@miradorlabs/web-grpc 2.36.0 → 2.38.0
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/package.json
CHANGED
|
@@ -215,6 +215,8 @@ export interface TransactionActivity {
|
|
|
215
215
|
| undefined;
|
|
216
216
|
/** All decoded event logs from receipt */
|
|
217
217
|
eventLogs: EventLog[];
|
|
218
|
+
/** Root of the internal call tree; unset unless the tracer was run */
|
|
219
|
+
callTrace: CallFrame | undefined;
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
/** Activity card representing a single semantic action */
|
|
@@ -377,6 +379,46 @@ export interface DecodedParam {
|
|
|
377
379
|
indexed: boolean;
|
|
378
380
|
}
|
|
379
381
|
|
|
382
|
+
/**
|
|
383
|
+
* CallFrame is one node of a transaction's internal call tree (debug_traceTransaction/callTracer).
|
|
384
|
+
* A reverted transaction emits no receipt logs, so this is the only record of what it actually did.
|
|
385
|
+
*/
|
|
386
|
+
export interface CallFrame {
|
|
387
|
+
/** CALL, DELEGATECALL, STATICCALL, CREATE, CREATE2, SELFDESTRUCT */
|
|
388
|
+
callType: string;
|
|
389
|
+
fromAddress: string;
|
|
390
|
+
/** Created contract address for CREATE/CREATE2 */
|
|
391
|
+
toAddress: string;
|
|
392
|
+
/** Native value moved by this frame, in wei */
|
|
393
|
+
valueRaw: string;
|
|
394
|
+
/** Human-readable native value (e.g., "0.5 ETH") */
|
|
395
|
+
valueFormatted: string;
|
|
396
|
+
/** Gas supplied to the frame */
|
|
397
|
+
gas: number;
|
|
398
|
+
/** Gas consumed by the frame */
|
|
399
|
+
gasUsed: number;
|
|
400
|
+
/** 0 for the root frame */
|
|
401
|
+
depth: number;
|
|
402
|
+
/** Decoded input for this frame (absent for CREATE/CREATE2) */
|
|
403
|
+
calldata:
|
|
404
|
+
| CalldataInfo
|
|
405
|
+
| undefined;
|
|
406
|
+
/** Return data, or revert data when the frame failed */
|
|
407
|
+
outputHex: string;
|
|
408
|
+
/** Whether this frame itself failed */
|
|
409
|
+
reverted: boolean;
|
|
410
|
+
/** Raw tracer error (e.g., "execution reverted", "out of gas") */
|
|
411
|
+
errorMessage: string;
|
|
412
|
+
/** Decoded revert string or custom error, when resolvable */
|
|
413
|
+
revertReason: string;
|
|
414
|
+
/** Logs emitted inside this frame; empty when it or an ancestor reverted (the tracer drops them, as the receipt does) */
|
|
415
|
+
eventLogs: EventLog[];
|
|
416
|
+
/** Sub-calls, in execution order */
|
|
417
|
+
calls: CallFrame[];
|
|
418
|
+
/** Sub-calls were dropped to stay under the frame/depth cap */
|
|
419
|
+
truncated: boolean;
|
|
420
|
+
}
|
|
421
|
+
|
|
380
422
|
/** EventLog represents a decoded event log from a transaction receipt */
|
|
381
423
|
export interface EventLog {
|
|
382
424
|
/** Position in receipt */
|
|
@@ -818,6 +860,7 @@ function createBaseTransactionActivity(): TransactionActivity {
|
|
|
818
860
|
nativeValueFiat: undefined,
|
|
819
861
|
calldata: undefined,
|
|
820
862
|
eventLogs: [],
|
|
863
|
+
callTrace: undefined,
|
|
821
864
|
};
|
|
822
865
|
}
|
|
823
866
|
|
|
@@ -850,6 +893,9 @@ export const TransactionActivity: MessageFns<TransactionActivity> = {
|
|
|
850
893
|
for (const v of message.eventLogs) {
|
|
851
894
|
EventLog.encode(v!, writer.uint32(82).fork()).join();
|
|
852
895
|
}
|
|
896
|
+
if (message.callTrace !== undefined) {
|
|
897
|
+
CallFrame.encode(message.callTrace, writer.uint32(90).fork()).join();
|
|
898
|
+
}
|
|
853
899
|
return writer;
|
|
854
900
|
},
|
|
855
901
|
|
|
@@ -938,6 +984,14 @@ export const TransactionActivity: MessageFns<TransactionActivity> = {
|
|
|
938
984
|
message.eventLogs.push(EventLog.decode(reader, reader.uint32()));
|
|
939
985
|
continue;
|
|
940
986
|
}
|
|
987
|
+
case 11: {
|
|
988
|
+
if (tag !== 90) {
|
|
989
|
+
break;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
message.callTrace = CallFrame.decode(reader, reader.uint32());
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
941
995
|
}
|
|
942
996
|
if ((tag & 7) === 4 || tag === 0) {
|
|
943
997
|
break;
|
|
@@ -987,6 +1041,11 @@ export const TransactionActivity: MessageFns<TransactionActivity> = {
|
|
|
987
1041
|
: globalThis.Array.isArray(object?.event_logs)
|
|
988
1042
|
? object.event_logs.map((e: any) => EventLog.fromJSON(e))
|
|
989
1043
|
: [],
|
|
1044
|
+
callTrace: isSet(object.callTrace)
|
|
1045
|
+
? CallFrame.fromJSON(object.callTrace)
|
|
1046
|
+
: isSet(object.call_trace)
|
|
1047
|
+
? CallFrame.fromJSON(object.call_trace)
|
|
1048
|
+
: undefined,
|
|
990
1049
|
};
|
|
991
1050
|
},
|
|
992
1051
|
|
|
@@ -1019,6 +1078,9 @@ export const TransactionActivity: MessageFns<TransactionActivity> = {
|
|
|
1019
1078
|
if (message.eventLogs?.length) {
|
|
1020
1079
|
obj.eventLogs = message.eventLogs.map((e) => EventLog.toJSON(e));
|
|
1021
1080
|
}
|
|
1081
|
+
if (message.callTrace !== undefined) {
|
|
1082
|
+
obj.callTrace = CallFrame.toJSON(message.callTrace);
|
|
1083
|
+
}
|
|
1022
1084
|
return obj;
|
|
1023
1085
|
},
|
|
1024
1086
|
|
|
@@ -1040,6 +1102,9 @@ export const TransactionActivity: MessageFns<TransactionActivity> = {
|
|
|
1040
1102
|
? CalldataInfo.fromPartial(object.calldata)
|
|
1041
1103
|
: undefined;
|
|
1042
1104
|
message.eventLogs = object.eventLogs?.map((e) => EventLog.fromPartial(e)) || [];
|
|
1105
|
+
message.callTrace = (object.callTrace !== undefined && object.callTrace !== null)
|
|
1106
|
+
? CallFrame.fromPartial(object.callTrace)
|
|
1107
|
+
: undefined;
|
|
1043
1108
|
return message;
|
|
1044
1109
|
},
|
|
1045
1110
|
};
|
|
@@ -3672,6 +3737,376 @@ export const DecodedParam: MessageFns<DecodedParam> = {
|
|
|
3672
3737
|
},
|
|
3673
3738
|
};
|
|
3674
3739
|
|
|
3740
|
+
function createBaseCallFrame(): CallFrame {
|
|
3741
|
+
return {
|
|
3742
|
+
callType: "",
|
|
3743
|
+
fromAddress: "",
|
|
3744
|
+
toAddress: "",
|
|
3745
|
+
valueRaw: "",
|
|
3746
|
+
valueFormatted: "",
|
|
3747
|
+
gas: 0,
|
|
3748
|
+
gasUsed: 0,
|
|
3749
|
+
depth: 0,
|
|
3750
|
+
calldata: undefined,
|
|
3751
|
+
outputHex: "",
|
|
3752
|
+
reverted: false,
|
|
3753
|
+
errorMessage: "",
|
|
3754
|
+
revertReason: "",
|
|
3755
|
+
eventLogs: [],
|
|
3756
|
+
calls: [],
|
|
3757
|
+
truncated: false,
|
|
3758
|
+
};
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
export const CallFrame: MessageFns<CallFrame> = {
|
|
3762
|
+
encode(message: CallFrame, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3763
|
+
if (message.callType !== "") {
|
|
3764
|
+
writer.uint32(10).string(message.callType);
|
|
3765
|
+
}
|
|
3766
|
+
if (message.fromAddress !== "") {
|
|
3767
|
+
writer.uint32(18).string(message.fromAddress);
|
|
3768
|
+
}
|
|
3769
|
+
if (message.toAddress !== "") {
|
|
3770
|
+
writer.uint32(26).string(message.toAddress);
|
|
3771
|
+
}
|
|
3772
|
+
if (message.valueRaw !== "") {
|
|
3773
|
+
writer.uint32(34).string(message.valueRaw);
|
|
3774
|
+
}
|
|
3775
|
+
if (message.valueFormatted !== "") {
|
|
3776
|
+
writer.uint32(42).string(message.valueFormatted);
|
|
3777
|
+
}
|
|
3778
|
+
if (message.gas !== 0) {
|
|
3779
|
+
writer.uint32(48).uint64(message.gas);
|
|
3780
|
+
}
|
|
3781
|
+
if (message.gasUsed !== 0) {
|
|
3782
|
+
writer.uint32(56).uint64(message.gasUsed);
|
|
3783
|
+
}
|
|
3784
|
+
if (message.depth !== 0) {
|
|
3785
|
+
writer.uint32(64).uint32(message.depth);
|
|
3786
|
+
}
|
|
3787
|
+
if (message.calldata !== undefined) {
|
|
3788
|
+
CalldataInfo.encode(message.calldata, writer.uint32(74).fork()).join();
|
|
3789
|
+
}
|
|
3790
|
+
if (message.outputHex !== "") {
|
|
3791
|
+
writer.uint32(82).string(message.outputHex);
|
|
3792
|
+
}
|
|
3793
|
+
if (message.reverted !== false) {
|
|
3794
|
+
writer.uint32(88).bool(message.reverted);
|
|
3795
|
+
}
|
|
3796
|
+
if (message.errorMessage !== "") {
|
|
3797
|
+
writer.uint32(98).string(message.errorMessage);
|
|
3798
|
+
}
|
|
3799
|
+
if (message.revertReason !== "") {
|
|
3800
|
+
writer.uint32(106).string(message.revertReason);
|
|
3801
|
+
}
|
|
3802
|
+
for (const v of message.eventLogs) {
|
|
3803
|
+
EventLog.encode(v!, writer.uint32(114).fork()).join();
|
|
3804
|
+
}
|
|
3805
|
+
for (const v of message.calls) {
|
|
3806
|
+
CallFrame.encode(v!, writer.uint32(122).fork()).join();
|
|
3807
|
+
}
|
|
3808
|
+
if (message.truncated !== false) {
|
|
3809
|
+
writer.uint32(128).bool(message.truncated);
|
|
3810
|
+
}
|
|
3811
|
+
return writer;
|
|
3812
|
+
},
|
|
3813
|
+
|
|
3814
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CallFrame {
|
|
3815
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3816
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3817
|
+
if (previousRecursionDepth >= 100) {
|
|
3818
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3819
|
+
}
|
|
3820
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3821
|
+
try {
|
|
3822
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3823
|
+
const message = createBaseCallFrame();
|
|
3824
|
+
while (reader.pos < end) {
|
|
3825
|
+
const tag = reader.uint32();
|
|
3826
|
+
switch (tag >>> 3) {
|
|
3827
|
+
case 1: {
|
|
3828
|
+
if (tag !== 10) {
|
|
3829
|
+
break;
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
message.callType = reader.string();
|
|
3833
|
+
continue;
|
|
3834
|
+
}
|
|
3835
|
+
case 2: {
|
|
3836
|
+
if (tag !== 18) {
|
|
3837
|
+
break;
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
message.fromAddress = reader.string();
|
|
3841
|
+
continue;
|
|
3842
|
+
}
|
|
3843
|
+
case 3: {
|
|
3844
|
+
if (tag !== 26) {
|
|
3845
|
+
break;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
message.toAddress = reader.string();
|
|
3849
|
+
continue;
|
|
3850
|
+
}
|
|
3851
|
+
case 4: {
|
|
3852
|
+
if (tag !== 34) {
|
|
3853
|
+
break;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
message.valueRaw = reader.string();
|
|
3857
|
+
continue;
|
|
3858
|
+
}
|
|
3859
|
+
case 5: {
|
|
3860
|
+
if (tag !== 42) {
|
|
3861
|
+
break;
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
message.valueFormatted = reader.string();
|
|
3865
|
+
continue;
|
|
3866
|
+
}
|
|
3867
|
+
case 6: {
|
|
3868
|
+
if (tag !== 48) {
|
|
3869
|
+
break;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
message.gas = longToNumber(reader.uint64());
|
|
3873
|
+
continue;
|
|
3874
|
+
}
|
|
3875
|
+
case 7: {
|
|
3876
|
+
if (tag !== 56) {
|
|
3877
|
+
break;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
message.gasUsed = longToNumber(reader.uint64());
|
|
3881
|
+
continue;
|
|
3882
|
+
}
|
|
3883
|
+
case 8: {
|
|
3884
|
+
if (tag !== 64) {
|
|
3885
|
+
break;
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
message.depth = reader.uint32();
|
|
3889
|
+
continue;
|
|
3890
|
+
}
|
|
3891
|
+
case 9: {
|
|
3892
|
+
if (tag !== 74) {
|
|
3893
|
+
break;
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
message.calldata = CalldataInfo.decode(reader, reader.uint32());
|
|
3897
|
+
continue;
|
|
3898
|
+
}
|
|
3899
|
+
case 10: {
|
|
3900
|
+
if (tag !== 82) {
|
|
3901
|
+
break;
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
message.outputHex = reader.string();
|
|
3905
|
+
continue;
|
|
3906
|
+
}
|
|
3907
|
+
case 11: {
|
|
3908
|
+
if (tag !== 88) {
|
|
3909
|
+
break;
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
message.reverted = reader.bool();
|
|
3913
|
+
continue;
|
|
3914
|
+
}
|
|
3915
|
+
case 12: {
|
|
3916
|
+
if (tag !== 98) {
|
|
3917
|
+
break;
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
message.errorMessage = reader.string();
|
|
3921
|
+
continue;
|
|
3922
|
+
}
|
|
3923
|
+
case 13: {
|
|
3924
|
+
if (tag !== 106) {
|
|
3925
|
+
break;
|
|
3926
|
+
}
|
|
3927
|
+
|
|
3928
|
+
message.revertReason = reader.string();
|
|
3929
|
+
continue;
|
|
3930
|
+
}
|
|
3931
|
+
case 14: {
|
|
3932
|
+
if (tag !== 114) {
|
|
3933
|
+
break;
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
message.eventLogs.push(EventLog.decode(reader, reader.uint32()));
|
|
3937
|
+
continue;
|
|
3938
|
+
}
|
|
3939
|
+
case 15: {
|
|
3940
|
+
if (tag !== 122) {
|
|
3941
|
+
break;
|
|
3942
|
+
}
|
|
3943
|
+
|
|
3944
|
+
message.calls.push(CallFrame.decode(reader, reader.uint32()));
|
|
3945
|
+
continue;
|
|
3946
|
+
}
|
|
3947
|
+
case 16: {
|
|
3948
|
+
if (tag !== 128) {
|
|
3949
|
+
break;
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
message.truncated = reader.bool();
|
|
3953
|
+
continue;
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3957
|
+
break;
|
|
3958
|
+
}
|
|
3959
|
+
reader.skip(tag & 7);
|
|
3960
|
+
}
|
|
3961
|
+
return message;
|
|
3962
|
+
} finally {
|
|
3963
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3964
|
+
}
|
|
3965
|
+
},
|
|
3966
|
+
|
|
3967
|
+
fromJSON(object: any): CallFrame {
|
|
3968
|
+
return {
|
|
3969
|
+
callType: isSet(object.callType)
|
|
3970
|
+
? globalThis.String(object.callType)
|
|
3971
|
+
: isSet(object.call_type)
|
|
3972
|
+
? globalThis.String(object.call_type)
|
|
3973
|
+
: "",
|
|
3974
|
+
fromAddress: isSet(object.fromAddress)
|
|
3975
|
+
? globalThis.String(object.fromAddress)
|
|
3976
|
+
: isSet(object.from_address)
|
|
3977
|
+
? globalThis.String(object.from_address)
|
|
3978
|
+
: "",
|
|
3979
|
+
toAddress: isSet(object.toAddress)
|
|
3980
|
+
? globalThis.String(object.toAddress)
|
|
3981
|
+
: isSet(object.to_address)
|
|
3982
|
+
? globalThis.String(object.to_address)
|
|
3983
|
+
: "",
|
|
3984
|
+
valueRaw: isSet(object.valueRaw)
|
|
3985
|
+
? globalThis.String(object.valueRaw)
|
|
3986
|
+
: isSet(object.value_raw)
|
|
3987
|
+
? globalThis.String(object.value_raw)
|
|
3988
|
+
: "",
|
|
3989
|
+
valueFormatted: isSet(object.valueFormatted)
|
|
3990
|
+
? globalThis.String(object.valueFormatted)
|
|
3991
|
+
: isSet(object.value_formatted)
|
|
3992
|
+
? globalThis.String(object.value_formatted)
|
|
3993
|
+
: "",
|
|
3994
|
+
gas: isSet(object.gas) ? globalThis.Number(object.gas) : 0,
|
|
3995
|
+
gasUsed: isSet(object.gasUsed)
|
|
3996
|
+
? globalThis.Number(object.gasUsed)
|
|
3997
|
+
: isSet(object.gas_used)
|
|
3998
|
+
? globalThis.Number(object.gas_used)
|
|
3999
|
+
: 0,
|
|
4000
|
+
depth: isSet(object.depth) ? globalThis.Number(object.depth) : 0,
|
|
4001
|
+
calldata: isSet(object.calldata) ? CalldataInfo.fromJSON(object.calldata) : undefined,
|
|
4002
|
+
outputHex: isSet(object.outputHex)
|
|
4003
|
+
? globalThis.String(object.outputHex)
|
|
4004
|
+
: isSet(object.output_hex)
|
|
4005
|
+
? globalThis.String(object.output_hex)
|
|
4006
|
+
: "",
|
|
4007
|
+
reverted: isSet(object.reverted) ? globalThis.Boolean(object.reverted) : false,
|
|
4008
|
+
errorMessage: isSet(object.errorMessage)
|
|
4009
|
+
? globalThis.String(object.errorMessage)
|
|
4010
|
+
: isSet(object.error_message)
|
|
4011
|
+
? globalThis.String(object.error_message)
|
|
4012
|
+
: "",
|
|
4013
|
+
revertReason: isSet(object.revertReason)
|
|
4014
|
+
? globalThis.String(object.revertReason)
|
|
4015
|
+
: isSet(object.revert_reason)
|
|
4016
|
+
? globalThis.String(object.revert_reason)
|
|
4017
|
+
: "",
|
|
4018
|
+
eventLogs: globalThis.Array.isArray(object?.eventLogs)
|
|
4019
|
+
? object.eventLogs.map((e: any) => EventLog.fromJSON(e))
|
|
4020
|
+
: globalThis.Array.isArray(object?.event_logs)
|
|
4021
|
+
? object.event_logs.map((e: any) => EventLog.fromJSON(e))
|
|
4022
|
+
: [],
|
|
4023
|
+
calls: globalThis.Array.isArray(object?.calls)
|
|
4024
|
+
? object.calls.map((e: any) => CallFrame.fromJSON(e))
|
|
4025
|
+
: [],
|
|
4026
|
+
truncated: isSet(object.truncated) ? globalThis.Boolean(object.truncated) : false,
|
|
4027
|
+
};
|
|
4028
|
+
},
|
|
4029
|
+
|
|
4030
|
+
toJSON(message: CallFrame): unknown {
|
|
4031
|
+
const obj: any = {};
|
|
4032
|
+
if (message.callType !== "") {
|
|
4033
|
+
obj.callType = message.callType;
|
|
4034
|
+
}
|
|
4035
|
+
if (message.fromAddress !== "") {
|
|
4036
|
+
obj.fromAddress = message.fromAddress;
|
|
4037
|
+
}
|
|
4038
|
+
if (message.toAddress !== "") {
|
|
4039
|
+
obj.toAddress = message.toAddress;
|
|
4040
|
+
}
|
|
4041
|
+
if (message.valueRaw !== "") {
|
|
4042
|
+
obj.valueRaw = message.valueRaw;
|
|
4043
|
+
}
|
|
4044
|
+
if (message.valueFormatted !== "") {
|
|
4045
|
+
obj.valueFormatted = message.valueFormatted;
|
|
4046
|
+
}
|
|
4047
|
+
if (message.gas !== 0) {
|
|
4048
|
+
obj.gas = Math.round(message.gas);
|
|
4049
|
+
}
|
|
4050
|
+
if (message.gasUsed !== 0) {
|
|
4051
|
+
obj.gasUsed = Math.round(message.gasUsed);
|
|
4052
|
+
}
|
|
4053
|
+
if (message.depth !== 0) {
|
|
4054
|
+
obj.depth = Math.round(message.depth);
|
|
4055
|
+
}
|
|
4056
|
+
if (message.calldata !== undefined) {
|
|
4057
|
+
obj.calldata = CalldataInfo.toJSON(message.calldata);
|
|
4058
|
+
}
|
|
4059
|
+
if (message.outputHex !== "") {
|
|
4060
|
+
obj.outputHex = message.outputHex;
|
|
4061
|
+
}
|
|
4062
|
+
if (message.reverted !== false) {
|
|
4063
|
+
obj.reverted = message.reverted;
|
|
4064
|
+
}
|
|
4065
|
+
if (message.errorMessage !== "") {
|
|
4066
|
+
obj.errorMessage = message.errorMessage;
|
|
4067
|
+
}
|
|
4068
|
+
if (message.revertReason !== "") {
|
|
4069
|
+
obj.revertReason = message.revertReason;
|
|
4070
|
+
}
|
|
4071
|
+
if (message.eventLogs?.length) {
|
|
4072
|
+
obj.eventLogs = message.eventLogs.map((e) => EventLog.toJSON(e));
|
|
4073
|
+
}
|
|
4074
|
+
if (message.calls?.length) {
|
|
4075
|
+
obj.calls = message.calls.map((e) => CallFrame.toJSON(e));
|
|
4076
|
+
}
|
|
4077
|
+
if (message.truncated !== false) {
|
|
4078
|
+
obj.truncated = message.truncated;
|
|
4079
|
+
}
|
|
4080
|
+
return obj;
|
|
4081
|
+
},
|
|
4082
|
+
|
|
4083
|
+
create<I extends Exact<DeepPartial<CallFrame>, I>>(base?: I): CallFrame {
|
|
4084
|
+
return CallFrame.fromPartial(base ?? ({} as any));
|
|
4085
|
+
},
|
|
4086
|
+
fromPartial<I extends Exact<DeepPartial<CallFrame>, I>>(object: I): CallFrame {
|
|
4087
|
+
const message = createBaseCallFrame();
|
|
4088
|
+
message.callType = object.callType ?? "";
|
|
4089
|
+
message.fromAddress = object.fromAddress ?? "";
|
|
4090
|
+
message.toAddress = object.toAddress ?? "";
|
|
4091
|
+
message.valueRaw = object.valueRaw ?? "";
|
|
4092
|
+
message.valueFormatted = object.valueFormatted ?? "";
|
|
4093
|
+
message.gas = object.gas ?? 0;
|
|
4094
|
+
message.gasUsed = object.gasUsed ?? 0;
|
|
4095
|
+
message.depth = object.depth ?? 0;
|
|
4096
|
+
message.calldata = (object.calldata !== undefined && object.calldata !== null)
|
|
4097
|
+
? CalldataInfo.fromPartial(object.calldata)
|
|
4098
|
+
: undefined;
|
|
4099
|
+
message.outputHex = object.outputHex ?? "";
|
|
4100
|
+
message.reverted = object.reverted ?? false;
|
|
4101
|
+
message.errorMessage = object.errorMessage ?? "";
|
|
4102
|
+
message.revertReason = object.revertReason ?? "";
|
|
4103
|
+
message.eventLogs = object.eventLogs?.map((e) => EventLog.fromPartial(e)) || [];
|
|
4104
|
+
message.calls = object.calls?.map((e) => CallFrame.fromPartial(e)) || [];
|
|
4105
|
+
message.truncated = object.truncated ?? false;
|
|
4106
|
+
return message;
|
|
4107
|
+
},
|
|
4108
|
+
};
|
|
4109
|
+
|
|
3675
4110
|
function createBaseEventLog(): EventLog {
|
|
3676
4111
|
return {
|
|
3677
4112
|
logIndex: 0,
|