Documentation ¶
Index ¶
- Constants
- func GenericError(msg string) error
- type AllBalancesQuery
- type AllBalancesResponse
- type AllDelegationsQuery
- func (v AllDelegationsQuery) MarshalJSON() ([]byte, error)
- func (v AllDelegationsQuery) MarshalTinyJSON(w *jwriter.Writer)
- func (m AllDelegationsQuery) ToQuery() QueryRequest
- func (v *AllDelegationsQuery) UnmarshalJSON(data []byte) error
- func (v *AllDelegationsQuery) UnmarshalTinyJSON(l *jlexer.Lexer)
- type AllDelegationsResponse
- type AllValidatorsQuery
- type AllValidatorsResponse
- type BalanceQuery
- type BalanceResponse
- type BankMsg
- type BankQuery
- type BlockInfo
- type BondedDenomQuery
- type BondedDenomResponse
- type BurnMsg
- type CanonicalAddress
- type ChannelQuery
- type ChannelResponse
- type ClearAdminMsg
- type CloseChannelMsg
- type Coin
- type ContractInfo
- type ContractInfoQuery
- type ContractInfoResponse
- type ContractResult
- type CosmosMsg
- type DelegateMsg
- type Delegation
- type DelegationQuery
- type DelegationResponse
- type DistributionMsg
- type DivideByZero
- type Env
- type Event
- type EventAttribute
- type ExecuteMsg
- type Fraction
- type FullDelegation
- type GenericErr
- type GovMsg
- type HumanAddress
- type IBCAcknowledgement
- type IBCBasicResponse
- type IBCBasicResult
- type IBCChannel
- type IBCChannelCloseMsg
- func (msg IBCChannelCloseMsg) GetChannel() IBCChannel
- func (v IBCChannelCloseMsg) MarshalJSON() ([]byte, error)
- func (v IBCChannelCloseMsg) MarshalTinyJSON(w *jwriter.Writer)
- func (v *IBCChannelCloseMsg) UnmarshalJSON(data []byte) error
- func (v *IBCChannelCloseMsg) UnmarshalTinyJSON(l *jlexer.Lexer)
- type IBCChannelConnectMsg
- func (msg IBCChannelConnectMsg) GetChannel() IBCChannel
- func (msg IBCChannelConnectMsg) GetCounterVersion() (ver string, ok bool)
- func (v IBCChannelConnectMsg) MarshalJSON() ([]byte, error)
- func (v IBCChannelConnectMsg) MarshalTinyJSON(w *jwriter.Writer)
- func (v *IBCChannelConnectMsg) UnmarshalJSON(data []byte) error
- func (v *IBCChannelConnectMsg) UnmarshalTinyJSON(l *jlexer.Lexer)
- type IBCChannelOpenMsg
- func (msg IBCChannelOpenMsg) GetChannel() IBCChannel
- func (msg IBCChannelOpenMsg) GetCounterVersion() (ver string, ok bool)
- func (v IBCChannelOpenMsg) MarshalJSON() ([]byte, error)
- func (v IBCChannelOpenMsg) MarshalTinyJSON(w *jwriter.Writer)
- func (v *IBCChannelOpenMsg) UnmarshalJSON(data []byte) error
- func (v *IBCChannelOpenMsg) UnmarshalTinyJSON(l *jlexer.Lexer)
- type IBCChannelOpenResult
- type IBCCloseConfirm
- type IBCCloseInit
- type IBCEndpoint
- type IBCMsg
- type IBCOpenAck
- type IBCOpenConfirm
- type IBCOpenInit
- type IBCOpenTry
- type IBCOrder
- type IBCPacket
- type IBCPacketAckMsg
- type IBCPacketReceiveMsg
- type IBCPacketTimeoutMsg
- type IBCQuery
- type IBCReceiveResponse
- type IBCReceiveResult
- type IBCTimeout
- type IBCTimeoutBlock
- type InstantiateMsg
- type InvalidBase64
- type InvalidDataSize
- type InvalidRequest
- type InvalidResponse
- type InvalidUtf8
- type ListChannelsQuery
- type ListChannelsResponse
- type MessageInfo
- type MigrateMsg
- type NoSuchContract
- type NotFound
- type NullPointer
- type OutOfGasError
- type Overflow
- type ParseErr
- type PortIDQuery
- type PortIDResponse
- type QuerierResult
- type QueryRequest
- type QueryResponse
- type RawMessage
- type RawQuery
- type RedelegateMsg
- type Reply
- type Response
- type SendMsg
- type SendPacketMsg
- type SerializeErr
- type SetWithdrawAddressMsg
- func (v SetWithdrawAddressMsg) MarshalJSON() ([]byte, error)
- func (v SetWithdrawAddressMsg) MarshalTinyJSON(w *jwriter.Writer)
- func (m SetWithdrawAddressMsg) ToMsg() CosmosMsg
- func (v *SetWithdrawAddressMsg) UnmarshalJSON(data []byte) error
- func (v *SetWithdrawAddressMsg) UnmarshalTinyJSON(l *jlexer.Lexer)
- type SmartQuery
- type StakingMsg
- type StakingQuery
- type StargateMsg
- type StargateQuery
- type StargateResponse
- type SubMsg
- type SubcallResponse
- type SubcallResult
- type SystemError
- type ToMsg
- type ToQuery
- type TransactionInfo
- type TransferMsg
- type UFraction
- type Unauthorized
- type UndelegateMsg
- type Underflow
- type Unknown
- type UnsupportedRequest
- type UpdateAdminMsg
- type Validator
- type ValidatorQuery
- type ValidatorResponse
- type VoteMsg
- type WasmMsg
- type WasmQuery
- type WithdrawDelegatorRewardMsg
- func (v WithdrawDelegatorRewardMsg) MarshalJSON() ([]byte, error)
- func (v WithdrawDelegatorRewardMsg) MarshalTinyJSON(w *jwriter.Writer)
- func (m WithdrawDelegatorRewardMsg) ToMsg() CosmosMsg
- func (v *WithdrawDelegatorRewardMsg) UnmarshalJSON(data []byte) error
- func (v *WithdrawDelegatorRewardMsg) UnmarshalTinyJSON(l *jlexer.Lexer)
Constants ¶
const ( VoteYes = "yes" VoteNo = "no" VoteAbstain = "abstain" VoteNoWithVeto = "no_with_veto" )
const ( ReplyAlways = "always" ReplySuccess = "success" ReplyError = "error" ReplyNever = "never" )
const Ordered = "ORDER_ORDERED"
const Unordered = "ORDER_UNORDERED"
These are the only two valid values for IbcOrder
Variables ¶
This section is empty.
Functions ¶
func GenericError ¶
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 ¶
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 ¶
func (BankMsg) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (BankMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*BankMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*BankMsg) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type BankQuery ¶
type BankQuery struct { Balance *BalanceQuery `json:"balance,omitempty"` AllBalances *AllBalancesQuery `json:"all_balances,omitempty"` }
func (BankQuery) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (BankQuery) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (BankQuery) ToQuery ¶
func (m BankQuery) ToQuery() QueryRequest
func (*BankQuery) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*BankQuery) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (BlockInfo) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*BlockInfo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*BlockInfo) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (BurnMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*BurnMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*BurnMsg) UnmarshalTinyJSON ¶
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 NewCoinFromUint64 ¶
NewCoinFromUint64 creates a new coin given an uint64 amount and denom.
func (Coin) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Coin) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (Coin) ToWasmVMCoin ¶
func (c Coin) ToWasmVMCoin() wasmVmTypes.Coin
ToWasmVMCoin convert Coin to WasmVM type.
func (*Coin) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Coin) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (CosmosMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*CosmosMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*CosmosMsg) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type DelegateMsg ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (Env) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Env) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Env) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Event ¶
type Event struct { Type string `json:"type"` Attributes []EventAttribute `json:"attributes,emptyslice"` }
func (Event) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Event) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Event) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Event) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type EventAttribute ¶
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 ¶
func (Fraction) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Fraction) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Fraction) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Fraction) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (GovMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*GovMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*GovMsg) UnmarshalTinyJSON ¶
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 (m *IBCCloseConfirm) ToMsg() IBCChannelCloseMsg
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 ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (IBCMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*IBCMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*IBCMsg) UnmarshalTinyJSON ¶
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 (m *IBCOpenConfirm) ToMsg() IBCChannelConnectMsg
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 IBCOrder ¶
type IBCOrder = string
TODO: test what the sdk Order.String() represents and how to parse back Proto files: https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/core/channel/v1/channel.proto#L69-L80 Auto-gen code: https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/x/ibc/core/04-channel/types/channel.pb.go#L70-L101
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 ¶
MarshalJSON supports json.Marshaler interface
func (IBCPacket) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*IBCPacket) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*IBCPacket) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (IBCQuery) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (IBCQuery) ToQuery ¶
func (m IBCQuery) ToQuery() QueryRequest
func (*IBCQuery) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*IBCQuery) UnmarshalTinyJSON ¶
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 ¶
func (InvalidDataSize) Error ¶
func (e InvalidDataSize) Error() string
type InvalidRequest ¶
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 ¶
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 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 ParseErr ¶
func ParseError ¶
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 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 ¶
RawQuery response is raw bytes ([]byte)
func (RawQuery) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (RawQuery) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (RawQuery) ToQuery ¶
func (m RawQuery) ToQuery() QueryRequest
func (*RawQuery) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*RawQuery) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (Reply) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Reply) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Reply) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (Response) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Response) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Response) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (SendMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*SendMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*SendMsg) UnmarshalTinyJSON ¶
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 ¶
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 ¶
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 ¶
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 ReplyOnError ¶
func ReplyOnSuccess ¶
func (SubMsg) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (SubMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*SubMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*SubMsg) UnmarshalTinyJSON ¶
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 ¶
func (UFraction) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (UFraction) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*UFraction) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*UFraction) UnmarshalTinyJSON ¶
UnmarshalTinyJSON supports tinyjson.Unmarshaler interface
type Unauthorized ¶
type Unauthorized struct{}
func (Unauthorized) Error ¶
func (e Unauthorized) Error() string
type UndelegateMsg ¶
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 Unknown ¶
type Unknown struct{}
func (Unknown) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (Unknown) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Unknown) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Unknown) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (Validator) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*Validator) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*Validator) UnmarshalTinyJSON ¶
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 ¶
func (VoteMsg) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (VoteMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*VoteMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*VoteMsg) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (WasmMsg) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (*WasmMsg) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*WasmMsg) UnmarshalTinyJSON ¶
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 ¶
MarshalJSON supports json.Marshaler interface
func (WasmQuery) MarshalTinyJSON ¶
MarshalTinyJSON supports tinyjson.Marshaler interface
func (WasmQuery) ToQuery ¶
func (m WasmQuery) ToQuery() QueryRequest
func (*WasmQuery) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
func (*WasmQuery) UnmarshalTinyJSON ¶
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 (m WithdrawDelegatorRewardMsg) ToMsg() CosmosMsg
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