mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-23 15:48:10 +00:00
add increseTime
This commit is contained in:
parent
0923267e66
commit
a4ab1cbe11
@ -195,3 +195,19 @@ function isException(error) {
|
|||||||
let strError = error.toString();
|
let strError = error.toString();
|
||||||
return strError.includes('invalid opcode') || strError.includes('invalid JUMP') || strError.includes('revert');
|
return strError.includes('invalid opcode') || strError.includes('invalid JUMP') || strError.includes('revert');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.increaseTime = async (web3, amount) => {
|
||||||
|
web3.currentProvider.sendAsync(
|
||||||
|
{
|
||||||
|
jsonrpc: '2.0',
|
||||||
|
method: 'evm_increaseTime',
|
||||||
|
params: [amount],
|
||||||
|
id: new Date().getSeconds()
|
||||||
|
},
|
||||||
|
(err, resp) => {
|
||||||
|
console.log(err)
|
||||||
|
console.log(resp)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user