rest

package
v0.16.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearContractAdminProposalHandler added in v0.10.0

func ClearContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func InstantiateProposalHandler added in v0.10.0

func InstantiateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func MigrateProposalHandler added in v0.10.0

func MigrateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func RegisterRoutes

func RegisterRoutes(cliCtx client.Context, r *mux.Router)

RegisterRoutes registers staking-related REST handlers to a router

func StoreCodeProposalHandler added in v0.10.0

func StoreCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler added in v0.10.0

func UpdateContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

Types

type ClearAdminJsonReq added in v0.10.0

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 added in v0.10.0

func (s ClearAdminJsonReq) Content() govtypes.Content

func (ClearAdminJsonReq) GetBaseReq added in v0.10.0

func (s ClearAdminJsonReq) GetBaseReq() rest.BaseReq

func (ClearAdminJsonReq) GetDeposit added in v0.10.0

func (s ClearAdminJsonReq) GetDeposit() sdk.Coins

func (ClearAdminJsonReq) GetProposer added in v0.10.0

func (s ClearAdminJsonReq) GetProposer() string

type InstantiateProposalJsonReq added in v0.10.0

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"`
	InitMsg json.RawMessage `json:"init_msg" yaml:"init_msg"`
	Funds   sdk.Coins       `json:"funds" yaml:"funds"`
}

func (InstantiateProposalJsonReq) Content added in v0.10.0

func (InstantiateProposalJsonReq) GetBaseReq added in v0.10.0

func (s InstantiateProposalJsonReq) GetBaseReq() rest.BaseReq

func (InstantiateProposalJsonReq) GetDeposit added in v0.10.0

func (s InstantiateProposalJsonReq) GetDeposit() sdk.Coins

func (InstantiateProposalJsonReq) GetProposer added in v0.10.0

func (s InstantiateProposalJsonReq) GetProposer() string

type MigrateProposalJsonReq added in v0.10.0

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"`
	MigrateMsg 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"`
}

func (MigrateProposalJsonReq) Content added in v0.10.0

func (MigrateProposalJsonReq) GetBaseReq added in v0.10.0

func (s MigrateProposalJsonReq) GetBaseReq() rest.BaseReq

func (MigrateProposalJsonReq) GetDeposit added in v0.10.0

func (s MigrateProposalJsonReq) GetDeposit() sdk.Coins

func (MigrateProposalJsonReq) GetProposer added in v0.10.0

func (s MigrateProposalJsonReq) GetProposer() string

type StoreCodeProposalJsonReq added in v0.10.0

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"`
	// Source is a valid absolute HTTPS URI to the contract's source code, optional
	Source string `json:"source" yaml:"source"`
	// Builder is a valid docker image name with tag, optional
	Builder string `json:"builder" yaml:"builder"`
	// InstantiatePermission to apply on contract creation, optional
	InstantiatePermission *types.AccessConfig `json:"instantiate_permission" yaml:"instantiate_permission"`
}

func (StoreCodeProposalJsonReq) Content added in v0.10.0

func (StoreCodeProposalJsonReq) GetBaseReq added in v0.10.0

func (s StoreCodeProposalJsonReq) GetBaseReq() rest.BaseReq

func (StoreCodeProposalJsonReq) GetDeposit added in v0.10.0

func (s StoreCodeProposalJsonReq) GetDeposit() sdk.Coins

func (StoreCodeProposalJsonReq) GetProposer added in v0.10.0

func (s StoreCodeProposalJsonReq) GetProposer() string

type UpdateAdminJsonReq added in v0.10.0

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 added in v0.10.0

func (s UpdateAdminJsonReq) Content() govtypes.Content

func (UpdateAdminJsonReq) GetBaseReq added in v0.10.0

func (s UpdateAdminJsonReq) GetBaseReq() rest.BaseReq

func (UpdateAdminJsonReq) GetDeposit added in v0.10.0

func (s UpdateAdminJsonReq) GetDeposit() sdk.Coins

func (UpdateAdminJsonReq) GetProposer added in v0.10.0

func (s UpdateAdminJsonReq) GetProposer() string

Jump to

Keyboard shortcuts

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