@zoguxprotocol/proto 0.1.8 → 0.1.9

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.
@@ -3,6 +3,8 @@ import { IndexerOrder, IndexerOrderSDKType, IndexerOrderId, IndexerOrderIdSDKTyp
3
3
  import { OrderRemovalReason } from "../shared/removal_reason";
4
4
  import { PerpetualMarketType } from "../protocol/v1/perpetual";
5
5
  import { VaultStatus } from "../protocol/v1/vault";
6
+ import { TokenPair, TokenPairSDKType } from "../../bridge/token";
7
+ import { DepositType } from "../../bridge/bridge_event";
6
8
  import * as _m0 from "protobufjs/minimal";
7
9
  import { DeepPartial, Long } from "../../../helpers";
8
10
  /** Type is the type for funding values. */
@@ -74,6 +76,154 @@ export function fundingEventV1_TypeToJSON(object: FundingEventV1_Type): string {
74
76
  return "UNRECOGNIZED";
75
77
  }
76
78
  }
79
+ /** BridgeDepositStatus tracks the lifecycle of a bridge deposit. */
80
+
81
+ export enum BridgeDepositStatus {
82
+ BRIDGE_DEPOSIT_STATUS_UNSPECIFIED = 0,
83
+
84
+ /** BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED - Deposit has been acknowledged by consensus (AcknowledgeBridges). */
85
+ BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED = 1,
86
+
87
+ /** BRIDGE_DEPOSIT_STATUS_COMPLETED - Deposit has been completed — tokens minted/transferred to user (CompleteBridge). */
88
+ BRIDGE_DEPOSIT_STATUS_COMPLETED = 2,
89
+ UNRECOGNIZED = -1,
90
+ }
91
+ export const BridgeDepositStatusSDKType = BridgeDepositStatus;
92
+ export function bridgeDepositStatusFromJSON(object: any): BridgeDepositStatus {
93
+ switch (object) {
94
+ case 0:
95
+ case "BRIDGE_DEPOSIT_STATUS_UNSPECIFIED":
96
+ return BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_UNSPECIFIED;
97
+
98
+ case 1:
99
+ case "BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED":
100
+ return BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED;
101
+
102
+ case 2:
103
+ case "BRIDGE_DEPOSIT_STATUS_COMPLETED":
104
+ return BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_COMPLETED;
105
+
106
+ case -1:
107
+ case "UNRECOGNIZED":
108
+ default:
109
+ return BridgeDepositStatus.UNRECOGNIZED;
110
+ }
111
+ }
112
+ export function bridgeDepositStatusToJSON(object: BridgeDepositStatus): string {
113
+ switch (object) {
114
+ case BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_UNSPECIFIED:
115
+ return "BRIDGE_DEPOSIT_STATUS_UNSPECIFIED";
116
+
117
+ case BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED:
118
+ return "BRIDGE_DEPOSIT_STATUS_ACKNOWLEDGED";
119
+
120
+ case BridgeDepositStatus.BRIDGE_DEPOSIT_STATUS_COMPLETED:
121
+ return "BRIDGE_DEPOSIT_STATUS_COMPLETED";
122
+
123
+ case BridgeDepositStatus.UNRECOGNIZED:
124
+ default:
125
+ return "UNRECOGNIZED";
126
+ }
127
+ }
128
+ /** BridgeWithdrawalStatus tracks the lifecycle of a bridge withdrawal. */
129
+
130
+ export enum BridgeWithdrawalStatus {
131
+ BRIDGE_WITHDRAWAL_STATUS_UNSPECIFIED = 0,
132
+
133
+ /** BRIDGE_WITHDRAWAL_STATUS_PENDING - Withdrawal requested, funds locked (RequestWithdrawal). */
134
+ BRIDGE_WITHDRAWAL_STATUS_PENDING = 1,
135
+
136
+ /** BRIDGE_WITHDRAWAL_STATUS_SIGNED - TSS threshold signatures collected (SubmitWithdrawalSignature). */
137
+ BRIDGE_WITHDRAWAL_STATUS_SIGNED = 2,
138
+
139
+ /** BRIDGE_WITHDRAWAL_STATUS_SUBMITTED - Submitted to EVM chain, waiting for confirmation (MarkWithdrawalSubmitted). */
140
+ BRIDGE_WITHDRAWAL_STATUS_SUBMITTED = 3,
141
+
142
+ /** BRIDGE_WITHDRAWAL_STATUS_COMPLETED - Confirmed on EVM chain (ConfirmWithdrawal). */
143
+ BRIDGE_WITHDRAWAL_STATUS_COMPLETED = 4,
144
+
145
+ /** BRIDGE_WITHDRAWAL_STATUS_CANCELLED - Cancelled, funds refunded (CancelWithdrawal). */
146
+ BRIDGE_WITHDRAWAL_STATUS_CANCELLED = 5,
147
+
148
+ /** BRIDGE_WITHDRAWAL_STATUS_FAILED - Failed (e.g. TSS timeout, EVM revert); funds remain locked until resolved (FailWithdrawal). */
149
+ BRIDGE_WITHDRAWAL_STATUS_FAILED = 6,
150
+
151
+ /** BRIDGE_WITHDRAWAL_STATUS_RESOLVED - Resolved by admin; locked funds sent to destination (ResolveWithdrawal). */
152
+ BRIDGE_WITHDRAWAL_STATUS_RESOLVED = 7,
153
+ UNRECOGNIZED = -1,
154
+ }
155
+ export const BridgeWithdrawalStatusSDKType = BridgeWithdrawalStatus;
156
+ export function bridgeWithdrawalStatusFromJSON(object: any): BridgeWithdrawalStatus {
157
+ switch (object) {
158
+ case 0:
159
+ case "BRIDGE_WITHDRAWAL_STATUS_UNSPECIFIED":
160
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_UNSPECIFIED;
161
+
162
+ case 1:
163
+ case "BRIDGE_WITHDRAWAL_STATUS_PENDING":
164
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_PENDING;
165
+
166
+ case 2:
167
+ case "BRIDGE_WITHDRAWAL_STATUS_SIGNED":
168
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_SIGNED;
169
+
170
+ case 3:
171
+ case "BRIDGE_WITHDRAWAL_STATUS_SUBMITTED":
172
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_SUBMITTED;
173
+
174
+ case 4:
175
+ case "BRIDGE_WITHDRAWAL_STATUS_COMPLETED":
176
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_COMPLETED;
177
+
178
+ case 5:
179
+ case "BRIDGE_WITHDRAWAL_STATUS_CANCELLED":
180
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_CANCELLED;
181
+
182
+ case 6:
183
+ case "BRIDGE_WITHDRAWAL_STATUS_FAILED":
184
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_FAILED;
185
+
186
+ case 7:
187
+ case "BRIDGE_WITHDRAWAL_STATUS_RESOLVED":
188
+ return BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_RESOLVED;
189
+
190
+ case -1:
191
+ case "UNRECOGNIZED":
192
+ default:
193
+ return BridgeWithdrawalStatus.UNRECOGNIZED;
194
+ }
195
+ }
196
+ export function bridgeWithdrawalStatusToJSON(object: BridgeWithdrawalStatus): string {
197
+ switch (object) {
198
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_UNSPECIFIED:
199
+ return "BRIDGE_WITHDRAWAL_STATUS_UNSPECIFIED";
200
+
201
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_PENDING:
202
+ return "BRIDGE_WITHDRAWAL_STATUS_PENDING";
203
+
204
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_SIGNED:
205
+ return "BRIDGE_WITHDRAWAL_STATUS_SIGNED";
206
+
207
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_SUBMITTED:
208
+ return "BRIDGE_WITHDRAWAL_STATUS_SUBMITTED";
209
+
210
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_COMPLETED:
211
+ return "BRIDGE_WITHDRAWAL_STATUS_COMPLETED";
212
+
213
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_CANCELLED:
214
+ return "BRIDGE_WITHDRAWAL_STATUS_CANCELLED";
215
+
216
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_FAILED:
217
+ return "BRIDGE_WITHDRAWAL_STATUS_FAILED";
218
+
219
+ case BridgeWithdrawalStatus.BRIDGE_WITHDRAWAL_STATUS_RESOLVED:
220
+ return "BRIDGE_WITHDRAWAL_STATUS_RESOLVED";
221
+
222
+ case BridgeWithdrawalStatus.UNRECOGNIZED:
223
+ default:
224
+ return "UNRECOGNIZED";
225
+ }
226
+ }
77
227
  /**
78
228
  * FundingUpdate is used for funding update events and includes a funding
79
229
  * value and an optional funding index that correspond to a perpetual market.
@@ -684,6 +834,15 @@ export interface AssetCreateEventV1 {
684
834
  */
