docs: add B20 concept docs - #1773
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
🟡 Heimdall Review Status
|
There was a problem hiding this comment.
Two issues, both from SEIZE_RECEIVER_POLICY (the 6th policy scope) being omitted. Inline with comments left in #1766.
Separately, on docs.json: there is no redirect for the exact old path /base-chain/specs/upgrades/beryl/b20 (the deleted single-page spec lived there). Redirects were added for /base-chain/b20, /base-chain/b20/*, and …/beryl/b20/{concepts,implementation,reference}/*, but not the bare …/beryl/b20, so that URL — and old deep links to its anchors (#multiplier, #policy-registry, #pause, #announcements), will 404 after merge.
| | `TRANSFER_RECEIVER_POLICY` | `to` | `transfer`, `transferFrom`, and memo variants | | ||
| | `TRANSFER_EXECUTOR_POLICY` | `msg.sender` | `transferFrom` only when `msg.sender != from` | | ||
| | `MINT_RECEIVER_POLICY` | `to` | `mint` and `mintWithMemo` | | ||
| | `SEIZE_HOLDER_POLICY` | `from` | `seizeWithMemo`; the holder is seizable only when not authorized by this policy | |
There was a problem hiding this comment.
Missing the 6th policy scope. B20Constants.sol / IB20.sol:274 define SEIZE_RECEIVER_POLICY (gates the seize to recipient), so there are 6 scopes, not 5. Add a row here and update the bytes32[5] array below (~line 75) to include it — as written the audit sample silently skips a real scope.
|
|
||
| ## Freeze and seize | ||
|
|
||
| `seizeWithMemo` transfers a holder's balance to a destination in one admin operation. It skips allowance and transfer policies; its membership check is `SEIZE_HOLDER_POLICY`. |
There was a problem hiding this comment.
seizeWithMemo's membership check isn't only SEIZE_HOLDER_POLICY — the recipient to is also gated by SEIZE_RECEIVER_POLICY (IB20.sol:460–467, reverts PolicyForbids(SEIZE_RECEIVER_POLICY, …)). Worth adding so the lifecycle description matches the current interface.
What changed? Why?
Added b20 concepts