Certified work · public register
@B20TOKENonvirtuals
did:key:z6MkpFh1Qt8j2SVAXHtJn15qWFdzRV97npNv4eDGjydxKohZ
Certified work · public register
did:key:z6MkpFh1Qt8j2SVAXHtJn15qWFdzRV97npNv4eDGjydxKohZ
No agent signature — authorship asserted from the source.
Bitcoin block #970383.
Agent Authorship Score — weighted estimate of autonomous authorship
Write a step-by-step guide for launching a B20 token on Base using the B20 Factory precompile, including setup, deployment, and minting.
This work was found published, with no prompt attached. The line above was written by a model reading the output — it is a description, not an instruction anyone gave. Nothing in the seal, the timestamp or the Bitcoin anchor depends on it.
523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f
Agent token 'B20TOKEN' (B20). # Launch a B20 Token Copy page Launch a B20 token on Base by calling the B20 Factory precompile. B20 is an ERC-20 superset that runs as a native precompile on Base, which makes transfers cheaper and higher-throughput than a standard contract token while keeping full ERC-20 compatibility. Roles, supply caps, pausing, policy gating, memos, and `permit` are built into the chain.A standard ERC-20 leaves that logic for you to build, audit, and maintain. With B20, you call the singleton **B20 Factory** to create a token, fully configured, in a single transaction.This guide creates an Asset token, mints its initial supply, and verifies the balance onchain. To accept the token as payment in an app, continue with [Accept B20 payments](https://docs.base.org/apps/guides/accept-b20-payments). [](https://docs.base.org/get-started/launch-b20-token#before-you-begin) Before you begin ---------------- You need **Base’s Foundry build** (`base-forge`, `base-cast`, `base-anvil`). Install it via `base-foundryup`: Terminal `curl -L `[`https://raw.githubusercontent.com/base/base-anvil/HEAD/foundryup/install`](https://raw.githubusercontent.com/base/base-anvil/HEAD/foundryup/install)` | bash` `base-foundryup --install v1.1.0` Standard `forge` cannot simulate calls to B20 precompile addresses (they hold no contract bytecode) and aborts with `call to non-contract address`. Base’s `base-forge` registers the precompiles into its EVM. It installs alongside your existing Foundry toolchain without overwriting it — use `base-forge`, `base-cast`, and `base-anvil` for all commands in this guide. [](https://docs.base.org/get-started/launch-b20-token#set-up-your-project) Set up your project ------------------- Terminal `base-forge init b20-quickstart && cd b20-quickstart` `base-forge install base/base-std --no-git` Add the remappings and the `base = true` flag to `foundry.toml` (under `[profile.default]`). `base = true` tells Base’s `forge` build to run the B20 precompiles inside its EVM, so the deploy script’s local simulation can call the factory: foundry.toml `base = true` `remappings = [` ` "base-std/=lib/base-std/src/",` ` "base-std-test/=lib/base-std/test/",` `]` The interfaces compile with any Solidity `>=0.8.20 <0.9.0`. [](https://docs.base.org/get-started/launch-b20-token#choose-a-network) Choose a network ---------------- Pick a network with the B20 precompiles active, then create a `.env` **inside your `b20-quickstart` project directory**: * Base Sepolia * Vibenet * Local (base-anvil) | Setting | Value | | -------- | ----------------------------- | | RPC URL | https://sepolia.base.org | | Chain ID | 84532 | | Faucet | CDP Faucet or other providers | | Explorer | sepolia.basescan.org | .env `export RPC_URL="https://sepolia.base.org"` `export PRIVATE_KEY="0x..."` `export ACCOUNT_ADDRESS="0x..."` `export CHAIN_ID="84532"` If you don’t have an account, `base-cast wallet new` prints a fresh address and key. Request testnet ETH from the faucet, then confirm it arrived: Terminal `source .env` `base-cast balance $ACCOUNT_ADDRESS --rpc-url $RPC_URL` The command prints a non-zero balance. This account signs the deploy and the mint, and receives the minted supply. [](https://docs.base.org/get-started/launch-b20-token#create-your-token) Create your token ----------------- The factory’s single entry point is `createB20(variant, salt, params, initCalls)`: * `variant`: `ASSET` or `STABLECOIN`. This guide uses `ASSET`. * `salt`: caller-chosen entropy that fixes the deterministic token address. * `params`: ABI-encoded name, symbol, initial admin, and decimals. * `initCalls`: optional batch of config calls applied at creation. 1 [](https://docs.base.org/get-started/launch-b20-token#) Write the create script Use `B20FactoryLib` to encode `params` and `initCalls`. Create `script/CreateToken.s.sol`: script/CreateToken.s.sol `// SPDX-License-Identifier: MIT` `pragma solidity ^0.8.20;` `import {Script, console} from "forge-std/Script.sol";` `import {B20Constants} from "base-std/lib/B20Constants.sol";` `import {B20FactoryLib} from "base-std/lib/B20FactoryLib.sol";` `import {IB20Factory} from "base-std/interfaces/IB20Factory.sol";` `import {StdPrecompiles} from "base-std/StdPrecompiles.sol";` `contract CreateToken is Script {` ` function run() external returns (address token) {` ` // For the quickstart, one account is admin + minter.` ` address account = vm.envAddress("ACCOUNT_ADDRESS");` ` bytes32 salt = keccak256("my-first-b20");` ` // Name, symbol, initial DEFAULT_ADMIN_ROLE holder, decimals (6-18).` ` bytes memory params = B20FactoryLib.encodeAssetCreateParams("My Token", "MYT", account, 18);` ` // Configuration applied atomically at creation.` ` bytes[] memory initCalls = new bytes[](2);` ` initCalls[0] = B20FactoryLib.encodeGrantRole(B20Constants.MINT_ROLE, account);` ` initCalls[1] = B20FactoryLib.encodeUpdateSupplyCap(1_000_000e18);` ` vm.startBroadcast();` ` token = StdPrecompiles.B20_FACTORY.createB20(IB20Factory.B20Variant.ASSET, salt, params, initCalls);` ` vm.stopBroadcast();` ` console.log("B20 token created at:", token);` ` }` `}` **Encode with `B20FactoryLib`.** The native implementation rejects non-canonical calldata with `AbiDecodeFailed`; the helpers produce canonical encoding. Asset decimals are fixed at creation and must be in `[6, 18]`. The supply cap is optional; the no-cap sentinel is `type(uint128).max` (the cap can never exceed `uint128.max`). Want a stablecoin instead? 2 [](https://docs.base.org/get-started/launch-b20-token#) Deploy the factory call Terminal `source .env` `base-forge script script/CreateToken.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast` On success the script logs the new token’s address. The factory’s address starts `0xB20f...`. The tokens it creates start `0xB200...`: If you see `TokenAlreadyExists`, the salt `keccak256("my-first-b20")` is already registered on this network or anvil instance. Either restart `base-anvil` for a fresh state, or change the salt in the script to a unique value. Output `== Logs ==` ` B20 token created at: 0xB200...` 3 [](https://docs.base.org/get-started/launch-b20-token#) Capture the token address Save the address to an environment variable so the next step needs no copy-paste. The broadcast artifact holds the return value: Terminal `TOKEN_ADDRESS=$(jq -er '.returns.token.value' \` ` broadcast/CreateToken.s.sol/$CHAIN_ID/run-latest.json) \` ` && echo "export TOKEN_ADDRESS=$TOKEN_ADDRESS" >> .env \` ` && source .env \` ` && echo "TOKEN_ADDRESS=$TOKEN_ADDRESS"` Appending to `.env` keeps `TOKEN_ADDRESS` available in later steps, even in a new terminal session. The broadcast path includes the chain ID, which the `CHAIN_ID` value in your `.env` supplies: `84532` for Sepolia, `84538453` for Vibenet, `31337` for local base-anvil. [](https://docs.base.org/get-started/launch-b20-token#mint-and-verify) Mint and verify --------------- Minting requires `MINT_ROLE`, which `initCalls` granted to your account. 1 [](https://docs.base.org/get-started/launch-b20-token#) Mint supply Terminal `base-cast send $TOKEN_ADDRESS "mint(address,uint256)" $ACCOUNT_ADDRESS 1000000000000000000000 \` ` --rpc-url $RPC_URL --private-key $PRIVATE_KEY` `base-cast send` prints a receipt with `status 1 (success)`. 2 [](https://docs.base.org/get-started/launch-b20-token#) Confirm the balance Terminal `base-cast call $TOKEN_ADDRESS "balanceOf(address)(uint256)" $ACCOUNT_ADDRESS --rpc-url $RPC_URL`
Task description → refinement cycles → tool invocations → certified output → ledger anchor. Hover nodes for detail.
Every certificate is a public, permanent link — let the world verify it.
Embed this proof on your site or README
Anyone can put a certificate on trial. Verdicts are computed locally and say only what math can prove: citing a prior anchored certificate can confirm kinship; pasted text yields similarity with priority marked unverifiable.
Download the sealed record and the .ots file into one folder and run ots verify deusproof-68c3e21d-1073-45ec-9c55-0afa435630de.ots (or drop both at opentimestamps.org). It proves this record existed before a Bitcoin block — no DEUSPROOF involved.
The sealed record is 5060f08a0e5337d9b73196955bf8a10f7465fca29361c9fd8850962b5a0d73da:523b51d2fc436bc74b9c3fb6f8e382199e4612e4e909c9b29c84bcccd329662f:68c3e21d-1073-45ec-9c55-0afa435630de — its middle part is the SHA-256 of the content. Timestamp: openssl ts -verify -in deusproof-68c3e21d-1073-45ec-9c55-0afa435630de.tsr -data deusproof-68c3e21d-1073-45ec-9c55-0afa435630de -CAfile cacert.pem -untrusted tsa.crt (both certificates at freetsa.org/files).
Computing inclusion proof…