crypto: refactor for stargate (#559)

* changelog

* update changelog

* crypto: refactor for stargate

* fixes

* fix keys

* changelog
This commit is contained in:
Federico Kunze
2020-10-06 20:57:55 +02:00
committed by GitHub
parent e7a19a1c0a
commit 4e01da905a
32 changed files with 165 additions and 146 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ import (
"github.com/cosmos/ethermint/app"
"github.com/cosmos/ethermint/client"
"github.com/cosmos/ethermint/codec"
"github.com/cosmos/ethermint/crypto"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/cosmos/ethermint/rpc"
ethermint "github.com/cosmos/ethermint/types"
)
@@ -37,8 +37,8 @@ func main() {
// Configure cobra to sort commands
cobra.EnableCommandSorting = false
tmamino.RegisterKeyType(crypto.PubKeySecp256k1{}, crypto.PubKeyAminoName)
tmamino.RegisterKeyType(crypto.PrivKeySecp256k1{}, crypto.PrivKeyAminoName)
tmamino.RegisterKeyType(ethsecp256k1.PubKey{}, ethsecp256k1.PubKeyName)
tmamino.RegisterKeyType(ethsecp256k1.PrivKey{}, ethsecp256k1.PrivKeyName)
keys.CryptoCdc = cdc
clientkeys.KeysCdc = cdc
+2 -2
View File
@@ -20,7 +20,7 @@ import (
authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/genutil"
"github.com/cosmos/ethermint/crypto"
"github.com/cosmos/ethermint/crypto/hd"
ethermint "github.com/cosmos/ethermint/types"
ethcrypto "github.com/ethereum/go-ethereum/crypto"
@@ -60,7 +60,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa
viper.GetString(flags.FlagKeyringBackend),
viper.GetString(flagClientHome),
inBuf,
crypto.EthSecp256k1Options()...,
hd.EthSecp256k1Options()...,
)
if err != nil {
return err
+3 -3
View File
@@ -30,7 +30,7 @@ import (
"github.com/cosmos/ethermint/app"
"github.com/cosmos/ethermint/client"
"github.com/cosmos/ethermint/codec"
"github.com/cosmos/ethermint/crypto"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
ethermint "github.com/cosmos/ethermint/types"
)
@@ -43,8 +43,8 @@ func main() {
cdc := codec.MakeCodec(app.ModuleBasics)
tmamino.RegisterKeyType(crypto.PubKeySecp256k1{}, crypto.PubKeyAminoName)
tmamino.RegisterKeyType(crypto.PrivKeySecp256k1{}, crypto.PrivKeyAminoName)
tmamino.RegisterKeyType(ethsecp256k1.PubKey{}, ethsecp256k1.PubKeyName)
tmamino.RegisterKeyType(ethsecp256k1.PrivKey{}, ethsecp256k1.PrivKeyName)
keys.CryptoCdc = cdc
genutil.ModuleCdc = cdc