Skip to main content

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

Constructors

Methods

create

Static create(data): StreamErc20Transfer

Create a new instance of StreamErc20Transfer

Example

const erc20Transfer = StreamErc20Transfer.create(data);

Parameters

NameTypeDescription
dataStreamErc20Transferishthe StreamErc20Transferish type

Returns

StreamErc20Transfer

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

NameTypeDescription
valueAStreamErc20Transferishthe first StreamErc20Transferish data to compare
valueBStreamErc20Transferishthe 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

NameTypeDescription
valueStreamErc20Transferishthe 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

StreamErc20TransferJSON

Implementation of

MoralisDataObject.format


toJSON

toJSON(): StreamErc20TransferJSON

Converts the StreamErc20Transfer instance to a JSON object.

Example

erc20Transfer.toJSON()

Returns

StreamErc20TransferJSON

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

NameType
dataStreamErc20TransferInput