ics721nft

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	SetAccount(sdk.Context, authtypes.AccountI)
	GetModuleAddress(name string) sdk.AccAddress
}

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	BlockedAddr(addr sdk.AccAddress) bool
}

type ICS721Class

type ICS721Class struct {
	ID   string
	URI  string
	Data string
}

func (ICS721Class) GetData

func (c ICS721Class) GetData() string

func (ICS721Class) GetID

func (c ICS721Class) GetID() string

func (ICS721Class) GetURI

func (c ICS721Class) GetURI() string

type ICS721Token

type ICS721Token struct {
	ClassID string
	ID      string
	URI     string
	Data    string
}

func (ICS721Token) GetClassID

func (t ICS721Token) GetClassID() string

func (ICS721Token) GetData

func (t ICS721Token) GetData() string

func (ICS721Token) GetID

func (t ICS721Token) GetID() string

func (ICS721Token) GetURI

func (t ICS721Token) GetURI() string

type Keeper

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

Keeper defines the ICS721 Keeper

func NewKeeper

func NewKeeper(cdc codec.Codec,
	k onftkeeper.Keeper,
	ak AccountKeeper,
	bk BankKeeper,
) Keeper

NewKeeper creates a new ics721 Keeper instance

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, classID string, tokenID string) error

Burn implement the method of ICS721Keeper.Burn

func (Keeper) CreateOrUpdateClass

func (k Keeper) CreateOrUpdateClass(ctx sdk.Context,
	classID,
	classURI,
	classData string,
) error

CreateOrUpdateClass implement the method of ICS721Keeper.CreateOrUpdateClass

func (Keeper) GetClass

func (k Keeper) GetClass(ctx sdk.Context, classID string) (nfttransfer.Class, bool)

GetClass implement the method of ICS721Keeper.GetClass

func (Keeper) GetNFT

func (k Keeper) GetNFT(ctx sdk.Context, classID, tokenID string) (nfttransfer.NFT, bool)

GetNFT implement the method of ICS721Keeper.GetNFT

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, classID string, tokenID string) sdk.AccAddress

GetOwner implement the method of ICS721Keeper.GetOwner

func (Keeper) HasClass

func (k Keeper) HasClass(ctx sdk.Context, classID string) bool

HasClass implement the method of ICS721Keeper.HasClass

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context,
	classID,
	tokenID,
	tokenURI,
	tokenData string,
	receiver sdk.AccAddress,
) error

Mint implement the method of ICS721Keeper.Mint

func (Keeper) Transfer

func (k Keeper) Transfer(
	ctx sdk.Context,
	classID,
	tokenID,
	_ string,
	receiver sdk.AccAddress,
) error

Transfer implement the method of ICS721Keeper.Transfer

Jump to

Keyboard shortcuts

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