Files
2026-07-12 14:35:58 +08:00

18 lines
757 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Durable Nonce
[English](README.md)
展示如何获取 durable nonce,并附加到由 `sol-parser-sdk` gRPC 事件触发的 PumpFun 交易。
> 这是会发送真实交易的模板。运行前设置 `PRIVATE_KEY`,替换 `use_your_nonce_account_here`,并配置 RPC 和 gRPCnonce authority 必须与签名者匹配。
```bash
export GRPC_ENDPOINT=https://your-yellowstone.example
export GRPC_AUTH_TOKEN=optional-token
cargo run --package nonce_cache
```
新代码不要同时设置 recent blockhash 和 durable nonce,应使用 `SimpleBuyParams::with_durable_nonce`。构建前刷新 nonce,已消费状态不可复用。Nonce 只延长交易有效期,不会保持报价新鲜。
参见[Nonce Cache 说明](../../docs/NONCE_CACHE_CN.md)。