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

Error: invalid denom: transfer/channel-0/samoleans #381

Closed
orkunkl opened this issue Jan 19, 2021 · 3 comments
Closed

Error: invalid denom: transfer/channel-0/samoleans #381

orkunkl opened this issue Jan 19, 2021 · 3 comments

Comments

@orkunkl
Copy link
Contributor

orkunkl commented Jan 19, 2021

relayer:

version: 1.0.0-rc1-57-ga1ef14a
commit: a1ef14ae814ecb7671084d07ef39d32cffe61f48
cosmos-sdk: v0.40.0
go: go1.15.6 linux/amd64

wasmd:

0.14.0
cosmos-sdk: v0.40.0
go: go1.15.6 linux/amd64

I managed to setup relayer two local networks and successfully setup a connection.
I can transfer tokens from ibc-0 chain to ibc-1 but when ibc-1 testkey address balance is queried with rly q bal ibc-1
this is the error I get:

panic: invalid denom: transfer/channel-0/samoleans

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/types.NewCoin(0xc0000fa3a0, 0x1c, 0xc0000d8960, 0xc0000454c0, 0x9, 0xc0000fa3a0)
        /home/orkunkl/Workspace/go/pkg/mod/github.com/cosmos/[email protected]/types/coin.go:23 +0x8a
github.com/cosmos/relayer/cmd.queryBalanceCmd.func1(0xc000f08b00, 0xc000f068e0, 0x1, 0x1, 0x0, 0x0)
        /home/orkunkl/Workspace/relayer/cmd/query.go:257 +0x5bb
github.com/spf13/cobra.(*Command).execute(0xc000f08b00, 0xc000f068c0, 0x1, 0x1, 0xc000f08b00, 0xc000f068c0)
        /home/orkunkl/Workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0x22379a0, 0x0, 0x0, 0x0)
        /home/orkunkl/Workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/orkunkl/Workspace/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/cosmos/relayer/cmd.Execute()
        /home/orkunkl/Workspace/relayer/cmd/root.go:107 +0x4d
main.main()
        /home/orkunkl/Workspace/relayer/main.go:21 +0x25

When I query the address balance using wasmd query bank balances wasm1mcnxyh7xht5kvmlcwplk8zwfsknxlekqqej77d
the transferred token is shown in the result.

balances:
- amount: "1000000"
  denom: ibc/27A6394C3F9FF9C9DCF5DFFADF9BB5FE9A37C7E92B006199894CF1824DF9AC7C
- amount: "100000000000"
  denom: samoleans
- amount: "99999977339"
  denom: stake
pagination:
  next_key: null
  total: "0"
@orkunkl
Copy link
Contributor Author

orkunkl commented Jan 19, 2021

Probably related to cosmos/cosmos-sdk#8317, I will try it with updating relayer to latest cosmos-sdk

@dukangxu
Copy link

dukangxu commented Jan 21, 2021

The reason is that the coin denom regex does not support '-' character, but cross-chain coin denom contains channel id, and it contains '-', So either change the denom regex or change channel id rule! Latest version of cosmos-sdk is v0.40.1, you can modify denom regex by function SetCoinDenomRegex before build gaia and relayer

@colin-axner
Copy link
Contributor

this is fixed on master

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

No branches or pull requests

3 participants