Skip to content

Commit

Permalink
feat: remove hardhat deploy script
Browse files Browse the repository at this point in the history
feat: add Lock ignition module
chore: add ignition in tsconfig and remove deploy folder
  • Loading branch information
ahmedali8 committed Sep 19, 2024
1 parent 98ad7ea commit 62e8449
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 142 deletions.
48 changes: 0 additions & 48 deletions deploy/00_lock.ts

This file was deleted.

93 changes: 0 additions & 93 deletions deployments/hardhat_contracts.json

This file was deleted.

18 changes: 18 additions & 0 deletions ignition/modules/Lock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

const JAN_1ST_2030: number = 1893456000;
const ONE_GWEI: bigint = 1_000_000_000n;

export default buildModule("Lock", (m) => {
const deployer = m.getAccount(0);

const unlockTime = m.getParameter("unlockTime", JAN_1ST_2030);
const lockedAmount = m.getParameter("lockedAmount", ONE_GWEI);

const lock = m.contract("Lock", [unlockTime], {
from: deployer,
value: lockedAmount,
});

return { lock };
});
6 changes: 6 additions & 0 deletions ignition/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Lock": {
"unlockTime": "1893456000",
"lockedAmount": "1000000000n"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"exclude": ["node_modules"],
"files": ["./hardhat.config.ts"],
"include": [
"deploy/**/*",
"ignition/**/*",
"scripts/**/*",
"tasks/**/*",
"test/**/*",
Expand Down

0 comments on commit 62e8449

Please sign in to comment.