rest

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 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

func ClearContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func InstantiateProposalHandler

func InstantiateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func MigrateProposalHandler

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

func StoreCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler

func UpdateContractAdminProposalHandler(cliCtx client.Context) 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 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"`
	InitMsg   json.RawMessage `json:"init_msg" yaml:"init_msg"`
	InitFunds sdk.Coins       `json:"init_funds" yaml:"init_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"`
	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

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 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"`
	// 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

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 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

Jump to

Keyboard shortcuts

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