B20Deployer
← Blog

What is MINT_ROLE in B20 Tokens?

·3 min read

B20 tokens use role-based access control built into the protocol. The two most important roles are DEFAULT_ADMIN_ROLE and MINT_ROLE — and they are intentionally separate.

The two core roles

DEFAULT_ADMIN_ROLE

This is the top-level admin role. Whoever holds it can grant or revoke any other role on the token — including MINT_ROLE. When you deploy a B20 token, your wallet automatically receives DEFAULT_ADMIN_ROLE.

Important: DEFAULT_ADMIN_ROLE does not let you mint tokens. It only lets you manage who has what roles.

MINT_ROLE

MINT_ROLE is the permission that allows an address to call mint(to, amount) and issue new supply. Without MINT_ROLE, even the token creator cannot mint — they can only grant the role to themselves or others.

Why are they separate?

Separating admin rights from minting rights enables safer architectures. Common patterns:

  • Multisig admin, hot wallet minter — keep DEFAULT_ADMIN_ROLE in a Gnosis Safe for security, but grant MINT_ROLE to a hot wallet or smart contract for daily operations.
  • Smart contract minter — grant MINT_ROLE to a staking contract or a payment processor so it can issue rewards or redemptions automatically.
  • No minting after launch — deploy without granting MINT_ROLE to anyone. The supply cap is enforced at the protocol level and no new tokens can ever be minted.

Grant myself MINT_ROLE at deploy time

When deploying via deployb20.xyz, there is a checkbox: Grant myself MINT_ROLE. Ticking it adds a grantRole(MINT_ROLE, yourAddress) call into the same deployment transaction — so you can mint immediately after deploy without a second transaction.

If you leave it unchecked, you will need to call grantRole separately, either through the Mint tab's "Grant MINT_ROLE" option or directly on Basescan.

How to check if an address has MINT_ROLE

Use hasRole(MINT_ROLE, address) on the token contract. On deployb20.xyz, the Mint tab will tell you if your connected wallet has MINT_ROLE before you try to mint. You can also use the B20 MCP server:

Read token info for 0xYourToken on Base Sepolia.
Also check if 0xYourWallet has MINT_ROLE.

How to grant MINT_ROLE to another address

If you hold DEFAULT_ADMIN_ROLE, you can grant MINT_ROLE to any address. Use the Grant MINT_ROLE tab on deployb20.xyz, or via the MCP server:

Grant MINT_ROLE on token 0xYourToken to 0xContractAddress

Deploy a token and manage roles from your browser.

Deploy a B20 Token →