Skip to main content

Class: StreamErc20Approval

moralis-monorepo / @moralisweb3/common-streams-utils / StreamErc20Approval

Class: StreamErc20Approval

@moralisweb3/common-streams-utils.StreamErc20Approval

The StreamErc20Transfer class is a representation of a erc20 approval that is returned by the Moralis Stream API

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): StreamErc20Approval

Create a new instance of StreamErc20Approval

Example

const erc20Approval = StreamErc20Approval.create(data);

Parameters

NameTypeDescription
dataStreamErc20Approvalishthe StreamErc20Approvalish type

Returns

StreamErc20Approval

an instance of StreamErc20Approval


equals

Static equals(valueA, valueB): boolean

Compares two StreamErc20Approval data. It checks a deep equality check of both values.

Example

 StreamErc20Approval.equals(valueA, valueB);

Parameters

NameTypeDescription
valueAStreamErc20Approvalishthe first StreamErc20Approvalish data to compare
valueBStreamErc20Approvalishthe second StreamErc20Approvalish data to compare

Returns

boolean

true if the values are equal, false otherwise


equals

equals(value): boolean

Compares an StreamErc20Approvalish data to this StreamErc20Approval instance.

Example

erc20Approval.equals(value);

Parameters

NameTypeDescription
valueStreamErc20Approvalishthe value to compare

Returns

boolean

true if the value is equal to the current instance, false otherwise

Implementation of

MoralisDataObject.equals


format

format(): StreamErc20ApprovalJSON

Deprecated

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

Returns

StreamErc20ApprovalJSON

Implementation of

MoralisDataObject.format


toJSON

toJSON(): StreamErc20ApprovalJSON

Converts the StreamErc20Approval instance to a JSON object.

Example

erc20Approval.toJSON()

Returns

StreamErc20ApprovalJSON

JSON object of the StreamErc20Approval instance

Implementation of

MoralisDataObject.toJSON

Accessors

chain

get chain(): EvmChain

Returns

EvmChain


contract

get contract(): EvmAddress

Returns

EvmAddress


logIndex

get logIndex(): string | number

Returns

string | number


owner

get owner(): EvmAddress

Returns

EvmAddress


spender

get spender(): 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 StreamErc20Approval(data)

Parameters

NameType
dataStreamErc20ApprovalInput