mirror of
https://github.com/status-im/thundercloud.git
synced 2025-02-28 19:00:32 +00:00
Almost ready with deposits...
This commit is contained in:
parent
8223a2ed8e
commit
a7c6640e43
14
start.js
14
start.js
@ -214,17 +214,21 @@ async function makeValidatorDeposits() {
|
|||||||
["amount", "uint64"],
|
["amount", "uint64"],
|
||||||
["signature", "bytes96"],
|
["signature", "bytes96"],
|
||||||
],
|
],
|
||||||
}));
|
}), new BN('3').toBuffer('le', 8));
|
||||||
|
|
||||||
// A signer is needed to sign a transaction from a given account
|
// A signer is needed to sign a transaction from a given account
|
||||||
let signer = provider.getSigner(item.address);
|
let wallet = new ethers.Wallet(item.pk, provider);
|
||||||
contract.connect(signer);
|
contract.connect(wallet);
|
||||||
let tx = contract.deposit(sign_pubkey, withdrawalCredentials, signature_d);
|
let tx = await contract.deposit(sign_pubkey, withdrawal_credentials, signature_d);
|
||||||
|
|
||||||
console.log("Validator " + item.address + " is depositing 32 ether to the deposit contract at " + contractAddress + " via TX " + tx.hash);
|
console.log("Validator " + item.address + " is depositing 32 ether to the deposit contract at " + contractAddress + " via TX " + tx.hash);
|
||||||
tx.wait();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
serverStart();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function serverStart() {
|
||||||
const server = ganache.server(startupOptions);
|
const server = ganache.server(startupOptions);
|
||||||
server.listen(8545, function(err, blockchain) {
|
server.listen(8545, function(err, blockchain) {
|
||||||
// The server starts, you can connect to it with RPC now.
|
// The server starts, you can connect to it with RPC now.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user