diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 2a611f92..125ebf14 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -6,10 +6,12 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" tmdb "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/cmd/0gchaind/root.go b/cmd/0gchaind/root.go index 575b2d45..fe285cf6 100644 --- a/cmd/0gchaind/root.go +++ b/cmd/0gchaind/root.go @@ -8,6 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" tmcfg "github.com/cometbft/cometbft/config" @@ -28,8 +29,16 @@ import ( "github.com/0glabs/0g-chain/chaincfg" "github.com/0glabs/0g-chain/cmd/opendb" "github.com/0glabs/0g-chain/cmd/rocksdb" + "github.com/0glabs/0g-chain/crypto/vrf" ) +func customKeyringOptions() keyring.Option { + return func(options *keyring.Options) { + options.SupportedAlgos = append(hd.SupportedAlgorithms, vrf.VrfAlgo) + options.SupportedAlgosLedger = append(hd.SupportedAlgorithmsLedger, vrf.VrfAlgo) + } +} + // NewRootCmd creates a new root command for the 0g-chain blockchain. func NewRootCmd() *cobra.Command { encodingConfig := app.MakeEncodingConfig() @@ -42,7 +51,7 @@ func NewRootCmd() *cobra.Command { WithAccountRetriever(types.AccountRetriever{}). WithBroadcastMode(flags.FlagBroadcastMode). WithHomeDir(chaincfg.DefaultNodeHome). - WithKeyringOptions(hd.EthSecp256k1Option()). + WithKeyringOptions(customKeyringOptions()). WithViper(chaincfg.EnvPrefix) rootCmd := &cobra.Command{ Use: chaincfg.AppName,