nft

package
v0.0.0-...-80b2b3e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	NTFContractsList(string, uint, uint) ([]models.NFTContract, int64, error)
	TokensList(int64, *int64, uint, uint) ([]models.NFTToken, int64, error)

	UpdateNTFContractLastHeight(contract models.NFTContract) error
	UpdateNTFContractLastOPHeight(contract models.NFTContract) error

	CreateBulk(rights []models.NFTToken) error
	UpdateNFTToken(contractID int64, tokenID uint64, isForSale bool, lastPrice *int64, lastActive time.Time) error

	ContractTokenHolders(mapID, limit int64) (tokens []models.AssetHolder, count int64, err error)
	TokenHoldersList(mapID int64, tokenID *int64, limit, offset uint) (tokens []models.AssetHolder, count int64, err error)
	TokenHoldersCount(mapID, tokenNum int64, isEqual bool) (int64, error)
}

type Repository

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

Repository is the account repo implementation.

func New

func New(db *gorm.DB) *Repository

New creates an instance of repository using the provided db.

func (*Repository) ContractTokenHolders

func (r *Repository) ContractTokenHolders(mapID, limit int64) (holders []models.AssetHolder, count int64, err error)

func (*Repository) CreateBulk

func (r *Repository) CreateBulk(rights []models.NFTToken) error

func (*Repository) NTFContractsList

func (r *Repository) NTFContractsList(contractID string, limit, offset uint) (contracts []models.NFTContract, count int64, err error)

func (*Repository) TokenHoldersCount

func (r *Repository) TokenHoldersCount(mapID, tokenNum int64, isEqual bool) (count int64, err error)

func (*Repository) TokenHoldersList

func (r *Repository) TokenHoldersList(mapID int64, tokenID *int64, limit uint, offset uint) (holders []models.AssetHolder, count int64, err error)

func (*Repository) TokensList

func (r *Repository) TokensList(contractID int64, tokenID *int64, limit uint, offset uint) (tokens []models.NFTToken, count int64, err error)

func (*Repository) UpdateNFTToken

func (r *Repository) UpdateNFTToken(contractID int64, tokenID uint64, isForSale bool, lastPrice *int64, lastActive time.Time) error

func (*Repository) UpdateNTFContractLastHeight

func (r *Repository) UpdateNTFContractLastHeight(contract models.NFTContract) error

func (*Repository) UpdateNTFContractLastOPHeight

func (r *Repository) UpdateNTFContractLastOPHeight(contract models.NFTContract) error

Jump to

Keyboard shortcuts

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