chore: add builder_code.md spec#2034
Closed
0xClouds wants to merge 6 commits intox402-foundation:mainfrom
Closed
Conversation
…ments Adds a new builder-code extension that enables ERC-8021 Schema 2 attribution tracking for x402 payments. Three parties can attach their builder code to settlement transactions: - Agent (client): sets the "a" field via BuilderCodeClientExtension - Service (server): declares in 402 response via declareBuilderCodeExtension() - Facilitator: adds to "s" array at settlement via BuilderCodeFacilitatorExtension At settlement, the facilitator encodes all builder codes as a Schema 2 CBOR suffix and appends it to the transferWithAuthorization calldata. The EVM ignores trailing calldata bytes, so the transfer executes normally while indexers (Coindexer, Beacon, Dune) can parse the suffix. Changes: - New extension package: @x402/extensions/builder-code - EVM mechanism: executeTransferWithAuthorization accepts optional calldataSuffix - settleEIP3009 reads builder code extension from FacilitatorContext - scheme.ts passes context through to EIP-3009 settlement
…t extension - Service declares its builder code as "a" (app) — it's the application exposing the x402 endpoint - Facilitator adds its code as "w" (wallet) — it's the entity that signs and broadcasts the settlement transaction - Service can optionally include related on-chain services in "s" array (e.g., Morpho, Aerodrome) - Remove BuilderCodeClientExtension — agent doesn't attach builder codes, the service's extension data passes through untouched - CBOR encoder now handles "a", "w", and "s" fields
feat: ERC-8021 builder code attribution for x402 payments
|
@0xClouds is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
phdargen
reviewed
Apr 15, 2026
CarsonRoscoe
previously approved these changes
Apr 16, 2026
954d493 to
f1c4ba6
Compare
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.
Description
Adds the
builder-codeextension spec for on-chain attribution tracking in x402 payments. This extension appends ERC-8021 Schema 2 (CBOR-encoded) builder codes to settlement transaction calldata, enabling attribution of which application exposed a paid endpoint and which facilitator settled the payment.The spec covers:
Tests
Checklist