> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-add-b20-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# IB20Factory reference

> Generated B20 reference for IB20Factory functions, events, and errors.

## Functions

| Function                                                                                                                   | Selector     | Summary                                                                                                  |
| -------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| [`createB20`](/base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Factory/createB20)               | `0xb263cb84` | Creates a B-20 token of the given `variant` at the deterministic address derived                         |
| [`getB20Address`](/base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Factory/getB20Address)       | `0x51038444` | Returns the deterministic address `createB20` would assign for `(variant, sender, salt)`. Never reverts. |
| [`isB20`](/base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Factory/isB20)                       | `0xfa19b927` | Returns whether `token` was created by this factory, recovered from the address prefix. Never reverts.   |
| [`isB20Initialized`](/base-chain/specs/upgrades/beryl/b20/specification/reference/interfaces/IB20Factory/isB20Initialized) | `0x6a45ba98` | Returns whether `createB20` has run to completion at `token`. Flips exactly once,                        |

## Events

| Event        | Topic0                                                               | Summary                                                                       |
| ------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `B20Created` | `0x86ee7a93da43b07286ea4c925a31ba17c41eb00c5ea396883bf32abfe5e73cfc` | Emitted once per `createB20` invocation, after the token's identity is sealed |

## Errors

| Error                  | Selector     | Summary                                                                                             |
| ---------------------- | ------------ | --------------------------------------------------------------------------------------------------- |
| `NonPayable`           | `0x6fb1b0e9` | ETH was attached to a call targeting a nonpayable factory selector.                                 |
| `TokenAlreadyExists`   | `0x15ef3a57` | A token already exists at the deterministic address derived from                                    |
| `InvalidVariant`       | `0xf10e8e43` | `variant` is not a recognized `B20Variant`.                                                         |
| `UnsupportedVersion`   | `0x6f3c1955` | The leading `version` byte in `params` does not match any known encoding for the requested variant. |
| `MissingRequiredField` | `0x4a43ae87` | A required string argument was the empty string.                                                    |
| `InvalidCurrency`      | `0x997c1de8` | The stablecoin `currency` was non-empty but contained a non-`A`-`Z` byte.                           |
| `InvalidDecimals`      | `0xca950391` | The asset `decimals` was outside the allowed inclusive range                                        |
| `InitCallFailed`       | `0x4eae0860` | One of the `initCalls` reverted. The factory bubbles the underlying revert reason                   |

<CardGroup cols={2}>
  <Card title="Errors & events index" href="/base-chain/specs/upgrades/beryl/b20/specification/reference/errors-and-events-index" />

  <Card title="Constants & addresses" href="/base-chain/specs/upgrades/beryl/b20/specification/reference/constants-and-addresses" />
</CardGroup>
