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
Name | Type | Description |
---|---|---|
data | EvmInternalTransactionish | the EvmInternalTransactionish type |
Returns
equals
▸ Static
equals(dataA
, dataB
): boolean
Check the equality between two Evm internal transactions
Example
EvmInternalTransaction.equals(dataA, dataB)
Parameters
Name | Type | Description |
---|---|---|
dataA | EvmInternalTransactionish | The first transaction |
dataB | EvmInternalTransactionish | The second transaction |
Returns
boolean
fromJSON
▸ Static
fromJSON(json
): EvmInternalTransaction
Parameters
Name | Type |
---|---|
json | EvmInternalTransactionJSON |
Returns
parse
▸ Static
parse(data
): EvmInternalTransactionData
Parameters
Name | Type |
---|---|
data | EvmInternalTransactionInput |
Returns
equals
▸ equals(data
): boolean
Checks the equality of the current transaction with another evm transaction
Example
transaction.equals(data)
Parameters
Name | Type | Description |
---|---|---|
data | EvmInternalTransactionish | the 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
toJSON
▸ toJSON(): EvmInternalTransactionJSON
Returns
Accessors
blockHash
• get
blockHash(): string
Returns
string
blockNumber
• get
blockNumber(): BigNumber
Returns
BigNumber
from
• get
from(): EvmAddress
Returns
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
to
• get
to(): EvmAddress
Returns
transactionHash
• get
transactionHash(): string
Returns
string
type
• get
type(): string
Returns
string
value
• get
value(): BigNumber
Returns
BigNumber
Constructors
constructor
• new EvmInternalTransaction(data
)
Parameters
Name | Type |
---|---|
data | EvmInternalTransactionInput |