wasm

package
v6.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DistributionRoute = "distribution"
)

Variables

This section is empty.

Functions

func CustomDistributionEncoder

func CustomDistributionEncoder(contract sdk.AccAddress, data json.RawMessage, version 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"`
}

Jump to

Keyboard shortcuts

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