hardhat
Version: 
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
16 lines (11 loc) • 434 B
JavaScript
const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");
const JAN_1ST_2030 = 1893456000;
const ONE_GWEI = 1_000_000_000n;
module.exports = buildModule("LockModule", (m) => {
  const unlockTime = m.getParameter("unlockTime", JAN_1ST_2030);
  const lockedAmount = m.getParameter("lockedAmount", ONE_GWEI);
  const lock = m.contract("Lock", [unlockTime], {
    value: lockedAmount,
  });
  return { lock };
});