Skip to content

feat: migrate smoke testing scripts to python#160

Merged
stevieraykatz merged 2 commits into
mainfrom
migrate-fork-tests-to-python
Jun 11, 2026
Merged

feat: migrate smoke testing scripts to python#160
stevieraykatz merged 2 commits into
mainfrom
migrate-fork-tests-to-python

Conversation

@stevieraykatz

@stevieraykatz stevieraykatz commented Jun 10, 2026

Copy link
Copy Markdown
Member

The bash script was getting a bit unwieldy. This PR refactors the fork testing setup to use python. This is preferable now that we're requiring python for the smoke tests anyway. Until we have a formal baseup + foundry stack, this should be more maintainable.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

Interface Coverage

✅ All interface functions have test coverage.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

📊 Forge Coverage (src/lib/)

🟡 ≥95% across all metrics — some metrics below 99%.

File Lines Stmts Branches Funcs
🟢 B20FactoryLib.sol 100.00% 100.00% 100.00% 100.00%
🔴 test/lib/ForceFeeder.sol 0.00% 0.00% 100.00% 0.00%
🔴 test/lib/PrecompileProbe.sol 0.00% 0.00% 0.00% 0.00%
🟢 MockActivationRegistry.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockActivationRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Asset.sol 100.00% 100.00% 100.00% 100.00%
🟡 MockB20Factory.sol 98.96% 99.10% 100.00% 100.00%
🟢 MockB20Stablecoin.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockB20Storage.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockPolicyRegistry.sol 100.00% 100.00% 100.00% 100.00%
🟢 MockPolicyRegistryStorage.sol 100.00% 100.00% 100.00% 100.00%
Total 96.69% 97.23% 98.39% 96.89%

Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).

Comment thread script/fork/__main__.py
("B20_STABLECOIN", bytes(FEATURE_B20_STABLECOIN)),
]

ACTIVATE_SELECTOR = bytes(Web3.keccak(text="activate(bytes32)")[:4])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

can we pull this from the abi instead of recalculating?

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

✅ Fork tests: all 616 passed

base/base is fully in sync with the base-std spec.

@amiecorso amiecorso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I asked my agent to run all of this locally and capture any problems or snags it ran into. Everything went smoothly and confirmed the test behavior is the same between the shell script and python. So looks great to me!

@stevieraykatz stevieraykatz merged commit 9651cad into main Jun 11, 2026
10 checks passed
@stevieraykatz stevieraykatz deleted the migrate-fork-tests-to-python branch June 11, 2026 23:48
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