Skip to content

Commit

Permalink
chore: Just nargo compile. (#3775)
Browse files Browse the repository at this point in the history
Ok. Don't be scared. 262 files sounds horrific but it's mostly path
updates and that kind of nonsense. The `noir-contracts` and
`noir-compiler` changes are probably what to focus on.

* We update boxes to use our build of nargo, and the modified
code-generator.
* We update paths in docs, as noir-contracts/src/contracts moved to
noir-contracts/contracts, as src is now pure codegen output.
* Contracts are now imported e.g. `import { ChildContractArtifact } from
'@aztec/noir-contracts/Child';`. You can still just import from top
level index, but it's pretty cruel to ask the runtime to parse all the
artifacts just to get one, they are huge.
* Contract files are now just named as per the name of the contract
(i.e. not snake case). Less moving parts is better here. Given it's
codegen output it's acceptable to allow the output names to be
inconsistent.
* aztec.js is now responsible for copying the account contracts into
itself, as opposed to have some other random module push code into it.
But we just need to get rid of this baked account stuff at some point
anyway.
* Got rid of lodash.zip in one place, and then restrained myself to not
go further. But think we should remove the "trivial" lodash cases at
some point.
* Tidied up yp/bootstrap a bit, it's basically in line with the
dockerfile at this point. Will prob make dockerfile just call bootstrap
as part of some other docker cleanup I'll do later.
* `source-map-support` in cli.
* Remove compile command from cli. We are just going to promote use of
aztec-nargo.
* The ts and noir generators now expect nargo output as input, rather
than our transformed abi. The ts generator outputs the transformed abi
as part of it's generation.
* Delete all the script stuff from `noir-contracts`. src folder is now
just the codegen output, and the codegen is done with a trivial script
to call compile and the ts generator in noir-compiler.
* Added an unused script called `transform_json_abi.sh` that uses a tiny
bit of jq to perform the transform. Probably to be deleted, especially
if we just stop transforming the noir output and use it directly, but it
served me as a useful tool at one point.
  • Loading branch information
charlielye authored and sirasistant committed Jan 4, 2024
1 parent 50925ea commit 338cb57
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/noir/modules_packages_crates/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Library crates_ don't have a `main` function and they don't compile down to ACI

#### Contracts

Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/src/contracts).
Contract crates are similar to binary crates in that they compile to ACIR which you can create proofs against. They are different in that they do not have a single `main` function, but are a collection of functions to be deployed to the [Aztec network](https://aztec.network). You can learn more about the technical details of Aztec in the [monorepo](https://github.com/AztecProtocol/aztec-packages) or contract [examples](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/noir-contracts/contracts).

### Crate Root

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the module is in a subdirectory, you can define a subdirectory in your git re
# Nargo.toml

[dependencies]
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/src/contracts/easy_private_token_contract"}
easy_private_token_contract = {tag ="v0.1.0-alpha62", git = "https://github.com/AztecProtocol/aztec-packages", directory = "yarn-project/noir-contracts/contracts/easy_private_token_contract"}
```

## Specifying a local dependency
Expand Down

0 comments on commit 338cb57

Please sign in to comment.