Skip to content
This new developer portal is under construction. For complete documentation, please refer to the old developer portal.

Deleting assets

Authorized by: Asset Manager

Created assets can be destroyed only by the asset manager account. All of the assets must be owned by the creator of the asset before the asset can be deleted.

sp = algod_client.suggested_params()
# Create asset destroy transaction to destroy the asset
destroy_txn = transaction.AssetDestroyTxn(
sender=acct1.address,
sp=sp,
index=created_asset,
)
signed_destroy_txn = destroy_txn.sign(acct1.private_key)
txid = algod_client.send_transaction(signed_destroy_txn)
print(f"Sent destroy transaction with txid: {txid}")
results = transaction.wait_for_confirmation(algod_client, txid, 4)
print(f"Result confirmed in round: {results['confirmed-round']}")
# now, trying to fetch the asset info should result in an error
try:
info = algod_client.asset_info(created_asset)
except Exception as e:
print("Expected Error:", e)

See also