starknet-io / starknet-docs

The repo for Starknet's developer documentation. Includes contribution guidelines and the Starknet documentation supplementary style guide
https://docs.starknet.io/
112 stars 159 forks source link

docs: Improvements to topics on account functions. #1198

Closed stoobie closed 3 months ago

stoobie commented 3 months ago

Description of the Changes

This PR is a cleanup of #945, which at some point introduced a lot of unwanted obsolete reversions.

Currently the section Validate limitations doesn't actually list the limitations. This PR fixes that.

PR Preview URL

Starknet’s account interface Account interface function reference

Check List


This change is Reviewable

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

ArniStarkware commented 3 months ago

components/Starknet/modules/architecture_and_concepts/pages/Accounts/account_functions.adoc line 23 at r1 (raw file):

You can only use the `+__validate_deploy__+` function in an account contract to validate the `DEPLOY_ACCOUNT` transaction for that same contract.
====
| `+__constructor__+` | If an account does not define a `+__constructor__+` function, the sequencer uses a default `+__constructor__+` function, which is empty.

no _.

Suggestion:

constructor
ArniStarkware commented 3 months ago

components/Starknet/modules/architecture_and_concepts/pages/Accounts/account_functions.adoc line 23 at r1 (raw file):

You can only use the `+__validate_deploy__+` function in an account contract to validate the `DEPLOY_ACCOUNT` transaction for that same contract.
====
| `+__constructor__+` | If an account does not define a `+__constructor__+` function, the sequencer uses a default `+__constructor__+` function, which is empty.

Suggestion:

| `+constructor+` | If an account does not define a `+constructor+` function, the sequencer uses a default `+constructor+` function, which is empty.
ArniStarkware commented 3 months ago

components/Starknet/modules/architecture_and_concepts/pages/Accounts/account_functions.adoc line 23 at r1 (raw file):

You can only use the `+__validate_deploy__+` function in an account contract to validate the `DEPLOY_ACCOUNT` transaction for that same contract.
====
| `+__constructor__+` | If an account does not define a `+__constructor__+` function, the sequencer uses a default `+__constructor__+` function, which is empty.

About the constructor - I like the fact it is on this page. If you can say that any contract has a constructor. As stated here, it is defined explicitly or used as the default constructor.

Code quote:

| `+__constructor__+` | If an account does not define a `+__constructor__+` function, the sequencer uses a default `+__constructor__+` function, which is empty.
github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

ArniStarkware commented 3 months ago

components/Starknet/modules/architecture_and_concepts/pages/Accounts/account_functions.adoc line 196 at r1 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…
Is this sentence + example readable? Is it clear that the `__validate_deploy__`'s parameters should be: `self`, `class_hash`, `contract_address_salt` + "the non-self arguments of the constructor"? Is it written somewhere else?

It is non-blocking in my opinion.

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .

github-actions[bot] commented 3 months ago

Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1198/documentation/ .