rest

package
v0.0.0-...-f498596 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearContractAdminProposalHandler

func ClearContractAdminProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func EmptyProposalRestHandler

func EmptyProposalRestHandler(ctx clientCtx.CLIContext) govrest.ProposalRESTHandler

EmptyProposalRestHandler defines an empty wasm proposal handler.

func ExecuteProposalHandler

func ExecuteProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func InstantiateProposalHandler

func InstantiateProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func MigrateProposalHandler

func MigrateProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func PinCodeProposalHandler

func PinCodeProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func RegisterRoutes

func RegisterRoutes(cliCtx clientCtx.CLIContext, r *mux.Router)

RegisterRoutes registers staking-related REST handlers to a router

func StoreCodeProposalHandler

func StoreCodeProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func SudoProposalHandler

func SudoProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func UnpinCodeProposalHandler

func UnpinCodeProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler

func UpdateContractAdminProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

func UpdateInstantiateConfigProposalHandler

func UpdateInstantiateConfigProposalHandler(cliCtx clientCtx.CLIContext) govrest.ProposalRESTHandler

Types

type ClearAdminJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	Contract string `json:"contract" yaml:"contract"`
}

func (ClearAdminJSONReq) Content

func (s ClearAdminJSONReq) Content() govtypes.Content

func (ClearAdminJSONReq) GetBaseReq

func (s ClearAdminJSONReq) GetBaseReq() rest.BaseReq

func (ClearAdminJSONReq) GetDeposit

func (s ClearAdminJSONReq) GetDeposit() sdk.Coins

func (ClearAdminJSONReq) GetProposer

func (s ClearAdminJSONReq) GetProposer() string

type ExecuteProposalJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	Contract string          `json:"contract" yaml:"contract"`
	Msg      json.RawMessage `json:"msg" yaml:"msg"`
	// RunAs is the role that is passed to the contract's environment
	RunAs string    `json:"run_as" yaml:"run_as"`
	Funds sdk.Coins `json:"funds" yaml:"funds"`
}

func (ExecuteProposalJSONReq) Content

func (ExecuteProposalJSONReq) GetBaseReq

func (s ExecuteProposalJSONReq) GetBaseReq() rest.BaseReq

func (ExecuteProposalJSONReq) GetDeposit

func (s ExecuteProposalJSONReq) GetDeposit() sdk.Coins

func (ExecuteProposalJSONReq) GetProposer

func (s ExecuteProposalJSONReq) GetProposer() string

type InstantiateProposalJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	RunAs string `json:"run_as" yaml:"run_as"`
	// Admin is an optional address that can execute migrations
	Admin string          `json:"admin,omitempty" yaml:"admin"`
	Code  uint64          `json:"code_id" yaml:"code_id"`
	Label string          `json:"label" yaml:"label"`
	Msg   json.RawMessage `json:"msg" yaml:"msg"`
	Funds sdk.Coins       `json:"funds" yaml:"funds"`
}

func (InstantiateProposalJSONReq) Content

func (InstantiateProposalJSONReq) GetBaseReq

func (s InstantiateProposalJSONReq) GetBaseReq() rest.BaseReq

func (InstantiateProposalJSONReq) GetDeposit

func (s InstantiateProposalJSONReq) GetDeposit() sdk.Coins

func (InstantiateProposalJSONReq) GetProposer

func (s InstantiateProposalJSONReq) GetProposer() string

type MigrateProposalJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	Contract string          `json:"contract" yaml:"contract"`
	Code     uint64          `json:"code_id" yaml:"code_id"`
	Msg      json.RawMessage `json:"msg" yaml:"msg"`
}

func (MigrateProposalJSONReq) Content

func (MigrateProposalJSONReq) GetBaseReq

func (s MigrateProposalJSONReq) GetBaseReq() rest.BaseReq

func (MigrateProposalJSONReq) GetDeposit

func (s MigrateProposalJSONReq) GetDeposit() sdk.Coins

func (MigrateProposalJSONReq) GetProposer

func (s MigrateProposalJSONReq) GetProposer() string

type PinCodeJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	CodeIDs []uint64 `json:"code_ids" yaml:"code_ids"`
}

func (PinCodeJSONReq) Content

func (s PinCodeJSONReq) Content() govtypes.Content

