#Do i need iTxn?
4 messages · Page 1 of 1 (latest)
The MBR for creating an asset is 0.1 Algorand, and then the transaction fee is 0.001 Algorand.
You could make a payment txn argument to this method where the asset is created. You can leave out the fee field for the calling user to also pay the transaction fee.
Then you would of course add assets for that payment transaction in the contract logic; eg; assert payment_txn.receiver == Global.current_application_address and assert payment_txn.amount == 100_000
Eg;
@abimethod
def create_asset(
asset_name: str,
mbr_payment: gtxn.Payment
) -> UInt64:
# assertions about payment here
create_asset_tx = itxn.AssetConfig(
. . .
)
return create_asset_tx.created_asset.id```