forked from cerc-io/laconicd-deprecated
update fork
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
rpctypes "github.com/cerc-io/laconicd/rpc/ethereum/types"
|
||||
rpctypes "github.com/cerc-io/laconicd/rpc/types"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -23,6 +23,7 @@ func GetQueryCmd() *cobra.Command {
|
||||
cmd.AddCommand(
|
||||
GetStorageCmd(),
|
||||
GetCodeCmd(),
|
||||
GetParamsCmd(),
|
||||
)
|
||||
return cmd
|
||||
}
|
||||
@@ -32,7 +33,7 @@ func GetStorageCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "storage [address] [key]",
|
||||
Short: "Gets storage for an account with a given key and height",
|
||||
Long: "Gets storage for an account with a given key and height. If the height is not provided, it will use the latest height from context.",
|
||||
Long: "Gets storage for an account with a given key and height. If the height is not provided, it will use the latest height from context.", //nolint:lll
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
clientCtx, err := client.GetClientQueryContext(cmd)
|
||||
@@ -103,3 +104,31 @@ func GetCodeCmd() *cobra.Command {
|
||||
flags.AddQueryFlagsToCmd(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
// GetParamsCmd queries the fee market params
|
||||
func GetParamsCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "params",
|
||||
Short: "Get the evm params",
|
||||
Long: "Get the evm parameter values.",
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
clientCtx, err := client.GetClientQueryContext(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
queryClient := types.NewQueryClient(clientCtx)
|
||||
|
||||
res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return clientCtx.PrintProto(res)
|
||||
},
|
||||
}
|
||||
|
||||
flags.AddQueryFlagsToCmd(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
rpctypes "github.com/cerc-io/laconicd/rpc/ethereum/types"
|
||||
rpctypes "github.com/cerc-io/laconicd/rpc/types"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user