tokenbridge/oracle-e2e/test/utils.js
2020-10-31 21:02:56 +03:00

18 lines
559 B
JavaScript

const { BRIDGE_VALIDATORS_ABI } = require('../../commons')
async function delay(ms) {
return new Promise(res => setTimeout(res, ms))
}
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 = {
delay,
setRequiredSignatures
}