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
- blockHash
- blockNumber
- blockTimestamp
- chain
- contractAddress
- fromWallet
- logIndex
- result
- tokenDecimals
- tokenLogo
- tokenName
- tokenSymbol
- transactionHash
- transactionIndex
- value
Constructors
Methods
create
▸ Static
create(data
): Erc20Burn
Create a new instance of Erc20Burn from any valid input
Example
const burn = Erc20Burn.create(data);
Parameters
Name | Type | Description |
---|---|---|
data | Erc20BurnInput | Erc20Burn | Erc20Burn instance or valid Erc20BurnInput |
Returns
equals
▸ Static
equals(dataA
, dataB
): boolean
Check the equality between two Erc20 burns
Example
Erc20Burn.equals(dataA, dataB)
Parameters
Name | Type | Description |
---|---|---|
dataA | Erc20BurnInput | Erc20Burn | The first burn to compare |
dataB | Erc20BurnInput | Erc20Burn | The second burn to compare |
Returns
boolean
true if the burns are equal, false otherwise
parse
▸ Static
parse(data
): Erc20BurnData
Parameters
Name | Type |
---|---|
data | Erc20BurnInput |
Returns
equals
▸ equals(data
): boolean
Checks the equality of the current burn with another erc20 burn
Example
burn.equals(data)
Parameters
Name | Type | Description |
---|---|---|
data | Erc20BurnInput | Erc20Burn | the 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
Name | Type |
---|---|
blockHash | string |
blockNumber | string |
blockTimestamp | Date |
chain | string |
contractAddress | string |
fromWallet | string |
logIndex | number |
tokenDecimals | number |
tokenLogo? | string |
tokenName | string |
tokenSymbol | string |
transactionHash | string |
transactionIndex | number |
value | string |
Implementation of
MoralisDataObject.format
toJSON
▸ toJSON(): Object
Example
burn.toJSON()
Returns
Object
a JSON representation of the burn.
Name | Type |
---|---|
blockHash | string |
blockNumber | string |
blockTimestamp | Date |
chain | string |
contractAddress | string |
fromWallet | string |
logIndex | number |
tokenDecimals | number |
tokenLogo? | string |
tokenName | string |
tokenSymbol | string |
transactionHash | string |
transactionIndex | number |
value | string |
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
the chain of the burn
contractAddress
• get
contractAddress(): EvmAddress
Example
burn.contractAddress // EvmAddress
Returns
the contractAddress of the burn
fromWallet
• get
fromWallet(): EvmAddress
Example
burn.fromWallet // EvmAddress
Returns
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
all the data without casting it to JSON.
tokenDecimals
• get
tokenDecimals(): number
Example
burn.tokenDecimals // 18
Returns
number
The decimals of the token.
tokenLogo
• 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
Name | Type |
---|---|
data | Erc20BurnInput |