Skip to content

test(BOP-486): add seize smoke journey (+ fix stablecoin burnBlocked binding) - #187

Merged
stephancill merged 5 commits into
mainfrom
stephancilliers/bop-486-transfer-blocked-smoke-tests
Jul 31, 2026
Merged

test(BOP-486): add seize smoke journey (+ fix stablecoin burnBlocked binding)#187
stephancill merged 5 commits into
mainfrom
stephancilliers/bop-486-transfer-blocked-smoke-tests

Conversation

@stephancill

@stephancill stephancill commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a seize smoke journey exercising the Cobalt seizeWithMemo surface against a live node, closing out BOP-486. Complements the stablecoin journey, which covers the legacy burn-based burnBlocked path.

The journey (script/smoke/journeys/seize.py, CLI key seize) walks:

  • GettersSEIZE_HOLDER_POLICY() / SEIZE_ROLE() match the keccak constants.
  • Happy pathseizeWithMemo(from, to, amount, memo) reassigns a seizable holder's balance; asserts TransferMemoSeized log order, Seized event args, and that totalSupply is unchanged (seize is a transfer, not a burn).
  • Reject gatesAccountNotSeizable, role (AccessControlUnauthorizedAccount), InvalidReceiver (zero to), and ContractPaused under a paused SEIZE.
  • Decoupling — blocks to on TRANSFER_RECEIVER_POLICY (a normal transfer reverts PolicyForbids) and shows seize still lands, since it's an admin op that doesn't consult the receiver policy.
  • Pause independence — pausing SEIZE blocks seize but leaves transfers working; unpause restores.

Fork-gated: probes the SEIZE_HOLDER_POLICY() getter and cleanly skips on a pre-Cobalt chain (where the seize selectors don't exist), the same stance as the multiplier journey.

Also adds SEIZE_ROLE / SEIZE_HOLDER_POLICY / FEATURE_SEIZE to config, registers the journey in the CLI (run order + all), and documents it in the README.

Also: stablecoin journey fix

Fixes a regression from #186 (which removed burnBlocked from the IB20 interface): the stablecoin journey called burnBlocked through the interface ABI and now failed with ABIFunctionNotFound. The selector still dispatches on the precompile (retained for back-compat), so the journey now binds it via an explicit ABI fragment to keep exercising the legacy burn-based freeze-and-seize path. (This regression is live on main today; base-std has no gating smoke CI, so it wasn't caught at #186 merge.)

Testing

Ran the full suite against a local Cobalt node (patched anvil+forge from the base-anvil fork built against this base/base seize surface):

smoke summary: 7 passed, 0 failed, 0 skipped (of 7)

seize passes every assertion; stablecoin green after the fix; invariants 13/13. Statically: forge build exposes seizeWithMemo / SEIZE_HOLDER_POLICY / SEIZE_ROLE / Seized / AccountNotSeizable; config keccak ids match the Rust precompile constants; all referenced error names resolve from the ABI.

stephancill and others added 2 commits July 31, 2026 15:46
New `seize` smoke journey exercising the Cobalt `seizeWithMemo` surface against a
live node: SEIZE_HOLDER_POLICY membership gate + SEIZE_ROLE, the happy-path
seizeWithMemo (Transfer -> Memo -> Seized, supply-preserving), the reject gates
(AccountNotSeizable, role, InvalidReceiver, ContractPaused), the admin-op
decoupling from the receiver policy on `to`, and the independent SEIZE pause
vector. Fork-gated: probes the SEIZE_HOLDER_POLICY() getter and skips cleanly on
a pre-Cobalt chain, mirroring the multiplier journey.

Adds SEIZE_ROLE / SEIZE_HOLDER_POLICY / FEATURE_SEIZE constants to config,
registers the journey in the CLI (run order + `all`), and documents it in the
README. Complements the stablecoin journey's legacy burn-based burnBlocked path.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@linear

linear Bot commented Jul 31, 2026

Copy link
Copy Markdown

BOP-486

@github-actions

Copy link
Copy Markdown

Interface Coverage

✅ All interface functions have test coverage.

Match the feature/surface name (seizeWithMemo) and the CLI key. The epic is
titled Transfer Blocked; the operation is seize.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

📊 Forge Coverage (src/lib/)

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

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.75% 97.26% 98.09% 96.46%

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

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

✅ Fork tests: all 703 passed

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

stephancill and others added 2 commits July 31, 2026 15:49
…ring

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
…rney

base-std #186 removed burnBlocked from the IB20 interface, so it is absent from
STABLECOIN_ABI and web3 raised ABIFunctionNotFound. The selector still dispatches
on the precompile (retained for back-compat), so bind it via an explicit fragment
to keep exercising the legacy burn-based freeze-and-seize path. Full smoke suite
now green (7/7) against a local Cobalt node.

Co-authored-by: OpenCode <opencode-noreply@coinbase.com>
@stephancill stephancill changed the title test(BOP-486): add transfer-blocked (seize) smoke journey test(BOP-486): add seize smoke journey (+ fix stablecoin burnBlocked binding) Jul 31, 2026
@stephancill
stephancill merged commit 68a7a35 into main Jul 31, 2026
10 checks passed
@stephancill
stephancill deleted the stephancilliers/bop-486-transfer-blocked-smoke-tests branch July 31, 2026 20:11
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.

3 participants