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

Allow whitelisted tx fee tokens based on conversion rate to OSMO #394

Merged
merged 28 commits into from
Nov 5, 2021

Conversation

sunnya97
Copy link
Collaborator

@sunnya97 sunnya97 commented Aug 2, 2021

closes #404

func GetCmdDenomPoolID() *cobra.Command {
cmd := &cobra.Command{
Use: "denom-pool-id",
Short: "Query the pool id associated with a specific whitelisted fee token",
Copy link
Contributor

Choose a reason for hiding this comment

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

If ATOM is whitelisted for ATOM/OSMO and ATOM/AKT pair, what does this return?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will check that only one pool can be whitelisted per denom. It also should make sure that selected pool does contain the native fee token (OSMO)

@ValarDragon
Copy link
Member

Going to take over this PR in a new branch, for an MVP of just the state changes & ensuring only allowed fee tokens are put on change. This would then enable tx fees in CheckTx to be written in a second PR

@sunnya97 sunnya97 force-pushed the sunny/autoswap-fees branch from b6a5f4c to e4ae67c Compare October 18, 2021 15:16
@sunnya97
Copy link
Collaborator Author

Should merge osmosis-labs/cosmos-sdk#42 first

@sunnya97
Copy link
Collaborator Author

Thanks @antstalepresh for the great review!

@sunnya97 sunnya97 marked this pull request as ready for review October 25, 2021 14:26
sunnya97 and others added 2 commits October 26, 2021 13:33
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
@antstalepresh
Copy link
Contributor

PR looks good for me, testing the module with CLI command and adding README would be helpful.
(what are the current test issues?)

x/txfees/genesis.go Outdated Show resolved Hide resolved
x/txfees/genesis.go Outdated Show resolved Hide resolved
Comment on lines 59 to 61
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterCodec(cdc)
}
Copy link
Member

Choose a reason for hiding this comment

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

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

New tests look great to me! Lets merge once CI passes

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2021

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 68.11594% with 66 lines in your changes missing coverage. Please review.

Project coverage is 20.72%. Comparing base (0a105c9) to head (fce7334).
Report is 3473 commits behind head on main.

Files with missing lines Patch % Lines
x/txfees/keeper/feetokens.go 71.21% 11 Missing and 8 partials ⚠️
x/txfees/module.go 48.57% 18 Missing ⚠️
x/txfees/keeper/feedecorator.go 73.68% 5 Missing and 5 partials ⚠️
x/txfees/keeper/grpc_query.go 33.33% 9 Missing and 1 partial ⚠️
x/txfees/genesis.go 20.00% 6 Missing and 2 partials ⚠️
x/txfees/keeper/keeper.go 87.50% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
+ Coverage   20.31%   20.72%   +0.40%     
==========================================
  Files         164      172       +8     
  Lines       23262    23465     +203     
==========================================
+ Hits         4726     4863     +137     
- Misses      17762    17812      +50     
- Partials      774      790      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Allow whitelisted tx fee tokens based on conversion rate to OSMO
4 participants