rest

package
v0.0.0-...-a351142 Latest Latest
Warning

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

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

Documentation

Overview

Deprecated: the rest package will be removed. You can use the GRPC gateway instead

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearContractAdminProposalHandler

func ClearContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func EmptyRestHandler

func EmptyRestHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func ExecuteProposalHandler

func ExecuteProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func InstantiateProposalHandler

func InstantiateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func MigrateProposalHandler

func MigrateProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func PinCodeProposalHandler

func PinCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func RegisterRoutes

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

RegisterRoutes registers staking-related REST handlers to a router Deprecated: the rest package will be removed. You can use the GRPC gateway instead

func StoreCodeProposalHandler

func StoreCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func SudoProposalHandler

func SudoProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func UnpinCodeProposalHandler

func UnpinCodeProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func UpdateContractAdminProposalHandler

func UpdateContractAdminProposalHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func UpdateInstantiateConfigProposalHandler

func UpdateInstantiateConfigProposalHandler(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 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"`

	// UnpinCode indicates if the code should not be pinned as part of the proposal.
	UnpinCode bool `json:"unpin_code" yaml:"unpin_code"`

	// Source is the URL where the code is hosted
	Source string `json:"source" yaml:"source"`
	// Builder is the docker image used to build the code deterministically, used for smart
	// contract verification
	Builder string `json:"builder" yaml:"builder"`
	// CodeHash is the SHA256 sum of the code outputted by optimizer, used for smart contract verification
	CodeHash []byte `json:"code_hash" yaml:"code_hash"`
}

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