40fef06503
* Renamed bridge-ui to ui, removed submodule * Re-added submodules. Pointing at 2.2.0 * Updated workspace name. * Removed package-lock.json. * Updated ui contracts to 2.3.0-rc0, installed node modules. * Added linting to ui * Integrated UI lint, test and build into CI. * Added readme for merging. * Consistent eslint module * Included plugins in dev dependencies. * Changed eslint version. * Add yarn.lock * Update deprecated node api. * Remove travis badge and config in ui * Update link to oracle in ui dependencies. * Remove duplicated gitter. * Remove unimplemented coverage and dependencies badges. * Update links in step 5 and 6 in UI * Cosmetic.
34 lines
923 B
JavaScript
34 lines
923 B
JavaScript
const Web3 = require('web3')
|
|
|
|
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://10.1.0.102:8545'))
|
|
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://10.1.0.103:8545'))
|
|
const account = '0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E'
|
|
const privateKey = '0x460635eb4ac4287de2d2393985e19b4a9f948ac533453a1044ab8d50330b0df9'
|
|
homeWeb3.eth.accounts.wallet.add(privateKey)
|
|
foreignWeb3.eth.accounts.wallet.add(privateKey)
|
|
|
|
function generateNewBlock(web3, address) {
|
|
return web3.eth.sendTransaction({
|
|
from: address,
|
|
to: '0x0000000000000000000000000000000000000000',
|
|
gasPrice: '1',
|
|
gas: '21000',
|
|
value: '1'
|
|
})
|
|
}
|
|
|
|
function main() {
|
|
setTimeout(async () => {
|
|
generateNewBlock(homeWeb3, account)
|
|
generateNewBlock(foreignWeb3, account)
|
|
main()
|
|
}, 5000)
|
|
}
|
|
|
|
main()
|
|
|
|
process.on('SIGTERM', function () {
|
|
console.log('Finishing sending blocks...')
|
|
process.exit(0);
|
|
});
|