-
Notifications
You must be signed in to change notification settings - Fork 106
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
Move PrecomputeAddress function to 'contract' package #574
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The PrecomputeAddress function precompute the address of a contract instance thus it's not directly related to the 'account' package, but to the 'contract' package. The only use of this function to the 'account' package is to calculate the account contract address for deploying an account, and to satisfy that I created the PrecomputeAccountAddress function in the 'account' package that calls the PrecomputeAddress function passing the proper parameters.
thiagodeev
force-pushed
the
thiagodeev/split-precomputeaddress-function
branch
from
June 12, 2024 18:09
2adf264
to
c3e1569
Compare
rianhughes
reviewed
Jun 13, 2024
thiagodeev
force-pushed
the
thiagodeev/split-precomputeaddress-function
branch
from
June 14, 2024 13:18
72c6dad
to
deb512c
Compare
thiagodeev
force-pushed
the
thiagodeev/split-precomputeaddress-function
branch
2 times, most recently
from
June 14, 2024 13:22
50c604d
to
5eec779
Compare
thiagodeev
force-pushed
the
thiagodeev/split-precomputeaddress-function
branch
from
June 14, 2024 13:23
5eec779
to
f9a1769
Compare
rianhughes
reviewed
Jun 25, 2024
thiagodeev
force-pushed
the
thiagodeev/split-precomputeaddress-function
branch
from
June 25, 2024 19:13
0777f49
to
c0f732c
Compare
rianhughes
approved these changes
Jun 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PrecomputeAddress function precomputes the address of a contract instance thus it's not directly related to the 'account' package, but to the 'contract' package. The only use of this function in the 'account' package is to calculate the account contract address for deploying an account, and to satisfy that I created the PrecomputeAccountAddress function in the 'account' package that calls the PrecomputeAddress function passing the proper parameters.
This will prevent developers from generating wrong account addresses when deploying an account as this process requires the 'deployer_address' to be '0', but the previous function was not intuitive when asking for the 'deployerAddress' parameter without describing that it should be '0' in such case. The new account.PrecomputeAccountAddress function passes '0' as 'deployer_address' automatically to the contract.PrecomputeAccount without prompting the user.
https://docs.starknet.io/architecture-and-concepts/smart-contracts/contract-address/