tenderly-wizard-v6
Version:
A tool for managing virtual testnets using Tenderly
15 lines (12 loc) • 411 B
text/typescript
import { network } from "hardhat";
import VirtualTestNet from "./virtual-test-net";
async function getVnetSnapshot() {
console.log("Getting snapshot");
const snapshot = await network.provider.send("evm_snapshot", []);
return snapshot;
}
(async () => {
const snapshot = await getVnetSnapshot();
console.log("Snapshot: ", snapshot);
VirtualTestNet.addToEnvFile("TENDERLY_SNAPSHOT", snapshot);
})();