-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
# Deploying contracts | ||
|
||
Once you have [compiled](./compiled.md) your contracts you can proceed to deploying them using `aztec-cli`. | ||
Once you have [compiled](./compiling.md) your contracts you can proceed to deploying them using `aztec-cli`. | ||
|
||
## Prerequisites | ||
- aztec-cli installed | ||
- contract artifacts ready | ||
|
||
## Deploy | ||
|
||
To deploy the contracts you can use the `aztec-cli` | ||
|
||
```bash | ||
aztec-cli deploy --contract-abi /path/to/contract/abi.json | ||
``` | ||
|
||
### Arguments | ||
This command takes the following mandatory arguments: | ||
|
||
- `--contract-abi <file>`: Path to the contract ABI file in JSON format (e.g. `build/contracts/PrivateToken.json`). | ||
Alternatively you can pass here a name of a contract ABI as exported by `@aztec/noir-contracts` (e.g. `PrivateTokenContractAbi`). | ||
|
||
and the following optional arguments: | ||
- `-args <constructorArgs...>` (default: `[]`): Arguments to pass to the contract constructor. | ||
- `--rpc-url <string>` (default: `http://localhost:8080`): URL of the Aztec node to connect to. | ||
- `--public-key <string>` (default: `undefined`): Optional encryption public key for this contract. Set this only if this contract is expected to receive private notes, which will be encrypted using this public key.' | ||
- `--salt <string>` (default: random value): Hexadecimal string used when computing the contract address of the contract being deployed. | ||
By default is set to a random value. | ||
Set it, if you need a deterministic contract address (same functionality as Ethereum's `CREATE2` opcode). | ||
|
||
```bash | ||
aztec-cli deploy --contract-abi <file> [-args <constructorArgs...>] [--rpc-url <string>] [--public-key <string>] [--salt <string>] | ||
``` |