Skip to main content

Class: Erc20Burn

moralis-monorepo / @moralisweb3/common-evm-utils / Erc20Burn

Class: Erc20Burn

@moralisweb3/common-evm-utils.Erc20Burn

The Erc20Burn is a representation of an Erc20 token burn.

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): Erc20Burn

Create a new instance of Erc20Burn from any valid input

Example

const burn = Erc20Burn.create(data);

Parameters

NameTypeDescription
dataErc20BurnInput | Erc20BurnErc20Burn instance or valid Erc20BurnInput

Returns

Erc20Burn


equals

Static equals(dataA, dataB): boolean

Check the equality between two Erc20 burns

Example

Erc20Burn.equals(dataA, dataB)

Parameters

NameTypeDescription
dataAErc20BurnInput | Erc20BurnThe first burn to compare
dataBErc20BurnInput | Erc20BurnThe second burn to compare

Returns

boolean

true if the burns are equal, false otherwise


parse

Static parse(data): Erc20BurnData

Parameters

NameType
dataErc20BurnInput

Returns

Erc20BurnData


equals

equals(data): boolean

Checks the equality of the current burn with another erc20 burn

Example

burn.equals(data)

Parameters

NameTypeDescription
dataErc20BurnInput | Erc20Burnthe burn to compare with

Returns

boolean

true if the burns are equal, false otherwise

Implementation of

MoralisDataObject.equals


format

format(): Object

Deprecated

This method will be removed soon. To format the value, use one of the properties.

Returns

Object

NameType
blockHashstring
blockNumberstring
blockTimestampDate
chainstring
contractAddressstring
fromWalletstring
logIndexnumber
tokenDecimalsnumber
tokenLogo?string
tokenNamestring
tokenSymbolstring
transactionHashstring
transactionIndexnumber
valuestring

Implementation of

MoralisDataObject.format


toJSON

toJSON(): Object

Example

burn.toJSON()

Returns

Object

a JSON representation of the burn.

NameType
blockHashstring
blockNumberstring
blockTimestampDate
chainstring
contractAddressstring
fromWalletstring
logIndexnumber
tokenDecimalsnumber
tokenLogo?string
tokenNamestring
tokenSymbolstring
transactionHashstring
transactionIndexnumber
valuestring

Implementation of

MoralisDataObject.toJSON

Accessors

blockHash

get blockHash(): string

Example

burn.blockHash // "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86"

Returns

string

the block hash of the burn


blockNumber

get blockNumber(): BigNumber

Example

burn.blockNumber // BigNumber

Returns

BigNumber

the block number of the burn


blockTimestamp

get blockTimestamp(): Date

Example

burn.blockTimestamp // Date

Returns

Date

the block timestamp of the burn


chain

get chain(): EvmChain

Example

burn.chain // EvmChain

Returns

EvmChain

the chain of the burn


contractAddress

get contractAddress(): EvmAddress

Example

burn.contractAddress // EvmAddress

Returns

EvmAddress

the contractAddress of the burn


fromWallet

get fromWallet(): EvmAddress

Example

burn.fromWallet // EvmAddress

Returns

EvmAddress

the fromWallet of the burn


logIndex

get logIndex(): number

Example

burn.logIndex // 2

Returns

number

the logIndex of the burn


result

get result(): Erc20BurnData

Example

burn.result

Returns

Erc20BurnData

all the data without casting it to JSON.


tokenDecimals

get tokenDecimals(): number

Example

burn.tokenDecimals // 18

Returns

number

The decimals of the token.


get tokenLogo(): undefined | string

Example

burn.tokenLogo // "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png"

Returns

undefined | string

The logo of the token


tokenName

get tokenName(): string

Example

burn.tokenName // "Kylin Network"

Returns

string

The name of the token.


tokenSymbol

get tokenSymbol(): string

Example

burn.tokenSymbol // "KYL"

Returns

string

The symbol of the token.


transactionHash

get transactionHash(): string

Example

burn.transactionHash // "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86"

Returns

string

the transaction hash of the burn


transactionIndex

get transactionIndex(): number

Example

burn.transactionIndex // 3

Returns

number

the transactionIndex of the burn


value

get value(): BigNumber

Example

burn.value // BigNumber

Returns

BigNumber

the value of the burn

Constructors

constructor

new Erc20Burn(data)

Parameters

NameType
dataErc20BurnInput