test(BOP-494): cover SEIZE_RECEIVER_POLICY in the seize smoke journey - #189
Merged
Merged
Conversation
Extends the Cobalt seize journey to exercise the new receiver-side gate on `to`: the SEIZE_RECEIVER_POLICY() getter, the unset default (allow-any), a configured allowlist authorizing the destination, and the PolicyForbids revert for an unauthorized destination. Still fork-gated (skips pre-Cobalt via the SEIZE_HOLDER_POLICY() probe). - config: add SEIZE_RECEIVER_POLICY constant. - seize journey: getter assertion + new receiver-policy section (unset allows any destination; allowlist(bob) lets the seize land; unauthorized `to` reverts PolicyForbids); assert AllowlistUpdated in the emitted-events set. - README: note the SEIZE_RECEIVER_POLICY coverage in the seize row. Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
stephancill
requested review from
amiecorso,
eric-ships,
ilikesymmetry,
rayyan224 and
stevieraykatz
as code owners
August 4, 2026 12:47
Interface Coverage✅ All interface functions have test coverage. |
📊 Forge Coverage (
|
| File | Lines | Stmts | Branches | Funcs |
|---|---|---|---|---|
| 🔴 B20FactoryLib.sol | 95.40% | 96.00% | 100.00% | 90.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% | 99.54% | 97.67% | 100.00% |
| 🟢 MockPolicyRegistryStorage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| Total | 96.79% | 97.29% | 98.14% | 96.49% |
Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).
✅ Fork tests: all 709 passedbase/base is fully in sync with the base-std spec. |
robriks
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the Cobalt
seizesmoke journey (BOP-486) to exercise the newSEIZE_RECEIVER_POLICYgate on the seize destination, added in base-std #188 (BOP-491). MirrorsMINT_RECEIVER_POLICY: unset = allow-any, configured = the destination must be authorized.Changes
config.py: add theSEIZE_RECEIVER_POLICYkeccak constant.journeys/seize.py:SEIZE_RECEIVER_POLICY()getter matches the constant.bob, seize to bob succeeds; (c) seize to an unauthorized destination revertsPolicyForbids(SEIZE_RECEIVER_POLICY, ...).AllowlistUpdatedin the emitted-events set.README.md: note the coverage in theseizerow.The existing decoupling step (seize ignores the transfer receiver policy on
to) is retained and still correct — that's a different scope fromSEIZE_RECEIVER_POLICY.Testing
python -m py_compileclean; logic + balance trace reviewed against the existing journey conventions.SEIZE_HOLDER_POLICY()and skips cleanly on a pre-Cobalt chain.SEIZE_RECEIVER_POLICY), matching how BOP-486 is validated — the suite is advisory/manual (no gating smoke CI). I can post a local7/7 greenrun once BOP-492 lands if desired.Ticket: https://linear.app/coinbase/issue/BOP-494