keeper

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CW721Converter

type CW721Converter interface {
	ConvertNFT(ctx context.Context, msg *cw721types.MsgConvertNFT) (*cw721types.MsgConvertNFTResponse, error)
	RefundPacketToken(ctx sdk.Context, data nfttransfertypes.NonFungibleTokenPacketData) error
}

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

type ERC721Converter

type ERC721Converter interface {
	ConvertNFT(ctx context.Context, msg *erc721types.MsgConvertNFT) (*erc721types.MsgConvertNFTResponse, error)
	RefundPacketToken(ctx sdk.Context, data nfttransfertypes.NonFungibleTokenPacketData) error
}

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

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
}

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) ConvertNFTFromCw721

func (k Keeper) ConvertNFTFromCw721(context context.Context, voucherClassID string, tokenIds []string, receiver string) error

func (Keeper) ConvertNFTFromErc721

func (k Keeper) ConvertNFTFromErc721(context context.Context, voucherClassID string, tokenIds []string, receiver string) error

func (*Keeper) GetVoucherClassID

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

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) OnRecvPacket

func (k Keeper) OnRecvPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	receiver string,
	convertType uint) exported.Acknowledgement

OnRecvPacket processes a cross chain fungible token transfer. If the convertType 0:erc721 1:cw721

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) RefundPacketToken

func (k Keeper) RefundPacketToken(
	ctx sdk.Context,
	data ibcnfttransfertypes.NonFungibleTokenPacketData,
) error

RefundPacketToken reverses an outbound ERC721 convert by delegating to x/erc721, which returns the ERC721 and deletes pair/refund mappings.

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.

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

Jump to

Keyboard shortcuts

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