Binaries
macOS
Install solpipe and safejar via Homebrew:
brew install noncepad/homebrew-tap/noncepad-solpipe
Linux / Docker
Build a Docker image with solpipe and safejar installed using our nightly Debian repository:
docker build https://noncepad.com/dev/nightly.Dockerfile
Environment Setup
Set up your workspace:
mkdir catscope-run
cd catscope-run
mkdir jar proxy
Advanced: using your own state and transaction processor
export STATE_URL=<state-server-url>
export TXPROC_URL=<txproc-server-url>
Create a Safe Wallet
A safe wallet controls how much your bot can spend and under what conditions.
cd jar
export OWNER=<owner-keypair>
Using a Ledger Nano?
Specify your owner key using the Ledger USB path:
cd jar
export OWNER=usb://ledger?key=3001 #specify and record a ledger key
Not using a Ledger? Generate a keypair instead
cd jar
solana-keygen new -o owner.json
export OWNER=owner.json
Set the wallet that will pay transaction fees:
export MY_WALLET=<keypair>
Initialize the safe wallet:
safejar jar init $OWNER --fee-payer=$MY_WALLET
Note: Record your jar ID from the output.
Need to retrieve your jar ID later?
safejar jar-id <owner-keypair>
See safejar for more details.
Run a Proxy
cd ../proxy
export JAR_ID=<jar-id>
Initialize the proxy configuration:
solpipe bidder init <jar> <sweep> <cur-dir>solpipe bidder init $JAR_ID $JAR_ID .Advanced: using a protected sweep key
By default the sweep destination is your jar. If you want funds swept to a separate protected key (e.g. a Ledger Nano), set it first and pass it as the sweep argument:
export SWEEP=<sweep-keypair>
solpipe bidder init <jar> $SWEEP <cur-dir>export SWEEP=usb://ledger?key=3002
solpipe bidder init $JAR_ID $SWEEP .This generates authorizer.json and proxy.json in the directory.
Fund the Authorizer
Fund the authorizer with approximately 0.03 SOL:
export AUTHORIZER=$(solana-keygen pubkey authorizer.json)
safejar transfer-sol <from-keypair> $AUTHORIZER <sol-amount> --fee-payer=$MY_WALLETexport AUTHORIZER=$(solana-keygen pubkey authorizer.json)
safejar transfer-sol $MY_WALLET $AUTHORIZER 0.03 --fee-payer=$MY_WALLETStart Proxy
solpipe bidder proxy proxy.json --fee-payer=authorizer.json
Note: Back up the
market.dbfile generated in this directory. It contains your bidder state and is not recoverable if lost.
Advanced: running the proxy as a background service
For production use, the proxy should be daemonized. See systemd for how to set this up as a service.
Connect to the Market
Propose Rule Set
Note: The proxy must remain running. Open a new terminal and
cdintocatscope-run/jar.
Propose the rule set for the CatScope market pipeline:
cd catscope-run/jar
solpipe bidder propose-rule-set 6VQk8GA84p7zZSyL8XtX6oVd3Vp4EJ5hoUenKoC3fHSf
Initialize Delegation
Set your owner and rule set — replace the placeholders with your actual values:
export OWNER=<owner-keypair> # set to same keypair used to create jar
export RULE_SET=<proposed-rule-set>
We recommend also saving the rule set to a file
echo $RULE_SET > rule.set
Initialize the delegation account using the rule set:
safejar delegation init <owner> <max-tokens> --rule="$RULE_SET" --fee-payer=<keypair>safejar delegation init $OWNER 1 --rule="$RULE_SET" --fee-payer=$MY_WALLETWhat is max-tokens?
The maximum number of tokens this delegation permits the rule set to spend. The rule set cannot authorize spending beyond this limit.
Listen
Connects the proxy to the CatScope bot market using your rule set, authorizing participation in the market.
solpipe bidder listen "$RULE_SET" 6VQk8GA84p7zZSyL8XtX6oVd3Vp4EJ5hoUenKoC3fHSf
Bot Image
Your bot runs as a compiled WebAssembly file. Clone the bot repo and build it:
git clone https://github.com/noncepad/catscope-rust-bot
cd catscope-rust-bot
Select which bot to run in src/lib.rs. The default is BouncerV1. See Bot Design for how to wire in your own strategy.
Add the WebAssembly target and build:
rustup target add wasm32-wasip2
cargo build --target wasm32-wasip2 --release
The compiled file will be at:
target/wasm32-wasip2/release/catscope_rust_bot.wasm
Set the path so the optimizer knows where to find it:
export BOT_IMAGE=$(pwd)/target/wasm32-wasip2/release/catscope_rust_bot.wasm
Run a Bot Optimizer
Clone and build the optimizer:
git clone https://github.com/noncepad/catscope-optimizer
cd catscope-optimizer
make
Generate a fee payer keypair (no funds required):
solana-keygen new -o fee-payer.json
Run the optimizer:
./optimizer run ./fee-payer.json -v
For design and configuration, see Optimizer Design.