Skip to content

feat(ci): wire contracts/*.sol into hardhat, bump solc to 0.8.26#32

Merged
abhicris merged 1 commit into
mainfrom
fix/wire-contracts-to-hardhat
Apr 23, 2026
Merged

feat(ci): wire contracts/*.sol into hardhat, bump solc to 0.8.26#32
abhicris merged 1 commit into
mainfrom
fix/wire-contracts-to-hardhat

Conversation

@abhicris
Copy link
Copy Markdown
Contributor

Summary

Follow-up to PR #27, which explicitly left contract wiring out of scope. The contracts CI job was green but said "Nothing to compile" — hardhat looked at deploy/contracts/ while the real .sol sources live in contracts/ at the repo root.

Changes

  • paths.root = ".." + paths.sources = "contracts" points hardhat at the real source tree, with cache/ and artifacts/ staying scoped under deploy/.
  • Solidity bumped to 0.8.26 with evmVersion: "cancun" because @openzeppelin/contracts ^5.0.0 (already in package.json) uses mcopy in utils/Memory.sol, which needs the cancun opcode.

Verification

Locally, from deploy/:

$ rm -rf cache artifacts && npx hardhat compile
Compiled 24 Solidity files successfully (evm target: cancun).

CI will now actually type-check our four contracts: MeridianVault.sol, MeridianVaultERC4626.sol (the ERC-4626 vault-share token), OracleAdapter.sol, StrategyExecutor.sol.

Follow-ups (separate PRs)

  • Fix _getChainlinkPrice(pairId, ...) vs pairId(string) name-shadowing warning in OracleAdapter.sol.
  • Add Foundry forge-test suite under tests/contracts/.

Test plan

  • Local compile clean (24 files, cancun target)
  • CI contracts job exercises actual Solidity sources on this PR

kcolbchain / Abhishek Krishna

PR #27 unbroke `npx hardhat compile` (got `npm ci` working), but the job
still output "Nothing to compile" — hardhat looked at `deploy/contracts/`
which doesn't exist; the repo's Solidity sources live in `contracts/` at
the repo root.

This wires them up properly:

- `paths.root = ".."` + `paths.sources = "contracts"` points hardhat at
  the real source tree. `paths.tests` / `paths.cache` / `paths.artifacts`
  follow the same root-relative convention so the structure stays clean.
- Solidity bumped to `0.8.26` with `evmVersion: "cancun"` because
  `@openzeppelin/contracts ^5.0.0` (already in `package.json`) uses
  `mcopy` in `utils/Memory.sol`, which needs the cancun opcode.

Verification (locally, from `deploy/`):

```
$ rm -rf cache artifacts && npx hardhat compile
Compiled 24 Solidity files successfully (evm target: cancun).
```

The `contracts` CI job on main will now actually type-check the four
Solidity files we ship — `MeridianVault.sol`, `MeridianVaultERC4626.sol`
(ERC-4626 vault-share token), `OracleAdapter.sol`, `StrategyExecutor.sol`
— instead of silently succeeding on an empty source set.

Follow-up (separate PR): fix the `_getChainlinkPrice(pairId, ...)` vs
`pairId(string)` name-shadowing warning in OracleAdapter.sol.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@abhicris abhicris force-pushed the fix/wire-contracts-to-hardhat branch from dc57acb to e8cd17e Compare April 23, 2026 13:07
@abhicris abhicris merged commit c8c8fc9 into main Apr 23, 2026
4 checks passed
@abhicris abhicris deleted the fix/wire-contracts-to-hardhat branch April 23, 2026 13:09
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