Skip to content

Conversation

@lumoswiz
Copy link
Collaborator

@lumoswiz lumoswiz commented Jan 6, 2026

Summary

  • Introduced a storage utility for ERC-20 tests so we can set balances, allowances, and total supply directly, reducing reliance on bloated harnesses when facets expose only partial functionality.

Changes Made

  • Added ERC20StorageUtils under test/utils/storage/ with getters/setters and a mint helper that write directly to ERC-20 transfer storage slots.

Checklist

Before submitting this PR, please ensure:

  • Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions, using for directives, or selfdestruct

  • Code follows Design Principles - Readable, uses diamond storage, favors composition over inheritance

  • Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)

  • Code is formatted with forge fmt

  • Existing tests pass - Run tests to be sure existing tests pass.

  • New tests are optional - If you don't provide tests for new functionality or changes then please create a new issue so this can be assigned to someone.

  • All tests pass - Run forge test and ensure everything works

  • Documentation updated - If applicable, update relevant documentation

@netlify
Copy link

netlify bot commented Jan 6, 2026

👷 Deploy request for compose-diamonds pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e3f1918

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Coverage Report

Coverage

Metric Coverage Details
Lines 70% 1121/1601 lines
Functions 81% 283/348 functions
Branches 51% 114/224 branches

Last updated: Tue, 06 Jan 2026 17:10:33 GMT for commit e3f1918

@lumoswiz lumoswiz merged commit dcc2c99 into Perfect-Abstractions:main Jan 6, 2026
5 checks passed
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Gas Report

No gas usage changes detected between main and test/add-erc20-storage-utils.

All functions maintain the same gas costs. ✅

Last updated: Tue, 06 Jan 2026 17:10:54 GMT for commit e3f1918

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.

1 participant