Skip to content

neko/ding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ding logo

small rust monitor for famous fox ding! transactions on solana.

it listens to helius enhanced or standard solana websockets, decodes mpl core createv2 instruction data, fetches the token metadata uri for the image, resolves primary sns names when present, and sends a compact discord embed.

Deploy on Railway

setup

copy .env.example to .env and fill in the values.

HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=<API_KEY>
HELIUS_WS_URL=wss://mainnet.helius-rpc.com/?api-key=<API_KEY>
DING_WS_MODE=enhanced
DING_FEE_ACCOUNT=98Ni7vVRR1tggtWWruPVcfFXHTH11bPbNryJZGkCGvaD
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/<ID>/<TOKEN>

railway Deploy on Railway

before the first deploy, add the required service variables from .env.example:

HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=<API_KEY>
HELIUS_WS_URL=wss://mainnet.helius-rpc.com/?api-key=<API_KEY>
DING_WS_MODE=enhanced
DING_FEE_ACCOUNT=98Ni7vVRR1tggtWWruPVcfFXHTH11bPbNryJZGkCGvaD
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/<ID>/<TOKEN>

railway uses railway.json to build with railpack and keep the monitor running as a long-lived worker.

run

cargo run --release

send a test webhook from the default example tx:

cargo run -- -t

send a test webhook from a specific tx:

cargo run -- -t <signature>

send a test webhook once on startup:

DING_TEST_SIGNATURE=<signature>

env

HELIUS_RPC_URL is used for test tx fetches and sns account lookups.

HELIUS_WS_URL is used for websocket subscriptions.

SOLANA_RPC_URL and SOLANA_WS_URL may be used instead of HELIUS_RPC_URL and HELIUS_WS_URL.

DING_WS_MODE controls the websocket mode. enhanced uses helius transactionSubscribe with required mpl core and fee accounts. standard uses normal logsSubscribe on the fee account, then fetches matching transactions by signature.

DING_FEE_ACCOUNT defaults to the famous fox fee account used to prefilter ding candidates.

DISCORD_WEBHOOK_URL is where ding embeds are sent.

DING_TEST_SIGNATURE sends a test webhook once on startup using that tx.

standard websocket mode example:

HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=<API_KEY>
HELIUS_WS_URL=wss://mainnet.helius-rpc.com/?api-key=<API_KEY>
DING_WS_MODE=standard
DING_FEE_ACCOUNT=98Ni7vVRR1tggtWWruPVcfFXHTH11bPbNryJZGkCGvaD
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/<ID>/<TOKEN>

About

monitor famous fox "ding!"(s) onchain

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages