diff --git a/yarn-project/aztec-cli/README.md b/yarn-project/aztec-cli/README.md index e8fb42516f24..69313b809115 100644 --- a/yarn-project/aztec-cli/README.md +++ b/yarn-project/aztec-cli/README.md @@ -324,7 +324,7 @@ Options: - `-c, --contract-abi `: The compiled contract's ABI in JSON format. You can also use one of Aztec's example contracts found in (@aztec/noir-contracts)[https://www.npmjs.com/package/@aztec/noir-contracts], e.g. PrivateTokenContractAbi. - `-ca, --contract-address
`: Address of the contract. - `-k, --private-key `: The sender's private key. -- `-u, --rpcUrl `: URL of the Aztec RPC. Default: `http://localhost:8080`. +- `-u, --rpc-url `: URL of the Aztec RPC. Default: `http://localhost:8080`. This command calls a function on an Aztec contract. It requires the contract's ABI, address, function name, and optionally, function arguments. The command executes the function call and displays the transaction details. @@ -352,7 +352,7 @@ Options: - `-c, --contract-abi `: The compiled contract's ABI in JSON format. You can also use one of Aztec's example contracts found in (@aztec/noir-contracts)[https://www.npmjs.com/package/@aztec/noir-contracts], e.g. PrivateTokenContractAbi. - `-ca, --contract-address
`: Address of the contract. - `-f, --from `: Public key of the transaction viewer. If empty, it will try to find an account in the RPC. -- `-u, --rpcUrl `: URL of the Aztec RPC. Default: `http://localhost:8080`. +- `-u, --rpc-url `: URL of the Aztec RPC. Default: `http://localhost:8080`. This command simulates the execution of a view function on a deployed contract without modifying the state. It requires the contract's ABI, address, function name, and optionally, function arguments. The command displays the result of the view function. diff --git a/yarn-project/aztec-cli/src/index.ts b/yarn-project/aztec-cli/src/index.ts index 1399aba3f3c0..d4a101981d49 100644 --- a/yarn-project/aztec-cli/src/index.ts +++ b/yarn-project/aztec-cli/src/index.ts @@ -361,7 +361,7 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command { ) .requiredOption('-ca, --contract-address
', 'Aztec address of the contract.') .option('-k, --private-key ', "The sender's private key.", PRIVATE_KEY) - .option('-u, --rpcUrl ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') + .option('-u, --rpc-url ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') .action(async (functionName, options) => { const { contractAddress, functionArgs, contractAbi } = await prepTx( @@ -413,7 +413,7 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command { ) .requiredOption('-ca, --contract-address
', 'Aztec address of the contract.') .option('-f, --from ', 'Public key of the TX viewer. If empty, will try to find account in RPC.') - .option('-u, --rpcUrl ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') + .option('-u, --rpc-url ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') .action(async (functionName, options) => { const { contractAddress, functionArgs, contractAbi } = await prepTx( options.contractAbi, @@ -461,7 +461,7 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command { program .command('block-number') .description('Gets the current Aztec L2 block number.') - .option('-u, --rpcUrl ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') + .option('-u, --rpc-url ', 'URL of the Aztec RPC', AZTEC_RPC_HOST || 'http://localhost:8080') .action(async (options: any) => { const client = createClient(options.rpcUrl); const num = await client.getBlockNumber();