utils

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClientContextKey = sdk.ContextKey("client.context")
	ServerContextKey = sdk.ContextKey("server.context")
)

Functions

func GenerateOrBroadcastTxCLI

func GenerateOrBroadcastTxCLI(cliCtx clientCtx.CLIContext, flagSet *pflag.FlagSet, msgs ...sdk.Msg) error

func GetClientContextFromCmd

func GetClientContextFromCmd(cmd *cobra.Command) clientCtx.CLIContext

func GetClientQueryContext

func GetClientQueryContext(cmd *cobra.Command) (clientCtx.CLIContext, error)

func GetClientTxContext

func GetClientTxContext(cmd *cobra.Command) (clientCtx.CLIContext, error)

func GetServerContextFromCmd

func GetServerContextFromCmd(cmd *cobra.Command) server.Context

func GzipIt

func GzipIt(input []byte) ([]byte, error)

GzipIt compresses the input ([]byte)

func IsGzip

func IsGzip(input []byte) bool

IsGzip returns checks if the file contents are gzip compressed

func IsWasm

func IsWasm(input []byte) bool

IsWasm checks if the file contents are of wasm binary

func WriteGeneratedTxResponse

func WriteGeneratedTxResponse(
	clientCtx clientCtx.CLIContext, w http.ResponseWriter, br rest.BaseReq, msgs ...sdk.Msg,
)

Types

type ExtraProposalJSON added in v1.7.0

type ExtraProposalJSON struct {
	Title       string       `json:"title" yaml:"title"`
	Description string       `json:"description" yaml:"description"`
	Deposit     sdk.SysCoins `json:"deposit" yaml:"deposit"`
	Action      string       `json:"action" yaml:"action"`
	Extra       string       `json:"extra" yaml:"extra"`
}

ExtraProposalJSON defines a ExtraProposal with a deposit used to parse manage treasures proposals from a JSON file.

func ParseExtraProposalJSON added in v1.7.0

func ParseExtraProposalJSON(cdc *codec.Codec, proposalFilePath string) (
	proposal ExtraProposalJSON, err error)

ParseExtraProposalJSON parses json from proposal file to ExtraProposalJSON struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL