transaction_utils
Utility class for transaction-related operations.
Code Example
Module
class human_protocol_sdk.transaction.transaction_utils.TransactionData(chain_id, block, hash, from_address, to_address, timestamp, value, method)
Bases: object
__init__(chain_id, block, hash, from_address, to_address, timestamp, value, method)
class human_protocol_sdk.transaction.transaction_utils.TransactionUtils
Bases: object
A utility class that provides additional transaction-related functionalities.
static get_transaction(chain_id, hash)
Returns the transaction for a given hash.
Parameters:
chain_id (
ChainId
) – Network in which the transaction was executedhash (
str
) – Hash of the transaction
Return type:
Optional
[TransactionData
]Returns: Transaction data
Example:
static get_transactions(filter)
Get an array of transactions based on the specified filter parameters.
Parameters: filter (
TransactionFilter
) – Object containing all the necessary parameters to filterReturn type:
List
[TransactionData
]Returns: List of transactions
Example:
exception human_protocol_sdk.transaction.transaction_utils.TransactionUtilsError
Bases: Exception
Raises when some error happens when getting data from subgraph.
Last updated