From cac1daac8d515b0216b479918c846cd32b4d8c11 Mon Sep 17 00:00:00 2001 From: Patrick Hughes Date: Tue, 13 Jan 2026 16:03:48 -0600 Subject: [PATCH 1/2] add manual append guide to builder code docs --- docs/base-chain/quickstart/builder-codes.mdx | 74 +++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/docs/base-chain/quickstart/builder-codes.mdx b/docs/base-chain/quickstart/builder-codes.mdx index 39b65a75..40bedef5 100644 --- a/docs/base-chain/quickstart/builder-codes.mdx +++ b/docs/base-chain/quickstart/builder-codes.mdx @@ -21,11 +21,81 @@ Once your app is registered on [Base.dev](http://base.dev/), the Base App will a ## For App Developers -When you register on [base.dev](https://base.dev/), you will receive a **Builder Code**—a random string (e.g., `k3p9da`) that you'll use to generate your attribution suffix. +When you register on [base.dev](https://base.dev/), you will receive a **Builder Code**—a random string (e.g., `bc_b7k3p9da` ) that you'll use to generate your attribution suffix. You can find your code anytime under **Settings** → **Builder Code**. -Manual appending outside of the Base app is coming soon. + + + +This will allow you to append the encoded version of your builder code. + + ```bash + npm i ox + ``` + + + + Navigate to **base.dev > Settings > Builder Codes** to find your unique builder code. + + + + Use the `Attribution.toDataSuffix` method from the `ox` library to encode your builder code: + + ```ts + import { Attribution } from "ox/erc8021"; + + const DATA_SUFFIX = Attribution.toDataSuffix({ + codes: ["YOUR-BUILDER-CODE"], // obtained from base.dev > Settings > Builder Codes + }); + ``` + + + + Use Wagmi's `useSendCalls` hook with the `dataSuffix` capability to append attribution data to your transactions. + + ```ts + import { useSendCalls } from "wagmi"; + import { parseEther } from "viem"; + import { Attribution } from "ox/erc8021"; + + const DATA_SUFFIX = Attribution.toDataSuffix({ + codes: ["YOUR-BUILDER-CODE"], + }); + + function App() { + const { sendCalls } = useSendCalls(); + + return ( + + ); + } + ``` + + ## For Wallet Developers From b98079cbcc21cd620b93d33da72c85e3c1ad16b6 Mon Sep 17 00:00:00 2001 From: Patrick Hughes Date: Tue, 13 Jan 2026 16:09:40 -0600 Subject: [PATCH 2/2] add code file titles and tooltip --- docs/base-chain/quickstart/builder-codes.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/base-chain/quickstart/builder-codes.mdx b/docs/base-chain/quickstart/builder-codes.mdx index 40bedef5..d4b4ea5c 100644 --- a/docs/base-chain/quickstart/builder-codes.mdx +++ b/docs/base-chain/quickstart/builder-codes.mdx @@ -23,14 +23,16 @@ Once your app is registered on [Base.dev](http://base.dev/), the Base App will a When you register on [base.dev](https://base.dev/), you will receive a **Builder Code**—a random string (e.g., `bc_b7k3p9da` ) that you'll use to generate your attribution suffix. -You can find your code anytime under **Settings** → **Builder Code**. + + You can find your code anytime under **Settings** → **Builder Code**. + This will allow you to append the encoded version of your builder code. - ```bash + ```bash Terminal npm i ox ``` @@ -42,7 +44,7 @@ This will allow you to append the encoded version of your builder code. Use the `Attribution.toDataSuffix` method from the `ox` library to encode your builder code: - ```ts + ```ts App.tsx import { Attribution } from "ox/erc8021"; const DATA_SUFFIX = Attribution.toDataSuffix({ @@ -54,7 +56,7 @@ This will allow you to append the encoded version of your builder code. Use Wagmi's `useSendCalls` hook with the `dataSuffix` capability to append attribution data to your transactions. - ```ts + ```ts App.tsx import { useSendCalls } from "wagmi"; import { parseEther } from "viem"; import { Attribution } from "ox/erc8021";