algokit_utils._debugging
Functions
cleanup_old_trace_files | Cleanup old trace files if total size exceeds buffer size limit. |
---|---|
persist_sourcemaps | Persist the sourcemaps for the given sources as an AlgoKit AVM Debugger compliant artifacts. Args: sources (list[PersistSourceMapInput]): A list of PersistSourceMapInput objects. project_root (Path): The root directory of the project. client (AlgodClient): An AlgodClient object for interacting with the Algorand blockchain. with_sources (bool): If True, it will dump teal source files along with sourcemaps. Default is True, as needed by an AlgoKit AVM debugger. |
simulate_and_persist_response | Simulates the atomic transactions using the provided AtomicTransactionComposer object and AlgodClient object,and persists the simulation response to an AlgoKit AVM Debugger compliant JSON file. |
simulate_response | Simulate and fetch response for the given AtomicTransactionComposer and AlgodClient. |
API
algokit_utils._debugging.cleanup_old_trace_files
cleanup_old_trace_files(output_dir: pathlib.Path, buffer_size_mb: float) → None
Cleanup old trace files if total size exceeds buffer size limit.
Args: output_dir (Path): Directory containing trace files buffer_size_mb (float): Maximum allowed size in megabytes
algokit_utils._debugging.persist_sourcemaps
persist_sourcemaps(*, sources: list[algokit_utils._debugging.PersistSourceMapInput], project_root: pathlib.Path, client: algosdk.v2client.algod.AlgodClient, with_sources: bool = True) → None
Persist the sourcemaps for the given sources as an AlgoKit AVM Debugger compliant artifacts. Args: sources (list[PersistSourceMapInput]): A list of PersistSourceMapInput objects. project_root (Path): The root directory of the project. client (AlgodClient): An AlgodClient object for interacting with the Algorand blockchain. with_sources (bool): If True, it will dump teal source files along with sourcemaps. Default is True, as needed by an AlgoKit AVM debugger.
algokit_utils._debugging.simulate_and_persist_response
simulate_and_persist_response(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, project_root: pathlib.Path, algod_client: algosdk.v2client.algod.AlgodClient, buffer_size_mb: float = 256) → algosdk.atomic_transaction_composer.SimulateAtomicTransactionResponse
Simulates the atomic transactions using the provided AtomicTransactionComposer
object and AlgodClient
object,
and persists the simulation response to an AlgoKit AVM Debugger compliant JSON file.
:param atc: An AtomicTransactionComposer
object representing the atomic transactions to be
simulated and persisted.
:param project_root: A Path
object representing the root directory of the project.
:param algod_client: An AlgodClient
object representing the Algorand client.
:param buffer_size_mb: The size of the trace buffer in megabytes. Defaults to 256mb.
:return: None
Returns: SimulateAtomicTransactionResponse: The simulated response after persisting it for AlgoKit AVM Debugger consumption.
algokit_utils._debugging.simulate_response
simulate_response(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod_client: algosdk.v2client.algod.AlgodClient) → algosdk.atomic_transaction_composer.SimulateAtomicTransactionResponse
Simulate and fetch response for the given AtomicTransactionComposer and AlgodClient.
Args: atc (AtomicTransactionComposer): An AtomicTransactionComposer object. algod_client (AlgodClient): An AlgodClient object for interacting with the Algorand blockchain.
Returns: SimulateAtomicTransactionResponse: The simulated response.