Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
"@iden3/contracts": "2.5.0",
"@nomicfoundation/hardhat-foundry": "1.2.0",
"@nomicfoundation/hardhat-ignition-viem": "0.15.16",
"@nomicfoundation/hardhat-toolbox-viem": "4.1.1",
"@nomicfoundation/hardhat-toolbox-viem": "4.1.2",
"@nomiclabs/hardhat-solhint": "4.1.0",
"@openzeppelin/contracts": "5.3.0",
"@openzeppelin/contracts-upgradeable": "5.3.0",
"@openzeppelin/subgraphs": "0.1.8-5",
"async-lock": "1.4.1",
"circomlibjs": "0.1.7",
"ffjavascript": "0.3.1",
"hardhat": "2.27.1",
"hardhat": "2.28.6",
"poseidon-lite": "0.3.0",
"snarkjs": "0.7.5",
"solhint": "6.0.1",
Expand All @@ -60,7 +60,7 @@
"@graphprotocol/graph-ts": "0.38.2"
},
"devDependencies": {
"@nomicfoundation/hardhat-ethers": "3.1.2",
"@nomicfoundation/hardhat-ethers": "3.1.3",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Hardhat Network runtime defaults to the "Osaka" hardfork due to a dependency update, while contracts are compiled for "Cancun", creating a testing environment mismatch.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

The update to EDR 0.12.0-next.17 changes the default Hardhat Network hardfork to "Osaka". However, the project's hardhat.config.ts specifies evmVersion: "cancun" for compilation without explicitly setting the network's hardfork. This mismatch between the compilation target (Cancun) and the test execution environment (Osaka) can cause tests to fail. Potential issues include gas cost discrepancies, unexpected EVM behavior due to new EIPs in Osaka, transaction failures from different default gas limits, and broken error message assertions. The test suite is tightly coupled to the Hardhat Network's behavior, making it sensitive to such environmental changes.

💡 Suggested Fix

Explicitly set the hardfork in hardhat.config.ts to match the compiler target. Add hardfork: "cancun" to the hardhat network configuration object to ensure the test execution environment is consistent with the compilation settings.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L63

Potential issue: The update to `EDR 0.12.0-next.17` changes the default Hardhat Network
hardfork to "Osaka". However, the project's `hardhat.config.ts` specifies `evmVersion:
"cancun"` for compilation without explicitly setting the network's hardfork. This
mismatch between the compilation target (Cancun) and the test execution environment
(Osaka) can cause tests to fail. Potential issues include gas cost discrepancies,
unexpected EVM behavior due to new EIPs in Osaka, transaction failures from different
default gas limits, and broken error message assertions. The test suite is tightly
coupled to the Hardhat Network's behavior, making it sensitive to such environmental
changes.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7517490

"@nomicfoundation/hardhat-toolbox": "6.1.0",
"@openzeppelin/hardhat-upgrades": "3.9.1"
},
Expand Down
Loading