Common generateNewBlock
This commit is contained in:
parent
25ff5888ba
commit
07968c347f
@ -1,4 +1,5 @@
|
||||
const Web3 = require('web3')
|
||||
const { generateNewBlock } = require('../utils')
|
||||
|
||||
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8541'))
|
||||
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8542'))
|
||||
@ -7,16 +8,6 @@ const privateKey = '0x460635eb4ac4287de2d2393985e19b4a9f948ac533453a1044ab8d5033
|
||||
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)
|
||||
|
@ -3,7 +3,7 @@ const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
const { generateNewBlock } = require('../../e2e-commons/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, 'build/contracts')
|
||||
|
||||
|
@ -3,7 +3,7 @@ const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
const { generateNewBlock } = require('../../e2e-commons/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, 'build/contracts')
|
||||
|
||||
|
@ -3,7 +3,7 @@ const Web3 = require('web3')
|
||||
const assert = require('assert')
|
||||
const promiseRetry = require('promise-retry')
|
||||
const { user, validator, temp, contractsPath } = require('../constants.json')
|
||||
const { generateNewBlock } = require('../utils/utils')
|
||||
const { generateNewBlock } = require('../../e2e-commons/utils')
|
||||
|
||||
const abisDir = path.join(__dirname, '..', contractsPath, '/build/contracts')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user