Class: EvmTransactionVerbose
moralis-monorepo / @moralisweb3/common-evm-utils / EvmTransactionVerbose
Class: EvmTransactionVerbose
@moralisweb3/common-evm-utils.EvmTransactionVerbose
The EvmTransactionVerbose is a representation of a published transaction.
Use this class any time you work with a transaction.
Hierarchy
↳
EvmTransactionVerbose
Table of contents
Methods
Accessors
- blockHash
- blockNumber
- blockTimestamp
- chain
- contractAddress
- cumulativeGasUsed
- data
- decodedCall
- from
- gas
- gasPrice
- gasUsed
- hash
- index
- internalTransactions
- logs
- nonce
- r
- receiptRoot
- receiptStatus
- result
- s
- signature
- to
- v
- value
Constructors
Properties
Methods
create
▸ Static create(data): EvmTransactionVerbose
Create a new instance of EvmTransactionVerbose from any valid transaction input
Example
const transaction = EvmTransactionVerbose.create(data);
Parameters
| Name | Type | Description |
|---|---|---|
data | EvmTransactionVerboseish | the EvmTransactionVerboseish type |
Returns
Overrides
equals
▸ Static equals(dataA, dataB): boolean
Check the equality between two Evm transactions
Example
EvmTransaction.equals(dataA, dataB)
Parameters
| Name | Type | Description |
|---|---|---|
dataA | EvmTransactionish | The first transaction |
dataB | EvmTransactionish | The second transaction |
Returns
boolean
Inherited from
parse
▸ Static parse(data): EvmTransactionVerboseData
Parameters
| Name | Type |
|---|---|
data | EvmTransactionVerboseInput |
Returns
Overrides
equals
▸ equals(data): boolean
Checks the equality of the current transaction with another evm transaction
Example
transaction.equals(data)
Parameters
| Name | Type | Description |
|---|---|---|
data | EvmTransactionish | the transaction to compare with |
Returns
boolean
Inherited from
format
▸ format(): Object
Deprecated
This method will be removed soon. To format the value, use one of the properties.
Returns
Object
| Name | Type |
|---|---|
blockHash | string |
blockNumber | string |
blockTimestamp | string |
chain | string |
contractAddress | undefined | string |
cumulativeGasUsed | string |
data? | string |
from | string |
gas | undefined | string |
gasPrice | string |
gasUsed | string |
hash | string |
index | string | number |
internalTransactions | EvmInternalTransactionJSON[] |
logs | { address: string ; blockHash: string ; blockNumber: number ; blockTimestamp?: string ; chain: string ; data: string ; logIndex?: number ; topics: (null | string)[] ; transactionHash: string ; transactionIndex?: number }[] |
nonce | undefined | string |
receiptRoot? | string |
receiptStatus? | number |
signature | undefined | MoralisDataObjectValue |
to | undefined | string |
value | undefined | string |
Inherited from
toJSON
▸ toJSON(): Object
Returns
Object
| Name | Type |
|---|---|
blockHash | string |
blockNumber | string |
blockTimestamp | string |
chain | string |
contractAddress | undefined | string |
cumulativeGasUsed | string |
data? | string |
from | string |
gas | undefined | string |
gasPrice | string |
gasUsed | string |
hash | string |
index | string | number |
internalTransactions | EvmInternalTransactionJSON[] |
logs | { address: string ; blockHash: string ; blockNumber: number ; blockTimestamp?: string ; chain: string ; data: string ; logIndex?: number ; topics: (null | string)[] ; transactionHash: string ; transactionIndex?: number }[] |
nonce | undefined | string |
receiptRoot? | string |
receiptStatus? | number |
signature | undefined | MoralisDataObjectValue |
to | undefined | string |
value | undefined | string |
Inherited from
Accessors
blockHash
• get blockHash(): string
Example
transaction.blockHash // 0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86
Returns
string
the transaction black hash
Inherited from
EvmTransaction.blockHash
blockNumber
• get blockNumber(): BigNumber
Example
transaction.blockNumber // 12526958
Returns
BigNumber
the transaction block number
Inherited from
EvmTransaction.blockNumber
blockTimestamp
• get blockTimestamp(): Date
Example
transaction.blockTimestamp // Date
Returns
Date
the transaction block timestamp
Inherited from
EvmTransaction.blockTimestamp
chain
• get chain(): EvmChain
Example
transaction.chain // EvmChain
Returns
the transaction chain
Inherited from
EvmTransaction.chain
contractAddress
• get contractAddress(): undefined | EvmAddress
Example
transaction.contractAddress // EvmAddress
Returns
undefined | EvmAddress
the transaction contract address
Inherited from
EvmTransaction.contractAddress
cumulativeGasUsed
• get cumulativeGasUsed(): BigNumber
Example
transaction.cumulativeGasUsed // 1340925
Returns
BigNumber
the transaction cumulative gas used
Inherited from
EvmTransaction.cumulativeGasUsed
data
• get data(): undefined | string
Example
transaction.data // 0x000000000000000000000000000000000000000000000000000000000000002
Returns
undefined | string
the transaction data
Inherited from
EvmTransaction.data
decodedCall
• get decodedCall(): EvmTransactionLogDecodedEvent
Returns
from
• get from(): EvmAddress
Example
transaction.address // EvmAddress
Returns
the transaction from address
Inherited from
EvmTransaction.from
gas
• get gas(): undefined | BigNumber
Example
transaction.gas // 6721975
Returns
undefined | BigNumber
the transaction gas
Inherited from
EvmTransaction.gas
gasPrice
• get gasPrice(): BigNumber
Example
transaction.gasPrice // 20000000000
Returns
BigNumber
the transaction gas price
Inherited from
EvmTransaction.gasPrice
gasUsed
• get gasUsed(): BigNumber
Example
transaction.gasUsed // 1340925
Returns
BigNumber
the transaction gas used
Inherited from
EvmTransaction.gasUsed
hash
• get hash(): string
Example
transaction.hash // 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e
Returns
string
the transaction hash
Inherited from
EvmTransaction.hash
index
• get index(): string | number
Example
transaction.index // 1
Returns
string | number
the index
Inherited from
EvmTransaction.index
internalTransactions
• get internalTransactions(): EvmInternalTransaction[]
Example
transaction.logs // EvmInternalTransaction[]
Returns
the internal transactions
Inherited from
EvmTransaction.internalTransactions
logs
• get logs(): EvmTransactionLogDecoded[]
Example
transaction.logs // EvmTransactionLog[]
Returns
the transaction logs
Overrides
EvmTransaction.logs
nonce
• get nonce(): undefined | BigNumber
Example
transaction.nonce // 326595425
Returns
undefined | BigNumber
the transaction nonce
Inherited from
EvmTransaction.nonce
r
• get r(): undefined | string
Returns
undefined | string
Inherited from
EvmTransaction.r
receiptRoot
• get receiptRoot(): undefined | string
Example
transaction.receiptRoot // string
Returns
undefined | string
the transaction receipt root
Inherited from
EvmTransaction.receiptRoot
receiptStatus
• get receiptStatus(): undefined | number
Example
transaction.receiptStatus // 1
Returns
undefined | number
the transaction receipt status
Inherited from
EvmTransaction.receiptStatus
result
• get result(): EvmTransactionData
Example
transaction.result
Returns
the transaction
Inherited from
EvmTransaction.result
s
• get s(): undefined | string
Returns
undefined | string
Inherited from
EvmTransaction.s
signature
• get signature(): undefined | EvmSignature
Example
transaction.signature // EvmSignature
Returns
undefined | EvmSignature
the signature (if available)
Inherited from
EvmTransaction.signature
to
• get to(): undefined | EvmAddress
Example
transaction.to // EvmAddress
Returns
undefined | EvmAddress
the transaction to address
Inherited from
EvmTransaction.to
v
• get v(): undefined | number
Returns
undefined | number
Inherited from
EvmTransaction.v
value
• get value(): undefined | EvmNative
Example
transaction.value // EvmNative
Returns
undefined | EvmNative
the transaction value
Inherited from
EvmTransaction.value
Constructors
constructor
• new EvmTransactionVerbose(data)
Parameters
| Name | Type |
|---|---|
data | EvmTransactionVerboseInput |
Overrides
Properties
_data
• Protected _data: EvmTransactionVerboseData