-
Notifications
You must be signed in to change notification settings - Fork 147
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
Adding upgradability to features overview #1057
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
The example code isn’t linked in the document. Why not include a reference? |
@boray it's something I considered, but I think it distracts from the main point. The code is slightly different from the example, and it's not all necessary to understand the main point of the article. We could add it someday if we think it's needed. I included it as a test anyways because that will still give us an alert if the example becomes outdated. |
update.update.verificationKey = { | ||
isSome: Bool(true), | ||
value: verificationKey, | ||
}; |
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.
there's a nicer way to interact with the update
field of an account update:
update.account.verificationKey.set(verificationKey);
in general documented here: https://docs.minaprotocol.com/zkapps/writing-a-zkapp/feature-overview/on-chain-values#setting-account-fields
Adding a short article about upgradability to the
zkapps/feature-overview
section of the docs.This is inspired by DFST's example code shared here: https://discord.com/channels/484437221055922177/1207271738388516884/1291820682828710021
https://github.com/zkcloudworker/zkcloudworker-tests/blob/main/tests/vk.test.ts
I realized we don't have an example showing how to actually upgrade a smart contract in the docs. Only references to the permission to do so.
In addition to the article, I added a new directory in the examples called
feature-overview
, which has annpm test
script that we can run in CI. Other snippets of feature overview code could be added there to be included in CI as well.