Conversation
1. add cli queries for rate_limits and params 2. add updateProposal for rate_limits and ibcPause status
robert-zaremba
left a comment
There was a problem hiding this comment.
let's try to convert x/ibctransfer into a true sdk module. Hence I propose the following structure (which also is inline with the most recent recommendations):
x/ibctransfer
- "root" ->
- generated types and codec will go here
- ibc_module.go -> ibc module can go there, eg `IBCModule`
- /module -> cosmos-sdk module
- /quota -> keeper for ibc limits and IBC middleware implementation (this doesn't implement anything related to gRPC service)
- /service -> sdk module keeper (it should import and encapsulate /quota) implementing gRPC service
- /client etc... - standard
- /ics20 -- move the existing ibctransfer/keeper package here
robert-zaremba
left a comment
There was a problem hiding this comment.
Let's keep generated types directly in x/ibctransfer and the SDK module code in x/ibctransfer/module as in the authz module.
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1568 +/- ##
==========================================
- Coverage 57.50% 55.80% -1.71%
==========================================
Files 77 83 +6
Lines 8034 8322 +288
==========================================
+ Hits 4620 4644 +24
- Misses 3063 3327 +264
Partials 351 351
|
| // reset quotas | ||
| if quotaExpires == nil || quotaExpires.Before(ctx.BlockTime()) { | ||
| if err := keeper.ResetQuota(ctx); err != nil { | ||
| panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
|
|
||
| // BeginBlock implements BeginBlock for the x/uibc module. | ||
| func BeginBlock(ctx sdk.Context, keeper keeper.Keeper) { | ||
| quotaExpires, err := keeper.GetExpire(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
| func BeginBlock(ctx sdk.Context, keeper keeper.Keeper) { | ||
| quotaExpires, err := keeper.GetExpire(ctx) | ||
| if err != nil { | ||
| panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
| } | ||
|
|
||
| // reset quotas | ||
| if quotaExpires == nil || quotaExpires.Before(ctx.BlockTime()) { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
| } | ||
|
|
||
| // reset quotas | ||
| if quotaExpires == nil || quotaExpires.Before(ctx.BlockTime()) { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
|
|
||
| // reset quotas | ||
| if quotaExpires == nil || quotaExpires.Before(ctx.BlockTime()) { | ||
| if err := keeper.ResetQuota(ctx); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Description
closes: #
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...