add loop to send transactions

This commit is contained in:
greg 2018-04-14 12:14:36 -04:00
parent 17bbad3d9b
commit 358f6a8aaf

View file

@ -2,15 +2,15 @@ var firstAccount = web3.eth.accounts[0]
var secondAccount = web3.eth.accounts[1]
var thirdAccount = web3.eth.accounts[2]
console.log(firstAccount)
for (var i = 0; i < 50; i++) {
console.log('\t\t' +i+ ' - iterations')
web3.eth.sendTransaction({
from: web3.eth.accounts[0],
to: web3.eth.accounts[1],
value: 623,
gas: 50000,
gasPrice: 20
})
});
web3.eth.sendTransaction({
from: web3.eth.accounts[0],
@ -18,7 +18,7 @@ web3.eth.sendTransaction({
value: 291,
gas: 50000,
gasPrice: 20
})
});
web3.eth.sendTransaction({
from: web3.eth.accounts[1],
@ -26,4 +26,5 @@ web3.eth.sendTransaction({
value: 53039,
gas: 50000,
gasPrice: 20
})
});
}