docs icon indicating copy to clipboard operation
docs copied to clipboard

Common Gotchas page

Open barnjamin opened this issue 3 years ago • 2 comments

Add a page noting things that are often confusing to new devs.

asset_sender - only used for clawback but seems like it'd be used to send an asset txn.accounts[0] and len(txn.accounts) - app call sender is implicitly 0 and length doesn't actually say how many elements in the array

what else?

barnjamin avatar Dec 28 '21 17:12 barnjamin

Txn.receiver() - only used for PaymentTxn, whereas Txn.asset_receiver() only used for AssetTransferTxn Similarly, Txn.amount() vs Txn.asset_amount() and Txn.close_remainder_to() vs Txn.asset_close_to() . Some Global methods can be referenced in Signature mode (like .group_size() ) while others cannot (like .latest_timestamp() )

mccabe-david avatar Dec 28 '21 17:12 mccabe-david

Clarification on accessing arguments in a stateless vs stateful might be helpful (pyteal.Arg vs TxnObject.application_args)

joe-p avatar Dec 28 '21 17:12 joe-p