Merge pull request #23 from zkokk/deploy

Path to ignition
This commit is contained in:
zkokk 2024-06-14 14:47:08 +03:00 committed by GitHub
commit ee02453db6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View file

@ -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

15
ignition/modules/Lock.js Normal file
View file

@ -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 };
});