Documentation ¶
Index ¶
Constants ¶
View Source
const (
DistributionRoute = "distribution"
)
Variables ¶
This section is empty.
Functions ¶
func CustomDistributionEncoder ¶
func CustomDistributionEncoder(contract sdk.AccAddress, data json.RawMessage, _ string) ([]sdk.Msg, error)
func MessageEncoders ¶
func MessageEncoders(registry *EncoderRegistry) *wasm.MessageEncoders
MessageEncoders provides stargaze custom encoder for contracts
Types ¶
type DistributionMsg ¶
type DistributionMsg struct {
FundCommunityPool *FundCommunityPool `json:"fund_community_pool,omitempty"`
}
type Encoder ¶
type Encoder func(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error)
Encoder describes behavior for Stargaze smart contract message encoding. The contract address must ALWAYS be set as the Msg signer.
type EncoderRegistry ¶
type EncoderRegistry struct {
// contains filtered or unexported fields
}
func NewEncoderRegistry ¶
func NewEncoderRegistry() *EncoderRegistry
NewEncoderRegistry creates a new registry for message encoders.
func (*EncoderRegistry) RegisterEncoder ¶
func (qr *EncoderRegistry) RegisterEncoder(route string, encoder Encoder)
RegisterEncoder adds a message encoder for the given route.
type FundCommunityPool ¶
type FundCommunityPool struct {
Amount wasmvmtypes.Coins `json:"amount"`
}
func (FundCommunityPool) Encode ¶
func (fcp FundCommunityPool) Encode(contract sdk.AccAddress) ([]sdk.Msg, error)
type MessageEncodeRequest ¶
type MessageEncodeRequest struct { Route string `json:"route"` MsgData json.RawMessage `json:"msg_data"` Version string `json:"version"` }
Click to show internal directories.
Click to hide internal directories.