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

Function jumpToTime

CLI/commands/helpers/time.js:33–49  ·  view source on GitHub ↗
(timestamp)

Source from the content-addressed store, hash-verified

31}
32
33function jumpToTime(timestamp) {
34 const id = Date.now();
35
36 return new Promise((resolve, reject) => {
37 web3.currentProvider.send(
38 {
39 jsonrpc: "2.0",
40 method: "evm_mine",
41 params: [timestamp],
42 id: id
43 },
44 (err, res) => {
45 return err ? reject(err) : resolve(res);
46 }
47 );
48 });
49}
50
51async function increaseTimeByDate(toTime) {
52 if (await web3.eth.net.getId() === 15) {

Callers 1

increaseTimeByDateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected