Skip to content

FIX: pass the coin type through the CLI will panic #4623

Open
cosmos/cosmos-sdk
#24722
@Pantani

Description

@Pantani

Pass the coin type through the CLI will panic:

Eg:

  • Scaffold a chain with a coins type and run it:
ignite s chain venus && cd venus && \
ignite s list employee salary:coin && \
ignite chain serve
  • Try to create a new transaction:
venusd tx venus create-employee "2token"

result:

panic: proto: cosmos.base.v1beta1.Coin.denom: field descriptor does not belong to this message

goroutine 1 [running]:
google.golang.org/protobuf/types/dynamicpb.(*Message).checkField(0x14002859c00, {0x10627ff78, 0x14000597b08})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/types/dynamicpb/dynamic.go:354 +0x238
google.golang.org/protobuf/types/dynamicpb.(*Message).Set(0x14002859c00, {0x10627ff78, 0x14000597b08}, {{}, 0x1059b4ee0?, 0x16dc4f7d4?, 0x102226848?})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/types/dynamicpb/dynamic.go:247 +0x40
google.golang.org/protobuf/proto.mergeOptions.mergeMessage.func1({0x10627ff78, 0x14000597b08}, {{}, 0x1059b4ee0?, 0x16dc4f7d4?, 0x105bd3801?})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/proto/merge.go:100 +0x268
cosmossdk.io/api/cosmos/base/v1beta1.(*fastReflection_Coin).Range(0x140021d2dc0, 0x1400181d6b0)
	/Users/danilopantani/Desktop/go/pkg/mod/cosmossdk.io/[email protected]/cosmos/base/v1beta1/coin.pulsar.go:98 +0x5c
google.golang.org/protobuf/proto.mergeOptions.mergeMessage({}, {0x106255b68, 0x14002859c00}, {0x10625a898, 0x140021d2dc0})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/proto/merge.go:89 +0xd8
google.golang.org/protobuf/proto.mergeOptions.mergeMessage.func1({0x10627ff78, 0x1400260a110}, {{}, 0x106095b80?, 0x140021d2dc0?, 0x14000087118?})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/proto/merge.go:96 +0x1e4
google.golang.org/protobuf/types/dynamicpb.(*Message).Range(0x14002859b00, 0x1400181d698)
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/types/dynamicpb/dynamic.go:147 +0x118
google.golang.org/protobuf/proto.mergeOptions.mergeMessage({}, {0x106255b68, 0x14002859bc0}, {0x106255b68, 0x14002859b00})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/proto/merge.go:89 +0xd8
google.golang.org/protobuf/proto.Merge({0x1061db8c0?, 0x14002859bc0?}, {0x1061db8c0, 0x14002859b00})
	/Users/danilopantani/Desktop/go/pkg/mod/google.golang.org/[email protected]/proto/merge.go:36 +0xb4
cosmossdk.io/client/v2/autocli.(*Builder).BuildMsgMethodCommand.func1(0x14002861508, {0x106255b68, 0x14002859b00})
	/Users/danilopantani/Desktop/go/pkg/mod/cosmossdk.io/client/[email protected]/autocli/msg.go:152 +0x328
cosmossdk.io/client/v2/autocli.(*Builder).buildMethodCommandCommon.func1(0x14002861508, {0x14001e0b0e0, 0x1, 0x1?})
	/Users/danilopantani/Desktop/go/pkg/mod/cosmossdk.io/client/[email protected]/autocli/common.go:97 +0x200
github.com/spf13/cobra.(*Command).execute(0x14002861508, {0x14001e0b0b0, 0x1, 0x1})
	/Users/danilopantani/Desktop/go/pkg/mod/github.com/spf13/[email protected]/command.go:1015 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x14001462608)
	/Users/danilopantani/Desktop/go/pkg/mod/github.com/spf13/[email protected]/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/danilopantani/Desktop/go/pkg/mod/github.com/spf13/[email protected]/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/Users/danilopantani/Desktop/go/pkg/mod/github.com/spf13/[email protected]/command.go:1064
github.com/cosmos/cosmos-sdk/server/cmd.Execute(0x14001462608, {0x104ad4c6f, 0x5}, {0x14001170a20, 0x1b})
	/Users/danilopantani/Desktop/go/pkg/mod/github.com/cosmos/[email protected]/server/cmd/execute.go:34 +0x154
main.main()
	/Users/danilopantani/Desktop/go/src/github.com/ignite/venus/cmd/venusd/main.go:16 +0x44

Metadata

Metadata

Labels

Type

No type

Projects

Status

To Discuss

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions