Skip to main content

Class: EvmInternalTransaction

moralis-monorepo / @moralisweb3/common-evm-utils / EvmInternalTransaction

Class: EvmInternalTransaction

@moralisweb3/common-evm-utils.EvmInternalTransaction

The EvmTranaction is a representation of a published transaction.

Use this class any time you work with a transaction.

Table of contents

Methods

Accessors

Constructors

Methods

create

Static create(data): EvmInternalTransaction

Create a new instance of EvmInternalTransaction from any valid transaction input

Example

const transaction = EvmInternalTransaction.create(data);

Parameters

NameTypeDescription
dataEvmInternalTransactionishthe EvmInternalTransactionish type

Returns

EvmInternalTransaction


equals

Static equals(dataA, dataB): boolean

Check the equality between two Evm internal transactions

Example

EvmInternalTransaction.equals(dataA, dataB)

Parameters

NameTypeDescription
dataAEvmInternalTransactionishThe first transaction
dataBEvmInternalTransactionishThe second transaction

Returns

boolean


fromJSON

Static fromJSON(json): EvmInternalTransaction

Parameters

NameType
jsonEvmInternalTransactionJSON

Returns

EvmInternalTransaction


parse

Static parse(data): EvmInternalTransactionData

Parameters

NameType
dataEvmInternalTransactionInput

Returns

EvmInternalTransactionData


equals

equals(data): boolean

Checks the equality of the current transaction with another evm transaction

Example

transaction.equals(data)

Parameters

NameTypeDescription
dataEvmInternalTransactionishthe transaction to compare with

Returns

boolean


format

format(): EvmInternalTransactionJSON

Deprecated

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

Returns

EvmInternalTransactionJSON


toJSON

toJSON(): EvmInternalTransactionJSON

Returns

EvmInternalTransactionJSON

Accessors

blockHash

get blockHash(): string

Returns

string


blockNumber

get blockNumber(): BigNumber

Returns

BigNumber


from

get from(): EvmAddress

Returns

EvmAddress


gas

get gas(): BigNumber

Returns

BigNumber


gasUsed

get gasUsed(): BigNumber

Returns

BigNumber


input

get input(): string

Returns

string


output

get output(): string

Returns

string


result

get result(): EvmInternalTransactionData

Returns

EvmInternalTransactionData


to

get to(): EvmAddress

Returns

EvmAddress


transactionHash

get transactionHash(): string

Returns

string


type

get type(): string

Returns

string


value

get value(): BigNumber

Returns

BigNumber

Constructors

constructor

new EvmInternalTransaction(data)

Parameters

NameType
dataEvmInternalTransactionInput