diff --git a/yarn-project/noir-contracts/scripts/compile.sh b/yarn-project/noir-contracts/scripts/compile.sh index 707af363b246..4e0770431a28 100755 --- a/yarn-project/noir-contracts/scripts/compile.sh +++ b/yarn-project/noir-contracts/scripts/compile.sh @@ -39,7 +39,7 @@ build() { # If VERBOSE is not set, compile with 'nargo' and redirect standard error (stderr) to /dev/null and standard output (stdout) to /dev/null. # If the compilation fails, rerun the compilation with 'nargo' and show the compiler output. - nargo compile main --contracts; + nargo compile --contracts; } process() { diff --git a/yarn-project/noir-contracts/src/contracts/child_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/child_contract/Nargo.toml index a3878b2825ca..7c96aee5fd7d 100644 --- a/yarn-project/noir-contracts/src/contracts/child_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/child_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "child-contract" +name = "child_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/easy_zk_token_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/easy_zk_token_contract/Nargo.toml index f5fc68e039f2..4b040bb699dc 100644 --- a/yarn-project/noir-contracts/src/contracts/easy_zk_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/easy_zk_token_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "easy-zk-token-contract" +name = "easy_zk_token_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/Nargo.toml index 09bb5d3e6253..be0bf7e29cb0 100644 --- a/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/ecdsa_account_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "ecdsa-account-contract" +name = "ecdsa_account_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/escrow_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/escrow_contract/Nargo.toml index 5716aec9f072..5083b93b66fe 100644 --- a/yarn-project/noir-contracts/src/contracts/escrow_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/escrow_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "escrow-contract" +name = "escrow_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/lending_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/lending_contract/Nargo.toml index cc8e31c7609b..d26d7583b126 100644 --- a/yarn-project/noir-contracts/src/contracts/lending_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/lending_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "lending-contract" +name = "lending_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/non_native_token_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/non_native_token_contract/Nargo.toml index b7e8e10246b6..63751f02c862 100644 --- a/yarn-project/noir-contracts/src/contracts/non_native_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/non_native_token_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "non-native-token-contract" +name = "non_native_token_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/parent_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/parent_contract/Nargo.toml index d8c6432a9b54..a7f57efaf5ca 100644 --- a/yarn-project/noir-contracts/src/contracts/parent_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/parent_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "parent-contract" +name = "parent_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/Nargo.toml index 7bb932739915..1d914763c7aa 100644 --- a/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/pending_commitments_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "pending-commitments-contract" +name = "pending_commitments_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/pokeable_token_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/pokeable_token_contract/Nargo.toml index 477074432fff..8557d4f3dd48 100644 --- a/yarn-project/noir-contracts/src/contracts/pokeable_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/pokeable_token_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "pokable-token-contract" +name = "pokeable_token_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/public_token_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/public_token_contract/Nargo.toml index 452418f666b0..258bb88aa394 100644 --- a/yarn-project/noir-contracts/src/contracts/public_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/public_token_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "public-token-contract" +name = "public_token_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/schnorr_multi_key_account_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/schnorr_multi_key_account_contract/Nargo.toml index f17aadf2fdc4..38858a840d47 100644 --- a/yarn-project/noir-contracts/src/contracts/schnorr_multi_key_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/schnorr_multi_key_account_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "schnorr-multi-key-account-contract" +name = "schnorr_multi_key_account_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/schnorr_single_key_account_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/schnorr_single_key_account_contract/Nargo.toml index 1d9794874c15..1a585dda1795 100644 --- a/yarn-project/noir-contracts/src/contracts/schnorr_single_key_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/schnorr_single_key_account_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "schnorr-single-key-account-contract" +name = "schnorr_single_key_account_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/test_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/test_contract/Nargo.toml index 8d5249dbd4c1..1cc0ca4d27c9 100644 --- a/yarn-project/noir-contracts/src/contracts/test_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/test_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "test-contract" +name = "test_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/uniswap_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/uniswap_contract/Nargo.toml index 636bbd7ffc9a..72685a5207ad 100644 --- a/yarn-project/noir-contracts/src/contracts/uniswap_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/uniswap_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "uniswap-contract" +name = "uniswap_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/contracts/zk_token_contract/Nargo.toml b/yarn-project/noir-contracts/src/contracts/zk_token_contract/Nargo.toml index 5a2e62d9c972..7096f5fa8bec 100644 --- a/yarn-project/noir-contracts/src/contracts/zk_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/src/contracts/zk_token_contract/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "zk-token-contract" +name = "zk_token_contract" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-contracts/src/scripts/copy_output.ts b/yarn-project/noir-contracts/src/scripts/copy_output.ts index b097ab47413e..219545795696 100644 --- a/yarn-project/noir-contracts/src/scripts/copy_output.ts +++ b/yarn-project/noir-contracts/src/scripts/copy_output.ts @@ -105,10 +105,11 @@ const main = () => { const name = process.argv[2]; if (!name) throw new Error(`Missing argument contract name`); - const folder = `src/contracts/${snakeCase(name)}_contract`; - const source = readFileSync(`${folder}/src/main.nr`).toString(); + const folderName = `${snakeCase(name)}_contract`; + const folderPath = `src/contracts/${folderName}`; + const source = readFileSync(`${folderPath}/src/main.nr`).toString(); const contractName = process.argv[3] ?? upperFirst(camelCase(name)); - const build = JSON.parse(readFileSync(`${folder}/target/main-${contractName}.json`).toString()); + const build = JSON.parse(readFileSync(`${folderPath}/target/${folderName}-${contractName}.json`).toString()); const artifacts = 'src/artifacts'; const abi = { diff --git a/yarn-project/noir-libs/easy-private-state/Nargo.toml b/yarn-project/noir-libs/easy-private-state/Nargo.toml index c8efb71d005f..5cb4146f22bc 100644 --- a/yarn-project/noir-libs/easy-private-state/Nargo.toml +++ b/yarn-project/noir-libs/easy-private-state/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "easy-private-state" +name = "easy_private_state" authors = ["aztec-labs"] compiler_version = "0.7.1" diff --git a/yarn-project/noir-libs/noir-aztec/Nargo.toml b/yarn-project/noir-libs/noir-aztec/Nargo.toml index ac30862b5548..9681257346da 100644 --- a/yarn-project/noir-libs/noir-aztec/Nargo.toml +++ b/yarn-project/noir-libs/noir-aztec/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "noir-aztec" +name = "noir_aztec" authors = [""] compiler_version = "0.1" diff --git a/yarn-project/noir-libs/value-note/Nargo.toml b/yarn-project/noir-libs/value-note/Nargo.toml index a6da913e38be..ed87714a07f5 100644 --- a/yarn-project/noir-libs/value-note/Nargo.toml +++ b/yarn-project/noir-libs/value-note/Nargo.toml @@ -1,5 +1,5 @@ [package] -name = "value-note" +name = "value_note" authors = ["aztec-labs"] compiler_version = "0.7.1"