feat(b20): rename SEIZE_HOLDER_POLICY to SEIZE_EXEMPT_POLICY - #214
Conversation
Authorized accounts cannot be seized, so the scope name now states that polarity instead of sounding like a seizable-holder list. Co-authored-by: Cursor <cursoragent@cursor.com>
Interface Coverage✅ All interface functions have test coverage. |
📊 Forge Coverage (
|
| File | Lines | Stmts | Branches | Funcs |
|---|---|---|---|---|
| 🟡 B20FactoryLib.sol | 97.70% | 98.00% | 100.00% | 95.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 | 97.07% | 97.52% | 98.16% | 97.00% |
Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).
|
| | Bits | Lane | Field | Scope | | ||
| | ------- | ---- | ---------- | ----------------------- | | ||
| | 0–63 | 0 | `seizable` | `SEIZE_HOLDER_POLICY` | | ||
| | 0–63 | 0 | `seizable` | `SEIZE_EXEMPT_POLICY` | |
There was a problem hiding this comment.
Naming doesn't make sense between seizable and policy name
There was a problem hiding this comment.
good catch, the packed struct filed seems to be not caught. Updated
|
|
||
| /// @notice Extracts the seize-holder policy id (lane 0) from the seize packed slot. | ||
| /// @notice Extracts the seize-exempt policy id (lane 0) from the seize packed slot. | ||
| function seizablePolicyId(uint256 packed) internal pure returns (uint64) { |
There was a problem hiding this comment.
Feels like cruft we should clean up when you have downtime. There are two policies under seize operation
There was a problem hiding this comment.
Fixed now, later sometimes never comes hahah
The SEIZE_EXEMPT_POLICY lane and its accessors still used the pre-rename "seizable" name, which no longer matches the policy and reads backwards (exempt accounts are NOT seizable). Mirrors how the receiver lane already matches SEIZE_RECEIVER_POLICY. Addresses review comments on PR #214. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
SEIZE_HOLDER_POLICYtoSEIZE_EXEMPT_POLICYso the identifier matches the inverted check: authorized accounts are seize-exempt.IB20getter,B20Constantskeccak preimage, mocks, tests, smoke journey, and Cobalt changelog (selector0xfeb346ec, valuekeccak256("SEIZE_EXEMPT_POLICY")).SEIZE_HOLDER_POLICY()must not resolve;SEIZE_EXEMPT_POLICY()must match the new digest.This is a Cobalt wire change (the scope hash and getter selector both change). The Rust precompile in
base/baseneeds the same preimage before live-precompile tests can pass.Test plan
forge test(735 passed locally)forge fmt --checktoken.SEIZE_EXEMPT_POLICY() == keccak256("SEIZE_EXEMPT_POLICY")SEIZE_HOLDER_POLICY()no longer resolvesbase/basebeforebase-forge test/make fork-testsMade with Cursor