Skip to content

Update token launch and token registeration docs #1234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 25, 2025
Merged
6 changes: 4 additions & 2 deletions docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Learn how to leverage AI tools to enhance your Flow development experience. Thes

Learn how to launch your own token on Flow using Cadence and EVM. This guide covers the process of registering and deploying tokens that can be used across both virtual machines.

- [Register a Token] - Step-by-step guide to registering and deploying your token on Flow
- [Register Your ERC20 Token] - Learn how to register your ERC20 token on Flow EVM based on Github Pull Request process so it appears in Flow standard Token List which is used by Flow Wallet, MetaMask, and other ecosystem apps.
- [Register Your Assets in Cadence] - Learn how to register your Fungible Token or Non-Fungible Token on Flow through Cadence transaction so it appears in Flow Wallet, IncrementFi, and other ecosystem apps.

## Cross-VM Applications

Expand Down Expand Up @@ -88,7 +89,6 @@ Explore Flow's unique capabilities through fun benchmark applications that showc
[Use Flow Knowledge Base in ChatGPT]: ai-plus-flow/chatgpt/index.md
[Flow Data Sources]: ai-plus-flow/flow-data-sources.md
[Build AI Agents with AgentKit]: ai-plus-flow/agentkit-flow-guide.md
[Register a Token]: token-launch/register-token.md
[Introduction to Cross-VM Applications]: cross-vm-apps/introduction.md
[Interacting with COAs]: cross-vm-apps/interacting-with-coa.md
[Batched EVM Transactions]: cross-vm-apps/batched-evm-transactions.md
Expand All @@ -97,3 +97,5 @@ Explore Flow's unique capabilities through fun benchmark applications that showc
[Secure Randomness with Commit-Reveal in Cadence]: native-vrf/commit-reveal-cadence.md
[Deploy a Solidity Contract Using Cadence]: native-vrf/deploy-solidity-contract.md
[Add Flow Cadence to Your wagmi App]: ./cross-vm-apps/add-to-wagmi.md
[Register Your Assets in Cadence]: ./token-launch/register-cadence-assets.md
[Register Your ERC20 Token]: ./token-launch/register-erc20-token.md
8 changes: 6 additions & 2 deletions docs/tutorials/token-launch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ description: Learn how to register your tokens on Flow to ensure visibility in w

This section covers the process of registering your tokens on Flow.

### Guides:
## Guides

- **[Register Your Token](register-token.md)**: Steps to register your Fungible Token on Flow Cadence or ERC20 on Flow EVM so it appears in Flow Wallet, IncrementFi, and other ecosystem apps.
- **[Register Your ERC20 Token]**: Steps to register your ERC20 token on Flow EVM based on Github Pull Request process so it appears in Flow standard Token List which is used by Flow Wallet, MetaMask, and other ecosystem apps.
- **[Register Your Assets in Cadence]**: Steps to register your Fungible Token or Non-Fungible Token on Flow so it appears in Flow Wallet, IncrementFi, and other ecosystem apps.

[Register Your Assets in Cadence]: ./register-cadence-assets.md
[Register Your ERC20 Token]: ./register-erc20-token.md
109 changes: 109 additions & 0 deletions docs/tutorials/token-launch/register-cadence-assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
title: Register Your Assets on Flow
description: 'Register your Fungible Token or Non-Fungible Token on Flow so it appears in Flow Wallet, IncrementFi, and other ecosystem apps.'
sidebar_label: Register Cadence Assets
sidebar_position: 2
keywords:
- Fungible Token
- Non-Fungible Token
- Flow
- Flow Wallet
- IncrementFi
- Token List
- Register Fungible Token
- Register Non-Fungible Token
- Flow Official Assets
---

# Register Your Assets on Flow

To make your fungible token or non-fungible token visible in Flow ecosystem projects like **Flow Wallet** and **IncrementFi**, you need to register it on the Flow Token List. This process will generate JSON files based on the Uniswap TokenList Standard and ensures that wallets, explorers, and onchain apps can recognize and display your token correctly.

There are two ways to register your token: **manually** via a web interface or **programmatically** during token deployment.

---

## Manual Registration (~1 min)

The following works for both fungible and non-fungible tokens on Flow Cadence or Flow EVM.

1. **Go to** [Token List Registration].
2. **Enter your contract address** in the **"Quick Register"** field and press **Enter**.
- Both Fungible and Non-Fungible tokens are supported.
- Both EVM and Cadence contracts are supported.
3. **Click "Register"** and sign the transaction.
- If your token is **already registered to VM Bridge**, you're done.
- Otherwise, the **first transaction** registers the token to **VM Bridge** (costs **1 $FLOW**).
- After that, click **"Register"** again and sign the **second transaction** to finalize the process.

:::warning

ERC-20 tokens registered with this method will use the default logo of Flow Official Assets.

If you want to register your ERC-20 token on Flow EVM with your customized logo, you should follow the [Register ERC-20 Token on Flow EVM] guide.

:::

---

## Programmatic Registration

For seamless automation, you can integrate token registration into your token deployment workflow.

You can use the following Cadence transaction to register your Fungible or Non-Fungible token on Flow Cadence or Flow EVM.

### Register Fungible Token or Non-Fungible Token automatically on Flow Cadence

Use a standalone Cadence transaction to register your Fungible Token or Non-Fungible Token on Flow Cadence.

- Use this **Cadence transaction**: [register-standard-asset.cdc].
- This transaction should be executed **right after deploying your Fungible Token or Non-Fungible Token contract**.

Or you can also pick up some code from the [register-standard-asset.cdc] file to make your own Cadence transaction with the same logic for more seamless integration. Here is an example:

