enumerable

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package enumerable provides functions to interact with ERC721 enumerable properties.

Package enumerable provides functions to interact with ERC721 enumerable properties.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC721EnumerableInteractions

type ERC721EnumerableInteractions struct {
	*nft.ERC721Interactions
	// contains filtered or unexported fields
}

ERC721EnumerableInteractions wraps interactions with an ERC721Enumerable contract, extending basic NFT interactions.

func NewERC721EnumerableInteractions

func NewERC721EnumerableInteractions(
	baseIERC721 *nft.ERC721Interactions,
	signatures []IERC721EnumerableSignature,
) (*ERC721EnumerableInteractions, error)

NewERC721EnumerableInteractions creates a new enumerable interaction instance using the provided base NFT interactions.

func (*ERC721EnumerableInteractions) GetAddressOwnedTokens

func (e *ERC721EnumerableInteractions) GetAddressOwnedTokens(to common.Address) ([]*big.Int, error)

GetAddressOwnedTokens returns a slice of token IDs owned by the specified address.

func (*ERC721EnumerableInteractions) GetAllTokenIDs

func (e *ERC721EnumerableInteractions) GetAllTokenIDs() ([]*big.Int, error)

GetAllTokenIDs returns all token IDs available in the contract.

func (*ERC721EnumerableInteractions) TokenByIndex

func (e *ERC721EnumerableInteractions) TokenByIndex(index *big.Int) (*big.Int, error)

TokenByIndex returns the token ID at a specific index in the contract.

func (*ERC721EnumerableInteractions) TokenOfOwnerByIndex

func (e *ERC721EnumerableInteractions) TokenOfOwnerByIndex(to common.Address, index *big.Int) (*big.Int, error)

TokenOfOwnerByIndex returns the token ID belonging to a specified address at a given index.

type IERC721EnumerableSignature

type IERC721EnumerableSignature nft.BaseNFTSignature

IERC721EnumerableSignature represents function signatures for ERC721 enumerable operations

const (
	// TokenOfOwnerByIndex represents the tokenOfOwnerByIndex function signature
	TokenOfOwnerByIndex IERC721EnumerableSignature = "tokenOfOwnerByIndex(address,uint256)"
	// TokenByIndex represents the tokenByIndex function signature
	TokenByIndex IERC721EnumerableSignature = "tokenByIndex(uint256)" // #nosec G101
)

func (IERC721EnumerableSignature) GetHex

GetHex returns the hex representation of the function signature

func (IERC721EnumerableSignature) GetSelector

func (s IERC721EnumerableSignature) GetSelector() []byte

GetSelector returns the Keccak256 hash selector for the ERC721 enumerable signature

func (IERC721EnumerableSignature) String

Jump to

Keyboard shortcuts

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