helpers

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCoinsForTransfer

func ConvertCoinsForTransfer(msg *sdktransfertypes.MsgTransfer, sendRegistryEntry *tokenregistrytypes.RegistryEntry,
	sendAsRegistryEntry *tokenregistrytypes.RegistryEntry) (sdk.Coin, sdk.Coin)

TODO only used in tests , remove this function completely

func ConvertIncomingCoins

func ConvertIncomingCoins(amount string, diff uint64) (sdk.Int, error)

func ExecConvForIncomingCoins

func ExecConvForIncomingCoins(
	ctx sdk.Context,
	bankKeeper sdktransfertypes.BankKeeper,
	mintedDenomEntry *tokenregistrytypes.RegistryEntry,
	convertToDenomEntry *tokenregistrytypes.RegistryEntry,
	packet channeltypes.Packet,
	data sdktransfertypes.FungibleTokenPacketData,
) error

func IncreasePrecision

func IncreasePrecision(dec sdk.Dec, po uint64) sdk.Dec

func IsRecvPacketAllowed

func IsRecvPacketAllowed(ctx sdk.Context, whitelistKeeper tokenregistrytypes.Keeper, packet channeltypes.Packet, data sdktransfertypes.FungibleTokenPacketData, mintedDenomEntry *tokenregistrytypes.RegistryEntry) bool

func PrepareToSendConvertedCoins

func PrepareToSendConvertedCoins(goCtx context.Context, msg *sdktransfertypes.MsgTransfer, token sdk.Coin, convToken sdk.Coin, bankKeeper sctransfertypes.BankKeeper) error

PrepareToSendConvertedCoins moves outgoing tokens into the denom that will be sent via IBC. The requested tokens will be escrowed, and the new denom to send over IBC will be minted in the senders account.

func ReducePrecision

func ReducePrecision(dec sdk.Dec, po uint64) sdk.Dec

Types

This section is empty.

Jump to

Keyboard shortcuts

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