rest

package
v0.11.0-alpha1 Latest Latest
Warning

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

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

func InstantiateProposalHandler added in v0.10.0

func InstantiateProposalHandler(cliCtx context.CLIContext) govrest.ProposalRESTHandler

func MigrateProposalHandler added in v0.10.0

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

func StoreCodeProposalHandler(cliCtx context.CLIContext) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler added in v0.10.0

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

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

func (ClearAdminJsonReq) Content added in v0.10.0

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

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 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 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() sdk.AccAddress

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

func (s MigrateProposalJsonReq) Content() gov.Content

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() sdk.AccAddress

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

func (s StoreCodeProposalJsonReq) Content() gov.Content

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() sdk.AccAddress

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

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

Jump to

Keyboard shortcuts

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