Skip to main content

Class: EvmStreamResult

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

Class: EvmStreamResult

@moralisweb3/common-streams-utils.EvmStreamResult

The EvmStreamResult class is representation of the webhook data that is returned from the Stream api

Implements

  • MoralisDataObject

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): EvmStreamResult

Create a new instance of EvmStreamResult

Example

const evmStreamResult = EvmStreamResult.create(data);

Parameters

NameTypeDescription
dataEvmStreamResultishthe EvmStreamResultish type

Returns

EvmStreamResult

an instance of EvmStreamResult


equals

Static equals(valueA, valueB): boolean

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

Example

 EvmStreamResult.equals(valueA, valueB);

Parameters

NameTypeDescription
valueAEvmStreamResultishthe first EvmStreamResultish data to compare
valueBEvmStreamResultishthe second EvmStreamResultish data to compare

Returns

boolean

true if the values are equal, false otherwise


equals

equals(value): boolean

Compares an EvmStreamResultish data to this EvmStreamResult instance.

Example

evmStreamResult.equals(value);

Parameters

NameTypeDescription
valueEvmStreamResultishthe value to compare

Returns

boolean

true if the value is equal to the current instance, 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
abiEvmAbi
block{}
chainstring
confirmedboolean
erc20ApprovalsStreamErc20ApprovalJSON[]
erc20TransfersStreamErc20TransferJSON[]
logsStreamEvmTransactionLogJSON[]
nativeBalancesStreamNativeBalanceJSON[]
nftApprovals{ ERC1155: StreamErc1155ApprovalJSON[] ; ERC721: StreamErc721ApprovalJSON[] }
nftApprovals.ERC1155StreamErc1155ApprovalJSON[]
nftApprovals.ERC721StreamErc721ApprovalJSON[]
nftTransfersStreamEvmNftTransferJSON[]
ntfTokenApprovalsMoralisDataObjectValue[]
retriesnumber
streamIdstring
tagstring
txsStreamEvmTransactionJSON[]
txsInternalStreamEvmInternalTransactionJSON[]

Implementation of

MoralisDataObject.format


toJSON

toJSON(): Object

Converts the EvmStreamResult instance to a JSON object.

Example

evmStreamResult.toJSON()

Returns

Object

JSON object of the EvmStreamResult instance

NameType
abiEvmAbi
block{}
chainstring
confirmedboolean
erc20ApprovalsStreamErc20ApprovalJSON[]
erc20TransfersStreamErc20TransferJSON[]
logsStreamEvmTransactionLogJSON[]
nativeBalancesStreamNativeBalanceJSON[]
nftApprovals{ ERC1155: StreamErc1155ApprovalJSON[] ; ERC721: StreamErc721ApprovalJSON[] }
nftApprovals.ERC1155StreamErc1155ApprovalJSON[]
nftApprovals.ERC721StreamErc721ApprovalJSON[]
nftTransfersStreamEvmNftTransferJSON[]
ntfTokenApprovalsMoralisDataObjectValue[]
retriesnumber
streamIdstring
tagstring
txsStreamEvmTransactionJSON[]
txsInternalStreamEvmInternalTransactionJSON[]

Implementation of

MoralisDataObject.toJSON

Accessors

abi

get abi(): EvmAbi

Returns

EvmAbi


abiInterface

get abiInterface(): null | Interface

Returns

null | Interface


block

get block(): EvmSimpleBlock

Returns

EvmSimpleBlock


chain

get chain(): EvmChain

Returns

EvmChain


confirmed

get confirmed(): boolean

Returns

boolean


decodedLogs

get decodedLogs(): LogDescription[]

Returns

LogDescription[]


erc20Approvals

get erc20Approvals(): StreamErc20Approval[]

Returns

StreamErc20Approval[]


erc20Transfers

get erc20Transfers(): StreamErc20Transfer[]

Returns

StreamErc20Transfer[]


logs

get logs(): StreamEvmTransactionLog[]

Returns

StreamEvmTransactionLog[]


nativeBalances

get nativeBalances(): StreamNativeBalance[]

Returns

StreamNativeBalance[]


nftApprovals

get nftApprovals(): Object

Deprecated

Use ntfTokenApprovals instead. This property will be removed in the future.

Returns

Object

NameType
ERC1155StreamErc1155Approval[]
ERC721StreamErc721Approval[]

nftTransfers

get nftTransfers(): StreamEvmNftTransfer[]

Returns

StreamEvmNftTransfer[]


ntfTokenApprovals

get ntfTokenApprovals(): StreamEvmNftTokenApproval[]

Returns

StreamEvmNftTokenApproval[]


retries

get retries(): number

Returns

number


streamId

get streamId(): string

Returns

string


tag

get tag(): string

Returns

string


txs

get txs(): StreamEvmTransaction[]

Returns

StreamEvmTransaction[]


txsInternal

get txsInternal(): StreamEvmInternalTransaction[]

Returns

StreamEvmInternalTransaction[]

Constructors

constructor

new EvmStreamResult(data)

Parameters

NameType
dataIWebhook