func (PinCodeJSONReq) GetBaseReq

func (s PinCodeJSONReq) GetBaseReq() rest.BaseReq

func (PinCodeJSONReq) GetDeposit

func (s PinCodeJSONReq) GetDeposit() sdk.Coins

func (PinCodeJSONReq) GetProposer

func (s PinCodeJSONReq) GetProposer() string

type StoreCodeProposalJSONReq

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

	Title       string    `json:"title" yaml:"title"`
	Description string    `json:"description" yaml:"description"`
	Proposer    string    `json:"proposer" yaml:"proposer"`
	Deposit     sdk.Coins `json:"deposit" yaml:"deposit"`

	RunAs string `json:"run_as" yaml:"run_as"`
	// WASMByteCode can be raw or gzip compressed
	WASMByteCode []byte `json:"wasm_byte_code" yaml:"wasm_byte_code"`
	// InstantiatePermission to apply on contract creation, optional
	InstantiatePermission *types.AccessConfig `json:"instantiate_permission" yaml:"instantiate_permission"`
}

func (StoreCodeProposalJSONReq) Content

func (StoreCodeProposalJSONReq) GetBaseReq

func (s StoreCodeProposalJSONReq) GetBaseReq() rest.BaseReq

func (StoreCodeProposalJSONReq) GetDeposit

func (s StoreCodeProposalJSONReq) GetDeposit() sdk.Coins

func (StoreCodeProposalJSONReq) GetProposer

func (s StoreCodeProposalJSONReq) GetProposer() string

type SudoProposalJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	Contract string          `json:"contract" yaml:"contract"`
	Msg      json.RawMessage `json:"msg" yaml:"msg"`
}

func (SudoProposalJSONReq) Content

func (s SudoProposalJSONReq) Content() govtypes.Content

func (SudoProposalJSONReq) GetBaseReq

func (s SudoProposalJSONReq) GetBaseReq() rest.BaseReq

func (SudoProposalJSONReq) GetDeposit

func (s SudoProposalJSONReq) GetDeposit() sdk.Coins

func (SudoProposalJSONReq) GetProposer

func (s SudoProposalJSONReq) GetProposer() string

type UnpinCodeJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	CodeIDs []uint64 `json:"code_ids" yaml:"code_ids"`
}

func (UnpinCodeJSONReq) Content

func (s UnpinCodeJSONReq) Content() govtypes.Content

func (UnpinCodeJSONReq) GetBaseReq

func (s UnpinCodeJSONReq) GetBaseReq() rest.BaseReq

func (UnpinCodeJSONReq) GetDeposit

func (s UnpinCodeJSONReq) GetDeposit() sdk.Coins

func (UnpinCodeJSONReq) GetProposer

func (s UnpinCodeJSONReq) GetProposer() string

type UpdateAdminJSONReq

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

	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`

	Proposer string    `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins `json:"deposit" yaml:"deposit"`

	NewAdmin string `json:"new_admin" yaml:"new_admin"`
	Contract string `json:"contract" yaml:"contract"`
}

func (UpdateAdminJSONReq) Content

func (s UpdateAdminJSONReq) Content() govtypes.Content

func (UpdateAdminJSONReq) GetBaseReq

func (s UpdateAdminJSONReq) GetBaseReq() rest.BaseReq

func (UpdateAdminJSONReq) GetDeposit

func (s UpdateAdminJSONReq) GetDeposit() sdk.Coins

func (UpdateAdminJSONReq) GetProposer

func (s UpdateAdminJSONReq) GetProposer() string

type UpdateInstantiateConfigProposalJSONReq

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

	Title               string                     `json:"title" yaml:"title"`
	Description         string                     `json:"description" yaml:"description"`
	Proposer            string                     `json:"proposer" yaml:"proposer"`
	Deposit             sdk.Coins                  `json:"deposit" yaml:"deposit"`
	AccessConfigUpdates []types.AccessConfigUpdate `json:"access_config_updates" yaml:"access_config_updates"`
}

func (UpdateInstantiateConfigProposalJSONReq) Content

func (UpdateInstantiateConfigProposalJSONReq) GetBaseReq

func (UpdateInstantiateConfigProposalJSONReq) GetDeposit

func (UpdateInstantiateConfigProposalJSONReq) GetProposer

Jump to

Keyboard shortcuts

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