Documentation ¶
Index ¶
- func ChangeAdmin(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, ...) error
- func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin
- func ConvertSdkCoinsToWasmCoins(coins []sdk.Coin) wasmvmtypes.Coins
- func CustomMessageDecorator(bank bankkeeper.Keeper, tokenFactory *tokenfactorykeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger
- func CustomQuerier(qp *QueryPlugin) func(ctx sdk.Context, request json.RawMessage) ([]byte, error)
- func GetFullDenom(contract string, subDenom string) (string, error)
- func PerformBurn(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, ...) error
- func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, ...) ([]byte, error)
- func PerformForceTransfer(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, ...) error
- func PerformMint(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, ...) error
- func PerformSetMetadata(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, ...) error
- func RegisterCustomPlugins(bank bankkeeper.Keeper, tokenFactory *tokenfactorykeeper.Keeper) []wasmkeeper.Option
- func SdkMetadataToWasm(metadata banktypes.Metadata) *bindingstypes.Metadata
- func WasmMetadataToSdk(metadata bindingstypes.Metadata) banktypes.Metadata
- type CustomMessenger
- type QueryPlugin
- func (qp QueryPlugin) GetDenomAdmin(ctx sdk.Context, denom string) (*bindingstypes.AdminResponse, error)
- func (qp QueryPlugin) GetDenomsByCreator(ctx sdk.Context, creator string) (*bindingstypes.DenomsByCreatorResponse, error)
- func (qp QueryPlugin) GetMetadata(ctx sdk.Context, denom string) (*bindingstypes.MetadataResponse, error)
- func (qp QueryPlugin) GetParams(ctx sdk.Context) (*bindingstypes.ParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeAdmin ¶
func ChangeAdmin(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, changeAdmin *bindingstypes.ChangeAdmin) error
ChangeAdmin is used with changeAdmin to validate changeAdmin messages and to dispatch.
func ConvertSdkCoinToWasmCoin ¶
func ConvertSdkCoinToWasmCoin(coin sdk.Coin) wasmvmtypes.Coin
ConvertSdkCoinToWasmCoin converts a sdk type coin to a wasm vm type coin
func ConvertSdkCoinsToWasmCoins ¶
func ConvertSdkCoinsToWasmCoins(coins []sdk.Coin) wasmvmtypes.Coins
ConvertSdkCoinsToWasmCoins converts sdk type coins to wasm vm type coins
func CustomMessageDecorator ¶
func CustomMessageDecorator(bank bankkeeper.Keeper, tokenFactory *tokenfactorykeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger
CustomMessageDecorator returns decorator for custom CosmWasm bindings messages
func CustomQuerier ¶
func CustomQuerier(qp *QueryPlugin) func(ctx sdk.Context, request json.RawMessage) ([]byte, error)
CustomQuerier dispatches custom CosmWasm bindings queries.
func GetFullDenom ¶
GetFullDenom is a function, not method, so the message_plugin can use it
func PerformBurn ¶
func PerformBurn(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, burn *bindingstypes.BurnTokens) error
PerformBurn performs token burning after validating tokenBurn message.
func PerformCreateDenom ¶
func PerformCreateDenom(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindingstypes.CreateDenom) ([]byte, error)
PerformCreateDenom is used with createDenom to create a token denom; validates the msgCreateDenom.
func PerformForceTransfer ¶
func PerformForceTransfer(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, forcetransfer *bindingstypes.ForceTransfer) error
PerformForceTransfer performs token moving after validating tokenForceTransfer message.
func PerformMint ¶
func PerformMint(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, mint *bindingstypes.MintTokens) error
PerformMint used with mintTokens to validate the mint message and mint through token factory.
func PerformSetMetadata ¶
func PerformSetMetadata(f *tokenfactorykeeper.Keeper, b bankkeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, denom string, metadata bindingstypes.Metadata) error
PerformSetMetadata is used with setMetadata to add new metadata It also is called inside CreateDenom if optional metadata field is set
func RegisterCustomPlugins ¶
func RegisterCustomPlugins( bank bankkeeper.Keeper, tokenFactory *tokenfactorykeeper.Keeper, ) []wasmkeeper.Option
func SdkMetadataToWasm ¶
func SdkMetadataToWasm(metadata banktypes.Metadata) *bindingstypes.Metadata
func WasmMetadataToSdk ¶
func WasmMetadataToSdk(metadata bindingstypes.Metadata) banktypes.Metadata
Types ¶
type CustomMessenger ¶
type CustomMessenger struct {
// contains filtered or unexported fields
}
func (*CustomMessenger) DispatchMsg ¶
func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg) ([]sdk.Event, [][]byte, error)
DispatchMsg executes on the contractMsg.
type QueryPlugin ¶
type QueryPlugin struct {
// contains filtered or unexported fields
}
func NewQueryPlugin ¶
func NewQueryPlugin(b bankkeeper.Keeper, tfk *tokenfactorykeeper.Keeper) *QueryPlugin
NewQueryPlugin returns a reference to a new QueryPlugin.
func (QueryPlugin) GetDenomAdmin ¶
func (qp QueryPlugin) GetDenomAdmin(ctx sdk.Context, denom string) (*bindingstypes.AdminResponse, error)
GetDenomAdmin is a query to get denom admin.
func (QueryPlugin) GetDenomsByCreator ¶
func (qp QueryPlugin) GetDenomsByCreator(ctx sdk.Context, creator string) (*bindingstypes.DenomsByCreatorResponse, error)
func (QueryPlugin) GetMetadata ¶
func (qp QueryPlugin) GetMetadata(ctx sdk.Context, denom string) (*bindingstypes.MetadataResponse, error)
func (QueryPlugin) GetParams ¶
func (qp QueryPlugin) GetParams(ctx sdk.Context) (*bindingstypes.ParamsResponse, error)