-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: allow custom authority and inflation function when using app-wiring #12660
Conversation
4db80ad
to
3c9dce0
Compare
x/mint/module.go
Outdated
Config *modulev1.Module | ||
Key *store.KVStoreKey | ||
Cdc codec.Codec | ||
Authority types.MintAuthority `optional:"true"` |
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.
slightly lost where this gets set? I thought you would need to modify protobuf config of each module? (https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/mint/module/v1/module.proto#L13)
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.
We set it in the app.go in depinject.Supply
(see comments). This is because it could be just an address or we want to get a module address, so I don't think it can be in the app_config / app.yaml.
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.
makes sense. still trying to wrap my head around some of DI
x/crisis/types/authority.go
Outdated
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
type CrisisAuthority sdk.AccAddress |
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.
Why is there a need for a dedicated type (alias)?
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.
If we named them all Authority
, there would be a name collision.
Let me try another implementation to see which one you prefer
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.
I've simplified it in d623377. What do you think?
Description
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.md
Reviewers 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...
!
in the type prefix if API or client breaking change