685
835
 
686
836
  atomicResolution: number;
837
+ /**
838
+ * The name of base denomination unit of the Asset (e.g. `uatom`, `ibc/xxxxx`).
839
+ * Must be unique and match the denom used in sdk.Coin in x/bank.
840
+ */
841
+
842
+ denom: string;
843
+ /** The exponent of converting one unit of denom to a full coin. */
844
+
845
+ denomExponent: number;
687
846
  }
688
847
  /**
689
848
  * AssetCreateEventV1 message contains all the information about an new Asset on
@@ -696,6 +855,8 @@ export interface AssetCreateEventV1SDKType {
696
855
  has_market: boolean;
697
856
  market_id: number;
698
857
  atomic_resolution: number;
858
+ denom: string;
859
+ denom_exponent: number;
699
860
  }
700
861
  /**
701
862
  * PerpetualMarketCreateEventV1 message contains all the information about a
@@ -1528,6 +1689,80 @@ export interface UpsertVaultEventV1SDKType {
1528
1689
  clob_pair_id: number;
1529
1690
  status: VaultStatus;
1530
1691
  }
1692
+ /** Event emitted when bridge token pairs are set (MsgSetTokenPairs). */
1693
+
1694
+ export interface SetTokenPairsEventV1 {
1695
+ tokenPairs: TokenPair[];
1696
+ }
1697
+ /** Event emitted when bridge token pairs are set (MsgSetTokenPairs). */
1698
+
1699
+ export interface SetTokenPairsEventV1SDKType {
1700
+ token_pairs: TokenPairSDKType[];
1701
+ }
1702
+ /** Event emitted at each deposit state transition (EVM → Zogux). */
1703
+
1704
+ export interface BridgeDepositEventV1 {
1705
+ id: number;
1706
+ address: string;
1707
+ coinDenom: string;
1708
+ coinAmount: string;
1709
+ ethBlockHeight: Long;
1710
+ status: BridgeDepositStatus;
1711
+ /** Where to credit the bridged funds: main account, spot, or perps (0=MAIN, 1=SPOT, 2=PREPS). */
1712
+
1713
+ depositType: DepositType;
1714
+ /** EVM transaction hash of the deposit. */
1715
+
1716
+ evmTxHash: string;
1717
+ /** Transaction hash of the Zogux chain transaction that finalized the bridge deposit. */
1718
+
1719
+ zoguxTxHash: string;
1720
+ }
1721
+ /** Event emitted at each deposit state transition (EVM → Zogux). */
1722
+
1723
+ export interface BridgeDepositEventV1SDKType {
1724
+ id: number;
1725
+ address: string;
1726
+ coin_denom: string;
1727
+ coin_amount: string;
1728
+ eth_block_height: Long;
1729
+ status: BridgeDepositStatus;
1730
+ deposit_type: DepositType;
1731
+ evm_tx_hash: string;
1732
+ zogux_tx_hash: string;
1733
+ }
1734
+ /** Event emitted at each withdrawal state transition (Zogux → EVM). */
1735
+
1736
+ export interface BridgeWithdrawalEventV1 {
1737
+ withdrawalId: string;
1738
+ fromAddress: string;
1739
+ toAddress: string;
1740
+ amount: string;
1741
+ chainId: Long;
1742
+ denom: string;
1743
+ nonce: Long;
1744
+ status: BridgeWithdrawalStatus;
1745
+ blockHeight: Long;
1746
+ evmTxHash: string;
1747
+ cancelReason: string;
1748
+ message: Uint8Array;
1749
+ }
1750
+ /** Event emitted at each withdrawal state transition (Zogux → EVM). */
1751
+
1752
+ export interface BridgeWithdrawalEventV1SDKType {
1753
+ withdrawal_id: string;
1754
+ from_address: string;
1755
+ to_address: string;
1756
+ amount: string;
1757
+ chain_id: Long;
1758
+ denom: string;
1759
+ nonce: Long;
1760
+ status: BridgeWithdrawalStatus;
1761
+ block_height: Long;
1762
+ evm_tx_hash: string;
1763
+ cancel_reason: string;
1764
+ message: Uint8Array;
1765
+ }
1531
1766
 
