Skip to content

Upgrade lending boilerplate to Hardhat v3, OZ v5 and add tests#33

Open
Heyuplol-101 wants to merge 1 commit intorsksmart:mainfrom
Heyuplol-101:lending-boilerplateUpdate
Open

Upgrade lending boilerplate to Hardhat v3, OZ v5 and add tests#33
Heyuplol-101 wants to merge 1 commit intorsksmart:mainfrom
Heyuplol-101:lending-boilerplateUpdate

Conversation

@Heyuplol-101
Copy link

  • Tooling

    • Migrate to Hardhat v3.1.0 with TypeScript hardhat.config.ts and EDR support.
    • Add Hardhat Ignition deployment module and update package.json scripts (demo, demo:testnet, deploy, deploy:testnet).
    • Remove the unused Sepolia network from the Hardhat config.
  • Contracts

    • Update all contracts to Solidity ^0.8.28.
    • Switch imports to OpenZeppelin v5.4.0 (ERC20, Ownable, ReentrancyGuard, SafeERC20).
    • Keep the original lending logic and getAccountData interface unchanged.
  • Scripts & Tests

    • Convert scripts/demo.js and scripts/demo-testnet.js to ESM (import hre from "hardhat").
    • Add test/LendingPool.test.ts covering:
      • deposit / zero‑deposit
      • borrow with and without collateral
      • repay flow
      • withdraw with health‑factor safety check
      • health factor with and without debt
  • Security & Repo Hygiene

    • Restore .github security workflows: CodeQL, Dependency Review, Scorecard, Dependabot.
    • Ensure .gitignore excludes artifacts/, cache/, ignition/deployments/,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant