Commit 5d1a0a3
feat!: ibc transfer quota (#1568)
* WIP: add ibc rate limit middleware to ibc transfer
* WIP: add cll tx,query cmds
1. add cli queries for rate_limits and params
2. add updateProposal for rate_limits and ibcPause status
* WIP: add check rate limits for ibc denom
* remove ibc-rate-limits and move rate limits into ibctransfer module
* move the umme ibctransfer into ics20 folder
* fix: fix the lint
* refactor: change the module structure to 'authz' type of cosmos-sdk
* remove inflow_limit in rate limits
* chore: check the rate limits by exchange rate
* add denom exponent to calculate amount in USD
* calculating the sent amount with exponent of registerd token
* fix: fix the amount calculation
* fix: fix the rate-limit reset issue
* refactor: update the params
1. add token_quota, total_quota, quota_duration params
2. ibc-transfer token quota checking with token_quota and total_quota params
* fix: fix the build
* chore: update the limits and quota interval
* chore: fix the lint issues
* chore: fix the lint issues
* chore: addree the pr comments
1. rename ibcratelimit to uibc module
2. update the uibc cli tx and queries
3. fix the quota expires of ibc-transfer
* chore: remove the param subspace from uibc
* refactor: refactor the proto and logic
1. ibc-transfer status now enum (enabled,disabled,paused)
2. get the exchange from base denom (ibc/xxx)
* chore: address the pr comments
1. remove expire time for quota records
2. removed params subspace keys
* fix: fix the buf lint
* chore: get the exchange price from TokenValue of leverage
* chore: convert uToken to baseToken in ibc-transfer quota checking
* chore: add typed events for emit events
* address the review comments
1. Rename ibc_denom to denom query
* refactor the code
1. rename the GovUpdateTransferStatus to GovSetIBCPause
2. address the pr comments
* address the pr comments
* chore: fix the build issue
* chore: add tests for params
* fix: fix the update quota params
* chore: address the pr comments
* chore: fix the lint
* address the pr comments++
* address the pr comments
* update reset quota
* move to Marshal to MustMarshal in uibc
* add TODO for ibc middleware acknowledgement
* add comment to outflow_sum
---------
Co-authored-by: Robert Zaremba <robert@zaremba.ch>1 parent 6253a22 commit 5d1a0a3
File tree
42 files changed
+5713
-68
lines changed- app
- proto/umee/uibc/v1
- x
- leverage
- keeper
- uibc
- client/cli
- ics20
- keeper
- module
- quota
- keeper
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+5713
-68
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | 121 | | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
| |||
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
177 | | - | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| |||
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
| 205 | + | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
| |||
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| 251 | + | |
244 | 252 | | |
245 | 253 | | |
246 | 254 | | |
| |||
300 | 308 | | |
301 | 309 | | |
302 | 310 | | |
303 | | - | |
304 | | - | |
| 311 | + | |
305 | 312 | | |
306 | 313 | | |
307 | 314 | | |
308 | | - | |
| 315 | + | |
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
| |||
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
445 | | - | |
446 | | - | |
| 452 | + | |
447 | 453 | | |
448 | 454 | | |
449 | 455 | | |
450 | 456 | | |
451 | 457 | | |
452 | 458 | | |
453 | 459 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| |||
494 | 497 | | |
495 | 498 | | |
496 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
497 | 522 | | |
498 | 523 | | |
499 | 524 | | |
500 | 525 | | |
501 | 526 | | |
502 | 527 | | |
503 | | - | |
| 528 | + | |
504 | 529 | | |
505 | 530 | | |
506 | 531 | | |
| |||
509 | 534 | | |
510 | 535 | | |
511 | 536 | | |
512 | | - | |
513 | | - | |
514 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
515 | 554 | | |
516 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
517 | 561 | | |
518 | 562 | | |
519 | | - | |
520 | | - | |
| 563 | + | |
| 564 | + | |
521 | 565 | | |
522 | 566 | | |
523 | 567 | | |
| |||
593 | 637 | | |
594 | 638 | | |
595 | 639 | | |
596 | | - | |
| 640 | + | |
597 | 641 | | |
598 | 642 | | |
599 | 643 | | |
600 | 644 | | |
601 | 645 | | |
602 | 646 | | |
603 | | - | |
604 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
605 | 652 | | |
606 | 653 | | |
607 | 654 | | |
| |||
626 | 673 | | |
627 | 674 | | |
628 | 675 | | |
| 676 | + | |
629 | 677 | | |
630 | 678 | | |
631 | 679 | | |
| |||
661 | 709 | | |
662 | 710 | | |
663 | 711 | | |
| 712 | + | |
664 | 713 | | |
665 | 714 | | |
666 | 715 | | |
| |||
676 | 725 | | |
677 | 726 | | |
678 | 727 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
683 | 732 | | |
684 | 733 | | |
685 | 734 | | |
| |||
704 | 753 | | |
705 | 754 | | |
706 | 755 | | |
707 | | - | |
708 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
709 | 760 | | |
710 | 761 | | |
711 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments