Skip to content

Commit

Permalink
Add more cosmos types to interface registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim committed Feb 8, 2021
1 parent 6f3997f commit f5216fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions chain/client/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

bank "github.com/cosmos/cosmos-sdk/x/bank/types"
evidence "github.com/cosmos/cosmos-sdk/x/evidence/types"
gov "github.com/cosmos/cosmos-sdk/x/gov/types"
staking "github.com/cosmos/cosmos-sdk/x/staking/types"

keyscodec "github.com/InjectiveLabs/sdk-go/chain/crypto/codec"
"github.com/InjectiveLabs/sdk-go/chain/crypto/ethsecp256k1"
"github.com/InjectiveLabs/sdk-go/chain/crypto/hd"
Expand All @@ -34,6 +39,12 @@ func NewTxConfig(signModes []signingtypes.SignMode) client.TxConfig {
peggy.RegisterInterfaces(interfaceRegistry)
ctypes.RegisterInterfaces(interfaceRegistry)

// more cosmos types
bank.RegisterInterfaces(interfaceRegistry)
staking.RegisterInterfaces(interfaceRegistry)
gov.RegisterInterfaces(interfaceRegistry)
evidence.RegisterInterfaces(interfaceRegistry)

marshaler := codec.NewProtoCodec(interfaceRegistry)
return tx.NewTxConfig(marshaler, signModes)
}
Expand All @@ -52,6 +63,12 @@ func NewClientContext(
peggy.RegisterInterfaces(interfaceRegistry)
ctypes.RegisterInterfaces(interfaceRegistry)

// more cosmos types
bank.RegisterInterfaces(interfaceRegistry)
staking.RegisterInterfaces(interfaceRegistry)
gov.RegisterInterfaces(interfaceRegistry)
evidence.RegisterInterfaces(interfaceRegistry)

marshaler := codec.NewProtoCodec(interfaceRegistry)
encodingConfig := EncodingConfig{
InterfaceRegistry: interfaceRegistry,
Expand Down

0 comments on commit f5216fd

Please sign in to comment.