-
Notifications
You must be signed in to change notification settings - Fork 189
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
docs: Updated content on deploying a new account. #1163
Conversation
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1163/documentation/ . |
|
||
== Deploy account transaction | ||
* Send a `DEPLOY_ACCOUNT` transaction. This method does not require a preexisting account. | ||
* Include the `deploy` syscall in the account contract, such as by invoking the Universal Deployer Contract (UDC) with an `INVOKE` transaction. This method requires an existing account to send the `INVOKE` transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Include the `deploy` syscall in the account contract, such as by invoking the Universal Deployer Contract (UDC) with an `INVOKE` transaction. This method requires an existing account to send the `INVOKE` transaction. | |
* Using the Universal Deployer Contract (UDC). This method requires an existing account to send the `INVOKE` transaction. |
Also suggest referencing the UDC documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* Decide on the account contract that you want to deploy | ||
* Compute your would-be account address off-chain | ||
* Send funds to this address | ||
. Verifies that the address has funds to pay for the deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If deployed using the DEPLOY_ACCOUNT
tx, then the fees are paid from the deployed account address. If by using the UDC, then from the sender account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* Compute your would-be account address off-chain | ||
* Send funds to this address | ||
. Verifies that the address has funds to pay for the deployment. | ||
. Executes the constructor with the given arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other way around, first the validate deploy or validate, only then the constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
. Verifies that the address has funds to pay for the deployment. | ||
. Executes the constructor with the given arguments. | ||
. Runs the respective validation function in the contract, as follows: | ||
** When deploying with the `DEPLOY_ACCOUNT` transaction type, the sequencer executes the `+__validate_deploy__+` function in the contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** When deploying with the `DEPLOY_ACCOUNT` transaction type, the sequencer executes the `+__validate_deploy__+` function in the contract. | |
** When deploying with the `DEPLOY_ACCOUNT` transaction type, the sequencer executes the `+__validate_deploy__+` function in the deployed contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
. Executes the constructor with the given arguments. | ||
. Runs the respective validation function in the contract, as follows: | ||
** When deploying with the `DEPLOY_ACCOUNT` transaction type, the sequencer executes the `+__validate_deploy__+` function in the contract. | ||
** When deploying with the `INVOKE` transaction type and a contract that includes the `deploy` syscall, such as the UDC, the sequencer executes the `+__validate__+` function in the contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** When deploying with the `INVOKE` transaction type and a contract that includes the `deploy` syscall, such as the UDC, the sequencer executes the `+__validate__+` function in the contract. | |
** When deploying using the UDC, the sequencer executes the `+__validate__+` function in the contract of the sender address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
** When deploying with the `DEPLOY_ACCOUNT` transaction type, the sequencer executes the `+__validate_deploy__+` function in the contract. | ||
** When deploying with the `INVOKE` transaction type and a contract that includes the `deploy` syscall, such as the UDC, the sequencer executes the `+__validate__+` function in the contract. | ||
. Charges fees from the new account address. | ||
. Sets the account's nonce to `1`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only true in case the account is deployed with the DEPLOY_ACCOUNT
tx. If by the UDC, the nonce of the deployed account is 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
Once the address has enough funds to pay for the deployment, you can then send a `deploy_account` transaction. | ||
== Deploying a new account with Starkli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest just having a link to the Starkli book instead of having this full section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got rid of the Prerequisites and the Procedure heading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
* Decide on the account contract that you want to deploy | ||
* Compute your would-be account address off-chain | ||
* Send funds to this address | ||
. Verifies that the address has funds to pay for the deployment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. Verifies that the address has funds to pay for the deployment. | |
. Verifies that the address has funds to pay for the deployment. | |
+ | |
If you use a `DEPLOY_ACCOUNT` transaction, the fees are paid from the address of the deployed account. If you use the UDC, the fees are paid from the sender's account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it from the numbered list and add as a note. For DEPLOY_ACCOUNT
tx, the fees are charged from the deployed address and from an INVOKE
tx using the UDC, the fees are charged from the sender's account (and add a link to the transactions types page to invoke tx v1 and v3).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1163/documentation/ . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comments
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1163/documentation/ . |
1 similar comment
Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/pr-1163/documentation/ . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Updated content on deploying a new account. * SME comments. * SME comments
Description of the Changes
This PR addresses #935.
PR Preview URL
Deploying new accounts
Also moved Universal Deployer Contract to a different place in the TOC:
Check List
<docs/feat/fix/chore>(optional scope): <description>
, e.g:fix: minor typos in code
This change is