Deploying Your First OP_20 Token on OP_NET
In this guide, you’ll learn how to deploy your first OP_20 token on the OP_NET metaprotocol. OP_20 is a token standard built on top of the Bitcoin network via OP_NET, enabling you to create and manage your own tokens within the OP_NET ecosystem.
Step 1: Clone the OP_20 Template Repository
First, clone the OP_20 template repository to get the contract code.
Step 2: Install Dependencies
Install the required dependencies using npm or yarn.
This will install everything needed to build and deploy your token contract.
Step 3: Configure Your Token
Once the dependencies are installed, customize your token by editing key properties such as maxSupply
, decimals
, name
, and symbol
in the MyToken.ts
file.
Example configuration:
Step 4: Build the Token Contract
After configuring the token details, build the contract:
This command will generate the compiled contract .wasm
file in the build
folder, ready for deployment.
Step 5: Deploy the Token Contract
Once the contract is built, you can deploy it using the OP_WALLET extension. Follow these steps:
Open OP_WALLET and select the "deploy" option.
Load the
.wasm
file generated in thebuild
folder.Confirm the transaction to deploy the token on OP_NET, which runs on top of the Bitcoin network.
Step 6: Add Liquidity on Motoswap
Now that your tokens are minted, you can make them tradable by adding liquidity on Motoswap:
Copy the token address from your OP_WALLET.
Go to the Motoswap pool creation section and paste your token address into the input field.
Select the other token for the liquidity pair (e.g., wBTC).
Enter the amount of each token you wish to provide as liquidity.
Click "Add Liquidity" and confirm the transaction.
Once liquidity is added, your token will be tradable on Motoswap!
Last updated