Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Common Gotchas page #669

Open
barnjamin opened this issue Dec 28, 2021 · 2 comments
Open

Common Gotchas page #669

barnjamin opened this issue Dec 28, 2021 · 2 comments

Comments

@barnjamin
Copy link
Contributor

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?

@mccabe-david
Copy link

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() )

@joe-p
Copy link
Collaborator

joe-p commented Dec 28, 2021

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@barnjamin @mccabe-david @joe-p and others