Skip to content

Cosmos address conversion #4215

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

Open
Kouteki opened this issue Apr 24, 2025 · 3 comments · May be fixed by #4306
Open

Cosmos address conversion #4215

Kouteki opened this issue Apr 24, 2025 · 3 comments · May be fixed by #4306
Assignees
Labels
🧾 package/realm Tag used for new Realms or Packages.

Comments

@Kouteki
Copy link
Contributor

Kouteki commented Apr 24, 2025

Description

As a Cosmos token holder ISBAT check whether I have any GNOT tokens allocated on Independence Day.

Acceptance Criteria

  • When I submit a Cosmos address, it's converted from the cosmos prefix to the g prefix before querying the gno.land account balance

Misc

Depends on #3899 and #4061

@thehowl
Copy link
Member

thehowl commented May 15, 2025

package main

import "crypto/bech32"

func main() {
	const addr = "g1m0rgan0rla00ygmdmp55f5m0unvsvknluyg2a4"
	hrp, data, err := bech32.Decode(addr)
	if err != nil {
		panic(err)
	}
	s, err := bech32.Encode("cosmos", data)
	if err != nil {
		panic(err)
	}
	println(s)
}

@leohhhn
Copy link
Contributor

leohhhn commented May 20, 2025

@thehowl @Kouteki

Making a PR to make the r/gnoland/coins app better and implementing this as well.

@Kouteki
Copy link
Contributor Author

Kouteki commented May 21, 2025

@thehowl @Kouteki

Making a PR to make the r/gnoland/coins app better and implementing this as well.

@leohhhn I'll keep this issue open until that PR has been merged. Thanks!

@leohhhn leohhhn linked a pull request May 22, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants