rest

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 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 context.CLIContext) govrest.ProposalRESTHandler

func InstantiateProposalHandler

func InstantiateProposalHandler(cliCtx context.CLIContext) govrest.ProposalRESTHandler

func MigrateProposalHandler

func MigrateProposalHandler(cliCtx context.CLIContext) govrest.ProposalRESTHandler

func RegisterRoutes

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

RegisterRoutes registers staking-related REST handlers to a router

func StoreCodeProposalHandler

func StoreCodeProposalHandler(cliCtx context.CLIContext) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler

func UpdateContractAdminProposalHandler(cliCtx context.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 sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins      `json:"deposit" yaml:"deposit"`

	Contract sdk.AccAddress `json:"contract" yaml:"contract"`
}

func (ClearAdminJsonReq) Content

func (s ClearAdminJsonReq) Content() gov.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() sdk.AccAddress

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 sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins      `json:"deposit" yaml:"deposit"`

	RunAs sdk.AccAddress `json:"run_as" yaml:"run_as"`
	// Admin is an optional address that can execute migrations
	Admin     sdk.AccAddress  `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() sdk.AccAddress

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 sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins      `json:"deposit" yaml:"deposit"`

	Contract   sdk.AccAddress  `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 sdk.AccAddress `json:"run_as" yaml:"run_as"`
}

func (MigrateProposalJsonReq) Content

func (s MigrateProposalJsonReq) Content() gov.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() sdk.AccAddress

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    sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit     sdk.Coins      `json:"deposit" yaml:"deposit"`

	RunAs sdk.AccAddress `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 (s StoreCodeProposalJsonReq) Content() gov.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() sdk.AccAddress

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 sdk.AccAddress `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins      `json:"deposit" yaml:"deposit"`

	NewAdmin sdk.AccAddress `json:"new_admin" yaml:"new_admin"`
	Contract sdk.AccAddress `json:"contract" yaml:"contract"`
}

func (UpdateAdminJsonReq) Content

func (s UpdateAdminJsonReq) Content() gov.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() sdk.AccAddress

Jump to

Keyboard shortcuts

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