MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / increaseTime

Function increaseTime

test/helpers/time.js:22–38  ·  view source on GitHub ↗
(duration)

Source from the content-addressed store, hash-verified

20
21// Increases ganache time by the passed duration in seconds
22async function increaseTime(duration) {
23 await new Promise((resolve, reject) => {
24 web3.currentProvider.send({
25 jsonrpc: '2.0',
26 method: 'evm_increaseTime',
27 params: [duration],
28 },
29 (err, result) => {
30 if (err) {
31 return reject(err);
32 }
33 resolve(result.result);
34 }
35 );
36 });
37 await advanceBlock();
38}
39
40async function takeSnapshot() {
41 return new Promise((resolve, reject) => {

Calls 1

advanceBlockFunction · 0.85

Tested by

no test coverage detected