Class: EvmNftCollection

moralis-monorepo / @moralisweb3/evm-utils / EvmNftCollection

Class: EvmNftCollection

@moralisweb3/evm-utils.EvmNftCollection

The EvmNftCollection is a representation of an nft collection.

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Methods

create

Static create(data, core?): EvmNftCollection

Create a new instance of EvmNftCollection from any valid transaction input

Example

const collection = EvmTransaction.create(data);

Parameters

NameTypeDescription
dataEvmNftCollectionishthe EvmNftCollectionish type
core?MoralisCore-

Returns

EvmNftCollection


equals

Static equals(dataA, dataB): boolean

Check the equality between two Evm collections. It compares their hashes and collections.

Example

EvmNftCollection.equals(dataA, dataB)

Parameters

NameTypeDescription
dataAEvmNftCollectionishThe first collection to compare
dataBEvmNftCollectionishThe second collection to compare

Returns

boolean


equals

equals(data): boolean

Checks the equality of the current collection with another evm collection

Example

collection.equals(data)

Parameters

NameTypeDescription
dataEvmNftCollectionishthe collection to compare with

Returns

boolean

Implementation of

MoralisDataObject.equals


toJSON

toJSON(): Object

Example

collection.toJSON()

Returns

Object

a JSON represention of the collection.

NameType
chainstring | number
tokenAddressstring
contractType?EvmNftContractType
namestring
symbolstring

Implementation of

MoralisDataObject.toJSON


format

format(): Object

Example

collection.format()

Returns

Object

a JSON represention of the collection.

NameType
chainstring | number
tokenAddressstring
contractType?EvmNftContractType
namestring
symbolstring

Implementation of

MoralisDataObject.format

Accessors

result

get result(): EvmNftCollectionData

Example

collection.result

Returns

EvmNftCollectionData

all the data without casting it to JSON.


chain

get chain(): EvmChain

Example

collection.chain // EvmChain

Returns

EvmChain

the chain where the collection is deployed.


tokenAddress

get tokenAddress(): EvmAddress

Example

collection.tokenAddress // EvmAddress

Returns

EvmAddress

the token address of collection.


contractType

get contractType(): undefined | EvmNftContractType

Example

collection.tokenAddress // 'ERC721'

Returns

undefined | EvmNftContractType

the token type of collection.


name

get name(): string

Example

collection.tokenAddress // 'Test NFT'

Returns

string

the token name of collection.


symbol

get symbol(): string

Example

collection.symbol // 'TEST'

Returns

string

the token symbol of collection.


Did this page help you?