Hello! I need to check USDT account balance in TEAL code. I’m passing the address as an argument to the TEAL application. However, I can not figure out how I can convert it from bytes back to the address in TEAL? Thank you!
You need ApplicationArgs 1 to be the 32-byte raw address, not the 58-character string looking like DXTFUT4EGE76MJ2Z55ER5WD67PI7SJ3UZPK4BIFU546BDICNVXJ6OBNZ3Y.
There isn’t an easy way to convert between these two formats inside the smart contract in TEAL. I always recommend TEAL smart contracts to only deal with 32-bit raw addresses (aka pk above), and have the SDK do the conversions.