I have this function which returns the amount of some ASA in a smart contract :
def get_amount()
asset_holding = AssetHolding.balance(
Global.current_application_address(), App.globalGet(Bytes("asset_id"))
)
return Seq(
asset_holding,
asset_holding.value()
)
The issue is that the callers of this function just need the amount (asset_holding.value()
) and not a Seq.
How can I return only the amount and not a Seq object ?
I really need to keep a function because my function is actually more complicated (it has an If/Else) but the point is to be able to return an Exp containing only the amount in all cases.