diff --git a/.github/workflows/ci_deploy.yaml b/.github/workflows/ci_deploy.yaml index 3f06a0dca2..da6a979f67 100644 --- a/.github/workflows/ci_deploy.yaml +++ b/.github/workflows/ci_deploy.yaml @@ -39,7 +39,7 @@ jobs: docker-compose up -d - name: Deploy contracts - run: npx hardhat ignition deploy /home/runner/work/go-ethereum/go-ethereum/hardhat/ignition/modules/Lock.js + run: npx hardhat ignition deploy /home/runner/work/go-ethereum/go-ethereum/ignition/modules/Lock.js - name: Build and push Docker image diff --git a/ignition/modules/Lock.js b/ignition/modules/Lock.js new file mode 100644 index 0000000000..192492a363 --- /dev/null +++ b/ignition/modules/Lock.js @@ -0,0 +1,15 @@ +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 }; +});