Class: StreamErc20Transfer
moralis-monorepo / @moralisweb3/common-streams-utils / StreamErc20Transfer
Class: StreamErc20Transfer
@moralisweb3/common-streams-utils.StreamErc20Transfer
The StreamErc20Transfer class is a representation of a erc20 transfer that is returned by the Moralis Stream API
Implements
MoralisDataObject
Table of contents
Methods
Accessors
- chain
- contract
- from
- logIndex
- to
- tokenDecimals
- tokenName
- tokenSymbol
- transactionHash
- triggers
- value
- valueWithDecimals
Constructors
Methods
create
▸ Static
create(data
): StreamErc20Transfer
Create a new instance of StreamErc20Transfer
Example
const erc20Transfer = StreamErc20Transfer.create(data);
Parameters
Name | Type | Description |
---|---|---|
data | StreamErc20Transferish | the StreamErc20Transferish type |
Returns
an instance of StreamErc20Transfer
equals
▸ Static
equals(valueA
, valueB
): boolean
Compares two StreamErc20Transfer data. It checks a deep equality check of both values.
Example
StreamErc20Transfer.equals(valueA, valueB);
Parameters
Name | Type | Description |
---|---|---|
valueA | StreamErc20Transferish | the first StreamErc20Transferish data to compare |
valueB | StreamErc20Transferish | the second StreamErc20Transferish data to compare |
Returns
boolean
true if the values are equal, false otherwise
equals
▸ equals(value
): boolean
Compares an StreamErc20Transferish data to this StreamErc20Transfer instance.
Example
erc20Transfer.equals(value);
Parameters
Name | Type | Description |
---|---|---|
value | StreamErc20Transferish | the value to compare |
Returns
boolean
true if the value is equal to the current instance, false otherwise
Implementation of
MoralisDataObject.equals
format
▸ format(): StreamErc20TransferJSON
Deprecated
This method will be removed soon. To format the value, use one of the properties.
Returns
Implementation of
MoralisDataObject.format
toJSON
▸ toJSON(): StreamErc20TransferJSON
Converts the StreamErc20Transfer instance to a JSON object.
Example
erc20Transfer.toJSON()
Returns
JSON object of the StreamErc20Transfer instance
Implementation of
MoralisDataObject.toJSON
Accessors
chain
• get
chain(): EvmChain
Returns
EvmChain
contract
• get
contract(): EvmAddress
Returns
EvmAddress
from
• get
from(): EvmAddress
Returns
EvmAddress
logIndex
• get
logIndex(): string
| number
Returns
string
| number
to
• get
to(): EvmAddress
Returns
EvmAddress
tokenDecimals
• get
tokenDecimals(): undefined
| number
Returns
undefined
| number
tokenName
• get
tokenName(): string
Returns
string
tokenSymbol
• get
tokenSymbol(): string
Returns
string
transactionHash
• get
transactionHash(): string
Returns
string
triggers
• get
triggers(): undefined
| StreamTriggerOutput
[]
Returns
undefined
| StreamTriggerOutput
[]
value
• get
value(): BigNumber
Returns
BigNumber
valueWithDecimals
• get
valueWithDecimals(): undefined
| string
Returns
undefined
| string
Constructors
constructor
• new StreamErc20Transfer(data
)
Parameters
Name | Type |
---|---|
data | StreamErc20TransferInput |