cosmos-sdk: github.com/cosmos/cosmos-sdk/x/params/client/utils Index | Files

package utils

import "github.com/cosmos/cosmos-sdk/x/params/client/utils"

Index

Package Files

utils.go

type ParamChangeJSON Uses

type ParamChangeJSON struct {
    Subspace string          `json:"subspace" yaml:"subspace"`
    Key      string          `json:"key" yaml:"key"`
    Value    json.RawMessage `json:"value" yaml:"value"`
}

ParamChangeJSON defines a parameter change used in JSON input. This allows values to be specified in raw JSON instead of being string encoded.

func NewParamChangeJSON Uses

func NewParamChangeJSON(subspace, key string, value json.RawMessage) ParamChangeJSON

func (ParamChangeJSON) ToParamChange Uses

func (pcj ParamChangeJSON) ToParamChange() proposal.ParamChange

ToParamChange converts a ParamChangeJSON object to ParamChange.

type ParamChangeProposalJSON Uses

type ParamChangeProposalJSON struct {
    Title       string           `json:"title" yaml:"title"`
    Description string           `json:"description" yaml:"description"`
    Changes     ParamChangesJSON `json:"changes" yaml:"changes"`
    Deposit     string           `json:"deposit" yaml:"deposit"`
}

ParamChangeProposalJSON defines a ParameterChangeProposal with a deposit used to parse parameter change proposals from a JSON file.

func ParseParamChangeProposalJSON Uses

func ParseParamChangeProposalJSON(cdc codec.JSONMarshaler, proposalFile string) (ParamChangeProposalJSON, error)

ParseParamChangeProposalJSON reads and parses a ParamChangeProposalJSON from file.

type ParamChangeProposalReq Uses

type ParamChangeProposalReq struct {
    BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`

    Title       string           `json:"title" yaml:"title"`
    Description string           `json:"description" yaml:"description"`
    Changes     ParamChangesJSON `json:"changes" yaml:"changes"`
    Proposer    sdk.AccAddress   `json:"proposer" yaml:"proposer"`
    Deposit     sdk.Coins        `json:"deposit" yaml:"deposit"`
}

ParamChangeProposalReq defines a parameter change proposal request body.

type ParamChangesJSON Uses

type ParamChangesJSON []ParamChangeJSON

ParamChangesJSON defines a slice of ParamChangeJSON objects which can be converted to a slice of ParamChange objects.

func (ParamChangesJSON) ToParamChanges Uses

func (pcj ParamChangesJSON) ToParamChanges() []proposal.ParamChange

ToParamChanges converts a slice of ParamChangeJSON objects to a slice of ParamChange.

Package utils imports 6 packages (graph) and is imported by 2 packages. Updated 2020-04-12. Refresh now. Tools for package owners.