types

package
v0.0.0-...-aa68697 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	VoteYes        = "yes"
	VoteNo         = "no"
	VoteAbstain    = "abstain"
	VoteNoWithVeto = "no_with_veto"
)
View Source
const (
	ReplyAlways  = "always"
	ReplySuccess = "success"
	ReplyError   = "error"
	ReplyNever   = "never"
)
View Source
const Ordered = "ORDER_ORDERED"
View Source
const Unordered = "ORDER_UNORDERED"

These are the only two valid values for IbcOrder

Variables

This section is empty.

Functions

func GenericError

func GenericError(msg string) error

Types

type AllBalancesQuery

type AllBalancesQuery struct {
	Address string `json:"address"`
}

func (AllBalancesQuery) MarshalJSON

func (v AllBalancesQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllBalancesQuery) MarshalTinyJSON

func (v AllBalancesQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (AllBalancesQuery) ToQuery

func (m AllBalancesQuery) ToQuery() QueryRequest

func (*AllBalancesQuery) UnmarshalJSON

func (v *AllBalancesQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllBalancesQuery) UnmarshalTinyJSON

func (v *AllBalancesQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type AllBalancesResponse

type AllBalancesResponse struct {
	Amount []Coin `json:"amount,emptyslice"`
}

AllBalancesResponse is the expected response to AllBalancesQuery

func (AllBalancesResponse) MarshalJSON

func (v AllBalancesResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllBalancesResponse) MarshalTinyJSON

func (v AllBalancesResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*AllBalancesResponse) UnmarshalJSON

func (v *AllBalancesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllBalancesResponse) UnmarshalTinyJSON

func (v *AllBalancesResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type AllDelegationsQuery

type AllDelegationsQuery struct {
	Delegator string `json:"delegator"`
}

func (AllDelegationsQuery) MarshalJSON

func (v AllDelegationsQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllDelegationsQuery) MarshalTinyJSON

func (v AllDelegationsQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (AllDelegationsQuery) ToQuery

func (m AllDelegationsQuery) ToQuery() QueryRequest

func (*AllDelegationsQuery) UnmarshalJSON

func (v *AllDelegationsQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllDelegationsQuery) UnmarshalTinyJSON

func (v *AllDelegationsQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type AllDelegationsResponse

type AllDelegationsResponse struct {
	Delegations []Delegation `json:"delegations,emptyslice"`
}

AllDelegationsResponse is the expected response to AllDelegationsQuery

func (AllDelegationsResponse) MarshalJSON

func (v AllDelegationsResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllDelegationsResponse) MarshalTinyJSON

func (v AllDelegationsResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*AllDelegationsResponse) UnmarshalJSON

func (v *AllDelegationsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllDelegationsResponse) UnmarshalTinyJSON

func (v *AllDelegationsResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type AllValidatorsQuery

type AllValidatorsQuery struct{}

func (AllValidatorsQuery) MarshalJSON

func (v AllValidatorsQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllValidatorsQuery) MarshalTinyJSON

func (v AllValidatorsQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (AllValidatorsQuery) ToQuery

func (m AllValidatorsQuery) ToQuery() QueryRequest

func (*AllValidatorsQuery) UnmarshalJSON

func (v *AllValidatorsQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllValidatorsQuery) UnmarshalTinyJSON

func (v *AllValidatorsQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type AllValidatorsResponse

type AllValidatorsResponse struct {
	Validators []Validator `json:"validators,emptyslice"`
}

AllValidatorsResponse is the expected response to AllValidatorsQuery

func (AllValidatorsResponse) MarshalJSON

func (v AllValidatorsResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (AllValidatorsResponse) MarshalTinyJSON

func (v AllValidatorsResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*AllValidatorsResponse) UnmarshalJSON

func (v *AllValidatorsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*AllValidatorsResponse) UnmarshalTinyJSON

func (v *AllValidatorsResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BalanceQuery

type BalanceQuery struct {
	Address string `json:"address"`
	Denom   string `json:"denom"`
}

func (BalanceQuery) MarshalJSON

func (v BalanceQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BalanceQuery) MarshalTinyJSON

func (v BalanceQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (BalanceQuery) ToQuery

func (m BalanceQuery) ToQuery() QueryRequest

func (*BalanceQuery) UnmarshalJSON

func (v *BalanceQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BalanceQuery) UnmarshalTinyJSON

func (v *BalanceQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BalanceResponse

type BalanceResponse struct {
	Amount Coin `json:"amount"`
}

BalanceResponse is the expected response to BalanceQuery

func (BalanceResponse) MarshalJSON

func (v BalanceResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BalanceResponse) MarshalTinyJSON

func (v BalanceResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*BalanceResponse) UnmarshalJSON

func (v *BalanceResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BalanceResponse) UnmarshalTinyJSON

func (v *BalanceResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BankMsg

type BankMsg struct {
	Send *SendMsg `json:"send,omitempty"`
	Burn *BurnMsg `json:"burn,omitempty"`
}

func (BankMsg) MarshalJSON

func (v BankMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BankMsg) MarshalTinyJSON

func (v BankMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (BankMsg) ToMsg

func (m BankMsg) ToMsg() CosmosMsg

func (*BankMsg) UnmarshalJSON

func (v *BankMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BankMsg) UnmarshalTinyJSON

func (v *BankMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BankQuery

type BankQuery struct {
	Balance     *BalanceQuery     `json:"balance,omitempty"`
	AllBalances *AllBalancesQuery `json:"all_balances,omitempty"`
}

func (BankQuery) MarshalJSON

func (v BankQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BankQuery) MarshalTinyJSON

func (v BankQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (BankQuery) ToQuery

func (m BankQuery) ToQuery() QueryRequest

func (*BankQuery) UnmarshalJSON

func (v *BankQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BankQuery) UnmarshalTinyJSON

func (v *BankQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BlockInfo

type BlockInfo struct {
	// block height this transaction is executed
	Height uint64 `json:"height"`
	// time in nanoseconds since unix epoch. Uses string to ensure JavaScript compatibility.
	Time    uint64 `json:"time,string"`
	ChainID string `json:"chain_id"`
}

func (BlockInfo) MarshalJSON

func (v BlockInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BlockInfo) MarshalTinyJSON

func (v BlockInfo) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*BlockInfo) UnmarshalJSON

func (v *BlockInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BlockInfo) UnmarshalTinyJSON

func (v *BlockInfo) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BondedDenomQuery

type BondedDenomQuery struct{}

func (BondedDenomQuery) MarshalJSON

func (v BondedDenomQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BondedDenomQuery) MarshalTinyJSON

func (v BondedDenomQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (BondedDenomQuery) ToQuery

func (m BondedDenomQuery) ToQuery() QueryRequest

func (*BondedDenomQuery) UnmarshalJSON

func (v *BondedDenomQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BondedDenomQuery) UnmarshalTinyJSON

func (v *BondedDenomQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BondedDenomResponse

type BondedDenomResponse struct {
	Denom string `json:"denom"`
}

func (BondedDenomResponse) MarshalJSON

func (v BondedDenomResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BondedDenomResponse) MarshalTinyJSON

func (v BondedDenomResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*BondedDenomResponse) UnmarshalJSON

func (v *BondedDenomResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BondedDenomResponse) UnmarshalTinyJSON

func (v *BondedDenomResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type BurnMsg

type BurnMsg struct {
	Amount []Coin `json:"amount,emptyslice"`
}

BurnMsg will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.

func (BurnMsg) MarshalJSON

func (v BurnMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (BurnMsg) MarshalTinyJSON

func (v BurnMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (BurnMsg) ToMsg

func (m BurnMsg) ToMsg() CosmosMsg

func (*BurnMsg) UnmarshalJSON

func (v *BurnMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*BurnMsg) UnmarshalTinyJSON

func (v *BurnMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type CanonicalAddress

type CanonicalAddress = []byte

CanonicalAddress uses standard base64 encoding, just use it as a label for developers

type ChannelQuery

type ChannelQuery struct {
	// optional argument
	PortID    string `json:"port_id,omitempty"`
	ChannelID string `json:"channel_id"`
}

func (ChannelQuery) MarshalJSON

func (v ChannelQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ChannelQuery) MarshalTinyJSON

func (v ChannelQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ChannelQuery) ToQuery

func (m ChannelQuery) ToQuery() QueryRequest

func (*ChannelQuery) UnmarshalJSON

func (v *ChannelQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ChannelQuery) UnmarshalTinyJSON

func (v *ChannelQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ChannelResponse

type ChannelResponse struct {
	// may be empty if there is no matching channel
	Channel *IBCChannel `json:"channel,omitempty"`
}

func (ChannelResponse) MarshalJSON

func (v ChannelResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ChannelResponse) MarshalTinyJSON

func (v ChannelResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ChannelResponse) UnmarshalJSON

func (v *ChannelResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ChannelResponse) UnmarshalTinyJSON

func (v *ChannelResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ClearAdminMsg

type ClearAdminMsg struct {
	// ContractAddr is the sdk.AccAddress of the target contract.
	ContractAddr string `json:"contract_addr"`
}

ClearAdminMsg is the Go counterpart of WasmMsg::ClearAdmin (https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta5/packages/std/src/results/cosmos_msg.rs#L158-L160).

func (ClearAdminMsg) MarshalJSON

func (v ClearAdminMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ClearAdminMsg) MarshalTinyJSON

func (v ClearAdminMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ClearAdminMsg) ToMsg

func (m ClearAdminMsg) ToMsg() CosmosMsg

func (*ClearAdminMsg) UnmarshalJSON

func (v *ClearAdminMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ClearAdminMsg) UnmarshalTinyJSON

func (v *ClearAdminMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type CloseChannelMsg

type CloseChannelMsg struct {
	ChannelID string `json:"channel_id"`
}

func (CloseChannelMsg) MarshalJSON

func (v CloseChannelMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (CloseChannelMsg) MarshalTinyJSON

func (v CloseChannelMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (CloseChannelMsg) ToMsg

func (m CloseChannelMsg) ToMsg() CosmosMsg

func (*CloseChannelMsg) UnmarshalJSON

func (v *CloseChannelMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*CloseChannelMsg) UnmarshalTinyJSON

func (v *CloseChannelMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Coin

type Coin struct {
	// Denom defines the name of the coin, example: ATOM
	Denom string
	// Amount is the math.Uint128 representation of the amount of coins.
	Amount math.Uint128
}

Coin is a string representation of the sdk.Coin type (more portable than sdk.Int)

func NewCoin

func NewCoin(amount math.Uint128, denom string) Coin

NewCoin creates a new coin given amount and denom.

func NewCoinFromUint64

func NewCoinFromUint64(amount uint64, denom string) Coin

NewCoinFromUint64 creates a new coin given an uint64 amount and denom.

func (Coin) MarshalJSON

func (v Coin) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Coin) MarshalTinyJSON

func (v Coin) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (Coin) String

func (c Coin) String() string

String implements the fmt.Stringer interface.

func (Coin) ToWasmVMCoin

func (c Coin) ToWasmVMCoin() wasmVmTypes.Coin

ToWasmVMCoin convert Coin to WasmVM type.

func (*Coin) UnmarshalJSON

func (v *Coin) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Coin) UnmarshalTinyJSON

func (v *Coin) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ContractInfo

type ContractInfo struct {
	// bech32 encoding of sdk.AccAddress of the contract, to be used when sending messages
	Address string
}

func (ContractInfo) MarshalJSON

func (v ContractInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ContractInfo) MarshalTinyJSON

func (v ContractInfo) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ContractInfo) UnmarshalJSON

func (v *ContractInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ContractInfo) UnmarshalTinyJSON

func (v *ContractInfo) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ContractInfoQuery

type ContractInfoQuery struct {
	// Bech32 encoded sdk.AccAddress of the contract
	ContractAddr string `json:"contract_addr"`
}

func (ContractInfoQuery) MarshalJSON

func (v ContractInfoQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ContractInfoQuery) MarshalTinyJSON

func (v ContractInfoQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ContractInfoQuery) ToQuery

func (m ContractInfoQuery) ToQuery() QueryRequest

func (*ContractInfoQuery) UnmarshalJSON

func (v *ContractInfoQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ContractInfoQuery) UnmarshalTinyJSON

func (v *ContractInfoQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ContractInfoResponse

type ContractInfoResponse struct {
	CodeID  uint64 `json:"code_id"`
	Creator string `json:"creator"`
	// Set to the admin who can migrate contract, if any
	Admin  string `json:"admin,omit_empty"`
	Pinned bool   `json:"pinned"`
	// Set if the contract is IBC enabled
	IBCPort string `json:"ibc_port,omit_empty"`
}

func (ContractInfoResponse) MarshalJSON

func (v ContractInfoResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ContractInfoResponse) MarshalTinyJSON

func (v ContractInfoResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ContractInfoResponse) UnmarshalJSON

func (v *ContractInfoResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ContractInfoResponse) UnmarshalTinyJSON

func (v *ContractInfoResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ContractResult

type ContractResult struct {
	Ok  *Response `json:"ok,omitempty"`
	Err string    `json:"error,omitempty"`
}

ContractResult is the raw response from the instantiate/execute/migrate calls. This is mirrors Rust's ContractResult<Response>.

func (ContractResult) MarshalJSON

func (v ContractResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ContractResult) MarshalTinyJSON

func (v ContractResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ContractResult) UnmarshalJSON

func (v *ContractResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ContractResult) UnmarshalTinyJSON

func (v *ContractResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type CosmosMsg

type CosmosMsg struct {
	Bank         *BankMsg         `json:"bank,omitempty"`
	Custom       RawMessage       `json:"custom,omitempty"`
	Distribution *DistributionMsg `json:"distribution,omitempty"`
	Gov          *GovMsg          `json:"gov,omitempty"`
	IBC          *IBCMsg          `json:"ibc,omitempty"`
	Staking      *StakingMsg      `json:"staking,omitempty"`
	Stargate     *StargateMsg     `json:"stargate,omitempty"`
	Wasm         *WasmMsg         `json:"wasm,omitempty"`
}

CosmosMsg is an rust enum and only (exactly) one of the fields should be set Should we do a cleaner approach in Go? (type/data?)

func (CosmosMsg) MarshalJSON

func (v CosmosMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (CosmosMsg) MarshalTinyJSON

func (v CosmosMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (CosmosMsg) ToMsg

func (m CosmosMsg) ToMsg() CosmosMsg

Return self to allow this also to be passed as args that expect a variant

func (*CosmosMsg) UnmarshalJSON

func (v *CosmosMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*CosmosMsg) UnmarshalTinyJSON

func (v *CosmosMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type DelegateMsg

type DelegateMsg struct {
	Validator string `json:"validator"`
	Amount    Coin   `json:"amount"`
}

func (DelegateMsg) MarshalJSON

func (v DelegateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (DelegateMsg) MarshalTinyJSON

func (v DelegateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (DelegateMsg) ToMsg

func (m DelegateMsg) ToMsg() CosmosMsg

func (*DelegateMsg) UnmarshalJSON

func (v *DelegateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*DelegateMsg) UnmarshalTinyJSON

func (v *DelegateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Delegation

type Delegation struct {
	Delegator string `json:"delegator"`
	Validator string `json:"validator"`
	Amount    Coin   `json:"amount"`
}

func (Delegation) MarshalJSON

func (v Delegation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Delegation) MarshalTinyJSON

func (v Delegation) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Delegation) UnmarshalJSON

func (v *Delegation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Delegation) UnmarshalTinyJSON

func (v *Delegation) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type DelegationQuery

type DelegationQuery struct {
	Delegator string `json:"delegator"`
	Validator string `json:"validator"`
}

func (DelegationQuery) MarshalJSON

func (v DelegationQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (DelegationQuery) MarshalTinyJSON

func (v DelegationQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (DelegationQuery) ToQuery

func (m DelegationQuery) ToQuery() QueryRequest

func (*DelegationQuery) UnmarshalJSON

func (v *DelegationQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*DelegationQuery) UnmarshalTinyJSON

func (v *DelegationQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type DelegationResponse

type DelegationResponse struct {
	Delegation *FullDelegation `json:"delegation,omitempty"`
}

DelegationResponse is the expected response to DelegationsQuery

func (DelegationResponse) MarshalJSON

func (v DelegationResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (DelegationResponse) MarshalTinyJSON

func (v DelegationResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*DelegationResponse) UnmarshalJSON

func (v *DelegationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*DelegationResponse) UnmarshalTinyJSON

func (v *DelegationResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type DistributionMsg

type DistributionMsg struct {
	SetWithdrawAddress      *SetWithdrawAddressMsg      `json:"set_withdraw_address,omitempty"`
	WithdrawDelegatorReward *WithdrawDelegatorRewardMsg `json:"withdraw_delegator_reward,omitempty"`
}

func (DistributionMsg) MarshalJSON

func (v DistributionMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (DistributionMsg) MarshalTinyJSON

func (v DistributionMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (DistributionMsg) ToMsg

func (m DistributionMsg) ToMsg() CosmosMsg

func (*DistributionMsg) UnmarshalJSON

func (v *DistributionMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*DistributionMsg) UnmarshalTinyJSON

func (v *DistributionMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type DivideByZero

type DivideByZero struct{}

func (DivideByZero) Error

func (e DivideByZero) Error() string

type Env

type Env struct {
	Block       BlockInfo
	Contract    ContractInfo
	Transaction *TransactionInfo `json:"transaction_info,omitempty"`
}

Env defines the state of the blockchain environment this contract is running in. This must contain only trusted data - nothing from the Tx itself that has not been verfied (like Signer).

Env are json encoded to a byte slice before passing to the wasm contract.

func (Env) MarshalJSON

func (v Env) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Env) MarshalTinyJSON

func (v Env) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Env) UnmarshalJSON

func (v *Env) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Env) UnmarshalTinyJSON

func (v *Env) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Event

type Event struct {
	Type       string           `json:"type"`
	Attributes []EventAttribute `json:"attributes,emptyslice"`
}

func (Event) MarshalJSON

func (v Event) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Event) MarshalTinyJSON

func (v Event) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Event) UnmarshalJSON

func (v *Event) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Event) UnmarshalTinyJSON

func (v *Event) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type EventAttribute

type EventAttribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

EventAttribute

func (EventAttribute) MarshalJSON

func (v EventAttribute) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (EventAttribute) MarshalTinyJSON

func (v EventAttribute) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*EventAttribute) UnmarshalJSON

func (v *EventAttribute) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*EventAttribute) UnmarshalTinyJSON

func (v *EventAttribute) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ExecuteMsg

type ExecuteMsg struct {
	// ContractAddr is the sdk.AccAddress of the contract, which uniquely defines
	// the contract ID and instance ID. The sdk module should maintain a reverse lookup table.
	ContractAddr string `json:"contract_addr"`
	// Msg is assumed to be a json-encoded message, which will be passed directly
	// as `userMsg` when calling `Handle` on the above-defined contract
	Msg []byte `json:"msg,omitempty"`
	// Send is an optional amount of coins this contract sends to the called contract
	Funds []Coin `json:"funds,emptyslice"`
}

ExecuteMsg is used to call another defined contract on this chain. The calling contract requires the callee to be defined beforehand, and the address should have been defined in initialization. And we assume the developer tested the ABIs and coded them together.

Since a contract is immutable once it is deployed, we don't need to transform this. If it was properly coded and worked once, it will continue to work throughout upgrades.

func (ExecuteMsg) MarshalJSON

func (v ExecuteMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ExecuteMsg) MarshalTinyJSON

func (v ExecuteMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ExecuteMsg) ToMsg

func (m ExecuteMsg) ToMsg() CosmosMsg

func (*ExecuteMsg) UnmarshalJSON

func (v *ExecuteMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ExecuteMsg) UnmarshalTinyJSON

func (v *ExecuteMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Fraction

type Fraction struct {
	Numerator   int64
	Denominator int64
}

func (Fraction) Floor

func (f Fraction) Floor() int64

func (Fraction) MarshalJSON

func (v Fraction) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Fraction) MarshalTinyJSON

func (v Fraction) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Fraction) Mul

func (f *Fraction) Mul(m int64) Fraction

func (*Fraction) UnmarshalJSON

func (v *Fraction) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Fraction) UnmarshalTinyJSON

func (v *Fraction) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type FullDelegation

type FullDelegation struct {
	Delegator          string `json:"delegator"`
	Validator          string `json:"validator"`
	Amount             Coin   `json:"amount"`
	AccumulatedRewards []Coin `json:"accumulated_rewards,emptyslice"`
	CanRedelegate      Coin   `json:"can_redelegate"`
}

func (FullDelegation) MarshalJSON

func (v FullDelegation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (FullDelegation) MarshalTinyJSON

func (v FullDelegation) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*FullDelegation) UnmarshalJSON

func (v *FullDelegation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*FullDelegation) UnmarshalTinyJSON

func (v *FullDelegation) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type GenericErr

type GenericErr struct {
	Msg string
}

func (GenericErr) Error

func (e GenericErr) Error() string

type GovMsg

type GovMsg struct {
	// This maps directly to [MsgVote](https://github.com/cosmos/cosmos-sdk/blob/v0.42.5/proto/cosmos/gov/v1beta1/tx.proto#L46-L56) in the Cosmos SDK with voter set to the contract address.
	Vote *VoteMsg `json:"vote,omitempty"`
}

func (GovMsg) MarshalJSON

func (v GovMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (GovMsg) MarshalTinyJSON

func (v GovMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (GovMsg) ToMsg

func (m GovMsg) ToMsg() CosmosMsg

func (*GovMsg) UnmarshalJSON

func (v *GovMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*GovMsg) UnmarshalTinyJSON

func (v *GovMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type HumanAddress

type HumanAddress = string

HumanAddress is a printable (typically bech32 encoded) address string. Just use it as a label for developers.

type IBCAcknowledgement

type IBCAcknowledgement struct {
	Data []byte `json:"data"`
}

func (IBCAcknowledgement) MarshalJSON

func (v IBCAcknowledgement) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCAcknowledgement) MarshalTinyJSON

func (v IBCAcknowledgement) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCAcknowledgement) UnmarshalJSON

func (v *IBCAcknowledgement) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCAcknowledgement) UnmarshalTinyJSON

func (v *IBCAcknowledgement) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCBasicResponse

type IBCBasicResponse struct {
	// Messages comes directly from the contract and is its request for action.
	// If the ReplyOn value matches the result, the runtime will invoke this
	// contract's `reply` entry point after execution. Otherwise, this is all
	// "fire and forget".
	Messages []SubMsg `json:"messages"`
	// attributes for a log event to return over abci interface
	Attributes []EventAttribute `json:"attributes"`
	// custom events (separate from the main one that contains the attributes
	// above)
	Events []Event `json:"events"`
}

IBCBasicResponse defines the return value on a successful processing. This is the counterpart of [IbcBasicResponse](https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta1/packages/std/src/ibc.rs#L194-L216).

func (IBCBasicResponse) MarshalJSON

func (v IBCBasicResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCBasicResponse) MarshalTinyJSON

func (v IBCBasicResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCBasicResponse) UnmarshalJSON

func (v *IBCBasicResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCBasicResponse) UnmarshalTinyJSON

func (v *IBCBasicResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCBasicResult

type IBCBasicResult struct {
	Ok  *IBCBasicResponse `json:"ok,omitempty"`
	Err string            `json:"error,omitempty"`
}

This is the return value for the majority of the ibc handlers. That are able to dispatch messages / events on their own, but have no meaningful return value to the calling code.

Callbacks that have return values (like ibc_receive_packet) or that cannot redispatch messages (like ibc_channel_open) will use other Response types

func (IBCBasicResult) MarshalJSON

func (v IBCBasicResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCBasicResult) MarshalTinyJSON

func (v IBCBasicResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCBasicResult) UnmarshalJSON

func (v *IBCBasicResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCBasicResult) UnmarshalTinyJSON

func (v *IBCBasicResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCChannel

type IBCChannel struct {
	Endpoint             IBCEndpoint `json:"endpoint"`
	CounterpartyEndpoint IBCEndpoint `json:"counterparty_endpoint"`
	Order                IBCOrder    `json:"order"`
	Version              string      `json:"version"`
	ConnectionID         string      `json:"connection_id"`
}

func (IBCChannel) MarshalJSON

func (v IBCChannel) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCChannel) MarshalTinyJSON

func (v IBCChannel) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCChannel) UnmarshalJSON

func (v *IBCChannel) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCChannel) UnmarshalTinyJSON

func (v *IBCChannel) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCChannelCloseMsg

type IBCChannelCloseMsg struct {
	CloseInit    *IBCCloseInit    `json:"close_init,omitempty"`
	CloseConfirm *IBCCloseConfirm `json:"close_confirm,omitempty"`
}

func (IBCChannelCloseMsg) GetChannel

func (msg IBCChannelCloseMsg) GetChannel() IBCChannel

GetChannel returns the IBCChannel in this message.

func (IBCChannelCloseMsg) MarshalJSON

func (v IBCChannelCloseMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCChannelCloseMsg) MarshalTinyJSON

func (v IBCChannelCloseMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCChannelCloseMsg) UnmarshalJSON

func (v *IBCChannelCloseMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCChannelCloseMsg) UnmarshalTinyJSON

func (v *IBCChannelCloseMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCChannelConnectMsg

type IBCChannelConnectMsg struct {
	OpenAck     *IBCOpenAck     `json:"open_ack,omitempty"`
	OpenConfirm *IBCOpenConfirm `json:"open_confirm,omitempty"`
}

func (IBCChannelConnectMsg) GetChannel

func (msg IBCChannelConnectMsg) GetChannel() IBCChannel

GetChannel returns the IBCChannel in this message.

func (IBCChannelConnectMsg) GetCounterVersion

func (msg IBCChannelConnectMsg) GetCounterVersion() (ver string, ok bool)

GetCounterVersion checks if the message has a counterparty version and returns it if so.

func (IBCChannelConnectMsg) MarshalJSON

func (v IBCChannelConnectMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCChannelConnectMsg) MarshalTinyJSON

func (v IBCChannelConnectMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCChannelConnectMsg) UnmarshalJSON

func (v *IBCChannelConnectMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCChannelConnectMsg) UnmarshalTinyJSON

func (v *IBCChannelConnectMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCChannelOpenMsg

type IBCChannelOpenMsg struct {
	OpenInit *IBCOpenInit `json:"open_init,omitempty"`
	OpenTry  *IBCOpenTry  `json:"open_try,omitempty"`
}

func (IBCChannelOpenMsg) GetChannel

func (msg IBCChannelOpenMsg) GetChannel() IBCChannel

GetChannel returns the IBCChannel in this message.

func (IBCChannelOpenMsg) GetCounterVersion

func (msg IBCChannelOpenMsg) GetCounterVersion() (ver string, ok bool)

GetCounterVersion checks if the message has a counterparty version and returns it if so.

func (IBCChannelOpenMsg) MarshalJSON

func (v IBCChannelOpenMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCChannelOpenMsg) MarshalTinyJSON

func (v IBCChannelOpenMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCChannelOpenMsg) UnmarshalJSON

func (v *IBCChannelOpenMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCChannelOpenMsg) UnmarshalTinyJSON

func (v *IBCChannelOpenMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCChannelOpenResult

type IBCChannelOpenResult struct {
	Ok  *struct{} `json:"ok,omitempty"`
	Err string    `json:"error,omitempty"`
}

IBCChannelOpenResult is the raw response from the ibc_channel_open call. This is mirrors Rust's ContractResult<()>. We just check if Err == "" to see if this is success (no other data on success)

func (IBCChannelOpenResult) MarshalJSON

func (v IBCChannelOpenResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCChannelOpenResult) MarshalTinyJSON

func (v IBCChannelOpenResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCChannelOpenResult) UnmarshalJSON

func (v *IBCChannelOpenResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCChannelOpenResult) UnmarshalTinyJSON

func (v *IBCChannelOpenResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCCloseConfirm

type IBCCloseConfirm struct {
	Channel IBCChannel `json:"channel"`
}

func (IBCCloseConfirm) MarshalJSON

func (v IBCCloseConfirm) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCCloseConfirm) MarshalTinyJSON

func (v IBCCloseConfirm) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCCloseConfirm) ToMsg

func (*IBCCloseConfirm) UnmarshalJSON

func (v *IBCCloseConfirm) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCCloseConfirm) UnmarshalTinyJSON

func (v *IBCCloseConfirm) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCCloseInit

type IBCCloseInit struct {
	Channel IBCChannel `json:"channel"`
}

func (IBCCloseInit) MarshalJSON

func (v IBCCloseInit) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCCloseInit) MarshalTinyJSON

func (v IBCCloseInit) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCCloseInit) ToMsg

func (m *IBCCloseInit) ToMsg() IBCChannelCloseMsg

func (*IBCCloseInit) UnmarshalJSON

func (v *IBCCloseInit) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCCloseInit) UnmarshalTinyJSON

func (v *IBCCloseInit) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCEndpoint

type IBCEndpoint struct {
	PortID    string `json:"port_id"`
	ChannelID string `json:"channel_id"`
}

func (IBCEndpoint) MarshalJSON

func (v IBCEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCEndpoint) MarshalTinyJSON

func (v IBCEndpoint) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCEndpoint) UnmarshalJSON

func (v *IBCEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCEndpoint) UnmarshalTinyJSON

func (v *IBCEndpoint) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCMsg

type IBCMsg struct {
	Transfer     *TransferMsg     `json:"transfer,omitempty"`
	SendPacket   *SendPacketMsg   `json:"send_packet,omitempty"`
	CloseChannel *CloseChannelMsg `json:"close_channel,omitempty"`
}

func (IBCMsg) MarshalJSON

func (v IBCMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCMsg) MarshalTinyJSON

func (v IBCMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (IBCMsg) ToMsg

func (m IBCMsg) ToMsg() CosmosMsg

func (*IBCMsg) UnmarshalJSON

func (v *IBCMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCMsg) UnmarshalTinyJSON

func (v *IBCMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCOpenAck

type IBCOpenAck struct {
	Channel             IBCChannel `json:"channel"`
	CounterpartyVersion string     `json:"counterparty_version"`
}

func (IBCOpenAck) MarshalJSON

func (v IBCOpenAck) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCOpenAck) MarshalTinyJSON

func (v IBCOpenAck) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCOpenAck) ToMsg

func (m *IBCOpenAck) ToMsg() IBCChannelConnectMsg

func (*IBCOpenAck) UnmarshalJSON

func (v *IBCOpenAck) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCOpenAck) UnmarshalTinyJSON

func (v *IBCOpenAck) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCOpenConfirm

type IBCOpenConfirm struct {
	Channel IBCChannel `json:"channel"`
}

func (IBCOpenConfirm) MarshalJSON

func (v IBCOpenConfirm) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCOpenConfirm) MarshalTinyJSON

func (v IBCOpenConfirm) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCOpenConfirm) ToMsg

func (*IBCOpenConfirm) UnmarshalJSON

func (v *IBCOpenConfirm) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCOpenConfirm) UnmarshalTinyJSON

func (v *IBCOpenConfirm) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCOpenInit

type IBCOpenInit struct {
	Channel IBCChannel `json:"channel"`
}

func (IBCOpenInit) MarshalJSON

func (v IBCOpenInit) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCOpenInit) MarshalTinyJSON

func (v IBCOpenInit) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCOpenInit) ToMsg

func (m *IBCOpenInit) ToMsg() IBCChannelOpenMsg

func (*IBCOpenInit) UnmarshalJSON

func (v *IBCOpenInit) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCOpenInit) UnmarshalTinyJSON

func (v *IBCOpenInit) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCOpenTry

type IBCOpenTry struct {
	Channel             IBCChannel `json:"channel"`
	CounterpartyVersion string     `json:"counterparty_version"`
}

func (IBCOpenTry) MarshalJSON

func (v IBCOpenTry) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCOpenTry) MarshalTinyJSON

func (v IBCOpenTry) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCOpenTry) ToMsg

func (m *IBCOpenTry) ToMsg() IBCChannelOpenMsg

func (*IBCOpenTry) UnmarshalJSON

func (v *IBCOpenTry) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCOpenTry) UnmarshalTinyJSON

func (v *IBCOpenTry) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCPacket

type IBCPacket struct {
	Data     []byte      `json:"data"`
	Src      IBCEndpoint `json:"src"`
	Dest     IBCEndpoint `json:"dest"`
	Sequence uint64      `json:"sequence"`
	Timeout  IBCTimeout  `json:"timeout"`
}

func (IBCPacket) MarshalJSON

func (v IBCPacket) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCPacket) MarshalTinyJSON

func (v IBCPacket) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCPacket) UnmarshalJSON

func (v *IBCPacket) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCPacket) UnmarshalTinyJSON

func (v *IBCPacket) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCPacketAckMsg

type IBCPacketAckMsg struct {
	Acknowledgement IBCAcknowledgement `json:"acknowledgement"`
	OriginalPacket  IBCPacket          `json:"original_packet"`
}

func (IBCPacketAckMsg) MarshalJSON

func (v IBCPacketAckMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCPacketAckMsg) MarshalTinyJSON

func (v IBCPacketAckMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCPacketAckMsg) UnmarshalJSON

func (v *IBCPacketAckMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCPacketAckMsg) UnmarshalTinyJSON

func (v *IBCPacketAckMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCPacketReceiveMsg

type IBCPacketReceiveMsg struct {
	Packet IBCPacket `json:"packet"`
}

func (IBCPacketReceiveMsg) MarshalJSON

func (v IBCPacketReceiveMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCPacketReceiveMsg) MarshalTinyJSON

func (v IBCPacketReceiveMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCPacketReceiveMsg) UnmarshalJSON

func (v *IBCPacketReceiveMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCPacketReceiveMsg) UnmarshalTinyJSON

func (v *IBCPacketReceiveMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCPacketTimeoutMsg

type IBCPacketTimeoutMsg struct {
	Packet IBCPacket `json:"packet"`
}

func (IBCPacketTimeoutMsg) MarshalJSON

func (v IBCPacketTimeoutMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCPacketTimeoutMsg) MarshalTinyJSON

func (v IBCPacketTimeoutMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCPacketTimeoutMsg) UnmarshalJSON

func (v *IBCPacketTimeoutMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCPacketTimeoutMsg) UnmarshalTinyJSON

func (v *IBCPacketTimeoutMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCQuery

type IBCQuery struct {
	PortID       *PortIDQuery       `json:"port_id,omitempty"`
	ListChannels *ListChannelsQuery `json:"list_channels,omitempty"`
	Channel      *ChannelQuery      `json:"channel,omitempty"`
}

IBCQuery defines a query request from the contract into the chain. This is the counterpart of [IbcQuery](https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta1/packages/std/src/ibc.rs#L61-L83).

func (IBCQuery) MarshalJSON

func (v IBCQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCQuery) MarshalTinyJSON

func (v IBCQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (IBCQuery) ToQuery

func (m IBCQuery) ToQuery() QueryRequest

func (*IBCQuery) UnmarshalJSON

func (v *IBCQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCQuery) UnmarshalTinyJSON

func (v *IBCQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCReceiveResponse

type IBCReceiveResponse struct {
	// binary encoded data to be returned to calling chain as the acknowledgement
	Acknowledgement []byte `json:"acknowledgement"`
	// Messages comes directly from the contract and is it's request for action.
	// If the ReplyOn value matches the result, the runtime will invoke this
	// contract's `reply` entry point after execution. Otherwise, this is all
	// "fire and forget".
	Messages   []SubMsg         `json:"messages"`
	Attributes []EventAttribute `json:"attributes"`
	// custom events (separate from the main one that contains the attributes
	// above)
	Events []Event `json:"events"`
}

IBCReceiveResponse defines the return value on packet response processing. This "success" case should be returned even in application-level errors, Where the Acknowledgement bytes contain an encoded error message to be returned to the calling chain. (Returning IBCReceiveResult::Err will abort processing of this packet and not inform the calling chain). This is the counterpart of (IbcReceiveResponse)(https://github.com/CosmWasm/cosmwasm/blob/v0.15.0/packages/std/src/ibc.rs#L247-L267).

func (IBCReceiveResponse) MarshalJSON

func (v IBCReceiveResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCReceiveResponse) MarshalTinyJSON

func (v IBCReceiveResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCReceiveResponse) UnmarshalJSON

func (v *IBCReceiveResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCReceiveResponse) UnmarshalTinyJSON

func (v *IBCReceiveResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCReceiveResult

type IBCReceiveResult struct {
	Ok  *IBCReceiveResponse `json:"ok,omitempty"`
	Err string              `json:"error,omitempty"`
}

This is the return value for the majority of the ibc handlers. That are able to dispatch messages / events on their own, but have no meaningful return value to the calling code.

Callbacks that have return values (like receive_packet) or that cannot redispatch messages (like the handshake callbacks) will use other Response types

func (IBCReceiveResult) MarshalJSON

func (v IBCReceiveResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCReceiveResult) MarshalTinyJSON

func (v IBCReceiveResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCReceiveResult) UnmarshalJSON

func (v *IBCReceiveResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCReceiveResult) UnmarshalTinyJSON

func (v *IBCReceiveResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCTimeout

type IBCTimeout struct {
	Block *IBCTimeoutBlock `json:"block"`
	// Nanoseconds since UNIX epoch
	Timestamp uint64 `json:"timestamp,string,omitempty"`
}

IBCTimeout is the timeout for an IBC packet. At least one of block and timestamp is required.

func (IBCTimeout) MarshalJSON

func (v IBCTimeout) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCTimeout) MarshalTinyJSON

func (v IBCTimeout) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCTimeout) UnmarshalJSON

func (v *IBCTimeout) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCTimeout) UnmarshalTinyJSON

func (v *IBCTimeout) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type IBCTimeoutBlock

type IBCTimeoutBlock struct {
	// the version that the client is currently on
	// (eg. after reseting the chain this could increment 1 as height drops to 0)
	Revision uint64 `json:"revision"`
	// block height after which the packet times out.
	// the height within the given revision
	Height uint64 `json:"height"`
}

IBCTimeoutBlock Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height)

func (IBCTimeoutBlock) IsZero

func (t IBCTimeoutBlock) IsZero() bool

func (IBCTimeoutBlock) MarshalJSON

func (v IBCTimeoutBlock) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (IBCTimeoutBlock) MarshalTinyJSON

func (v IBCTimeoutBlock) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*IBCTimeoutBlock) UnmarshalJSON

func (v *IBCTimeoutBlock) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*IBCTimeoutBlock) UnmarshalTinyJSON

func (v *IBCTimeoutBlock) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type InstantiateMsg

type InstantiateMsg struct {
	// CodeID is the reference to the wasm byte code as used by the Cosmos-SDK
	CodeID uint64 `json:"code_id"`
	// Msg is assumed to be a json-encoded message, which will be passed directly
	// as `userMsg` when calling `Init` on a new contract with the above-defined CodeID
	Msg []byte `json:"msg,omitempty"`
	// Send is an optional amount of coins this contract sends to the called contract
	Funds []Coin `json:"funds,emptyslice"`
	// Label is optional metadata to be stored with a contract instance.
	Label string `json:"label"`
	// Admin (optional) may be set here to allow future migrations from this address
	Admin string `json:"admin,omitempty"`
}

InstantiateMsg will create a new contract instance from a previously uploaded CodeID. This allows one contract to spawn "sub-contracts".

func (InstantiateMsg) MarshalJSON

func (v InstantiateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (InstantiateMsg) MarshalTinyJSON

func (v InstantiateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (InstantiateMsg) ToMsg

func (m InstantiateMsg) ToMsg() CosmosMsg

func (*InstantiateMsg) UnmarshalJSON

func (v *InstantiateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*InstantiateMsg) UnmarshalTinyJSON

func (v *InstantiateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type InvalidBase64

type InvalidBase64 struct {
	Msg string
}

func (InvalidBase64) Error

func (e InvalidBase64) Error() string

type InvalidDataSize

type InvalidDataSize struct {
	Expected uint64
	Actual   uint64
}

func (InvalidDataSize) Error

func (e InvalidDataSize) Error() string

type InvalidRequest

type InvalidRequest struct {
	Err     string `json:"error"`
	Request []byte `json:"request"`
}

func (InvalidRequest) Error

func (e InvalidRequest) Error() string

func (InvalidRequest) MarshalJSON

func (v InvalidRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (InvalidRequest) MarshalTinyJSON

func (v InvalidRequest) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*InvalidRequest) UnmarshalJSON

func (v *InvalidRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*InvalidRequest) UnmarshalTinyJSON

func (v *InvalidRequest) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type InvalidResponse

type InvalidResponse struct {
	Err      string `json:"error"`
	Response []byte `json:"response"`
}

func (InvalidResponse) Error

func (e InvalidResponse) Error() string

func (InvalidResponse) MarshalJSON

func (v InvalidResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (InvalidResponse) MarshalTinyJSON

func (v InvalidResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*InvalidResponse) UnmarshalJSON

func (v *InvalidResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*InvalidResponse) UnmarshalTinyJSON

func (v *InvalidResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type InvalidUtf8

type InvalidUtf8 struct {
	Msg string
}

func (InvalidUtf8) Error

func (e InvalidUtf8) Error() string

type ListChannelsQuery

type ListChannelsQuery struct {
	// optional argument
	PortID string `json:"port_id,omitempty"`
}

ListChannelsQuery is an IBCQuery that lists all channels that are bound to a given port. If `PortID` is unset, this list all channels bound to the contract's port. Returns a `ListChannelsResponse`. This is the counterpart of [IbcQuery::ListChannels](https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta1/packages/std/src/ibc.rs#L70-L73).

func (ListChannelsQuery) MarshalJSON

func (v ListChannelsQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ListChannelsQuery) MarshalTinyJSON

func (v ListChannelsQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ListChannelsQuery) ToQuery

func (m ListChannelsQuery) ToQuery() QueryRequest

func (*ListChannelsQuery) UnmarshalJSON

func (v *ListChannelsQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ListChannelsQuery) UnmarshalTinyJSON

func (v *ListChannelsQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ListChannelsResponse

type ListChannelsResponse struct {
	Channels []IBCChannel `json:"channels,emptyslice"`
}

func (ListChannelsResponse) MarshalJSON

func (v ListChannelsResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ListChannelsResponse) MarshalTinyJSON

func (v ListChannelsResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ListChannelsResponse) UnmarshalJSON

func (v *ListChannelsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ListChannelsResponse) UnmarshalTinyJSON

func (v *ListChannelsResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type MessageInfo

type MessageInfo struct {
	// binary encoding of sdk.AccAddress executing the contract
	Sender string `json:"sender"`
	// amount of funds send to the contract along with this message
	Funds []Coin `json:"funds,emptyslice"`
}

func (MessageInfo) MarshalJSON

func (v MessageInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (MessageInfo) MarshalTinyJSON

func (v MessageInfo) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*MessageInfo) UnmarshalJSON

func (v *MessageInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*MessageInfo) UnmarshalTinyJSON

func (v *MessageInfo) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type MigrateMsg

type MigrateMsg struct {
	// ContractAddr is the sdk.AccAddress of the target contract, to migrate.
	ContractAddr string `json:"contract_addr"`
	// NewCodeID is the reference to the wasm byte code for the new logic to migrate to
	NewCodeID uint64 `json:"new_code_id"`
	// Msg is assumed to be a json-encoded message, which will be passed directly
	// as `userMsg` when calling `Migrate` on the above-defined contract
	Msg []byte `json:"msg,omitempty"`
}

MigrateMsg will migrate an existing contract from it's current wasm code (logic) to another previously uploaded wasm code. It requires the calling contract to be listed as "admin" of the contract to be migrated.

func (MigrateMsg) MarshalJSON

func (v MigrateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (MigrateMsg) MarshalTinyJSON

func (v MigrateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (MigrateMsg) ToMsg

func (m MigrateMsg) ToMsg() CosmosMsg

func (*MigrateMsg) UnmarshalJSON

func (v *MigrateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*MigrateMsg) UnmarshalTinyJSON

func (v *MigrateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type NoSuchContract

type NoSuchContract struct {
	Addr string `json:"addr,omitempty"`
}

func (NoSuchContract) Error

func (e NoSuchContract) Error() string

func (NoSuchContract) MarshalJSON

func (v NoSuchContract) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (NoSuchContract) MarshalTinyJSON

func (v NoSuchContract) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*NoSuchContract) UnmarshalJSON

func (v *NoSuchContract) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*NoSuchContract) UnmarshalTinyJSON

func (v *NoSuchContract) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type NotFound

type NotFound struct {
	Kind string
}

func (NotFound) Error

func (e NotFound) Error() string

type NullPointer

type NullPointer struct{}

func (NullPointer) Error

func (e NullPointer) Error() string

type OutOfGasError

type OutOfGasError struct{}

func (OutOfGasError) Error

func (o OutOfGasError) Error() string

type Overflow

type Overflow struct {
	Operation string
	Op1       string
	Op2       string
}

func OverflowError

func OverflowError(Operation string, Op1 string, Op2 string) Overflow

func (Overflow) Error

func (e Overflow) Error() string

type ParseErr

type ParseErr struct {
	Target string
	Msg    string
}

func ParseError

func ParseError(target string, msg string) ParseErr

func (ParseErr) Error

func (e ParseErr) Error() string

type PortIDQuery

type PortIDQuery struct{}

func (PortIDQuery) MarshalJSON

func (v PortIDQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (PortIDQuery) MarshalTinyJSON

func (v PortIDQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (PortIDQuery) ToQuery

func (m PortIDQuery) ToQuery() QueryRequest

func (*PortIDQuery) UnmarshalJSON

func (v *PortIDQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*PortIDQuery) UnmarshalTinyJSON

func (v *PortIDQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type PortIDResponse

type PortIDResponse struct {
	PortID string `json:"port_id"`
}

func (PortIDResponse) MarshalJSON

func (v PortIDResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (PortIDResponse) MarshalTinyJSON

func (v PortIDResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*PortIDResponse) UnmarshalJSON

func (v *PortIDResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*PortIDResponse) UnmarshalTinyJSON

func (v *PortIDResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type QuerierResult

type QuerierResult struct {
	Ok  *QueryResponse `json:"ok,omitempty"`
	Err *SystemError   `json:"error,omitempty"`
}

This is a 2-level result

func (QuerierResult) MarshalJSON

func (v QuerierResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (QuerierResult) MarshalTinyJSON

func (v QuerierResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*QuerierResult) UnmarshalJSON

func (v *QuerierResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*QuerierResult) UnmarshalTinyJSON

func (v *QuerierResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type QueryRequest

type QueryRequest struct {
	Bank     *BankQuery     `json:"bank,omitempty"`
	Custom   RawMessage     `json:"custom,omitempty"`
	IBC      *IBCQuery      `json:"ibc,omitempty"`
	Staking  *StakingQuery  `json:"staking,omitempty"`
	Stargate *StargateQuery `json:"stargate,omitempty"`
	Wasm     *WasmQuery     `json:"wasm,omitempty"`
}

QueryRequest is an rust enum and only (exactly) one of the fields should be set Should we do a cleaner approach in Go? (type/data?)

func (QueryRequest) MarshalJSON

func (v QueryRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (QueryRequest) MarshalTinyJSON

func (v QueryRequest) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (QueryRequest) ToQuery

func (m QueryRequest) ToQuery() QueryRequest

Return self to allow this also to be passed as args that expect a variant

func (*QueryRequest) UnmarshalJSON

func (v *QueryRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*QueryRequest) UnmarshalTinyJSON

func (v *QueryRequest) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type QueryResponse

type QueryResponse struct {
	Ok  []byte `json:"ok,omitempty"`
	Err string `json:"error,omitempty"`
}

type queryResponseImpl struct {

func BuildQueryResponse

func BuildQueryResponse(msg string) *QueryResponse

TODO: I think this can be removed (we may need to update calling code)

func BuildQueryResponseBinary

func BuildQueryResponseBinary(msg []byte) *QueryResponse

func (QueryResponse) Data

func (q QueryResponse) Data() ([]byte, error)

func (QueryResponse) MarshalJSON

func (v QueryResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (QueryResponse) MarshalTinyJSON

func (v QueryResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*QueryResponse) UnmarshalJSON

func (v *QueryResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*QueryResponse) UnmarshalTinyJSON

func (v *QueryResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type RawMessage

type RawMessage []byte

RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.

func (RawMessage) MarshalJSON

func (m RawMessage) MarshalJSON() ([]byte, error)

MarshalJSON returns m as the JSON encoding of m.

func (*RawMessage) UnmarshalJSON

func (m *RawMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *m to a copy of data.

type RawQuery

type RawQuery struct {
	ContractAddr string `json:"contract_addr"`
	Key          []byte `json:"key"`
}

RawQuery response is raw bytes ([]byte)

func (RawQuery) MarshalJSON

func (v RawQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (RawQuery) MarshalTinyJSON

func (v RawQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (RawQuery) ToQuery

func (m RawQuery) ToQuery() QueryRequest

func (*RawQuery) UnmarshalJSON

func (v *RawQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*RawQuery) UnmarshalTinyJSON

func (v *RawQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type RedelegateMsg

type RedelegateMsg struct {
	SrcValidator string `json:"src_validator"`
	DstValidator string `json:"dst_validator"`
	Amount       Coin   `json:"amount"`
}

func (RedelegateMsg) MarshalJSON

func (v RedelegateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (RedelegateMsg) MarshalTinyJSON

func (v RedelegateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (RedelegateMsg) ToMsg

func (m RedelegateMsg) ToMsg() CosmosMsg

func (*RedelegateMsg) UnmarshalJSON

func (v *RedelegateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*RedelegateMsg) UnmarshalTinyJSON

func (v *RedelegateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Reply

type Reply struct {
	ID     uint64        `json:"id"`
	Result SubcallResult `json:"result"`
}

func (Reply) MarshalJSON

func (v Reply) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Reply) MarshalTinyJSON

func (v Reply) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Reply) UnmarshalJSON

func (v *Reply) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Reply) UnmarshalTinyJSON

func (v *Reply) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Response

type Response struct {
	// Messages comes directly from the contract and is its request for action.
	// If the ReplyOn value matches the result, the runtime will invoke this
	// contract's `reply` entry point after execution. Otherwise, this is all
	// "fire and forget".
	Messages []SubMsg `json:"messages,emptyslice"`
	// base64-encoded bytes to return as ABCI.Data field
	Data []byte `json:"data,omitempty"`
	// attributes for a log event to return over abci interface
	Attributes []EventAttribute `json:"attributes,emptyslice"`
	// custom events (separate from the main one that contains the attributes
	// above)
	Events []Event `json:"events,emptyslice"`
}

Response defines the return value on a successful instantiate/execute/migrate. This is the counterpart of Response(https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta1/packages/std/src/results/response.rs#L73-L88)

func (Response) MarshalJSON

func (v Response) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Response) MarshalTinyJSON

func (v Response) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Response) UnmarshalJSON

func (v *Response) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Response) UnmarshalTinyJSON

func (v *Response) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SendMsg

type SendMsg struct {
	ToAddress string `json:"to_address"`
	Amount    []Coin `json:"amount,emptyslice"`
}

SendMsg contains instructions for a Cosmos-SDK/SendMsg It has a fixed interface here and should be converted into the proper SDK format before dispatching

func (SendMsg) MarshalJSON

func (v SendMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SendMsg) MarshalTinyJSON

func (v SendMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (SendMsg) ToMsg

func (m SendMsg) ToMsg() CosmosMsg

func (*SendMsg) UnmarshalJSON

func (v *SendMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SendMsg) UnmarshalTinyJSON

func (v *SendMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SendPacketMsg

type SendPacketMsg struct {
	ChannelID string     `json:"channel_id"`
	Data      []byte     `json:"data"`
	Timeout   IBCTimeout `json:"timeout"`
}

func (SendPacketMsg) MarshalJSON

func (v SendPacketMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SendPacketMsg) MarshalTinyJSON

func (v SendPacketMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (SendPacketMsg) ToMsg

func (m SendPacketMsg) ToMsg() CosmosMsg

func (*SendPacketMsg) UnmarshalJSON

func (v *SendPacketMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SendPacketMsg) UnmarshalTinyJSON

func (v *SendPacketMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SerializeErr

type SerializeErr struct {
	Source string
	Msg    string
}

func SerializeError

func SerializeError(source string, msg string) SerializeErr

func (SerializeErr) Error

func (e SerializeErr) Error() string

type SetWithdrawAddressMsg

type SetWithdrawAddressMsg struct {
	// Address contains the `delegator_address` of a MsgSetWithdrawAddress
	Address string `json:"address"`
}

SetWithdrawAddressMsg is translated to a [MsgSetWithdrawAddress](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L29-L37). `delegator_address` is automatically filled with the current contract's address.

func (SetWithdrawAddressMsg) MarshalJSON

func (v SetWithdrawAddressMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SetWithdrawAddressMsg) MarshalTinyJSON

func (v SetWithdrawAddressMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (SetWithdrawAddressMsg) ToMsg

func (m SetWithdrawAddressMsg) ToMsg() CosmosMsg

func (*SetWithdrawAddressMsg) UnmarshalJSON

func (v *SetWithdrawAddressMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SetWithdrawAddressMsg) UnmarshalTinyJSON

func (v *SetWithdrawAddressMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SmartQuery

type SmartQuery struct {
	ContractAddr string `json:"contract_addr"`
	Msg          []byte `json:"msg"`
}

SmartQuery respone is raw bytes ([]byte)

func (SmartQuery) MarshalJSON

func (v SmartQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SmartQuery) MarshalTinyJSON

func (v SmartQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (SmartQuery) ToQuery

func (m SmartQuery) ToQuery() QueryRequest

func (*SmartQuery) UnmarshalJSON

func (v *SmartQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SmartQuery) UnmarshalTinyJSON

func (v *SmartQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type StakingMsg

type StakingMsg struct {
	Delegate   *DelegateMsg   `json:"delegate,omitempty"`
	Undelegate *UndelegateMsg `json:"undelegate,omitempty"`
	Redelegate *RedelegateMsg `json:"redelegate,omitempty"`
}

func (StakingMsg) MarshalJSON

func (v StakingMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (StakingMsg) MarshalTinyJSON

func (v StakingMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (StakingMsg) ToMsg

func (m StakingMsg) ToMsg() CosmosMsg

func (*StakingMsg) UnmarshalJSON

func (v *StakingMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*StakingMsg) UnmarshalTinyJSON

func (v *StakingMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type StakingQuery

type StakingQuery struct {
	AllValidators  *AllValidatorsQuery  `json:"all_validators,omitempty"`
	Validator      *ValidatorQuery      `json:"validator,omitempty"`
	AllDelegations *AllDelegationsQuery `json:"all_delegations,omitempty"`
	Delegation     *DelegationQuery     `json:"delegation,omitempty"`
	BondedDenom    *BondedDenomQuery    `json:"bonded_denom,omitempty"`
}

func (StakingQuery) MarshalJSON

func (v StakingQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (StakingQuery) MarshalTinyJSON

func (v StakingQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (StakingQuery) ToQuery

func (m StakingQuery) ToQuery() QueryRequest

func (*StakingQuery) UnmarshalJSON

func (v *StakingQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*StakingQuery) UnmarshalTinyJSON

func (v *StakingQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type StargateMsg

type StargateMsg struct {
	TypeURL string `json:"type_url"`
	Value   []byte `json:"value"`
}

StargateMsg is encoded the same way as a protobof [Any](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). This is the same structure as messages in `TxBody` from [ADR-020](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-020-protobuf-transaction-encoding.md)

func (StargateMsg) MarshalJSON

func (v StargateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (StargateMsg) MarshalTinyJSON

func (v StargateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (StargateMsg) ToMsg

func (m StargateMsg) ToMsg() CosmosMsg

func (*StargateMsg) UnmarshalJSON

func (v *StargateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*StargateMsg) UnmarshalTinyJSON

func (v *StargateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type StargateQuery

type StargateQuery struct {
	// this is the fully qualified service path used for routing,
	// eg. custom/cosmos_sdk.x.bank.v1.Query/QueryBalance
	Path string `json:"path"`
	// this is the expected protobuf message type (not any), binary encoded
	Data []byte `json:"data"`
}

A Stargate query encoded the same way as abci_query, with path and protobuf encoded Data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md) The response is also protobuf encoded. The caller is responsible for compiling the proper protobuf definitions

func (StargateQuery) MarshalJSON

func (v StargateQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (StargateQuery) MarshalTinyJSON

func (v StargateQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (StargateQuery) ToQuery

func (m StargateQuery) ToQuery() QueryRequest

func (*StargateQuery) UnmarshalJSON

func (v *StargateQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*StargateQuery) UnmarshalTinyJSON

func (v *StargateQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type StargateResponse

type StargateResponse struct {
	Response []byte `json:"response"`
}

This is the protobuf response, binary encoded. The caller is responsible for knowing how to parse.

func (StargateResponse) MarshalJSON

func (v StargateResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (StargateResponse) MarshalTinyJSON

func (v StargateResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*StargateResponse) UnmarshalJSON

func (v *StargateResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*StargateResponse) UnmarshalTinyJSON

func (v *StargateResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SubMsg

type SubMsg struct {
	ID       uint64    `json:"id"`
	Msg      CosmosMsg `json:"msg"`
	GasLimit *uint64   `json:"gas_limit,omitempty"`
	ReplyOn  string    `json:"reply_on"`
}

SubMsg wraps a CosmosMsg with some metadata for handling replies (ID) and optionally limiting the gas usage (GasLimit)

func AlwaysReply

func AlwaysReply(msg ToMsg, id uint64) SubMsg

func NewSubMsg

func NewSubMsg(msg ToMsg) SubMsg

func ReplyOnError

func ReplyOnError(msg ToMsg, id uint64) SubMsg

func ReplyOnSuccess

func ReplyOnSuccess(msg ToMsg, id uint64) SubMsg

func (SubMsg) MarshalJSON

func (v SubMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SubMsg) MarshalTinyJSON

func (v SubMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*SubMsg) UnmarshalJSON

func (v *SubMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SubMsg) UnmarshalTinyJSON

func (v *SubMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SubcallResponse

type SubcallResponse struct {
	Events []Event `json:"events,emptyslice"`
	Data   []byte  `json:"data,omitempty"`
}

func (SubcallResponse) MarshalJSON

func (v SubcallResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SubcallResponse) MarshalTinyJSON

func (v SubcallResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*SubcallResponse) UnmarshalJSON

func (v *SubcallResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SubcallResponse) UnmarshalTinyJSON

func (v *SubcallResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SubcallResult

type SubcallResult struct {
	Ok  *SubcallResponse `json:"ok,omitempty"`
	Err string           `json:"error,omitempty"`
}

SubcallResult is the raw response we return from the sdk -> reply after executing a SubMsg. This is mirrors Rust's ContractResult<SubcallResponse>.

func (SubcallResult) MarshalJSON

func (v SubcallResult) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SubcallResult) MarshalTinyJSON

func (v SubcallResult) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*SubcallResult) UnmarshalJSON

func (v *SubcallResult) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SubcallResult) UnmarshalTinyJSON

func (v *SubcallResult) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type SystemError

type SystemError struct {
	InvalidRequest     *InvalidRequest     `json:"invalid_request,omitempty"`
	InvalidResponse    *InvalidResponse    `json:"invalid_response,omitempty"`
	NoSuchContract     *NoSuchContract     `json:"no_such_contract,omitempty"`
	Unknown            *Unknown            `json:"unknown,omitempty"`
	UnsupportedRequest *UnsupportedRequest `json:"unsupported_request,omitempty"`
}

SystemError captures all errors returned from the Rust code as SystemError. Exactly one of the fields should be set.

func ToSystemError

func ToSystemError(err error) *SystemError

ToSystemError will try to convert the given error to an SystemError. This is important to returning any Go error back to Rust.

If it is already StdError, return self. If it is an error, which could be a sub-field of StdError, embed it. If it is anything else, **return nil**

This may return nil on an unknown error, whereas ToStdError will always create a valid error type.

func (SystemError) Error

func (a SystemError) Error() string

func (SystemError) MarshalJSON

func (v SystemError) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (SystemError) MarshalTinyJSON

func (v SystemError) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*SystemError) UnmarshalJSON

func (v *SystemError) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*SystemError) UnmarshalTinyJSON

func (v *SystemError) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ToMsg

type ToMsg interface {
	ToMsg() CosmosMsg
}

ToMsg can be implemented by any variant of CosmosMsg to easily be wrapped. We can then use this interface in various function arguments

type ToQuery

type ToQuery interface {
	ToQuery() QueryRequest
}

ToQuery can be implemented by any variant of QueryRequest to easily be wrapped. We can then use this interface in various function arguments

type TransactionInfo

type TransactionInfo struct {
	// Position of this transaction in the block.
	// The first transaction has index 0
	//
	// Along with BlockInfo.Height, this allows you to get a unique
	// transaction identifier for the chain for future queries
	Index uint32 `json:"index"`
}

func (TransactionInfo) MarshalJSON

func (v TransactionInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (TransactionInfo) MarshalTinyJSON

func (v TransactionInfo) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*TransactionInfo) UnmarshalJSON

func (v *TransactionInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*TransactionInfo) UnmarshalTinyJSON

func (v *TransactionInfo) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type TransferMsg

type TransferMsg struct {
	ChannelID string     `json:"channel_id"`
	ToAddress string     `json:"to_address"`
	Amount    Coin       `json:"amount"`
	Timeout   IBCTimeout `json:"timeout"`
}

func (TransferMsg) MarshalJSON

func (v TransferMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (TransferMsg) MarshalTinyJSON

func (v TransferMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (TransferMsg) ToMsg

func (m TransferMsg) ToMsg() CosmosMsg

func (*TransferMsg) UnmarshalJSON

func (v *TransferMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*TransferMsg) UnmarshalTinyJSON

func (v *TransferMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type UFraction

type UFraction struct {
	Numerator   uint64
	Denominator uint64
}

func (UFraction) Floor

func (f UFraction) Floor() uint64

func (UFraction) MarshalJSON

func (v UFraction) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (UFraction) MarshalTinyJSON

func (v UFraction) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*UFraction) Mul

func (f *UFraction) Mul(m uint64) UFraction

func (*UFraction) UnmarshalJSON

func (v *UFraction) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*UFraction) UnmarshalTinyJSON

func (v *UFraction) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Unauthorized

type Unauthorized struct{}

func (Unauthorized) Error

func (e Unauthorized) Error() string

type UndelegateMsg

type UndelegateMsg struct {
	Validator string `json:"validator"`
	Amount    Coin   `json:"amount"`
}

func (UndelegateMsg) MarshalJSON

func (v UndelegateMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (UndelegateMsg) MarshalTinyJSON

func (v UndelegateMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (UndelegateMsg) ToMsg

func (m UndelegateMsg) ToMsg() CosmosMsg

func (*UndelegateMsg) UnmarshalJSON

func (v *UndelegateMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*UndelegateMsg) UnmarshalTinyJSON

func (v *UndelegateMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Underflow

type Underflow struct {
	Minuend    string
	Subtrahend string
}

func (Underflow) Error

func (e Underflow) Error() string

type Unknown

type Unknown struct{}

func (Unknown) Error

func (e Unknown) Error() string

func (Unknown) MarshalJSON

func (v Unknown) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Unknown) MarshalTinyJSON

func (v Unknown) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Unknown) UnmarshalJSON

func (v *Unknown) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Unknown) UnmarshalTinyJSON

func (v *Unknown) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type UnsupportedRequest

type UnsupportedRequest struct {
	Kind string `json:"kind,omitempty"`
}

func (UnsupportedRequest) Error

func (e UnsupportedRequest) Error() string

func (UnsupportedRequest) MarshalJSON

func (v UnsupportedRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (UnsupportedRequest) MarshalTinyJSON

func (v UnsupportedRequest) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*UnsupportedRequest) UnmarshalJSON

func (v *UnsupportedRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*UnsupportedRequest) UnmarshalTinyJSON

func (v *UnsupportedRequest) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type UpdateAdminMsg

type UpdateAdminMsg struct {
	// ContractAddr is the sdk.AccAddress of the target contract.
	ContractAddr string `json:"contract_addr"`
	// Admin is the sdk.AccAddress of the new admin.
	Admin string `json:"admin"`
}

UpdateAdminMsg is the Go counterpart of WasmMsg::UpdateAdmin (https://github.com/CosmWasm/cosmwasm/blob/v0.14.0-beta5/packages/std/src/results/cosmos_msg.rs#L158-L160).

func (UpdateAdminMsg) MarshalJSON

func (v UpdateAdminMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (UpdateAdminMsg) MarshalTinyJSON

func (v UpdateAdminMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (UpdateAdminMsg) ToMsg

func (m UpdateAdminMsg) ToMsg() CosmosMsg

func (*UpdateAdminMsg) UnmarshalJSON

func (v *UpdateAdminMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*UpdateAdminMsg) UnmarshalTinyJSON

func (v *UpdateAdminMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type Validator

type Validator struct {
	Address string `json:"address"`
	// decimal string, eg "0.02"
	Commission string `json:"commission"`
	// decimal string, eg "0.02"
	MaxCommission string `json:"max_commission"`
	// decimal string, eg "0.02"
	MaxChangeRate string `json:"max_change_rate"`
}

func (Validator) MarshalJSON

func (v Validator) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (Validator) MarshalTinyJSON

func (v Validator) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*Validator) UnmarshalJSON

func (v *Validator) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Validator) UnmarshalTinyJSON

func (v *Validator) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ValidatorQuery

type ValidatorQuery struct {
	/// Address is the validator's address (e.g. cosmosvaloper1...)
	Address string `json:"address"`
}

func (ValidatorQuery) MarshalJSON

func (v ValidatorQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ValidatorQuery) MarshalTinyJSON

func (v ValidatorQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (ValidatorQuery) ToQuery

func (m ValidatorQuery) ToQuery() QueryRequest

func (*ValidatorQuery) UnmarshalJSON

func (v *ValidatorQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ValidatorQuery) UnmarshalTinyJSON

func (v *ValidatorQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type ValidatorResponse

type ValidatorResponse struct {
	Validator *Validator `json:"validator"` // serializes to `null` when unset which matches Rust's Option::None serialization
}

ValidatorResponse is the expected response to ValidatorQuery

func (ValidatorResponse) MarshalJSON

func (v ValidatorResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (ValidatorResponse) MarshalTinyJSON

func (v ValidatorResponse) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (*ValidatorResponse) UnmarshalJSON

func (v *ValidatorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*ValidatorResponse) UnmarshalTinyJSON

func (v *ValidatorResponse) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type VoteMsg

type VoteMsg struct {
	ProposalId uint64 `json:"proposal_id"`
	Vote       string `json:"vote"`
}

func (VoteMsg) MarshalJSON

func (v VoteMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (VoteMsg) MarshalTinyJSON

func (v VoteMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (VoteMsg) ToMsg

func (m VoteMsg) ToMsg() CosmosMsg

func (*VoteMsg) UnmarshalJSON

func (v *VoteMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*VoteMsg) UnmarshalTinyJSON

func (v *VoteMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type WasmMsg

type WasmMsg struct {
	Execute     *ExecuteMsg     `json:"execute,omitempty"`
	Instantiate *InstantiateMsg `json:"instantiate,omitempty"`
	Migrate     *MigrateMsg     `json:"migrate,omitempty"`
	UpdateAdmin *UpdateAdminMsg `json:"update_admin,omitempty"`
	ClearAdmin  *ClearAdminMsg  `json:"clear_admin,omitempty"`
}

func (WasmMsg) MarshalJSON

func (v WasmMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (WasmMsg) MarshalTinyJSON

func (v WasmMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (WasmMsg) ToMsg

func (m WasmMsg) ToMsg() CosmosMsg

func (*WasmMsg) UnmarshalJSON

func (v *WasmMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*WasmMsg) UnmarshalTinyJSON

func (v *WasmMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type WasmQuery

type WasmQuery struct {
	Smart        *SmartQuery        `json:"smart,omitempty"`
	Raw          *RawQuery          `json:"raw,omitempty"`
	ContractInfo *ContractInfoQuery `json:"contract_info,omitempty"`
}

func (WasmQuery) MarshalJSON

func (v WasmQuery) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (WasmQuery) MarshalTinyJSON

func (v WasmQuery) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (WasmQuery) ToQuery

func (m WasmQuery) ToQuery() QueryRequest

func (*WasmQuery) UnmarshalJSON

func (v *WasmQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*WasmQuery) UnmarshalTinyJSON

func (v *WasmQuery) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

type WithdrawDelegatorRewardMsg

type WithdrawDelegatorRewardMsg struct {
	// Validator contains `validator_address` of a MsgWithdrawDelegatorReward
	Validator string `json:"validator"`
}

WithdrawDelegatorRewardMsg is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.

func (WithdrawDelegatorRewardMsg) MarshalJSON

func (v WithdrawDelegatorRewardMsg) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (WithdrawDelegatorRewardMsg) MarshalTinyJSON

func (v WithdrawDelegatorRewardMsg) MarshalTinyJSON(w *jwriter.Writer)

MarshalTinyJSON supports tinyjson.Marshaler interface

func (WithdrawDelegatorRewardMsg) ToMsg

func (*WithdrawDelegatorRewardMsg) UnmarshalJSON

func (v *WithdrawDelegatorRewardMsg) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*WithdrawDelegatorRewardMsg) UnmarshalTinyJSON

func (v *WithdrawDelegatorRewardMsg) UnmarshalTinyJSON(l *jlexer.Lexer)

UnmarshalTinyJSON supports tinyjson.Unmarshaler interface

Jump to

Keyboard shortcuts

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