- Download and install the OP_WALLET Chrome Extension.
- Set up the wallet and switch the network to Testnet.
- If you don't have any Testnet3 Bitcoin, get some from this faucet.
- Clone the OP_20 template contract repository:
git clone https://github.com/btc-vision/OP_20.git
- Open the
OP_20
template repository in your IDE or text editor. - Navigate to
src/contracts/MyToken.ts
and find lines 15-18:const maxSupply: u256 = u128.fromString('100000000000000000000000000').toU256(); const decimals: u8 = 18; const name: string = 'Testnet'; const symbol: string = 'TEST';
- Modify the number for the total supply and the amount of decimals (e.g., for 18 decimals, add 18 zeros).
- Change the name and symbol of the token as desired.
- Open your terminal and navigate to the location of the downloaded OP_20 template folder.
- Run the following commands:
npm install npm run build
- After building, a
build
folder will be created in the root of theOP_20
folder. Look for[nameoftoken].wasm
for the compiled contract.
- Open the OP_WALLET extension and select the "deploy" option.
- Drag your
.wasm
file or click to choose it. - Send your transaction to deploy the token contract onto Bitcoin with OP_NET.
- After deploying the token, you will need to mint the supply you wish to have.
- Open your OP_WALLET, click the token in your balance that you just deployed, and select the "mint" option.
- Click "max" or type in the amount of tokens you wish to mint, and then send the transaction.
- Copy the token address from your OP_WALLET.
- Go to Motoswap and paste your token address into the top or bottom box.
- Enter the amount of tokens you wish to add to the liquidity pool.
- Select the other side of the liquidity pair (e.g., WBTC) and enter the amount of tokens you wish to add.
- Click "Add Liquidity".
Your token is now tradeable on Motoswap!
You have successfully deployed and minted your OP_20 token on the Bitcoin blockchain using OP_NET, and added liquidity to make it tradeable on Motoswap.