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

Function revertToSnapshot

test/helpers/time.js:79–97  ·  view source on GitHub ↗
(snapShotId)

Source from the content-addressed store, hash-verified

77}
78
79async function revertToSnapshot(snapShotId) {
80 return new Promise((resolve, reject) => {
81 web3.currentProvider.send(
82 {
83 jsonrpc: "2.0",
84 method: "evm_revert",
85 params: [snapShotId],
86 id: new Date().getTime()
87 },
88 err => {
89 if (err) {
90 return reject(err);
91 }
92
93 resolve();
94 }
95 );
96 });
97}
98
99export { increaseTime, takeSnapshot, revertToSnapshot, jumpToTime };

Calls

no outgoing calls

Tested by

no test coverage detected