_algopy_testing.value_generators.txn
¶
Module Contents¶
Classes¶
Factory for generating test data for transactions. |
API¶
- class TxnValueGenerator¶
Factory for generating test data for transactions.
- application_call(
- scratch_space: Sequence[algopy.Bytes | algopy.UInt64 | int | bytes] | None = None,
- **fields: Unpack[_algopy_testing.models.txn_fields.ApplicationCallFields],
Generate a new application call transaction.
- Parameters:
scratch_space – Scratch space data.
**fields – Fields to be set in the transaction.
- Returns:
New application call transaction.
- Raises:
TypeError – If
app_id
is not an instance of algopy.Application
- asset_transfer( ) algopy.gtxn.AssetTransferTransaction ¶
Generate a new asset transfer transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated asset transfer transaction.
- payment( ) algopy.gtxn.PaymentTransaction ¶
Generate a new payment transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated payment transaction.
- asset_config( ) algopy.gtxn.AssetConfigTransaction ¶
Generate a new ACFG transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated asset config transaction.
- key_registration( ) algopy.gtxn.KeyRegistrationTransaction ¶
Generate a new key registration transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated key registration transaction.
- asset_freeze( ) algopy.gtxn.AssetFreezeTransaction ¶
Generate a new asset freeze transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated asset freeze transaction.
- transaction( ) algopy.gtxn.Transaction ¶
Generate a new transaction with specified fields.
- Parameters:
**fields – Fields to be set in the transaction.
- Returns:
The newly generated transaction.