diff --git a/docs/docs/dev_docs/contracts/deploying.md b/docs/docs/dev_docs/contracts/deploying.md index 2751f0d6ae4..4afbad89aa1 100644 --- a/docs/docs/dev_docs/contracts/deploying.md +++ b/docs/docs/dev_docs/contracts/deploying.md @@ -1,3 +1,33 @@ # Deploying contracts -Once you have [compiled](./compiled.md) your contracts you can proceed to deploying them using `aztec-cli`. \ No newline at end of file +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 `: 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 ` (default: `[]`): Arguments to pass to the contract constructor. +- `--rpc-url ` (default: `http://localhost:8080`): URL of the Aztec node to connect to. +- `--public-key ` (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 ` (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 [-args ] [--rpc-url ] [--public-key ] [--salt ] +``` \ No newline at end of file