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

[Feature]: supporting chains with different prefix #21430

Closed
xyz1hang opened this issue Aug 27, 2024 · 2 comments · Fixed by #21436
Closed

[Feature]: supporting chains with different prefix #21430

xyz1hang opened this issue Aug 27, 2024 · 2 comments · Fixed by #21436

Comments

@xyz1hang
Copy link
Contributor

xyz1hang commented Aug 27, 2024

Summary

We have the same requirement as #16541

e.g. one chain prefix their address with axmXxxxxxx... another prefix with cosmosXxxxxxxx....

but the String() functions e.g. for AccAdress is using Global config and the String() function is used in tx.Sign

Currently it seems that there's no easy way to support multiple Cosmos based chains in the same process ? I know we have series of tickets to remove Globals but this is very limiting.

I must have missed sth. Would be really appreciated if you can point me in the right direction 🙏

Problem Definition

No response

Proposed Feature

Remove bech32AddressPrefix from global config as it's not really a global attribute

@julienrbrt
Copy link
Member

Hey, yes you shouldn't use the .String() function on (Val)AccAddress but use an address codec.
Unfortunately, the global prefix cannot be totally removed just yet for backward compatibility.
What we can do however is mark those String() methods as deprecated 👍🏾

@julienrbrt
Copy link
Member

Opened #21436 to use an address codec in tx.Sign.
This address codec is to be found in the client.Context from v0.52.

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.

2 participants