From ae8583df5781197a57e946cbc129ab0e6fc6ae82 Mon Sep 17 00:00:00 2001 From: James Zaki Date: Tue, 23 Apr 2024 08:21:27 +0100 Subject: [PATCH] docs info on Nargo.toml search --- .../compiling_contracts/how_to_compile_contract.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md index 3f53b1b55d7..6f047087f03 100644 --- a/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md +++ b/docs/docs/developers/contracts/compiling_contracts/how_to_compile_contract.md @@ -20,6 +20,17 @@ aztec-nargo compile This will output a JSON [artifact](./artifacts.md) for each contract in the project to a `target` folder containing the Noir ABI artifacts. +:::note +This command looks for `Nargo.toml` files by ascending up the parent directories, and will compile the top-most Nargo.toml file it finds. +Eg: if you are in `/hobbies/cool-game/contracts/easter-egg/`, and both `cool-game` and `easter-egg` contain a Nargo.toml file, then `aztec-compile` will be performed on `cool-game/Nargo.toml` and compile the project(s) specified within it. Eg +``` +[workspace] +members = [ + "contracts/easter-egg", +] +``` +::: + ### Typescript Interfaces You can use the code generator to autogenerate type-safe typescript classes for each of your contracts. These classes define type-safe methods for deploying and interacting with your contract based on their artifact.