Hethers
  • Documentation
  • Getting Started
  • Application Programming Interface
    • Providers
      • Provider
        • Accounts Methods
        • Logs Methods
        • Network Status Methods
        • Transactions Methods
        • Event Emitter Methods
        • Base Provider
        • HederaProvider
      • Types
    • Contract Interaction
      • Contract
      • ContractFactory
      • Example: ERC-20 Contract
    • Utilities
      • Accounts
      • Addresses
      • Application Binary Interface
        • AbiCoder
        • ABI Formats
        • Fragments
        • Interface
      • BigNumber
      • Byte Manipulation
      • Constants
      • Display Logic and Input
      • Encoding Utilities
      • FixedNumber
      • Hashing Algorithms
      • HD Wallet
      • Logging
      • Property Utilities
      • Signing Key
      • Strings
      • Transactions
      • Web Utilities
      • Wordlists
    • Signers
  • Contributing
  • Other Resources
Powered by GitBook
On this page
  • Types
  • UnsignedTransaction
  • Transaction
  • AccessListish
  • HederaTransaction
  • Functions
  1. Application Programming Interface
  2. Utilities

Transactions

PreviousStringsNextWeb Utilities

Last updated 3 years ago

Types

UnsignedTransaction

An unsigned transaction represents a transaction that has not been signed and its values are flexible as long as they are not ambiguous.

unsignedTransaction.to ⇒ string<>

The address this transaction is to. Can be either an address or an alias.

unsignedTransaction.from ⇒ string<>

The address initiating the transaction.

unsignedTransaction.gasLimit ⇒

The gas limit for this transaction. Read more about .

unsignedTransaction.data ⇒

The data for this transaction.

unsignedTransaction.value ⇒

The value (in tinybar) for this transaction

unsignedTransaction.chainId ⇒ number

The chain ID for this transaction.

unsignedTransaction.type ⇒ number

The type of this transaction. The type is always 0 for now.

The AccessList of this transaction. Currently accessLists are not supported in Hedera.

The ID of the target node.

unsignedTransaction.customData ⇒ Record<string, any>

Can contain any kind of data for custom logic.

Transaction

A generic object to represent a transaction.

transaction.transactionId => string

The transaction hash, which can be used as an identifier for transaction. This is the keccak256 of the serialized RLP encoded representation of transaction.

The address transaction is to.

The address transaction is from.

transaction.nonce ⇒ number

The nonce for transaction. Each transaction sent to the network from an account includes this, which ensures the order and non-replayability of a transaction. This must be equal to the current number of transactions ever sent to the network by the from address.

The data for transaction. In a contract this is the call data.

The value (in tinybars) for transaction.

transaction.chainId ⇒ number

The chain ID for transaction.

AccessListish

type AccessListish = AccessList |
         Array<[string, Array<string>]> |
         Record<string, Array<string>>

HederaTransaction

Functions

hethers.utils.accessListify( anAcceslistish ) ⇒ AccessList

Normalizes the AccessListish anAccessListish into an AccessList.

This is useful for other utility functions which wish to remain flexible as to the input parameter for access lists, such as when creating a Signer which needs to manipulate a possibly typed transaction envelope.

Parses the transaction properties from a serialized transaction.

unsignedTransaction.accessList ⇒

unsignedTransaction.nodeId ⇒

The of the transaction. Can be in one of the following formats:

transaction.hash ⇒ string<<32>>

transaction.to ⇒ string<>

transaction.from ⇒ string<>

transaction.gasLimit ⇒

The gas limit for transaction. Read more about .

transaction.data ⇒

transaction.value ⇒

hethers.utils.parseTransaction( aBytesLike ) ⇒

transactionId
BigNumber
gas reservation and unused gas refund
BigNumber
AccessListish
Transaction
gas reservation and unused gas refund
BytesLike
BigNumberish
BigNumberish
DataHexString
BytesLike
AccountLike
AccountLike
AccountLike
Address
Address