Skip to content

[PR #36] Missing evm_version=paris in foundry.toml — PUSH0 opcode reverts on BSC #114

@obchain

Description

@obchain

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

Problem: contracts/foundry.toml (lines 1-14) does not set evm_version. Default for solc 0.8.24 is shanghai, which emits PUSH0 opcode (EIP-3855). BSC mainnet (chain ID 56) runs a fork of go-ethereum that does not implement PUSH0. Any contract compiled with shanghai EVM target reverts on deployment to BSC.

Impact: Critical — contract cannot deploy to target chain. Silent failure: forge build succeeds locally, forge test passes against local Anvil defaulting to shanghai, but forge create --rpc-url $BNB_HTTP_URL produces a broken deployment.

Fix: Add to [profile.default] in contracts/foundry.toml:

evm_version = "paris"

Also add [profile.ci] / test annotation confirming fork test uses --evm-version paris when running against BSC fork.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions