@@ -108,6 +108,9 @@ pub struct Params {
108
108
/// IBC params
109
109
#[ prost( message, optional, tag = "15" ) ]
110
110
pub ibc_params : :: core:: option:: Option < IbcParams > ,
111
+ /// Rate limit params
112
+ #[ prost( message, optional, tag = "16" ) ]
113
+ pub rate_limit_params : :: core:: option:: Option < RateLimitParams > ,
111
114
}
112
115
impl :: prost:: Name for Params {
113
116
const NAME : & ' static str = "Params" ;
@@ -202,6 +205,60 @@ impl ::prost::Name for ProtocolFees {
202
205
:: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
203
206
}
204
207
}
208
+ /// RateLimitParams defines the params related to the rate limit for BTC withdrawal
209
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
210
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
211
+ pub struct RateLimitParams {
212
+ /// Global rate limit params
213
+ #[ prost( message, optional, tag = "1" ) ]
214
+ pub global_rate_limit_params : :: core:: option:: Option < GlobalRateLimitParams > ,
215
+ /// Per address rate limit params
216
+ #[ prost( message, optional, tag = "2" ) ]
217
+ pub address_rate_limit_params : :: core:: option:: Option < AddressRateLimitParams > ,
218
+ }
219
+ impl :: prost:: Name for RateLimitParams {
220
+ const NAME : & ' static str = "RateLimitParams" ;
221
+ const PACKAGE : & ' static str = "side.btcbridge" ;
222
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
223
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
224
+ }
225
+ }
226
+ /// GlobalRateLimitParams defines the global rate limit params
227
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
228
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
229
+ pub struct GlobalRateLimitParams {
230
+ /// Duration of each rate limit epoch
231
+ #[ prost( message, optional, tag = "1" ) ]
232
+ pub period : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Duration > ,
233
+ /// Maximum withdrawable supply percentage during the rate limit period; 100 means no limit
234
+ #[ prost( uint32, tag = "2" ) ]
235
+ pub supply_percentage_quota : u32 ,
236
+ }
237
+ impl :: prost:: Name for GlobalRateLimitParams {
238
+ const NAME : & ' static str = "GlobalRateLimitParams" ;
239
+ const PACKAGE : & ' static str = "side.btcbridge" ;
240
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
241
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
242
+ }
243
+ }
244
+ /// AddressRateLimitParams defines the per address rate limit params
245
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
246
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
247
+ pub struct AddressRateLimitParams {
248
+ /// Duration of each rate limit epoch
249
+ #[ prost( message, optional, tag = "1" ) ]
250
+ pub period : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Duration > ,
251
+ /// Maximum withdrawable amount during the rate limit period; 0 means no limit
252
+ #[ prost( int64, tag = "2" ) ]
253
+ pub quota : i64 ,
254
+ }
255
+ impl :: prost:: Name for AddressRateLimitParams {
256
+ const NAME : & ' static str = "AddressRateLimitParams" ;
257
+ const PACKAGE : & ' static str = "side.btcbridge" ;
258
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
259
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
260
+ }
261
+ }
205
262
/// TSSParams defines the params related to TSS
206
263
#[ allow( clippy:: derive_partial_eq_without_eq) ]
207
264
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -391,6 +448,85 @@ impl ::prost::Name for IbcWithdrawRequest {
391
448
:: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
392
449
}
393
450
}
451
+ /// Rate limit for BTC withdrawal
452
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
453
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
454
+ pub struct RateLimit {
455
+ #[ prost( message, optional, tag = "1" ) ]
456
+ pub global_rate_limit : :: core:: option:: Option < GlobalRateLimit > ,
457
+ #[ prost( message, optional, tag = "2" ) ]
458
+ pub address_rate_limit : :: core:: option:: Option < AddressRateLimit > ,
459
+ }
460
+ impl :: prost:: Name for RateLimit {
461
+ const NAME : & ' static str = "RateLimit" ;
462
+ const PACKAGE : & ' static str = "side.btcbridge" ;
463
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
464
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
465
+ }
466
+ }
467
+ /// Global rate limit for BTC withdrawal
468
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
469
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
470
+ pub struct GlobalRateLimit {
471
+ /// Starting time for the current epoch
472
+ #[ prost( message, optional, tag = "1" ) ]
473
+ pub start_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
474
+ /// End time for the current epoch
475
+ #[ prost( message, optional, tag = "2" ) ]
476
+ pub end_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
477
+ /// Maximum withdrawable amount for the current epoch; 0 means no limit
478
+ #[ prost( int64, tag = "3" ) ]
479
+ pub quota : i64 ,
480
+ /// Used quota currently
481
+ #[ prost( int64, tag = "4" ) ]
482
+ pub used : i64 ,
483
+ }
484
+ impl :: prost:: Name for GlobalRateLimit {
485
+ const NAME : & ' static str = "GlobalRateLimit" ;
486
+ const PACKAGE : & ' static str = "side.btcbridge" ;
487
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
488
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
489
+ }
490
+ }
491
+ /// Per address rate limit for BTC withdrawal
492
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
493
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
494
+ pub struct AddressRateLimit {
495
+ /// Starting time for the current epoch
496
+ #[ prost( message, optional, tag = "1" ) ]
497
+ pub start_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
498
+ /// End time for the current epoch
499
+ #[ prost( message, optional, tag = "2" ) ]
500
+ pub end_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
501
+ /// Maximum withdrawable amount for the current epoch; 0 means no limit
502
+ #[ prost( int64, tag = "3" ) ]
503
+ pub quota : i64 ,
504
+ }
505
+ impl :: prost:: Name for AddressRateLimit {
506
+ const NAME : & ' static str = "AddressRateLimit" ;
507
+ const PACKAGE : & ' static str = "side.btcbridge" ;
508
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
509
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
510
+ }
511
+ }
512
+ /// Per address rate limit details
513
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
514
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
515
+ pub struct AddressRateLimitDetails {
516
+ /// Address
517
+ #[ prost( string, tag = "1" ) ]
518
+ pub address : :: prost:: alloc:: string:: String ,
519
+ /// Used quota currently
520
+ #[ prost( int64, tag = "2" ) ]
521
+ pub used : i64 ,
522
+ }
523
+ impl :: prost:: Name for AddressRateLimitDetails {
524
+ const NAME : & ' static str = "AddressRateLimitDetails" ;
525
+ const PACKAGE : & ' static str = "side.btcbridge" ;
526
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
527
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
528
+ }
529
+ }
394
530
/// Bitcoin UTXO
395
531
#[ allow( clippy:: derive_partial_eq_without_eq) ]
396
532
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
@@ -1429,6 +1565,72 @@ impl ::prost::Name for QueryIbcDepositScriptResponse {
1429
1565
:: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
1430
1566
}
1431
1567
}
1568
+ /// QueryRateLimitRequest is the request type for the Query/RateLimit RPC method.
1569
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1570
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1571
+ pub struct QueryRateLimitRequest { }
1572
+ impl :: prost:: Name for QueryRateLimitRequest {
1573
+ const NAME : & ' static str = "QueryRateLimitRequest" ;
1574
+ const PACKAGE : & ' static str = "side.btcbridge" ;
1575
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
1576
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
1577
+ }
1578
+ }
1579
+ /// QueryRateLimitResponse is the response type for the Query/RateLimit RPC method.
1580
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1581
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1582
+ pub struct QueryRateLimitResponse {
1583
+ #[ prost( message, optional, tag = "1" ) ]
1584
+ pub rate_limit : :: core:: option:: Option < RateLimit > ,
1585
+ }
1586
+ impl :: prost:: Name for QueryRateLimitResponse {
1587
+ const NAME : & ' static str = "QueryRateLimitResponse" ;
1588
+ const PACKAGE : & ' static str = "side.btcbridge" ;
1589
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
1590
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
1591
+ }
1592
+ }
1593
+ /// QueryRateLimitByAddressRequest is the request type for the Query/RateLimitByAddress RPC method.
1594
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1595
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1596
+ pub struct QueryRateLimitByAddressRequest {
1597
+ #[ prost( string, tag = "1" ) ]
1598
+ pub address : :: prost:: alloc:: string:: String ,
1599
+ }
1600
+ impl :: prost:: Name for QueryRateLimitByAddressRequest {
1601
+ const NAME : & ' static str = "QueryRateLimitByAddressRequest" ;
1602
+ const PACKAGE : & ' static str = "side.btcbridge" ;
1603
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
1604
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
1605
+ }
1606
+ }
1607
+ /// QueryRateLimitByAddressResponse is the response type for the Query/RateLimitByAddress RPC method.
1608
+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
1609
+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
1610
+ pub struct QueryRateLimitByAddressResponse {
1611
+ /// Address
1612
+ #[ prost( string, tag = "1" ) ]
1613
+ pub address : :: prost:: alloc:: string:: String ,
1614
+ /// Starting time for the current epoch
1615
+ #[ prost( message, optional, tag = "2" ) ]
1616
+ pub start_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
1617
+ /// End time for the current epoch
1618
+ #[ prost( message, optional, tag = "3" ) ]
1619
+ pub end_time : :: core:: option:: Option < :: tendermint_proto:: google:: protobuf:: Timestamp > ,
1620
+ /// Maximum withdrawable amount for the current epoch; 0 means no limit
1621
+ #[ prost( int64, tag = "4" ) ]
1622
+ pub quota : i64 ,
1623
+ /// Used quota currently
1624
+ #[ prost( int64, tag = "5" ) ]
1625
+ pub used : i64 ,
1626
+ }
1627
+ impl :: prost:: Name for QueryRateLimitByAddressResponse {
1628
+ const NAME : & ' static str = "QueryRateLimitByAddressResponse" ;
1629
+ const PACKAGE : & ' static str = "side.btcbridge" ;
1630
+ fn full_name ( ) -> :: prost:: alloc:: string:: String {
1631
+ :: prost:: alloc:: format!( "side.btcbridge.{}" , Self :: NAME )
1632
+ }
1633
+ }
1432
1634
/// MsgSubmitDepositTransaction defines the Msg/SubmitDepositTransaction request type.
1433
1635
#[ allow( clippy:: derive_partial_eq_without_eq) ]
1434
1636
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
0 commit comments