Skip to content
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 Changes For Neutron #716

Merged

Conversation

bonedaddy
Copy link
Contributor

Overview

Adds changes needed to make the osmosis ibc rate limit contract compatible with neutron

Changes Made

  • Dependency updates
  • Migrations needed due to dependency updates
  • Replace usage of deprecated functions as a result of dependency changes
  • Unit test updates to ensure original functoin is still intact
  • Replace osmosis addresses in unit tests with neutron addresses

Notes

Some comments in the code in the code mention "osmosis" however I wasn't sure whether or not to change this, so please let me know if I should do this.

@bonedaddy bonedaddy changed the title IBC Rate Limit Adaption For Neutron IBC Rate Limit Changes For Neutron Sep 9, 2024
Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM. just a couple of questions and preferences that may be fixed after the merge when working with the base branch

Comment on lines 106 to 113
let response: QuerySupplyOfResponse = deps.querier.query(&cosmwasm_std::QueryRequest::Grpc({
GrpcQuery {
path: "/cosmos.bank.v1beta1.Query/SupplyOf".to_string(),
data: Binary::from_base64(
&to_base64(self.local_denom(direction))
)?
}
}))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and that would simplify the function a lot, should I remove and change to

    pub fn channel_value(&self, deps: Deps, direction: &FlowType) -> Result<Uint256, StdError> {
        Ok(Uint256::from_uint128(deps.querier.query_supply(self.local_denom(direction))?.amount))
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that should work

@pr0n00gler pr0n00gler merged commit 0c0dffb into neutron-org:feat/ibc-rate-limit Sep 13, 2024
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants