Deploy with Thirdweb
Deploying Your ERC-20 Token on the PointPay Network with Thirdweb
Thirdweb offers an easy way to deploy your ERC-20 token contract on the PointPay network. Here's how to create and deploy your token "Your Token Name" (YTN) using their tools.
Step 1: Set Up Your Environment
Install Tools:
Start with the Thirdweb SDK using npm:
npm install @thirdweb-dev/sdk ethers
Configure Your Wallet: Use MetaMask or a compatible wallet and connect it to the PointPay network:
For Mainnet, use
https://rpc-mainnet.pointpay.ioas the RPC endpoint and5511as the Chain ID.For TestNet, use
https://rpc-testnet.pointpay.ioas the RPC endpoint and5511555as the Chain ID.Set
PXPas the currency symbol in both cases.
Fund Your Wallet: Ensure your wallet has enough PXP tokens for gas fees. For testing, you can use the PointPay TestNet Faucet.
Step 2: Write the Token Contract π
Create a basic ERC-20 token contract using OpenZeppelin's templates. Hereβs an example for "Your Token Name" (YTN):
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract YourTokenName is ERC20 {
constructor() ERC20("Your Token Name", "YTN") {
_mint(msg.sender, 1000000 * 10 ** decimals());
}
}Save this file as YourTokenName.sol.
Step 3: Deploy Your Contract with Thirdweb
Go to Thirdweb Dashboard: Open the Thirdweb Dashboard and connect your wallet.
Select the PointPay Network: Choose Mainnet or TestNet, depending on your deployment target.
Upload and Deploy the Contract:
Click "Deploy Contract."
Upload the
YourTokenName.solfile.Enter the following parameters:
Token Name: Your Token Name
Symbol: YTN
Total Supply: 1,000,000 tokens.
Confirm the transaction in your wallet.
Verify Deployment:
For Mainnet, use https://explorer.pointpay.io to view your deployed contract.
For TestNet, check the deployment on https://testnet.pointpay.io.
Step 4: Manage and Interact with Your Token
After deployment, use the Thirdweb SDK to interact with your contract:
Final Thoughts π
With Thirdweb, deploying your ERC-20 token on the PointPay network is quick and straightforward. By following this guide, youβll have "Your Token Name" (YTN) live and ready to integrate into your applications or share with your community. π
Last updated