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,28 +2,29 @@ var firstAccount = web3.eth.accounts[0]
var secondAccount = web3.eth.accounts[1] var secondAccount = web3.eth.accounts[1]
var thirdAccount = web3.eth.accounts[2] 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({ web3.eth.sendTransaction({
from: web3.eth.accounts[0], from: web3.eth.accounts[0],
to: web3.eth.accounts[1], to: web3.eth.accounts[1],
value: 623, value: 623,
gas: 50000, gas: 50000,
gasPrice: 20 gasPrice: 20
}) });
web3.eth.sendTransaction({ web3.eth.sendTransaction({
from: web3.eth.accounts[0], from: web3.eth.accounts[0],
to: web3.eth.accounts[2], to: web3.eth.accounts[2],
value: 291, value: 291,
gas: 50000, gas: 50000,
gasPrice: 20 gasPrice: 20
}) });
web3.eth.sendTransaction({ web3.eth.sendTransaction({
from: web3.eth.accounts[1], from: web3.eth.accounts[1],
to: web3.eth.accounts[3], to: web3.eth.accounts[3],
value: 53039, value: 53039,
gas: 50000, gas: 50000,
gasPrice: 20 gasPrice: 20
}) });
}