Skip to content

Update fork tests to use mainnet addresses#1472

Merged
andreivladbrg merged 7 commits intomainfrom
fix/fork-tests
Mar 20, 2026
Merged

Update fork tests to use mainnet addresses#1472
andreivladbrg merged 7 commits intomainfrom
fix/fork-tests

Conversation

@smol-ninja
Copy link
Member

Updated fork tests to use the mainnet contracts. Also closes #1335

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 441059a0-1e87-445d-92ef-260072ee168d

📥 Commits

Reviewing files that changed from the base of the PR and between 7b09200 and ed37730.

📒 Files selected for processing (5)
  • airdrops/tests/fork/merkle-campaign/MerkleExecute.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleInstant.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLL.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLT.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleVCA.t.sol
✅ Files skipped from review due to trivial changes (1)
  • airdrops/tests/fork/merkle-campaign/MerkleVCA.t.sol
🚧 Files skipped from review as they are similar to previous changes (4)
  • airdrops/tests/fork/merkle-campaign/MerkleExecute.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleInstant.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLT.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLL.t.sol

Walkthrough

Fork test setup across multiple modules was changed to use Ethereum mainnet-deployed contracts and factory methods. Fork.t.sol files now assign factory and core contracts from hardcoded mainnet addresses, remove local deployments and certain reinitialization steps, and update tests to compute expected Merkle campaign addresses via factory.computeMerkle*(campaignCreator, constructorParams). Some tests also use runtime-calculated fees and expanded protocol address lists.

Possibly related issues

  • None — no additional possibly-related issues were found beyond the linked issue already associated with this PR.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: updating fork tests to use mainnet addresses instead of locally-deployed contracts.
Description check ✅ Passed The PR description is directly related to the changeset, mentioning the update to mainnet contracts and referencing the linked issue #1335.
Linked Issues check ✅ Passed The changes implement Solution 1 from issue #1335 by replacing locally-computed merkle addresses with factory's computeMerkle functions and hardcoded mainnet contract addresses.
Out of Scope Changes check ✅ Passed All changes are scoped to fork test infrastructure updates to use mainnet addresses, directly addressing the linked issue requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fork-tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@utils/tests/fork/Comptroller.t.sol`:
- Line 66: Update the checklist comment above the test function
testForkFuzz_CalculateMinFeeWei to include "Bob" so it matches the assertion
string ("Airdrops, Bob, Flow, Lockup") — locate the comment block immediately
preceding testForkFuzz_CalculateMinFeeWei and edit the text from "Lockup, Flow
and Airdrops" to "Airdrops, Bob, Flow and Lockup" (or equivalent ordering
matching assertGt's message) so the checklist and the assertGt message are
consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 77a1fea1-885b-476d-baec-7f6998dbc0bb

📥 Commits

Reviewing files that changed from the base of the PR and between 6f36e85 and 2ca4fe9.

📒 Files selected for processing (11)
  • airdrops/tests/fork/Fork.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleExecute.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleInstant.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLL.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleLT.t.sol
  • airdrops/tests/fork/merkle-campaign/MerkleVCA.t.sol
  • bob/tests/bob/fork/Fork.t.sol
  • flow/tests/fork/Fork.t.sol
  • lockup/tests/fork/Fork.t.sol
  • lockup/tests/fork/LockupPriceGated.t.sol
  • utils/tests/fork/Comptroller.t.sol

Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

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

generally looks good, two questions:

wdyt about adding the contract addresses in utils' test constants?

this way we'd have them only in one place

@smol-ninja
Copy link
Member Author

wdyt about adding the contract addresses in utils' test constants

It would increase maintenance cost. With every change, we would have to bump utils. So I am not in favour of that approach.

Copy link
Member

@andreivladbrg andreivladbrg left a comment

Choose a reason for hiding this comment

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

It would increase maintenance cost. With every change, we would have to bump utils. So I am not in favour of that approach.

yeah, fair enough lets keep it this way

@andreivladbrg andreivladbrg merged commit 08e946e into main Mar 20, 2026
42 checks passed
@andreivladbrg andreivladbrg deleted the fix/fork-tests branch March 20, 2026 13:04
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.

Fork tests fail on profiles without via_ir = true

2 participants