Skip to content

Chichu9/Wrap-SOL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CLI Bot to Wrap Your SOL to wSOL

This guide helps you convert SOL to wSOL, both in Devnet and on Mainnet.

🧪 Testing the Bot in Devnet

Testing in Devnet allows you to safely verify the bot’s functionality without using real assets. Follow these steps:

Update RPC URL to Devnet

Open the index.ts file and set the RPC URL to Devnet to use test tokens:

const RPC_URL = clusterApiUrl("devnet"); // Devnet URL for testing purposes

Set the amount of SOL you want to wrap:

const amountToWrap = 1; // Set the desired amount here

Fund Your Wallet with Test SOL

Visit the Solana Devnet Faucet and enter your wallet address to receive test SOL.

Run the Bot on Devnet

After configuring the RPC URL and funding your wallet, execute the bot script to run it on Devnet:

npm run start

🌐 Running the Bot on Mainnet

After successful testing in Devnet, you can proceed to use it on Mainnet to handle real SOL. Follow these steps:

Update RPC URL to Mainnet

Open the index.ts file and set the RPC URL to Mainnet to use real tokens:

const RPC_URL = clusterApiUrl("mainnet-beta"); // Mainnet URL

Set the amount of SOL you want to wrap:

const amountToWrap = 1; // Set the desired amount here

Run the Bot on Mainnet

Execute the bot script to wrap SOL on Mainnet:

npm run start

💡 Tips

Ensure you have enough SOL to cover both the amount being wrapped and the transaction fees.

Use Solana Explorer to verify the status of your transactions.

About

CLI Bot to convert Sol to wSOL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published