x/bank: convert query CLI commands to use gRPC query client (#6367)
* Convert x/bank query cli methods to use gRPC query client * WIP on x/bank cli query migration * lint * Fix integration tests * Remove Println in favor of updated PrintOutput * Add PrintOutput tests Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze
parent
1c8249e26d
commit
257354dbff
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
package testdata
|
||||
|
||||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/tendermint/go-amino"
|
||||
)
|
||||
|
||||
func NewTestInterfaceRegistry() types.InterfaceRegistry {
|
||||
registry := types.NewInterfaceRegistry()
|
||||
registry.RegisterInterface("Animal", (*Animal)(nil))
|
||||
registry.RegisterImplementations(
|
||||
(*Animal)(nil),
|
||||
&Dog{},
|
||||
&Cat{},
|
||||
)
|
||||
registry.RegisterImplementations(
|
||||
(*HasAnimalI)(nil),
|
||||
&HasAnimal{},
|
||||
)
|
||||
registry.RegisterImplementations(
|
||||
(*HasHasAnimalI)(nil),
|
||||
&HasHasAnimal{},
|
||||
)
|
||||
return registry
|
||||
}
|
||||
|
||||
func NewTestAmino() *amino.Codec {
|
||||
cdc := amino.NewCodec()
|
||||
cdc.RegisterInterface((*Animal)(nil), nil)
|
||||
cdc.RegisterConcrete(&Dog{}, "testdata/Dog", nil)
|
||||
cdc.RegisterConcrete(&Cat{}, "testdata/Cat", nil)
|
||||
|
||||
cdc.RegisterInterface((*HasAnimalI)(nil), nil)
|
||||
cdc.RegisterConcrete(&HasAnimal{}, "testdata/HasAnimal", nil)
|
||||
|
||||
cdc.RegisterInterface((*HasHasAnimalI)(nil), nil)
|
||||
cdc.RegisterConcrete(&HasHasAnimal{}, "testdata/HasHasAnimal", nil)
|
||||
|
||||
return cdc
|
||||
}
|
||||
Reference in New Issue
Block a user