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

Function jumpToTime

test/helpers/time.js:60–77  ·  view source on GitHub ↗
(timestamp)

Source from the content-addressed store, hash-verified

58}
59
60async function jumpToTime(timestamp) {
61 await new Promise(
62 (resolve, reject) => {
63 web3.currentProvider.send({
64 jsonrpc: '2.0',
65 method: "evm_mine",
66 params: [timestamp],
67 },
68 (err, result) => {
69 if (err) {
70 return reject(err);
71 }
72 resolve(result.result);
73 }
74 );
75 });
76 await advanceBlock();
77}
78
79async function revertToSnapshot(snapShotId) {
80 return new Promise((resolve, reject) => {

Callers 1

Calls 1

advanceBlockFunction · 0.85

Tested by

no test coverage detected