algopy_testing.value_generators.txn
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”TxnValueGenerator | Factory for generating test data for transactions. |
|---|
class TxnValueGenerator
Section titled “class TxnValueGenerator”Factory for generating test data for transactions.
application_call(scratch_space: Sequence[algopy.Bytes | algopy.UInt64 | int | bytes] | None = None, **fields: Unpack[ApplicationCallFields]) → algopy.gtxn.ApplicationCallTransaction
Section titled “application_call(scratch_space: Sequence[algopy.Bytes | algopy.UInt64 | int | bytes] | None = None, **fields: Unpack[ApplicationCallFields]) → algopy.gtxn.ApplicationCallTransaction”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(**fields: Unpack[AssetTransferFields]) → algopy.gtxn.AssetTransferTransaction
Section titled “asset_transfer(**fields: Unpack[AssetTransferFields]) → 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(**fields: Unpack[PaymentFields]) → algopy.gtxn.PaymentTransaction
Section titled “payment(**fields: Unpack[PaymentFields]) → 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(**fields: Unpack[AssetConfigFields]) → algopy.gtxn.AssetConfigTransaction
Section titled “asset_config(**fields: Unpack[AssetConfigFields]) → 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(**fields: Unpack[KeyRegistrationFields]) → algopy.gtxn.KeyRegistrationTransaction
Section titled “key_registration(**fields: Unpack[KeyRegistrationFields]) → 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(**fields: Unpack[AssetFreezeFields]) → algopy.gtxn.AssetFreezeTransaction
Section titled “asset_freeze(**fields: Unpack[AssetFreezeFields]) → 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(**fields: Unpack[TransactionFields]) → algopy.gtxn.Transaction
Section titled “transaction(**fields: Unpack[TransactionFields]) → algopy.gtxn.Transaction”Generate a new transaction with specified fields.
-
Parameters: **fields –
Fields to be set in the transaction.
-
Returns: The newly generated transaction.