diff --git a/yarn-project/cli/src/cmds/l1/index.ts b/yarn-project/cli/src/cmds/l1/index.ts index f5d67fa77f7..77e14801d62 100644 --- a/yarn-project/cli/src/cmds/l1/index.ts +++ b/yarn-project/cli/src/cmds/l1/index.ts @@ -78,8 +78,9 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger 'test test test test test test test test test test test junk', ) .addOption(l1ChainIdOption) - .option('--validator <addresse>', 'ethereum address of the validator', parseEthereumAddress) + .option('--validator <address>', 'ethereum address of the validator', parseEthereumAddress) .option('--rollup <address>', 'ethereum address of the rollup contract', parseEthereumAddress) + .option('--withdrawer <address>', 'ethereum address of the withdrawer', parseEthereumAddress) .action(async options => { const { addL1Validator } = await import('./update_l1_validators.js'); await addL1Validator({ @@ -89,6 +90,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger mnemonic: options.mnemonic, validatorAddress: options.validator, rollupAddress: options.rollup, + withdrawerAddress: options.withdrawer, log, debugLogger, }); diff --git a/yarn-project/cli/src/cmds/l1/update_l1_validators.ts b/yarn-project/cli/src/cmds/l1/update_l1_validators.ts index 40d06e2fd6d..abbf6d1f266 100644 --- a/yarn-project/cli/src/cmds/l1/update_l1_validators.ts +++ b/yarn-project/cli/src/cmds/l1/update_l1_validators.ts @@ -13,6 +13,7 @@ export interface RollupCommandArgs { privateKey?: string; mnemonic?: string; rollupAddress: EthAddress; + withdrawerAddress?: EthAddress; } export interface LoggerArgs { @@ -37,6 +38,7 @@ export async function addL1Validator({ mnemonic, validatorAddress, rollupAddress, + withdrawerAddress, log, debugLogger, }: RollupCommandArgs & LoggerArgs & { validatorAddress: EthAddress }) { @@ -67,7 +69,7 @@ export async function addL1Validator({ const txHash = await rollup.write.deposit([ validatorAddress.toString(), validatorAddress.toString(), - validatorAddress.toString(), + withdrawerAddress?.toString() ?? validatorAddress.toString(), config.minimumStake, ]); dualLog(`Transaction hash: ${txHash}`); diff --git a/yarn-project/end-to-end/scripts/native-network/validator.sh b/yarn-project/end-to-end/scripts/native-network/validator.sh index 580b60483b6..f2b7a7ee5a5 100755 --- a/yarn-project/end-to-end/scripts/native-network/validator.sh +++ b/yarn-project/end-to-end/scripts/native-network/validator.sh @@ -83,7 +83,7 @@ else # this may fail, so try 3 times echo "Adding validator $ADDRESS..." for i in {1..3}; do - node --no-warnings "$REPO"/yarn-project/aztec/dest/bin/index.js add-l1-validator --validator $ADDRESS --rollup $ROLLUP_CONTRACT_ADDRESS && break + node --no-warnings "$REPO"/yarn-project/aztec/dest/bin/index.js add-l1-validator --validator $ADDRESS --withdrawer $ADDRESS --rollup $ROLLUP_CONTRACT_ADDRESS && break sleep 15 done fi