keeper

package
v0.0.0-...-bd096cc Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: LGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	*keeper.Keeper
	// contains filtered or unexported fields
}

Keeper defines the modified IBC transfer keeper that embeds the original one. It also contains the bank keeper and the erc20 keeper to support ERC20 tokens to be sent via IBC.

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	paramSpace paramtypes.Subspace,

	ics4Wrapper porttypes.ICS4Wrapper,
	channelKeeper transfertypes.ChannelKeeper,
	portKeeper transfertypes.PortKeeper,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	scopedKeeper capabilitykeeper.ScopedKeeper,
	erc20Keeper types.ERC20Keeper,
) Keeper

NewKeeper creates a new IBC transfer Keeper instance

func (Keeper) Transfer

func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.MsgTransferResponse, error)

Transfer defines a gRPC msg server method for MsgTransfer. This implementation overrides the default ICS20 transfer's by converting the ERC20 tokens to their Cosmos representation if the token pair has been registered through governance. If user doesn't have enough balance of coin, it will attempt to convert ERC20 tokens to the coin denomination, and continue with a regular transfer.

Jump to

Keyboard shortcuts

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