docs: restructure B20 guides and rewrite execution architecture - #213
Draft
rayyan224 wants to merge 13 commits into
Draft
docs: restructure B20 guides and rewrite execution architecture#213rayyan224 wants to merge 13 commits into
rayyan224 wants to merge 13 commits into
Conversation
…/reference Replaces the old docs/B20, docs/PolicyRegistry, and docs/ActivationRegistry pages with an audience-layered structure: a short overview, a canonical architecture doc, per-audience guides (integrator/indexer/implementer), evergreen concept pages, and a reference section. Root README now points into the new docs/ entry point instead of the removed paths. Co-Authored-By: Claude <noreply@anthropic.com>
Walk grant-then-call and attach-then-gate in the overview, including revert paths, and move the role and policy-scope tables to the concept pages. Co-authored-by: Cursor <cursoragent@cursor.com>
Give roles, pause, and policy a why-then-how flow. Drop the stack section that duplicated What is B20. Co-authored-by: Cursor <cursoragent@cursor.com>
…rchitecture Fills in the constants, errors, and events reference tables with the actual role/policy hashes, error selectors, and event catalogue, and rewrites architecture.md around the precompile execution model and protocol-evolution guarantees. Co-Authored-By: Claude <noreply@anthropic.com>
The changelog/README.md ordinal table is already the source of truth for hardfork<->version mapping, so a separate reference/versions.md duplicated it. Repoint the three referring TODOs at the changelog index instead. Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite the contracts-vs-precompiles section into a continuous narrative so readers can follow native execution, self-managed state and gas, registry routing, and the shared EVM flow. Co-authored-by: Cursor <cursoragent@cursor.com>
Spell out that recognized precompiles run registered native code, meter gas and EVM-like errors themselves, and write straight into account storage — the same slots a contract would use. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the unfinished implementer page and its nav links, and add a compliance-guide template for the remaining how-to pages. Co-authored-by: Cursor <cursoragent@cursor.com>
Interface Coverage✅ All interface functions have test coverage. |
✅ Fork tests: all 721 passedbase/base is fully in sync with the base-std spec. |
📊 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).
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.
Summary
docs/B20,PolicyRegistry,ActivationRegistry) with an audience-layered structure: overview, architecture, guides, concepts, and reference.Test plan
docs/overview.mdend to end and confirm it still matches current B20 behaviordocs/architecture.md§§1–3 and confirm the precompile vs contract story, routing, and token-creation flow are accuratetransferchart)docs/README.mdand the rootREADME.mdinto the new structure; no staledocs/B20/PolicyRegistry/ActivationRegistrypathsdocs/reference/{constants,errors,events}.mdagainst the interfacesMade with Cursor