Skip to content

Add b20-token skill: deploy, manage, and accept B20 payments#134

Open
Sukanto01899 wants to merge 5 commits into
base:masterfrom
Sukanto01899:add-b20-token-skill
Open

Add b20-token skill: deploy, manage, and accept B20 payments#134
Sukanto01899 wants to merge 5 commits into
base:masterfrom
Sukanto01899:add-b20-token-skill

Conversation

@Sukanto01899

Copy link
Copy Markdown

Description

Adds a new skill covering the full B20 token lifecycle on Base, deploying
(Foundry CLI + wallet-signed viem/wagmi UI), roles/admin model, PolicyRegistry
compliance gating, post-deploy operations (mint/supply-cap/memo), ASSET-only
features, metadata/permit, accepting B20 payments, and a full error catalog.

Content audited against lib/base-std interfaces and live Base Sepolia calls
(address derivation, ALWAYS_ALLOW/ALWAYS_BLOCK sentinels, error signatures).

Type of change

  • New skill

Affected skill(s)

b20-token

Plugin checklist

N/A — this is a skill, not an MCP plugin submission.

Covers setup (base-foundryup/base-std), activation verification via the
ActivationRegistry precompile (getCode is not a valid liveness check),
the client-side abi.encode(struct)-as-single-tuple encoding gotcha,
deploy/salt handling, post-deploy mint/role/supply-cap/memo operations,
and a full custom-error reference with a viem decoding pattern.
…/permit

Adds full coverage of the Beryl B20 spec: complete roles table and admin
model (renounceLastAdmin, admin-resurrection guard), the PolicyRegistry
allowlist/blocklist model and its open-by-default trap, ASSET-only
features (multiplier, announce, batchMint, extra metadata), and
metadata/ERC-2612 permit details. Adds a tested scripts/check-activation.sh,
table-of-contents headers on all reference files over 100 lines, and
trims the frontmatter description to pass quick_validate.py (was 1775
chars, over the 1024 limit).
The skill now covers the full B20 lifecycle (deploy, operate, accept
payments), not just deployment, so deploy-b20-token undersold its own
scope. Renamed to b20-token to match.

Adds references/accepting-payments.md from docs.base.org/apps/guides/
accept-b20-payments: the merchant/app-integration side (transferWithMemo,
transferFromWithMemo for allowance-based collection, simulateContract
pre-flight checks, and the CDP SQL API for indexing Transfer/Memo events
at scale) — distinct from the issuer-side operations already covered in
post-deploy.md.
Gives the new skill top-level discoverability for anyone browsing the
repo, alongside build-on-base and base-mcp.
Found during a source-code audit against lib/base-std/IPolicyRegistry.sol:
policy.md showed createPolicy/updateAllowlist/etc. usage but didn't
document what they can revert with. These are distinct from the
B20-token-level PolicyNotFound/UnsupportedPolicyType already in errors.md
(different signatures, thrown by the registry itself vs by the token's
updatePolicy).
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

2 participants