Conversation
… templates folder
…y state by adding 1
…er clarity and consistency
…r AddProgram functionality
…am with a proof argument
…Num state with addProgramState
…tate for clarity and consistency
…lass to improve code readability and maintainability
…istency and clarity throughout the file
…lable for import in other files
…am module with lowercase 'k' in filename
…naming convention
…n the file along with Add
…rove performance and functionality
feat(customNextPage.js): update references from AddZKprogram to AddZkProgram for consistency feat(Add.test.ts): update import statement for AddZkProgram in Add.test.ts feat(Add.ts): update import statement for AddZkProgram in Add.ts feat(index.ts): update export statement for AddZkProgram in index.ts feat(interact.ts): update import statement for AddZkProgram in interact.ts
This reverts commit 540180c.
45930
left a comment
There was a problem hiding this comment.
This is great! Thank you for also redeploying a new contract and updating the interact script <3
I left some specific comments. As a general comment, does the new UI only work with next/react? If so, I'd be comfortable removing the not-as-supported frameworks from the options so that users can't accidentally opt into a worse experience. I ran the new code with nuxt and everything works fine, but the UI has no zkapp elements by default.
… zkProgramState for consistency and readability
… clean up code and improve readability
…nabled and proofsDisabled
… the current zkapp state
…t() method for better readability and consistency
… after transaction execution
…xtIndex.js, and customPageSvelte.js
@45930 We previously did not create UI zkapp interactions with
I assume you think option 1 is the path forward we should take. Is that correct? |
…xpected final state with integration test expecations
|
@ymekuria I think all options are reasonable. Let me take a quick poll in discord about who is using the zkapp-cli and what UI they are using. |
Summary
This PR adds a new
ZkPogramdefault example that is included with projects generated with thezkApp-CLI. This example was also coupled with a new example template UI that demonstrates an end to end flow of generating proofs with aZkProgram, and settling the state onMina.Impact
The previous default example set up the developer community for failure. While this example highlighted the intuitive nature of writing proofs with
o1js, it extended theSmartContractclass which abstracted away a lot of the complexity of what was happening.The new example was created using
ZkProgramwhich has more clear inputs, outputs, and behavior. This coupled with the end to end UI example will allow a developer to make more progress on their learning journey by providing an easy to reason about example that can quickly be iterated and rerun.Changes
AddZkProgramwas created that can generate proofs and update the stateAdd.tswas modified to only verify a proof created byAddZKprogramand settle the state toMinaAdd.tests.tswere modified to test interactions with theAddZkPograminteract.tswas modified to generate proofs with theAddZkProgramand interact with a deployedAdd.tscontract that settles the state toMinaZkProgram, and settling the state onMina.