cosmos-sdk: github.com/cosmos/cosmos-sdk/x/ibc-transfer/keeper Index | Files

package keeper

import "github.com/cosmos/cosmos-sdk/x/ibc-transfer/keeper"

Index

Package Files

keeper.go relay.go

type Keeper Uses

type Keeper struct {
    // contains filtered or unexported fields
}

Keeper defines the IBC fungible transfer keeper

func NewKeeper Uses

func NewKeeper(
    cdc codec.BinaryMarshaler, key sdk.StoreKey,
    channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper,
    authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper,
) Keeper

NewKeeper creates a new IBC transfer Keeper instance

func (Keeper) BindPort Uses

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the ort Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ChanCloseInit Uses

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function in order to expose it to the ICS20 trasfer handler.

func (Keeper) ClaimCapability Uses

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability allows the transfer module that can claim a capability that IBC module passes to it

func (Keeper) GetPort Uses

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the transfer module. Used in ExportGenesis

func (Keeper) GetTransferAccount Uses

func (k Keeper) GetTransferAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetTransferAccount returns the ICS20 - transfers ModuleAccount

func (Keeper) IsBound Uses

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks if the transfer module is already bound to the desired port

func (Keeper) Logger Uses

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) OnAcknowledgementPacket Uses

func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data types.FungibleTokenPacketData, ack types.FungibleTokenPacketAcknowledgement) error

OnAcknowledgementPacket responds to the the success or failure of a packet acknowledgement written on the receiving chain. If the acknowledgement was a success then nothing occurs. If the acknowledgement failed, then the sender is refunded their tokens using the refundPacketToken function.

func (Keeper) OnRecvPacket Uses

func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data types.FungibleTokenPacketData) error

OnRecvPacket processes a cross chain fungible token transfer. If the sender chain is the source of minted tokens then vouchers will be minted and sent to the receiving address. Otherwise if the sender chain is sending back tokens this chain originally transferred to it, the tokens are unescrowed and sent to the receiving address.

func (Keeper) OnTimeoutPacket Uses

func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data types.FungibleTokenPacketData) error

OnTimeoutPacket refunds the sender since the original packet sent was never received and has been timed out.

func (Keeper) PacketExecuted Uses

func (k Keeper) PacketExecuted(ctx sdk.Context, packet channelexported.PacketI, acknowledgement []byte) error

PacketExecuted defines a wrapper function for the channel Keeper's function in order to expose it to the ICS20 transfer handler. Keeper retrieves channel capability and passes it into channel keeper for authentication

func (Keeper) SendTransfer Uses

func (k Keeper) SendTransfer(
    ctx sdk.Context,
    sourcePort,
    sourceChannel string,
    token sdk.Coin,
    sender sdk.AccAddress,
    receiver string,
    timeoutHeight,
    timeoutTimestamp uint64,
) error

func (Keeper) SetPort Uses

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the transfer module. Used in InitGenesis

Package keeper imports 12 packages (graph) and is imported by 2 packages. Updated 2020-08-01. Refresh now. Tools for package owners.