```cadence
import "TokenList"
import "NFTList"

transaction(
address: Address,
contractName: String,
) {
execute {
if TokenList.isValidToRegister(address, contractName) {
TokenList.ensureFungibleTokenRegistered(address, contractName)
} else if NFTList.isValidToRegister(address, contractName) {
NFTList.ensureNFTCollectionRegistered(address, contractName)
}
}
}
```

### Register ERC-20 or ERC-721 Tokens automatically on Flow EVM

- Use this **Cadence transaction**: [register-evm-asset.cdc]
- This transaction should be executed **right after deploying your ERC-20 or ERC-721 contract**.

:::warning

Similar to manual registration:
- If the token **is not bridged** to **VM Bridge**, you will need to **send the transaction twice**.
- The **first transaction** deploys a **VM Bridged Cadence contract** for the ERC-20.
- The **second transaction** registers it on the Token List.

:::

---

### Next Steps

- Verify your token listing in Flow Wallet.

For any issues, refer to the [Token List GitHub Repository] or reach out to the [Flow developer community].

[Token List Registration]: https://token-list.fixes.world/
[Register ERC-20 Token on Flow EVM]: ./register-erc20-token.md
[register-standard-asset.cdc]: https://github.com/fixes-world/token-list/blob/main/cadence/transactions/register-standard-asset.cdc
[register-evm-asset.cdc]: https://github.com/fixes-world/token-list/blob/main/cadence/transactions/register-evm-asset.cdc
[Token List GitHub Repository]: https://github.com/fixes-world/token-list
[Flow developer community]: https://discord.gg/flow
78 changes: 78 additions & 0 deletions docs/tutorials/token-launch/register-erc20-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Register Your ERC20 Token on Flow EVM
description: 'Register your ERC20 token on Flow EVM so it appears in Flow Wallet, MetaMask, and other ecosystem apps.'
sidebar_label: Register ERC20 Token
sidebar_position: 1
keywords:
- ERC20
- Fungible Token
- Flow EVM
- Flow Wallet
- MetaMask
- Token List
- Register ERC20 Token
- Flow Official Assets
---

# Register Your ERC20 Token on Flow EVM

## Overview

This section covers the process of registering your ERC20 token on Flow EVM via a Github Pull Request process so it appears in Flow standard Token List which is used by Flow Wallet, MetaMask, and other ecosystem apps.

We will use the [Flow Official Assets] repository as the standard token list repository for updating the token list for the whole Flow ecosystem.
The repository is open to the public and you can submit your PRs to add your token to the list.

Note: The logic of the registration is based on the [Register Assets in Cadence] backend process.

## Guides for submitting your PRs

Steps to submit your PRs:

1. **Fork the [Flow Official Assets] repository**
- Click the `Fork` button in the top right corner of the repository.
- Create a new fork of the repository in your own Github account.
2. **Create a new branch**
- Clone your forked repository to your local development environment by `git clone https://github.com/your-github-username/assets`
- Create a new branch for your token by `git checkout -b new-token-branch`
3. **Add/Update your token to the list**
- For new Tokens:
- Create the token folders in the `tokens/registry` directory.
- The name of the token folders must be the same as the token's contract address.
- e.g. `tokens/registry/0x1234567890123456789012345678901234567890`
- for Testnet tokens, the folder should be `tokens/registry/testnet:0x1234567890123456789012345678901234567890`
- Put the required metadata file in the token folder, at least one of the following files should be included:
- `logo.png`: PNG format token logo (256x256px recommended)
- `logo.svg`: SVG format token logo, optimized and viewboxed
- You can also add extra optional metadata file:
- `mods.json`: Mods JSON file for token metadata, you can adjust the `symbol`, `name`, `description` for the final output in the `token.json` file.
- For existing Tokens:
- Identify the token folder in the `tokens/registry` directory by the token's contract address.
- Update the token metadata in the `tokens/registry/${token_address}` directory.
4. **Submit a Pull Request**
- Commit your changes and push to your forked repository.
- Create a new Pull Request for your changes in the [Flow Official Assets] repository.
- A Github Action will be triggered to verify the on-chain status of the token and update the report in the PR's comment.
- If there is any issue, you will see some warnings and suggestions in the PR's comment. Please check the report and update the token metadata if needed.
- You may see a comment from the Github Action that you need to send 1 $FLOW to the registry address for the token registration because there is a VM Bridge onboarding fee.

Learn more about the registration process in the [Assets Registry] README.md file of the repository.

## What's next?

After submitting your PR, you just need to wait for the Flow team to review your token and merge your PR.
Once the PR is merged, your token will be registered by the Github Actions in the [Flow Official Assets] repository automatically and a new PR will be created automatically by Github Actions to update the token list. The Flow team will regularly merge the token list updates PR to the main branch.

## How to verify the token is registered?

As the registration and token list generation is executed by Github Actions, you can check the status of the PRs and the token list JSON files in the [Flow Official Assets] repository.
Here are the URLs for the token list JSON files:

- Mainnet: `https://raw.githubusercontent.com/onflow/assets/refs/heads/main/tokens/outputs/mainnet/token-list.json`
- Testnet: `https://raw.githubusercontent.com/onflow/assets/refs/heads/main/tokens/outputs/testnet/token-list.json`

You can check the token list JSON files to verify the token is registered in the `token-list.json` file.

[Flow Official Assets]: https://github.com/onflow/assets
[Register Assets in Cadence]: ./register-cadence-assets.md
[Assets Registry]: https://github.com/onflow/assets/tree/main/tokens
48 changes: 0 additions & 48 deletions docs/tutorials/token-launch/register-token.md

This file was deleted.