Activity - pheathwa - Algorand

Ed25519verify_bare Implementation

Yes - that appears to be it. The TEAL is unchanged, but it worked after replacing:

const signature = nacl.sign.detached(Buffer.from(recipientAddress), secretKeyBytes);

with:

const signature = nacl.sign.detached( algosdk.decodeAddress(recipientAddress).publicKey, secretKeyBytes);

So, the lesson is...


WalletConnect + Atomic Transactions + logicsig

It seems Walletconnect returns an empty array entry for those that were submitted with signers. With the additional check bolded below, this all seems to work, including having logicsigs with user-signed sigs in an atomic transaction - pretty cool.

// signedTxns contains empty rows where any sub...

Conditional callsubs or retsubs

Super helpful - following is my abbreviated working example. Thank you!

callsub handle_sub1
handle_sub1:
load 2
pushint 0
<=
bnz handle_retsub // Early return
// Do other stuff here
retsub // Normal return
handle_retsub:
retsub

Asset Optin Teal Code

I got it working as below. I re-read the docs and the reminder (for me) was that for Inner Transactions, the Sender defaults to the Application (Smart Contract) itself. But, when trying to use the AssetSender explicitly, it thinks it is a clawback. So, the below facilitates the Application Optin to ...