You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I check whether a contract is opted in, but has 0 of the asset? Right now I can just check to see if the balance is 0, and then proceed to close out. It will work. But it won't have the precision and error handling by checking for this condition before trying to do it.
// check we have opted in the asset, and its balance is 0.byte[]appAddress=CurrentApplicationAddress;AccountReferencecontract=appAddress.ToAccountReference();ulongassetBalance=contract.AssetBalance(assetReference);
Kind regards.
The text was updated successfully, but these errors were encountered:
mangoplane
changed the title
Asset Reference
Asset Reference - Check if Contract Account is Opted into Asset
Jun 8, 2023
Hi,
How do I check whether a contract is opted in, but has 0 of the asset? Right now I can just check to see if the balance is 0, and then proceed to close out. It will work. But it won't have the precision and error handling by checking for this condition before trying to do it.
Kind regards.
The text was updated successfully, but these errors were encountered: