This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): Noir contract compiler CLI (#1561)
Exposes a Noir contract compiler to end users via the CLI. Adds a new `compile` command in the aztec-cli, also exposed via the `noir-compiler` package as `aztec-compile contract`. This command compiles a noir contract using nargo or noir-wasm (defaulting to nargo until noir-lang/noir#2210 is fixed), then reformats it for Aztec consumption, and optionally generates typescript wrappers and noir interfaces. All these actions are also exported as functions from the `noir-compiler` package, and are now used in the `copy-output` script. This PR also makes a few changes to the generated typescript type: `create` gets renamed to `at` (to make it clear we're not creating a new contract but creating an instance of the ts wrapper for a contract at an address) and the import path to the ABI is directly to the JSON file. We could add more (sub)commands just for generating the typescript or noir interfaces from the CLI, so it can be used in flows where nargo is used directly. We should also update the project README and add a page in the docs about how to compile one's own contracts (not sure if there's already one in the skeleton). Fixes #1457
- Loading branch information