Skip to content

Commit

Permalink
fix: noir contract build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Aug 2, 2023
1 parent 68bff29 commit 94f0838
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion yarn-project/noir-contracts/scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "child-contract"
name = "child_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "easy-zk-token-contract"
name = "easy_zk_token_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ecdsa-account-contract"
name = "ecdsa_account_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "escrow-contract"
name = "escrow_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "lending-contract"
name = "lending_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "non-native-token-contract"
name = "non_native_token_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "parent-contract"
name = "parent_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pending-commitments-contract"
name = "pending_commitments_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pokable-token-contract"
name = "pokeable_token_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "public-token-contract"
name = "public_token_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "schnorr-multi-key-account-contract"
name = "schnorr_multi_key_account_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "schnorr-single-key-account-contract"
name = "schnorr_single_key_account_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "test-contract"
name = "test_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "uniswap-contract"
name = "uniswap_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "zk-token-contract"
name = "zk_token_contract"
authors = [""]
compiler_version = "0.1"

Expand Down
7 changes: 4 additions & 3 deletions yarn-project/noir-contracts/src/scripts/copy_output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-libs/easy-private-state/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "easy-private-state"
name = "easy_private_state"
authors = ["aztec-labs"]
compiler_version = "0.7.1"

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-libs/noir-aztec/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "noir-aztec"
name = "noir_aztec"
authors = [""]
compiler_version = "0.1"

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-libs/value-note/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "value-note"
name = "value_note"
authors = ["aztec-labs"]
compiler_version = "0.7.1"

Expand Down

0 comments on commit 94f0838

Please sign in to comment.