Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion yarn-project/cli/src/cmds/l1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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,
});
Expand Down
4 changes: 3 additions & 1 deletion yarn-project/cli/src/cmds/l1/update_l1_validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface RollupCommandArgs {
privateKey?: string;
mnemonic?: string;
rollupAddress: EthAddress;
withdrawerAddress?: EthAddress;
}

export interface LoggerArgs {
Expand All @@ -37,6 +38,7 @@ export async function addL1Validator({
mnemonic,
validatorAddress,
rollupAddress,
withdrawerAddress,
log,
debugLogger,
}: RollupCommandArgs & LoggerArgs & { validatorAddress: EthAddress }) {
Expand Down Expand Up @@ -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}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading