feat(ci): wire contracts/*.sol into hardhat, bump solc to 0.8.26#32
Merged
Conversation
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>
dc57acb to
e8cd17e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to PR #27, which explicitly left contract wiring out of scope. The
contractsCI job was green but said "Nothing to compile" — hardhat looked atdeploy/contracts/while the real.solsources live incontracts/at the repo root.Changes
paths.root = ".."+paths.sources = "contracts"points hardhat at the real source tree, withcache/andartifacts/staying scoped underdeploy/.0.8.26withevmVersion: "cancun"because@openzeppelin/contracts ^5.0.0(already inpackage.json) usesmcopyinutils/Memory.sol, which needs the cancun opcode.Verification
Locally, from
deploy/: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)
_getChainlinkPrice(pairId, ...)vspairId(string)name-shadowing warning inOracleAdapter.sol.tests/contracts/.Test plan
contractsjob exercises actual Solidity sources on this PR— kcolbchain / Abhishek Krishna