Summary
CharonLiquidator.t.sol is compiled under the same foundry.toml as the production contracts. That foundry.toml has no evm_version key (confirmed on branch feat/13-foundry-fork-tests). solc 0.8.24 defaults to the shanghai EVM target, which emits the PUSH0 (0x5F) opcode. BNB Smart Chain does not support PUSH0 and will revert any contract containing it.
This PR adds a new file to the build surface that inherits the same miscompile risk previously filed against PRs #36 and #37 (issues #114, #118). Until foundry.toml is fixed, forge test passing locally gives a false-green signal because the local EVM accepts PUSH0; a deployment or fork-test against BSC mainnet will fail.
Location
- File:
contracts/foundry.toml — missing evm_version = "paris" under [profile.default]
- Inheritor:
contracts/test/CharonLiquidator.t.sol (introduced in this PR)
PRD / invariant violated
CLAUDE.md scope: Venus Protocol on BNB Chain only. Correct EVM target is mandatory for any contract compiled for deployment or testing on BSC.
Risk
All 16 deterministic tests pass in the Foundry local EVM (which accepts PUSH0), giving a misleading green status. If the fork test (Section E) is ever un-skipped against a real BSC node, or if any contract is deployed without re-compiling, the transaction will revert at the PUSH0 instruction.
Fix
Add evm_version = "paris" to [profile.default] in contracts/foundry.toml. This is the same fix required by issues #114 and #118. This issue tracks the test file specifically so it is not silently closed when the production-contract issues are resolved.
Refs #38
Summary
CharonLiquidator.t.sol is compiled under the same foundry.toml as the production contracts. That foundry.toml has no
evm_versionkey (confirmed on branch feat/13-foundry-fork-tests). solc 0.8.24 defaults to theshanghaiEVM target, which emits the PUSH0 (0x5F) opcode. BNB Smart Chain does not support PUSH0 and will revert any contract containing it.This PR adds a new file to the build surface that inherits the same miscompile risk previously filed against PRs #36 and #37 (issues #114, #118). Until foundry.toml is fixed,
forge testpassing locally gives a false-green signal because the local EVM accepts PUSH0; a deployment or fork-test against BSC mainnet will fail.Location
contracts/foundry.toml— missingevm_version = "paris"under[profile.default]contracts/test/CharonLiquidator.t.sol(introduced in this PR)PRD / invariant violated
CLAUDE.md scope: Venus Protocol on BNB Chain only. Correct EVM target is mandatory for any contract compiled for deployment or testing on BSC.
Risk
All 16 deterministic tests pass in the Foundry local EVM (which accepts PUSH0), giving a misleading green status. If the fork test (Section E) is ever un-skipped against a real BSC node, or if any contract is deployed without re-compiling, the transaction will revert at the PUSH0 instruction.
Fix
Add
evm_version = "paris"to[profile.default]incontracts/foundry.toml. This is the same fix required by issues #114 and #118. This issue tracks the test file specifically so it is not silently closed when the production-contract issues are resolved.Refs #38