1532
1767
  function createBaseFundingUpdateV1(): FundingUpdateV1 {
1533
1768
  return {
@@ -3010,7 +3245,9 @@ function createBaseAssetCreateEventV1(): AssetCreateEventV1 {
3010
3245
  symbol: "",
3011
3246
  hasMarket: false,
3012
3247
  marketId: 0,
3013
- atomicResolution: 0
3248
+ atomicResolution: 0,
3249
+ denom: "",
3250
+ denomExponent: 0
3014
3251
  };
3015
3252
  }
3016
3253
 
@@ -3036,6 +3273,14 @@ export const AssetCreateEventV1 = {
3036
3273
  writer.uint32(40).sint32(message.atomicResolution);
3037
3274
  }
3038
3275
 
3276
+ if (message.denom !== "") {
3277
+ writer.uint32(50).string(message.denom);
3278
+ }
3279
+
3280
+ if (message.denomExponent !== 0) {
3281
+ writer.uint32(56).sint32(message.denomExponent);
3282
+ }
3283
+
3039
3284
  return writer;
3040
3285
  },
3041
3286
 
@@ -3068,6 +3313,14 @@ export const AssetCreateEventV1 = {
3068
3313
  message.atomicResolution = reader.sint32();
3069
3314
  break;
3070
3315
 
3316
+ case 6:
3317
+ message.denom = reader.string();
3318
+ break;
3319
+
3320
+ case 7:
3321
+ message.denomExponent = reader.sint32();
3322
+ break;
3323
+
3071
3324
  default:
3072
3325
  reader.skipType(tag & 7);
3073
3326
  break;
@@ -3084,6 +3337,8 @@ export const AssetCreateEventV1 = {
3084
3337
  message.hasMarket = object.hasMarket ?? false;
3085
3338
  message.marketId = object.marketId ?? 0;
3086
3339
  message.atomicResolution = object.atomicResolution ?? 0;
3340
+ message.denom = object.denom ?? "";
3341
+ message.denomExponent = object.denomExponent ?? 0;
3087
3342
  return message;
3088
3343
  }
3089
3344
 
@@ -4602,4 +4857,329 @@ export const UpsertVaultEventV1 = {
4602
4857
  return message;
4603
4858
  }
4604
4859
 
4860
+ };
4861
+
4862
+ function createBaseSetTokenPairsEventV1(): SetTokenPairsEventV1 {
4863
+ return {
4864
+ tokenPairs: []
4865
+ };
4866
+ }
4867
+
4868
+ export const SetTokenPairsEventV1 = {
4869
+ encode(message: SetTokenPairsEventV1, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4870
+ for (const v of message.tokenPairs) {
4871
+ TokenPair.encode(v!, writer.uint32(10).fork()).ldelim();
4872
+ }
4873
+
4874
+ return writer;
4875
+ },
4876
+
4877
+ decode(input: _m0.Reader | Uint8Array, length?: number): SetTokenPairsEventV1 {
4878
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
4879
+ let end = length === undefined ? reader.len : reader.pos + length;
4880
+ const message = createBaseSetTokenPairsEventV1();
4881
+
4882
+ while (reader.pos < end) {
4883
+ const tag = reader.uint32();
4884
+
4885
+ switch (tag >>> 3) {
4886
+ case 1:
4887
+ message.tokenPairs.push(TokenPair.decode(reader, reader.uint32()));
4888
+ break;
4889
+
4890
+ default:
4891
+ reader.skipType(tag & 7);
4892
+ break;
4893
+ }
4894
+ }
4895
+
4896
+ return message;
4897
+ },
4898
+
4899
+ fromPartial(object: DeepPartial<SetTokenPairsEventV1>): SetTokenPairsEventV1 {
4900
+ const message = createBaseSetTokenPairsEventV1();
4901
+ message.tokenPairs = object.tokenPairs?.map(e => TokenPair.fromPartial(e)) || [];
4902
+ return message;
4903
+ }
4904
+
4905
+ };
4906
+
4907
+ function createBaseBridgeDepositEventV1(): BridgeDepositEventV1 {
4908
+ return {
4909
+ id: 0,
4910
+ address: "",
4911
+ coinDenom: "",
4912
+ coinAmount: "",
4913
+ ethBlockHeight: Long.UZERO,
4914
+ status: 0,
4915
+ depositType: 0,
4916
+ evmTxHash: "",
4917
+ zoguxTxHash: ""
4918
+ };
4919
+ }
4920
+
4921
+ export const BridgeDepositEventV1 = {
4922
+ encode(message: BridgeDepositEventV1, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4923
+ if (message.id !== 0) {
4924
+ writer.uint32(8).uint32(message.id);
4925
+ }
4926
+
4927
+ if (message.address !== "") {
4928
+ writer.uint32(18).string(message.address);
4929
+ }
4930
+
4931
+ if (message.coinDenom !== "") {
4932
+ writer.uint32(26).string(message.coinDenom);
4933
+ }
4934
+
4935
+ if (message.coinAmount !== "") {
4936
+ writer.uint32(34).string(message.coinAmount);
4937
+ }
4938
+
4939
+ if (!message.ethBlockHeight.isZero()) {
4940
+ writer.uint32(40).uint64(message.ethBlockHeight);
4941
+ }
4942
+
4943
+ if (message.status !== 0) {
4944
+ writer.uint32(48).int32(message.status);
4945
+ }
4946
+
4947
+ if (message.depositType !== 0) {
4948
+ writer.uint32(56).int32(message.depositType);
4949
+ }
4950
+
4951
+ if (message.evmTxHash !== "") {
4952
+ writer.uint32(66).string(message.evmTxHash);
4953
+ }
4954
+
4955
+ if (message.zoguxTxHash !== "") {
4956
+ writer.uint32(74).string(message.zoguxTxHash);
4957
+ }
4958
+
4959
+ return writer;
4960
+ },
4961
+
4962
+ decode(input: _m0.Reader | Uint8Array, length?: number): BridgeDepositEventV1 {
4963
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
4964
+ let end = length === undefined ? reader.len : reader.pos + length;
4965
+ const message = createBaseBridgeDepositEventV1();
4966
+
4967
+ while (reader.pos < end) {
4968
+ const tag = reader.uint32();
4969
+
4970
+ switch (tag >>> 3) {
4971
+ case 1:
4972
+ message.id = reader.uint32();
4973
+ break;
4974
+
4975
+ case 2:
4976
+ message.address = reader.string();
4977
+ break;
4978
+
4979
+ case 3:
4980
+ message.coinDenom = reader.string();
4981
+ break;
4982
+
4983
+ case 4:
4984
+ message.coinAmount = reader.string();
4985
+ break;
4986
+
4987
+ case 5:
4988
+ message.ethBlockHeight = (reader.uint64() as Long);
4989
+ break;
4990
+
4991
+ case 6:
4992
+ message.status = (reader.int32() as any);
4993
+ break;
4994
+
4995
+ case 7:
4996
+ message.depositType = (reader.int32() as any);
4997
+ break;
4998
+
4999
+ case 8:
5000
+ message.evmTxHash = reader.string();
5001
+ break;
5002
+
5003
+ case 9:
5004
+ message.zoguxTxHash = reader.string();
5005
+ break;
5006
+
5007
+ default:
5008
+ reader.skipType(tag & 7);
5009
+ break;
5010
+ }
5011
+ }
5012
+
5013
+ return message;
5014
+ },
5015
+
5016
+ fromPartial(object: DeepPartial<BridgeDepositEventV1>): BridgeDepositEventV1 {
5017
+ const message = createBaseBridgeDepositEventV1();
5018
+ message.id = object.id ?? 0;
5019
+ message.address = object.address ?? "";
5020
+ message.coinDenom = object.coinDenom ?? "";
5021
+ message.coinAmount = object.coinAmount ?? "";
5022
+ message.ethBlockHeight = object.ethBlockHeight !== undefined && object.ethBlockHeight !== null ? Long.fromValue(object.ethBlockHeight) : Long.UZERO;
5023
+ message.status = object.status ?? 0;
5024
+ message.depositType = object.depositType ?? 0;
5025
+ message.evmTxHash = object.evmTxHash ?? "";
5026
+ message.zoguxTxHash = object.zoguxTxHash ?? "";
5027
+ return message;
5028
+ }
5029
+
5030
+ };
5031
+
5032
+ function createBaseBridgeWithdrawalEventV1(): BridgeWithdrawalEventV1 {
5033
+ return {
5034
+ withdrawalId: "",
5035
+ fromAddress: "",
5036
+ toAddress: "",
5037
+ amount: "",
5038
+ chainId: Long.ZERO,
5039
+ denom: "",
5040
+ nonce: Long.UZERO,
5041
+ status: 0,
5042
+ blockHeight: Long.UZERO,
5043
+ evmTxHash: "",
5044
+ cancelReason: "",
5045
+ message: new Uint8Array()
5046
+ };
5047
+ }
5048
+
5049
+ export const BridgeWithdrawalEventV1 = {
5050
+ encode(message: BridgeWithdrawalEventV1, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
5051
+ if (message.withdrawalId !== "") {
5052
+ writer.uint32(10).string(message.withdrawalId);
5053
+ }
5054
+
5055
+ if (message.fromAddress !== "") {
5056
+ writer.uint32(18).string(message.fromAddress);
5057
+ }
5058
+
5059
+ if (message.toAddress !== "") {
5060
+ writer.uint32(26).string(message.toAddress);
5061
+ }
5062
+
5063
+ if (message.amount !== "") {
5064
+ writer.uint32(34).string(message.amount);
5065
+ }
5066
+
5067
+ if (!message.chainId.isZero()) {
5068
+ writer.uint32(40).int64(message.chainId);
5069
+ }
5070
+
5071
+ if (message.denom !== "") {
5072
+ writer.uint32(50).string(message.denom);
5073
+ }
5074
+
5075
+ if (!message.nonce.isZero()) {
5076
+ writer.uint32(56).uint64(message.nonce);
5077
+ }
5078
+
5079
+ if (message.status !== 0) {
5080
+ writer.uint32(64).int32(message.status);
5081
+ }
5082
+
5083
+ if (!message.blockHeight.isZero()) {
5084
+ writer.uint32(72).uint64(message.blockHeight);
5085
+ }
5086
+
5087
+ if (message.evmTxHash !== "") {
5088
+ writer.uint32(82).string(message.evmTxHash);
5089
+ }
5090
+
5091
+ if (message.cancelReason !== "") {
5092
+ writer.uint32(90).string(message.cancelReason);
5093
+ }
5094
+
5095
+ if (message.message.length !== 0) {
5096
+ writer.uint32(98).bytes(message.message);
5097
+ }
5098
+
5099
+ return writer;
5100
+ },
5101
+
5102
+ decode(input: _m0.Reader | Uint8Array, length?: number): BridgeWithdrawalEventV1 {
5103
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
5104
+ let end = length === undefined ? reader.len : reader.pos + length;
5105
+ const message = createBaseBridgeWithdrawalEventV1();
5106
+
5107
+ while (reader.pos < end) {
5108
+ const tag = reader.uint32();
5109
+
5110
+ switch (tag >>> 3) {
5111
+ case 1:
5112
+ message.withdrawalId = reader.string();
5113
+ break;
5114
+
5115
+ case 2:
5116
+ message.fromAddress = reader.string();
5117
+ break;
5118
+
5119
+ case 3:
5120
+ message.toAddress = reader.string();
5121
+ break;
5122
+
5123
+ case 4:
5124
+ message.amount = reader.string();
5125
+ break;
5126
+
5127
+ case 5:
5128
+ message.chainId = (reader.int64() as Long);
5129
+ break;
5130
+
5131
+ case 6:
5132
+ message.denom = reader.string();
5133
+ break;
5134
+
5135
+ case 7:
5136
+ message.nonce = (reader.uint64() as Long);
5137
+ break;
5138
+
5139
+ case 8:
5140
+ message.status = (reader.int32() as any);
5141
+ break;
5142
+
5143
+ case 9:
5144
+ message.blockHeight = (reader.uint64() as Long);
5145
+ break;
5146
+
5147
+ case 10:
5148
+ message.evmTxHash = reader.string();
5149
+ break;
5150
+
5151
+ case 11:
5152
+ message.cancelReason = reader.string();
5153
+ break;
5154
+
5155
+ case 12:
5156
+ message.message = reader.bytes();
5157
+ break;
5158
+
5159
+ default:
5160
+ reader.skipType(tag & 7);
5161
+ break;
5162
+ }
5163
+ }
5164
+
5165
+ return message;
5166
+ },
5167
+
5168
+ fromPartial(object: DeepPartial<BridgeWithdrawalEventV1>): BridgeWithdrawalEventV1 {
5169
+ const message = createBaseBridgeWithdrawalEventV1();
5170
+ message.withdrawalId = object.withdrawalId ?? "";
5171
+ message.fromAddress = object.fromAddress ?? "";
5172
+ message.toAddress = object.toAddress ?? "";
5173
+ message.amount = object.amount ?? "";
5174
+ message.chainId = object.chainId !== undefined && object.chainId !== null ? Long.fromValue(object.chainId) : Long.ZERO;
5175
+ message.denom = object.denom ?? "";
5176
+ message.nonce = object.nonce !== undefined && object.nonce !== null ? Long.fromValue(object.nonce) : Long.UZERO;
5177
+ message.status = object.status ?? 0;
5178
+ message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.UZERO;
5179
+ message.evmTxHash = object.evmTxHash ?? "";
5180
+ message.cancelReason = object.cancelReason ?? "";
5181
+ message.message = object.message ?? new Uint8Array();
5182
+ return message;
5183
+ }
5184
+
4605
5185
  };