-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…1735) ## Overview Now that noir-lang/noir#2403 has been merged into noir and released under the `aztec` tag. This PR now builds! This cleans up the syntax for noir programs, making them less verbose and easier to get started with. For example what originally was: ```rust fn mint( inputs: PrivateContextInputs, amount: Field, owner: Field ) -> distinct pub abi::PrivateCircuitPublicInputs { let storage = Storage::init(); let mut context = PrivateContext::new(inputs, abi::hash_args([amount, owner])); // Insert new note to a set of user notes and emit the newly created encrypted note preimage via oracle call. let owner_balance = storage.balances.at(owner); send_note(&mut context, owner_balance, amount, owner); emit_unencrypted_log(&mut context, "Coins minted"); // Return private circuit public inputs. All private functions need to return this as it is part of the input of the private kernel.. context.finish() } ``` can instead be written as: ```rust #[aztec(private)] fn mint( amount: Field, owner: Field ) { let storage = Storage::init(); // Insert new note to a set of user notes and emit the newly created encrypted note preimage via oracle call. let owner_balance = storage.balances.at(owner); send_note(&mut context, owner_balance, amount, owner); emit_unencrypted_log(&mut context, "Coins minted"); } ```
- Loading branch information
Showing
27 changed files
with
313 additions
and
929 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
yarn-project/aztec.js/src/abis/schnorr_single_key_account_contract.json
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.