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

UPDATE: improve account prefix management for txs in cosmosclient #2744

Closed
lumtis opened this issue Aug 12, 2022 · 3 comments · Fixed by #4486
Closed

UPDATE: improve account prefix management for txs in cosmosclient #2744

lumtis opened this issue Aug 12, 2022 · 3 comments · Fixed by #4486
Assignees
Milestone

Comments

@lumtis
Copy link
Contributor

lumtis commented Aug 12, 2022

We are currently updating the SDK global config for the address prefix everytime before sending a transaction: cli/ignite/pkg/cosmosclient/cosmosclient.go
Or also when the client is created in #2743

This method is a bit unclean as we must interact with global vars...

This method is kind of impose by the current structure of the SDK since it relies on the global config to parse the prefix when determining the address of an account.

The first step of this issue is to design and propose an issue in the SDK repo more flexibility to manage account prefix without relying on a global configuration.
For example:
Adding accountPrefix as attribute of transaction factory type: https://github.com/cosmos/cosmos-sdk/blob/1932ef175da024cf4abb5d91e03a590625320eee/client/tx/factory.go#L23

@lumtis lumtis added the type:request Feature request. label Aug 12, 2022
@tbruyelle
Copy link
Contributor

Couldn't agree more, dealing with the sdkconfig for prefix changes is painful in cosmosclient.

@julienrbrt
Copy link
Member

We'll be able to do this better in v0.52 as we can set an address codec in the client context.
However, the global sdk config will still need to be used and set (until no other modules depend on it).

@maxrobot
Copy link

Couldn't agree more, dealing with the sdkconfig for prefix changes is painful in cosmosclient.

Do you have an example of how to change the prefix in the sdkconfig for use with cosmosclient?

@salmad3 salmad3 moved this from To Discuss to Todo in Ignite CLI Masterboard Jan 22, 2025
@salmad3 salmad3 added this to the v29 milestone Jan 23, 2025
@salmad3 salmad3 changed the title cosmosclient: improve account prefix management for txs UPDATE: improve account prefix management for txs in cosmosclient Jan 23, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Ignite CLI Masterboard Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants