This project is a simple automated script to interact with the Pharos Network, performing token swaps and liquidity-related operations.
- Token Swapping on Pharos Network
- Liquidity Management
- Headless execution using
screen - Configurable private key and loop count for batch operations
git clone https://github.com/takachan0012/pharos-network.gitcd pharos-networknpm installsetup private key
echo PRIVATE_KEY=your_private_key_here >> main/.envsetup loop count ( how many time you will run script in main.ts )
echo LOOP_COUNT=your_loop_count_here >> main/.envsetup amount in percent, it set for each tx of your asset. for example use 1% from asset balance
echo AMOUNT_IN_PERCENT=1 >> main/.envset timeout in milisecond, it set for waiting next tx. for example below, next tx will be done in ranges 1minute to 2minutes
echo TIMEOUT_MIN_MS=60000 >> main/.env
echo TIMEOUT_MAX_MS=120000 >> main/.envsetup Autostaking Access token open https://autostaking.pro/?env=pharos, connect wallet > open devmode > tab console, paste code below
localStorage.getItem("token")copy that value token, then run in terminal
echo AUTOSTAKING_TOKEN="your_token_here" >> main/.envOptional Set Rpc Url
echo RPC_URL=your_rpc_url_here >> main/.envscreen -S pharosnpm run rwafiAquafluxnpm run autostakingFaucetnpm run autostakingDepositnpm run autostakingWithdrawnpm run openCfdTradenpm run faroswapUsdcLiquiditynpm run faroswapUsdtLiquidtynpm run faroswapUsdcSwapnpm run faroswapWphrsSwapnpm run pnsnpm run primusnpm run zenithUsdcLiquiditynpm run zenithWphrsLiquiditynpm run zenithUsdcSwapnpm run zenithUsdtSwapnpm run zenithWphrsSwapnpm run rwafiR2Swapnpm run rwafiR2Earnnpm run openFiFaucetnpm run openFiSupplynpm run openFiBorrownpm run openFiRepaynpm run openFiWithdrawnpm run spoutBuynpm run bitverseOpenPositionif you got error especially in order type Market as example below:
Opening position long BTCS-USD for 2.16 USDT, Order type: market...
Failed: Error: transaction execution reverted action="sendTransaction", data=null, reason=null, invocation=null, revert=null, ...setup order type to 2 in main/bitverse/openPosition.ts as below:
await openPosition({
baseDir,
side,
pair,
provider,
signer: wallet.signer,
router,
orderType: 2 // SETUP HERE
})open https://testnet.pharosnetwork.xyz/experience, connect wallet > open devmode > tab console, paste code below
localStorage.getItem("PHAROS_AUTHORIZATION_TOKEN")copy that value token, then run in terminal
echo PHAROS_TOKEN=your_token_here >> main/.envnpm run atlanticDirectSendTokennpm run atlanticSubscribeAssetonpm run atlanticRedemptionAssetoPress: Ctrl + A, then D
screen -R pharosYour bot is running in the background on the Pharos Network.
- Make sure your wallet is funded with enough gas (PHRS).
- list faucet:
- Use at your own risk. Test carefully on testnet.
- This project for educational and testing purposes only.
Coffee: https://trakteer.id/Winsnipsupport/tip
Stay updated and connect with the Winsnip community:
Channel: https://t.me/winsnip
Group Chat: https://t.me/winsnip_hub
This ensures users can join the Telegram community easily and stay engaged with updates and discussions.