Skip to content

Commit

Permalink
register EthAccount with legacy amino codec in order to use EthAccoun…
Browse files Browse the repository at this point in the history
…ts (#8)

over json rpc
  • Loading branch information
nddeluca authored May 27, 2022
1 parent 02e1b41 commit 8010710
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions encoding/codec/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
sdk.RegisterLegacyAminoCodec(cdc)
cryptocodec.RegisterCrypto(cdc)
ethermint.RegisterLegacyAminoCodec(cdc)
codec.RegisterEvidences(cdc)
}

Expand Down
6 changes: 6 additions & 0 deletions types/codec.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
Expand All @@ -24,3 +25,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
&ExtensionOptionsWeb3Tx{},
)
}

// RegisterLegacyAminoCodec registers the tendermint concrete client-related implmentations and interfaces
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&EthAccount{}, "ethermint/EthAccount", nil)
}

0 comments on commit 8010710

Please sign in to comment.