-
Notifications
You must be signed in to change notification settings - Fork 168
fix(docs): add common data best practice #2879
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
base: main
Are you sure you want to change the base?
fix(docs): add common data best practice #2879
Conversation
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.
Thanks! I've left a couple of suggestions
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
Co-authored-by: Novus Nota <68142933+novusnota@users.noreply.github.com>
|
||
When deploying multiple instances of the same contract type, it's common for some data fields to be initially set to the same values. For example, in [NFT Item contracts](/cookbook/nfts), fields like `ownerAddress`, `content`, and `collectionAddress` might start as `null` or have the same collection address for all items. | ||
|
||
In such cases, it's more gas-efficient to group these common fields at the beginning of the contract parameters. |
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.
It's unclear from the description this is going to be cheaper.
Please add an explanation and a test that supports this recommendation.
Closes #2878