Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

This PR improves the test coverage and naming conventions for OptimismMintableERC20Factory:

  1. Renamed 6 tests to use testFuzz_ prefix - These tests already used fuzz parameters but didn't follow the naming convention
  2. Corrected misleading function names - Tests referencing createStandardL2TokenWithDecimals now correctly reference createOptimismMintableERC20WithDecimals (the actual function being tested)
  3. Added tests for createOptimismMintableERC20 - This public function was only tested indirectly through createStandardL2Token
  4. Added test for version - Uses SemverComp.parse() to validate semver format

Review & Testing Checklist for Human

  • Verify the new createOptimismMintableERC20 tests are not redundant with existing createStandardL2Token tests (they test the same underlying logic since createStandardL2Token calls createOptimismMintableERC20)
  • Confirm the test naming changes align with repository conventions

Test Plan

cd packages/contracts-bedrock
just test-dev --match-path test/universal/OptimismMintableERC20Factory.t.sol -v

All 12 tests pass locally.

Notes

…MintableERC20Factory

- Rename test_createStandardL2Token_succeeds to testFuzz_createStandardL2Token_validParams_succeeds
- Rename test_createStandardL2TokenWithDecimals_succeeds to testFuzz_createOptimismMintableERC20WithDecimals_validParams_succeeds
- Rename test_createStandardL2Token_sameTwice_reverts to testFuzz_createStandardL2Token_sameTwice_reverts
- Rename test_createStandardL2TokenWithDecimals_sameTwice_reverts to testFuzz_createOptimismMintableERC20WithDecimals_sameTwice_reverts
- Rename test_createStandardL2Token_remoteIsZero_reverts to testFuzz_createStandardL2Token_remoteIsZero_reverts
- Rename test_createStandardL2TokenWithDecimals_remoteIsZero_reverts to testFuzz_createOptimismMintableERC20WithDecimals_remoteIsZero_reverts

Tests that use fuzz parameters should follow the testFuzz_ naming convention.
Also corrects function names in test names to match actual functions being tested.
…n functions

- Add OptimismMintableERC20Factory_CreateOptimismMintableERC20_Test contract
  - testFuzz_createOptimismMintableERC20_validParams_succeeds
  - testFuzz_createOptimismMintableERC20_remoteIsZero_reverts
- Add OptimismMintableERC20Factory_Version_Test contract
  - test_version_validFormat_succeeds using SemverComp.parse()

These public functions were not directly tested before.
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner January 1, 2026 07:13
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.44%. Comparing base (34726e8) to head (e1d13ee).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #18707      +/-   ##
===========================================
+ Coverage    70.92%   77.44%   +6.51%     
===========================================
  Files          189      134      -55     
  Lines        11244     7213    -4031     
===========================================
- Hits          7975     5586    -2389     
+ Misses        3123     1627    -1496     
+ Partials       146        0     -146     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 77.44% <ø> (+4.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 66 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JosepBove JosepBove enabled auto-merge January 6, 2026 20:36
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.

2 participants