Skip to content

[PR #36] contracts/test/ absent — step-11 requires passing forge tests #116

@obchain

Description

@obchain

PR: #36 feat(contracts): Foundry workspace + CharonLiquidator skeleton

PRD reference: Step 11 acceptance criterion — Foundry workspace must include at least one passing forge test that exercises the contract skeleton, including dual-gate checks in executeOperation() and rescue() happy path.

Problem: PR introduces contracts/src/CharonLiquidator.sol and four interface files but adds no files under contracts/test/. Running forge test produces zero test results. CI reports green with zero tests run — false-green.

Impact: onlyOwner modifier (line 119), dual-gate require-checks in executeOperation() (lines 183-202), and rescue() function (lines 225-247) have no coverage. Future regressions not caught.

Fix: Add contracts/test/CharonLiquidator.t.sol with at minimum:

  • Unit test calling executeLiquidation() from non-owner address, expects revert.
  • Unit test calling rescue() for an ERC-20 and native BNB from owner address.
  • Test calling executeOperation() directly (not via flash loan), expects !pool revert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions