Skip to content

mrsirg97-rgb/torchsdk-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

torchsdk-examples

Example projects built with the Torch SDK for torch.market — the fair-launch DAO launchpad on Solana.

Examples

Package Description
tradebot Bonding-curve trading bot — scans for high-volume tokens, quotes buys, takes profit on sells
lending-monitor Lending position monitor — shows rates, watches loan health, auto-liquidates underwater positions
token-launcher CLI for the full token lifecycle — launch, buy+vote, star, message, and check SAID status

Setup

pnpm install
pnpm -r build

Running

Each example is a standalone npx tsx script. Set WALLET to a base58 private key and RPC_URL to your Solana RPC.

# tradebot — scan and trade bonding-curve tokens
cd packages/tradebot
WALLET=<key> RPC_URL=<rpc> npx tsx src/index.ts

# lending-monitor — show lending info for all migrated tokens
cd packages/lending-monitor
RPC_URL=<rpc> npx tsx src/index.ts

# lending-monitor — watch your loan health
MODE=watch MINT=<addr> WALLET=<key> npx tsx src/index.ts

# lending-monitor — run liquidation bot
MODE=liquidate MINT=<addr> WALLET=<key> npx tsx src/index.ts

# token-launcher — launch a new token
cd packages/token-launcher
WALLET=<key> npx tsx src/index.ts launch --name "My Token" --symbol "MTKN" --uri "https://..."

# token-launcher — buy+vote, star, message
WALLET=<key> npx tsx src/index.ts buy --mint <addr> --sol 0.1 --vote burn
WALLET=<key> npx tsx src/index.ts star --mint <addr>
WALLET=<key> npx tsx src/index.ts message --mint <addr> --text "gm"
WALLET=<key> npx tsx src/index.ts said

Testing

Each example has an E2E test that runs against a Surfpool mainnet fork. The tests simulate the full application flow on a local Solana validator.

# Start a local Solana mainnet fork
surfpool start --network mainnet --no-tui

# Run individual tests
cd packages/tradebot && pnpm test     # scan → quote → buy → PnL → sell
cd packages/lending-monitor && pnpm test  # bond → migrate → borrow → watch → repay
cd packages/token-launcher && pnpm test   # launch → buy+vote → star → message → SAID

License

MIT

About

a few simple working examples of applications built on torchsdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors