Same trading flow as pumpfun_trade, but the wallet uses a sol-safekey file or fallback KEYPAIR_BASE58.
中文 | English | Repository overview
- Token must still be on PumpFun (not graduated); use
pumpswap_trade_with_safekeyafter migration. - Set
keystore_pathinconfig/*/solana.yaml(e.g../keystore.json), enter the password at runtime or setKEYSTORE_PASSWORD. - If
keystore_pathis empty,KEYPAIR_BASE58is accepted as a fallback (less secure).
cd sol-safekey
cargo run --release -- export <private_key_or_mnemonic> ../pumpfun_trade_with_safekey/keystore.jsonThen point keystore_path in pumpfun_trade_with_safekey/config/dev/solana.yaml to that file.
For longer documentation (SWQoS, nonce, security), see pumpswap_trade_with_safekey/README.md—same layout, different protocol (PumpSwap).
- Clone sol-safekey separately and export
keystore.json(this repo does not vendor it)—see root README.md. - In this crate:
cp .env.example .env
cp config/dev/solana.yaml.example config/dev/solana.yaml
cp config/dev/trading.yaml.example config/dev/trading.yaml- Edit YAML/
keystore_path, SWQoS, nonce. Do not commit.envor filled YAML.
cd pumpfun_trade_with_safekey
./run.sh <MINT_ADDRESS>cargo build --release
# Binary: build-cache/release/pumpfun_trade_with_safekey
./build-linux-release.sh- 1 round by default: buy → wait ~30s → sell full mint balance (
ROUNDSinsrc/run.rs). - 2+ SWQoS requires durable nonce; empty YAML placeholders are skipped so
NONCE_ACCOUNTstill works. - Params are refreshed from RPC before sell, same as
pumpfun_trade.
MIT License
https://fnzero.dev/ · https://github.com/0xfnzero/fnzero-examples