2020-01-20 17:00:04 -03:00
|
|
|
const { BRIDGE_VALIDATORS_ABI } = require('../../commons')
|
|
|
|
|
2020-10-31 21:02:56 +03:00
|
|
|
async function delay(ms) {
|
|
|
|
return new Promise(res => setTimeout(res, ms))
|
|
|
|
}
|
|
|
|
|
2020-01-20 17:00:04 -03:00
|
|
|
const setRequiredSignatures = async ({ bridgeContract, web3, requiredSignatures, options }) => {
|
|
|
|
const validatorAddress = await bridgeContract.methods.validatorContract().call()
|
|
|
|
const validatorContract = new web3.eth.Contract(BRIDGE_VALIDATORS_ABI, validatorAddress)
|
|
|
|
|
|
|
|
return validatorContract.methods.setRequiredSignatures(requiredSignatures).send(options)
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
2020-10-31 21:02:56 +03:00
|
|
|
delay,
|
2020-01-20 17:00:04 -03:00
|
|
|
setRequiredSignatures
|
|
|
|
}
|