use of tech.pegasys.teku.test.acceptance.dsl.tools.deposits.DepositGenerator in project teku by ConsenSys.
the class TekuDepositSender method sendValidatorDeposits.
public ValidatorKeystores sendValidatorDeposits(final BesuNode eth1Node, final int numberOfValidators, UInt64 amount) throws InterruptedException, ExecutionException, TimeoutException {
final Eth1Address eth1Address = Eth1Address.fromHexString(eth1Node.getDepositContractAddress());
final Credentials eth1Credentials = Credentials.create(eth1Node.getRichBenefactorKey());
try (final DepositGenerator depositGenerator = new DepositGenerator(spec, eth1Node.getExternalJsonRpcUrl(), eth1Address, eth1Credentials, numberOfValidators, amount)) {
final SafeFuture<Void> future = depositGenerator.generate();
Waiter.waitFor(future, Duration.ofMinutes(2));
return new ValidatorKeystores(depositGenerator.getKeys());
}
}
Aggregations