mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
commit
ee02453db6
2 changed files with 16 additions and 1 deletions
2
.github/workflows/ci_deploy.yaml
vendored
2
.github/workflows/ci_deploy.yaml
vendored
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
- name: Deploy contracts
|
- 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
|
- name: Build and push Docker image
|
||||||
|
|
|
||||||
15
ignition/modules/Lock.js
Normal file
15
ignition/modules/Lock.js
Normal 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 };
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue