Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Documentation on Contract accounts is inconsistent, as well as missing. #1105

Closed
pbennett opened this issue Apr 25, 2023 · 0 comments · Fixed by #1106
Closed

Documentation on Contract accounts is inconsistent, as well as missing. #1105

pbennett opened this issue Apr 25, 2023 · 0 comments · Fixed by #1106
Labels
minor update Any small code or wording update.

Comments

@pbennett
Copy link
Contributor

There doesn't appear to be a a good place that references the application id -> application address relationship.
A quick look in developer.algorand.org isn't turning up anything obvious.

https://developer.algorand.org/docs/get-details/accounts/?from_query=account%20address#accounts
mentions:

Other Account Types
Creating an Algorand address from a public key is not the only way. A valid address can also be produced from a compiled TEAL contract and through multisignature accounts. These accounts differ in how they authorize spends, but they look like any other account on Algorand. Read more about contract accounts in the Algorand Smart Contracts section. Multisignature accounts are described below.

but then going to that link (the alogrand smart contracts section link) - there's a brief line:

Applications have an associated Application Account that can hold Algos or ASAs balances and can be used as on-chain escrow accounts.

'application account' is a link that goes to: https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#using-a-smart-contract-as-an-escrow
So now we have 'contract account' - then called 'application account' - and link to application account never mentions anything about them nor how they're derived etc.

As part of describing a smart contract, the fact that it has a 1:1 paired Contract Account should be made clear and visualized. The SDK calls to make to derive it (TEAL, PyTeal, js-sdk, go-sdk, etc) as well as the underlying transformation SHA256("appID{64-bit BE App ID bytes}") -> PK
should be shown as well.

@pbennett pbennett added the minor update Any small code or wording update. label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor update Any small code or wording update.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant