-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBC rate limit query #4246
base: main
Are you sure you want to change the base?
IBC rate limit query #4246
Conversation
0464530
to
8a4ba07
Compare
@@ -1518,3 +1519,25 @@ pub async fn query_ibc_denom<N: Namada>( | |||
|
|||
token.as_ref().to_string() | |||
} | |||
|
|||
/// Query the IBC rate limit for the provided token | |||
pub async fn query_ibc_rate_limit<C: Client + Sync>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to this function could be to add another path to the TOKEN
namada/crates/sdk/src/queries/vp/token.rs
Line 15 in 9eb747c
router! {TOKEN, |
@brentstone I've also added a cli command for the query. Let me know if we only need the sdk function so that I can revert that change |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4246 +/- ##
==========================================
- Coverage 74.59% 74.58% -0.02%
==========================================
Files 342 342
Lines 108771 108785 +14
==========================================
- Hits 81135 81134 -1
- Misses 27636 27651 +15 ☔ View full report in Codecov by Sentry. |
pub async fn query_ibc_rate_limit<C: Client + Sync>( | ||
client: &C, | ||
token: &Address, | ||
) -> Result<Amount, error::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the token's mint limit too? like
namada/crates/ibc/src/storage.rs
Lines 577 to 580 in 9eb747c
pub fn get_limits<S: StorageRead>( | |
storage: &S, | |
token: &Address, | |
) -> Result<(Amount, Amount)> { |
Describe your changes
Adds a query to retrieve the ibc rate limit for a specific token.
Checklist before merging
breaking::
labelsnamada-docs
reponamada-indexer
ornamada-masp-indexer
, a corresponding PR is opened in that repo