keeper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CW721Converter

type CW721Converter interface {
	RefundPacketToken(ctx sdk.Context, data nfttransfertypes.NonFungibleTokenPacketData) error
}

CW721Converter is the x/cw721 surface used by outbound refunds.

NOTE (R1-C): same as ERC721Converter — inbound ConvertNFT was removed.

type ERC721Converter

type ERC721Converter interface {
	RefundPacketToken(ctx sdk.Context, data nfttransfertypes.NonFungibleTokenPacketData) error
}

ERC721Converter is the x/erc721 surface used by outbound refunds.

NOTE (R1-C): the inbound ConvertNFT path was removed — convert memos are now settled natively, so no token pair is written and the burn guard never locks a bridged voucher out of its origin chain. Only the refund side remains.

type ICS721Keeper

type ICS721Keeper interface {
	OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data nfttransfertypes.NonFungibleTokenPacketData, ack channeltypes.Acknowledgement) error
	OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data nfttransfertypes.NonFungibleTokenPacketData) error
	// GetVoucherClassID resolves a class id — which may be a multi-hop trace
	// path on a back-to-origin receive — to the canonical local voucher/native
	// id, matching nft-transfer's keeper logic (HasClass check + ibc/<hash>).
	GetVoucherClassID(ctx sdk.Context, classID string) (string, error)
}

ICS721Keeper is the nft-transfer surface used to refund the Cosmos NFT side of an outbound convert packet without going through the IBC middleware twice.

type Keeper

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

Keeper of this module maintains collections of erc721.

func NewKeeper

func NewKeeper(
	ik ICS721Keeper,
) Keeper

NewKeeper creates new instances of the erc721 Keeper

func (*Keeper) GetVoucherClassID

func (k *Keeper) GetVoucherClassID(port string, channel string, classId string) string

GetVoucherClassID returns the canonical IBC voucher class ID for a given (port, channel, originalClassID) tuple.

KEEP-IN-SYNC: duplicated in x/erc721/keeper/keeper.go (the keepers cannot import each other). Bodies MUST stay byte-identical.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) OnAcknowledgementPacket

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

OnAcknowledgementPacket responds to 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) OnTimeoutPacket

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

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

func (*Keeper) SetCw721Keeper

func (k *Keeper) SetCw721Keeper(cw721keeper CW721Converter)

SetCw721Keeper sets the CW721 keeper reference.

func (*Keeper) SetErc721Keeper

func (k *Keeper) SetErc721Keeper(crc721keeper ERC721Converter)

SetErc721Keeper sets the ERC721 keeper reference.

Jump to

Keyboard shortcuts

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