sol-parser-sdk-python 0.4.5__tar.gz → 0.5.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. sol_parser_sdk_python-0.5.6/PKG-INFO +315 -0
  2. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/README.md +25 -3
  3. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/README_CN.md +25 -3
  4. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/multi_protocol_grpc.py +1 -1
  5. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/pyproject.toml +2 -1
  6. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/__init__.py +47 -7
  7. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_dispatcher.py +6 -6
  8. sol_parser_sdk_python-0.5.6/sol_parser/account_fillers/__init__.py +5 -0
  9. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_fillers/pumpfun.py +2 -4
  10. sol_parser_sdk_python-0.5.6/sol_parser/account_fillers/raydium_launchlab.py +30 -0
  11. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/accounts/__init__.py +116 -37
  12. sol_parser_sdk_python-0.5.6/sol_parser/accounts/raydium_orca.py +515 -0
  13. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/dex_parsers.py +248 -71
  14. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/event_types.py +68 -20
  15. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc_client.py +22 -2
  16. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc_instruction_parser.py +7 -17
  17. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc_types.py +263 -132
  18. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/inner_instruction_parser.py +83 -45
  19. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/instr/__init__.py +4 -0
  20. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/instructions.py +471 -121
  21. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/log_instr_dedup.py +13 -11
  22. sol_parser_sdk_python-0.5.6/sol_parser/market.py +62 -0
  23. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/merger.py +4 -2
  24. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/parser.py +70 -2
  25. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/pumpfun_fee_enrich.py +55 -2
  26. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/rpc_parser.py +66 -25
  27. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/shredstream_client.py +112 -20
  28. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/shredstream_pumpfun.py +39 -13
  29. sol_parser_sdk_python-0.5.6/tests/test_filter_and_account_parity.py +660 -0
  30. sol_parser_sdk_python-0.5.6/tests/test_imports_and_inner.py +150 -0
  31. sol_parser_sdk_python-0.5.6/tests/test_market_helpers.py +19 -0
  32. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_pumpfun_trade_tail.py +81 -3
  33. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_pumpfun_v2_parity.py +5 -5
  34. sol_parser_sdk_python-0.5.6/tests/test_raydium_clmm_instruction_parity.py +235 -0
  35. sol_parser_sdk_python-0.5.6/tests/test_shredstream.py +117 -0
  36. sol_parser_sdk_python-0.4.5/PKG-INFO +0 -14
  37. sol_parser_sdk_python-0.4.5/sol_parser/account_fillers/__init__.py +0 -5
  38. sol_parser_sdk_python-0.4.5/sol_parser/account_fillers/bonk.py +0 -30
  39. sol_parser_sdk_python-0.4.5/tests/test_filter_and_account_parity.py +0 -193
  40. sol_parser_sdk_python-0.4.5/tests/test_imports_and_inner.py +0 -37
  41. sol_parser_sdk_python-0.4.5/tests/test_raydium_clmm_instruction_parity.py +0 -107
  42. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/.env.example +0 -0
  43. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/.gitignore +0 -0
  44. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/meteora_damm_grpc.py +0 -0
  45. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/parse_tx_by_signature.py +0 -0
  46. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/pumpfun_quick_test.py +0 -0
  47. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/pumpfun_trade_filter.py +0 -0
  48. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/pumpfun_with_metrics.py +0 -0
  49. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/pumpswap_low_latency.py +0 -0
  50. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/pumpswap_with_metrics.py +0 -0
  51. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/examples/rust_example_utils.py +0 -0
  52. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/scripts/bench_parser.py +0 -0
  53. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/scripts/gen_golden_rust.sh +0 -0
  54. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_fillers/meteora.py +0 -0
  55. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_fillers/orca.py +0 -0
  56. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_fillers/pumpswap.py +0 -0
  57. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/account_fillers/raydium.py +0 -0
  58. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/accounts/rpc_wallet.py +0 -0
  59. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/accounts/utils.py +0 -0
  60. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/check_migration.py +0 -0
  61. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/clock.py +0 -0
  62. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/common/__init__.py +0 -0
  63. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/entries_decode.py +0 -0
  64. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/env_config.py +0 -0
  65. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/geyser_pb2.py +0 -0
  66. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/geyser_pb2_grpc.py +0 -0
  67. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc/__init__.py +0 -0
  68. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc/geyser_connect.py +0 -0
  69. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc/subscribe_builder.py +0 -0
  70. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/grpc/transaction_meta.py +0 -0
  71. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/instr_account_utils.py +0 -0
  72. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/json_util.py +0 -0
  73. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/logs/__init__.py +0 -0
  74. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/order_buffer.py +0 -0
  75. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/rust_api_inventory.py +0 -0
  76. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/rust_event_json.py +0 -0
  77. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/shredstream_pb2.py +0 -0
  78. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/shredstream_pb2_grpc.py +0 -0
  79. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/solana_storage_pb2.py +0 -0
  80. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/solana_storage_pb2_grpc.py +0 -0
  81. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/u128_parity.py +0 -0
  82. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/sol_parser/verify_discriminators.py +0 -0
  83. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/fixtures/golden_parse_log.json +0 -0
  84. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_golden.py +0 -0
  85. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_log_instr_dedup.py +0 -0
  86. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_order_buffer.py +0 -0
  87. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_pumpfun_account_fill.py +0 -0
  88. {sol_parser_sdk_python-0.4.5 → sol_parser_sdk_python-0.5.6}/tests/test_pumpswap_instruction.py +0 -0
@@ -0,0 +1,315 @@
1
+ Metadata-Version: 2.4
2
+ Name: sol-parser-sdk-python
3
+ Version: 0.5.6
4
+ Summary: Solana DEX program log parsing (pure Python, API aligned with sol-parser-sdk)
5
+ Requires-Python: >=3.10
6
+ Requires-Dist: base58>=2.0
7
+ Requires-Dist: grpcio-tools>=1.64.0
8
+ Requires-Dist: grpcio>=1.64.0
9
+ Requires-Dist: python-dotenv>=1.0.0
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest-benchmark>=4.0; extra == 'dev'
12
+ Requires-Dist: pytest>=8.0; extra == 'dev'
13
+ Provides-Extra: shredstream
14
+ Requires-Dist: solders>=0.21.0; extra == 'shredstream'
15
+ Description-Content-Type: text/markdown
16
+
17
+ <div align="center">
18
+ <h1>⚡ Sol Parser SDK - Python</h1>
19
+ <h3><em>High-performance Solana DEX event parser for Python</em></h3>
20
+ </div>
21
+
22
+ <p align="center">
23
+ <strong>High-performance Python library for parsing Solana DEX events in real-time via Yellowstone gRPC</strong>
24
+ </p>
25
+
26
+ <p align="center">
27
+ <a href="https://pypi.org/project/sol-parser-sdk-python/">
28
+ <img src="https://img.shields.io/pypi/v/sol-parser-sdk-python.svg" alt="PyPI">
29
+ </a>
30
+ <a href="https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/LICENSE">
31
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
32
+ </a>
33
+ </p>
34
+
35
+ <p align="center">
36
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
37
+ <img src="https://img.shields.io/badge/Solana-9945FF?style=for-the-badge&logo=solana&logoColor=white" alt="Solana">
38
+ <img src="https://img.shields.io/badge/gRPC-4285F4?style=for-the-badge&logo=grpc&logoColor=white" alt="gRPC">
39
+ </p>
40
+
41
+ <p align="center">
42
+ <a href="./README_CN.md">中文</a> |
43
+ <a href="./README.md">English</a> |
44
+ <a href="https://fnzero.dev/">Website</a> |
45
+ <a href="https://t.me/fnzero_group">Telegram</a> |
46
+ <a href="https://discord.gg/vuazbGkqQE">Discord</a>
47
+ </p>
48
+
49
+ > ☕ **Support This Project**
50
+ >
51
+ > This SDK is completely free and open source. However, maintaining and continuously updating it requires significant AI computing resources and token consumption. If this SDK helps with your development, consider making a monthly SOL donation — any amount is appreciated and helps keep this project alive!
52
+ >
53
+ > **Donation Wallet:** `6oW7AXz1yRb57pYSxysuXnMs2aR1ha5rzGzReZ1MjPV8`
54
+
55
+ ---
56
+
57
+ ## Other language SDKs
58
+
59
+ | Language | Repository |
60
+ |----------|------------|
61
+ | Rust | [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) |
62
+ | Node.js | [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) |
63
+ | Python | [sol-parser-sdk-python](https://github.com/0xfnzero/sol-parser-sdk-python) |
64
+ | Go | [sol-parser-sdk-golang](https://github.com/0xfnzero/sol-parser-sdk-golang) |
65
+
66
+ ---
67
+
68
+ ## Release notes
69
+
70
+ ### v0.5.6
71
+
72
+ - Adds Meteora DBC log parsing with program-context routing and filter parity.
73
+ - Adds Raydium CLMM/CPMM and Orca account parsers and exports.
74
+ - Fixes default no-filter RPC/Yellowstone instruction parsing so it no longer behaves like an empty include-only filter.
75
+ - Merges RPC ALT loaded writable/readonly keys into the full instruction account table.
76
+ - Skips ShredStream/RPC instruction parsing early for account-only or empty include-only filters.
77
+
78
+ ### v0.5.5
79
+
80
+ - Aligns ShredStream parsing with Rust/Node.js/Go for low-latency static-account paths.
81
+ - Uses default pubkey placeholders for V0 ALT-loaded instruction accounts instead of dropping the instruction.
82
+ - Adds discriminator fallback when the ShredStream outer program id is ALT-loaded.
83
+ - Fixes Pump.fun ShredStream create/create_v2 fallback to use instruction-order accounts.
84
+ - Improves Pump.fun v2 short-account parsing, event-type filtering, and multi-protocol routing parity.
85
+
86
+ ---
87
+
88
+ ## How to use
89
+
90
+ ### 1. Install
91
+
92
+ **From PyPI**
93
+
94
+ ```bash
95
+ pip install sol-parser-sdk-python==0.5.6
96
+ ```
97
+
98
+ **From source**
99
+
100
+ ```bash
101
+ git clone https://github.com/0xfnzero/sol-parser-sdk-python
102
+ cd sol-parser-sdk-python
103
+ pip install -e .
104
+ pip install grpcio grpcio-tools protobuf base58 python-dotenv
105
+ ```
106
+
107
+ ### 2. Environment (Yellowstone gRPC examples)
108
+
109
+ At the **package root** (next to `pyproject.toml`):
110
+
111
+ ```bash
112
+ cp .env.example .env
113
+ # Set GRPC_URL (or GRPC_ENDPOINT) and GRPC_AUTH_TOKEN or GRPC_TOKEN
114
+ ```
115
+
116
+ Run examples from that directory so `.env` is picked up (same idea as the Node.js package).
117
+
118
+ **CLI overrides:** `--grpc-url` / `-g`, `--grpc-token` / `--token` (also `--grpc-url=https://host:443`). **Rust-compatible names:** `GRPC_AUTH_TOKEN` (same as [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) examples), `GRPC_ENDPOINT` (alias for URL). **Legacy env:** `GEYSER_ENDPOINT` / `GEYSER_API_TOKEN`. **Precedence:** CLI > `GRPC_URL` / `GRPC_ENDPOINT` > `GEYSER_*` > defaults; token: CLI > `GRPC_AUTH_TOKEN` > `GRPC_TOKEN` > `GEYSER_API_TOKEN`. Explicit shell `export` wins over `.env`; `python-dotenv` does not overwrite existing variables.
119
+
120
+ Helpers: `sol_parser.env_config` (`parse_grpc_credentials`, `require_grpc_env`, `parse_shredstream_url`, …), re-exported from `sol_parser`.
121
+
122
+ ### 3. Smoke test
123
+
124
+ ```bash
125
+ python examples/pumpfun_quick_test.py
126
+ ```
127
+
128
+ Requires `GRPC_URL` (or `GRPC_ENDPOINT`) and (for most providers) `GRPC_AUTH_TOKEN` or `GRPC_TOKEN` in `.env` or the environment. You can pass credentials on the command line instead; see step 2.
129
+
130
+ ### 4. Minimal gRPC subscribe + parse
131
+
132
+ ```python
133
+ import asyncio
134
+ import os
135
+
136
+ import base58
137
+
138
+ from sol_parser import parse_logs_only
139
+ from sol_parser.grpc_client import YellowstoneGrpc
140
+ from sol_parser.grpc_types import Protocol, SubscribeCallbacks, transaction_filter_for_protocols
141
+
142
+ async def main():
143
+ endpoint = (
144
+ os.environ.get("GRPC_URL", "").strip()
145
+ or os.environ.get("GRPC_ENDPOINT", "").strip()
146
+ or os.environ.get("GEYSER_ENDPOINT", "solana-yellowstone-grpc.publicnode.com:443")
147
+ )
148
+ token = (
149
+ os.environ.get("GRPC_AUTH_TOKEN", "").strip()
150
+ or os.environ.get("GRPC_TOKEN", "").strip()
151
+ or os.environ.get("GEYSER_API_TOKEN", "")
152
+ )
153
+
154
+ client = YellowstoneGrpc(endpoint)
155
+ if token:
156
+ client.set_x_token(token)
157
+ await client.connect()
158
+
159
+ filter_ = transaction_filter_for_protocols([Protocol.PUMP_FUN, Protocol.PUMP_SWAP])
160
+ filter_.vote = False
161
+ filter_.failed = False
162
+
163
+ def on_update(update):
164
+ if update.transaction is None or update.transaction.transaction is None:
165
+ return
166
+ tx_info = update.transaction.transaction
167
+ slot = update.transaction.slot
168
+ logs = tx_info.log_messages
169
+ if not logs:
170
+ return
171
+ sb = bytes(tx_info.signature) if tx_info.signature else b""
172
+ sig = base58.b58encode(sb).decode("ascii") if len(sb) == 64 else ""
173
+ events = parse_logs_only(
174
+ logs, sig, slot, None, subscribe_tx_info=tx_info
175
+ ) # tx_info from gRPC update — fills accounts from instruction keys
176
+ for ev in events:
177
+ print(ev)
178
+
179
+ sub = await client.subscribe_transactions(
180
+ filter_,
181
+ SubscribeCallbacks(on_update=on_update, on_error=print, on_end=lambda: None),
182
+ )
183
+ print("subscribed", sub.id)
184
+
185
+ try:
186
+ await asyncio.Event().wait()
187
+ except KeyboardInterrupt:
188
+ pass
189
+ await client.disconnect()
190
+
191
+ asyncio.run(main())
192
+ ```
193
+
194
+ **Lighter path:** `parse_logs_only(logs, …)` only needs log messages from the update (no full wire transaction).
195
+
196
+ ### 5. ShredStream (HTTP — not Yellowstone gRPC)
197
+
198
+ Python includes a native ShredStream client (`ShredStreamClient`, `ShredStreamConfig`) plus the same env/CLI helpers as Node (`parse_shredstream_url`: `SHREDSTREAM_URL` / `SHRED_URL`, `--url` / `-u` / `--endpoint=`). Install the optional extra with `pip install 'sol-parser-sdk-python[shredstream]'`. ShredStream uses its own endpoint, **not** `GRPC_URL`.
199
+
200
+ The Python ShredStream hot path uses static account keys only. V0 ALT-loaded instruction accounts are represented with default pubkey placeholders, and ALT-loaded outer program ids are parsed best-effort by discriminator. Inner CPI/log-only events still require the Yellowstone/RPC paths.
201
+
202
+ ---
203
+
204
+ ## Examples
205
+
206
+ From the **package root** after `pip install -e .`. Run with `python examples/<file>.py`. Scripts are written to mirror the **output layout and env names** of [sol-parser-sdk/examples](https://github.com/0xfnzero/sol-parser-sdk/tree/main/examples) (Rust); streaming uses `subscribe_transactions` + `parse_logs_only` with the same program IDs as `TransactionFilter::for_protocols` in Rust.
207
+
208
+ | Description | Run command | Source |
209
+ |-------------|-------------|--------|
210
+ | **PumpFun** | | |
211
+ | PumpFun trade filtering | `python examples/pumpfun_trade_filter.py` | [pumpfun_trade_filter.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_trade_filter.py) |
212
+ | PumpFun events + metrics | `python examples/pumpfun_with_metrics.py` | [pumpfun_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_with_metrics.py) |
213
+ | Quick PumpFun connection test | `python examples/pumpfun_quick_test.py` | [pumpfun_quick_test.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpfun_quick_test.py) |
214
+ | **PumpSwap** | | |
215
+ | PumpSwap ultra-low latency | `python examples/pumpswap_low_latency.py` | [pumpswap_low_latency.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_low_latency.py) |
216
+ | PumpSwap events + metrics | `python examples/pumpswap_with_metrics.py` | [pumpswap_with_metrics.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/pumpswap_with_metrics.py) |
217
+ | **Meteora DAMM** | | |
218
+ | Meteora DAMM V2 events | `python examples/meteora_damm_grpc.py` | [meteora_damm_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/meteora_damm_grpc.py) |
219
+ | **Multi-protocol** | | |
220
+ | Subscribe to every program in Rust `Protocol` / `program_ids` | `python examples/multi_protocol_grpc.py` | [multi_protocol_grpc.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/multi_protocol_grpc.py) |
221
+ | **Utility** | | |
222
+ | Parse tx by signature (HTTP RPC; not gRPC). `TX_SIGNATURE` / `RPC_URL` or `SOLANA_RPC_URL` in `.env` or `--sig` / `--rpc`. | `python examples/parse_tx_by_signature.py` | [parse_tx_by_signature.py](https://github.com/0xfnzero/sol-parser-sdk-python/blob/main/examples/parse_tx_by_signature.py) |
223
+
224
+ **Env:** gRPC examples need **`GRPC_URL`** or **`GRPC_ENDPOINT`**, plus **`GRPC_AUTH_TOKEN`** or **`GRPC_TOKEN`** (or legacy `GEYSER_*`). See **`.env.example`**.
225
+
226
+ ---
227
+
228
+ ## Protocols
229
+
230
+ PumpFun, PumpSwap, Raydium AMM V4 / CLMM / CPMM, Orca Whirlpool, Meteora DAMM V2 / DLMM, Raydium LaunchLab (see `sol_parser/`).
231
+
232
+ ---
233
+
234
+ ## Useful exports
235
+
236
+ - `parse_logs_only` — log-based DEX events from gRPC log messages.
237
+ - `format_dex_event_json` / `dex_event_to_jsonable` — pretty-print `DexEvent` as indented JSON (one field per line); `repr(ev)` is the default dataclass single-line form, not JSON.
238
+ - `YellowstoneGrpc` — async Yellowstone gRPC client (`connect`, `subscribe_transactions`, `disconnect`).
239
+ - `now_micros` — microsecond clock (same role as Rust `sol_parser_sdk::core::now_micros`).
240
+ - `transaction_filter_for_protocols` / `program_ids_for_protocols` / `account_filter_for_protocols` — same program IDs as Rust `Protocol` + `for_protocols` in `grpc/filter.rs`.
241
+ - `parse_grpc_credentials` / `require_grpc_env` — load `.env` + env + CLI (aligned with [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) `grpc_env`).
242
+
243
+ ---
244
+
245
+ ## Advanced
246
+
247
+ ### Custom gRPC endpoint
248
+
249
+ ```python
250
+ import os
251
+
252
+ from sol_parser.grpc_client import YellowstoneGrpc
253
+
254
+ endpoint = os.environ.get("GRPC_URL") or os.environ.get("GRPC_ENDPOINT") or os.environ.get(
255
+ "GEYSER_ENDPOINT", "solana-yellowstone-grpc.publicnode.com:443"
256
+ )
257
+ token = (
258
+ os.environ.get("GRPC_AUTH_TOKEN")
259
+ or os.environ.get("GRPC_TOKEN")
260
+ or os.environ.get("GEYSER_API_TOKEN", "")
261
+ )
262
+ client = YellowstoneGrpc(endpoint)
263
+ if token:
264
+ client.set_x_token(token)
265
+ ```
266
+
267
+ ### Create + buy detection
268
+
269
+ `parse_logs_only` can detect create-and-buy patterns from program logs; see the PumpFun examples.
270
+
271
+ ---
272
+
273
+ ## Project structure
274
+
275
+ ```
276
+ sol-parser-sdk-python/
277
+ ├── sol_parser/
278
+ │ ├── grpc_client.py # YellowstoneGrpc (async connect / subscribe)
279
+ │ ├── env_config.py # GRPC_URL, .env, CLI helpers (Node parity)
280
+ │ ├── clock.py # now_micros()
281
+ │ ├── grpc_types.py # TransactionFilter, SubscribeCallbacks, for_protocols helpers, …
282
+ │ ├── parser.py # parse_logs_only, …
283
+ │ ├── geyser_pb2.py # Generated proto (Yellowstone)
284
+ │ └── …
285
+ ├── examples/
286
+ │ ├── pumpfun_trade_filter.py
287
+ │ ├── pumpfun_quick_test.py
288
+ │ └── …
289
+ ├── .env.example
290
+ └── pyproject.toml
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Development
296
+
297
+ ```bash
298
+ pip install -e ".[dev]"
299
+ pytest tests/
300
+ ```
301
+
302
+ ---
303
+
304
+ ## License
305
+
306
+ MIT — https://github.com/0xfnzero/sol-parser-sdk-python
307
+
308
+ ---
309
+
310
+ ## Contact
311
+
312
+ - **Repository**: https://github.com/0xfnzero/sol-parser-sdk-python
313
+ - **Website**: https://fnzero.dev/
314
+ - **Telegram**: https://t.me/fnzero_group
315
+ - **Discord**: https://discord.gg/vuazbGkqQE
@@ -49,6 +49,26 @@
49
49
 
50
50
  ---
51
51
 
52
+ ## Release notes
53
+
54
+ ### v0.5.6
55
+
56
+ - Adds Meteora DBC log parsing with program-context routing and filter parity.
57
+ - Adds Raydium CLMM/CPMM and Orca account parsers and exports.
58
+ - Fixes default no-filter RPC/Yellowstone instruction parsing so it no longer behaves like an empty include-only filter.
59
+ - Merges RPC ALT loaded writable/readonly keys into the full instruction account table.
60
+ - Skips ShredStream/RPC instruction parsing early for account-only or empty include-only filters.
61
+
62
+ ### v0.5.5
63
+
64
+ - Aligns ShredStream parsing with Rust/Node.js/Go for low-latency static-account paths.
65
+ - Uses default pubkey placeholders for V0 ALT-loaded instruction accounts instead of dropping the instruction.
66
+ - Adds discriminator fallback when the ShredStream outer program id is ALT-loaded.
67
+ - Fixes Pump.fun ShredStream create/create_v2 fallback to use instruction-order accounts.
68
+ - Improves Pump.fun v2 short-account parsing, event-type filtering, and multi-protocol routing parity.
69
+
70
+ ---
71
+
52
72
  ## How to use
53
73
 
54
74
  ### 1. Install
@@ -56,7 +76,7 @@
56
76
  **From PyPI**
57
77
 
58
78
  ```bash
59
- pip install sol-parser-sdk-python==0.4.5
79
+ pip install sol-parser-sdk-python==0.5.6
60
80
  ```
61
81
 
62
82
  **From source**
@@ -159,7 +179,9 @@ asyncio.run(main())
159
179
 
160
180
  ### 5. ShredStream (HTTP — not Yellowstone gRPC)
161
181
 
162
- The Node.js SDK includes a ShredStream HTTP client. **Python** provides the same env/CLI helpers as Node (`parse_shredstream_url`: `SHREDSTREAM_URL` / `SHRED_URL`, `--url` / `-u` / `--endpoint=`) for configuration parity; a native ShredStream client may be added later. **Not** `GRPC_URL`.
182
+ Python includes a native ShredStream client (`ShredStreamClient`, `ShredStreamConfig`) plus the same env/CLI helpers as Node (`parse_shredstream_url`: `SHREDSTREAM_URL` / `SHRED_URL`, `--url` / `-u` / `--endpoint=`). Install the optional extra with `pip install 'sol-parser-sdk-python[shredstream]'`. ShredStream uses its own endpoint, **not** `GRPC_URL`.
183
+
184
+ The Python ShredStream hot path uses static account keys only. V0 ALT-loaded instruction accounts are represented with default pubkey placeholders, and ALT-loaded outer program ids are parsed best-effort by discriminator. Inner CPI/log-only events still require the Yellowstone/RPC paths.
163
185
 
164
186
  ---
165
187
 
@@ -189,7 +211,7 @@ From the **package root** after `pip install -e .`. Run with `python examples/<f
189
211
 
190
212
  ## Protocols
191
213
 
192
- PumpFun, PumpSwap, Raydium AMM V4 / CLMM / CPMM, Orca Whirlpool, Meteora DAMM V2 / DLMM, Bonk Launchpad (see `sol_parser/`).
214
+ PumpFun, PumpSwap, Raydium AMM V4 / CLMM / CPMM, Orca Whirlpool, Meteora DAMM V2 / DLMM, Raydium LaunchLab (see `sol_parser/`).
193
215
 
194
216
  ---
195
217
 
@@ -49,6 +49,26 @@
49
49
 
50
50
  ---
51
51
 
52
+ ## 发布说明
53
+
54
+ ### v0.5.6
55
+
56
+ - 新增 Meteora DBC 日志解析,并按当前 program context 做路由与过滤。
57
+ - 新增 Raydium CLMM/CPMM、Orca account parser 与导出。
58
+ - 修复默认无 filter 的 RPC/Yellowstone 指令解析,不再被误当作空 include-only filter。
59
+ - RPC 指令账户表合并 ALT loaded writable/readonly keys。
60
+ - ShredStream/RPC 对 account-only 或空 include-only filter 直接跳过指令解析。
61
+
62
+ ### v0.5.5
63
+
64
+ - ShredStream 低延迟静态账户路径与 Rust/Node.js/Go 对齐。
65
+ - V0 ALT-loaded 指令账户不再整条跳过,而是用默认 pubkey 占位继续 best-effort 解析。
66
+ - 当 ShredStream 外层 program id 来自 ALT 时,按 discriminator 做候选 program id fallback。
67
+ - 修复 Pump.fun ShredStream create/create_v2 fallback,确保按 instruction-order 账户解析。
68
+ - 改进 Pump.fun v2 短账户解析、事件类型过滤和多协议路由一致性。
69
+
70
+ ---
71
+
52
72
  ## 怎么用
53
73
 
54
74
  ### 1. 安装
@@ -56,7 +76,7 @@
56
76
  **PyPI**
57
77
 
58
78
  ```bash
59
- pip install sol-parser-sdk-python==0.4.5
79
+ pip install sol-parser-sdk-python==0.5.6
60
80
  ```
61
81
 
62
82
  **源码**
@@ -159,7 +179,9 @@ asyncio.run(main())
159
179
 
160
180
  ### 5. ShredStream(HTTP,不是 Yellowstone gRPC)
161
181
 
162
- Node 版提供 ShredStream HTTP 客户端。**Python** 侧提供与 Node 相同的配置方式(`parse_shredstream_url`:`SHREDSTREAM_URL` / `SHRED_URL`,`--url` / `-u` / `--endpoint=`);原生 ShredStream 客户端后续可能补充。**不要**用 `GRPC_URL` 配 ShredStream。
182
+ Python 已提供原生 ShredStream 客户端(`ShredStreamClient`、`ShredStreamConfig`),并保留与 Node 相同的配置方式(`parse_shredstream_url`:`SHREDSTREAM_URL` / `SHRED_URL`,`--url` / `-u` / `--endpoint=`)。安装可选依赖:`pip install 'sol-parser-sdk-python[shredstream]'`。ShredStream 使用独立端点,**不要**用 `GRPC_URL`。
183
+
184
+ Python ShredStream 热路径只使用静态账户表。V0 ALT-loaded 指令账户会用默认 pubkey 占位,外层 program id 若来自 ALT 会按 discriminator best-effort 解析。Inner CPI / 仅日志事件仍需 Yellowstone/RPC 路径。
163
185
 
164
186
  ---
165
187
 
@@ -189,7 +211,7 @@ Node 版提供 ShredStream HTTP 客户端。**Python** 侧提供与 Node 相同
189
211
 
190
212
  ## 协议
191
213
 
192
- PumpFun、PumpSwap、Raydium AMM V4 / CLMM / CPMM、Orca Whirlpool、Meteora DAMM V2 / DLMM、Bonk Launchpad(见 `sol_parser/`)。
214
+ PumpFun、PumpSwap、Raydium AMM V4 / CLMM / CPMM、Orca Whirlpool、Meteora DAMM V2 / DLMM、Raydium LaunchLab(见 `sol_parser/`)。
193
215
 
194
216
  ---
195
217
 
@@ -28,7 +28,7 @@ from sol_parser.grpc_types import (
28
28
  PROTOCOLS = [
29
29
  Protocol.PUMP_FUN,
30
30
  Protocol.PUMP_SWAP,
31
- Protocol.BONK,
31
+ Protocol.RAYDIUM_LAUNCHLAB,
32
32
  Protocol.RAYDIUM_CPMM,
33
33
  Protocol.RAYDIUM_CLMM,
34
34
  Protocol.RAYDIUM_AMM_V4,
@@ -1,7 +1,8 @@
1
1
  [project]
2
2
  name = "sol-parser-sdk-python"
3
- version = "0.4.5"
3
+ version = "0.5.6"
4
4
  description = "Solana DEX program log parsing (pure Python, API aligned with sol-parser-sdk)"
5
+ readme = "README.md"
5
6
  requires-python = ">=3.10"
6
7
  dependencies = [
7
8
  "base58>=2.0",
@@ -6,6 +6,7 @@ from .parser import (
6
6
  StreamingEventListener,
7
7
  parse_log,
8
8
  parse_log_optimized,
9
+ parse_log_optimized_with_program_id,
9
10
  parse_log_unified,
10
11
  parse_logs_only,
11
12
  parse_logs_streaming,
@@ -16,6 +17,12 @@ from .parser import (
16
17
  warmup_parser,
17
18
  )
18
19
  from .clock import now_micros
20
+ from .market import (
21
+ sqrt_price_x64_to_price,
22
+ vault_price_from_balances,
23
+ normalize_buy_sell_from_token_delta,
24
+ normalize_buy_sell_from_input_mint,
25
+ )
19
26
  from .grpc_types import (
20
27
  OrderMode,
21
28
  CommitmentLevel,
@@ -46,6 +53,14 @@ from .grpc_types import (
46
53
  event_type_filter_includes_pumpfun,
47
54
  event_type_filter_includes_pumpswap,
48
55
  event_type_filter_includes_meteora_damm_v2,
56
+ event_type_filter_includes_meteora_dbc,
57
+ event_type_filter_includes_meteora_pools,
58
+ event_type_filter_includes_meteora_dlmm,
59
+ event_type_filter_includes_raydium_clmm,
60
+ event_type_filter_includes_raydium_cpmm,
61
+ event_type_filter_includes_raydium_amm_v4,
62
+ event_type_filter_includes_orca_whirlpool,
63
+ event_type_filter_includes_raydium_launchlab,
49
64
  event_type_filter_includes_pump_fees,
50
65
  event_type_filter_allows_instruction_parsing,
51
66
  all_event_types,
@@ -128,16 +143,20 @@ from .event_types import (
128
143
  MeteoraDammV2AddLiquidityEvent,
129
144
  MeteoraDammV2RemoveLiquidityEvent,
130
145
  MeteoraDammV2InitializePoolEvent,
131
- # Bonk events
132
- BonkTradeEvent,
133
- BonkPoolCreateEvent,
134
- BonkMigrateAmmEvent,
146
+ MeteoraDbcCurveCompleteEvent,
147
+ MeteoraDbcInitializePoolEvent,
148
+ MeteoraDbcSwapEvent,
149
+ # RaydiumLaunchlab events
150
+ RaydiumLaunchlabTradeEvent,
151
+ RaydiumLaunchlabPoolCreateEvent,
152
+ RaydiumLaunchlabMigrateAmmEvent,
135
153
  # Union type and helper
136
154
  TypedDexEvent,
137
155
  to_typed_event,
138
156
  legacy_dict_to_dex_event,
139
157
  )
140
158
  from .pumpfun_fee_enrich import (
159
+ enrich_create_v2_from_create_events,
141
160
  enrich_create_v2_observed_fee_recipient,
142
161
  enrich_pumpfun_same_tx_post_merge,
143
162
  enrich_pumpfun_trades_from_create_instructions,
@@ -206,6 +225,8 @@ from .instructions import (
206
225
  parse_pumpfun_instruction,
207
226
  parse_pumpswap_instruction,
208
227
  parse_meteora_damm_instruction,
228
+ parse_meteora_pools_instruction,
229
+ parse_meteora_dlmm_instruction,
209
230
  parse_pump_fees_instruction,
210
231
  )
211
232
 
@@ -218,6 +239,7 @@ __all__ = [
218
239
  "enrich_dex_events_with_subscribe_tx_info",
219
240
  "parse_log_unified",
220
241
  "parse_log_optimized",
242
+ "parse_log_optimized_with_program_id",
221
243
  "parse_log",
222
244
  "parse_logs_only",
223
245
  "parse_logs_streaming",
@@ -229,6 +251,10 @@ __all__ = [
229
251
  "StreamingEventListener",
230
252
  "warmup_parser",
231
253
  "now_micros",
254
+ "sqrt_price_x64_to_price",
255
+ "vault_price_from_balances",
256
+ "normalize_buy_sell_from_token_delta",
257
+ "normalize_buy_sell_from_input_mint",
232
258
  # RPC parser
233
259
  "ParseError",
234
260
  "RpcClient",
@@ -264,6 +290,8 @@ __all__ = [
264
290
  "parse_pumpfun_instruction",
265
291
  "parse_pumpswap_instruction",
266
292
  "parse_meteora_damm_instruction",
293
+ "parse_meteora_pools_instruction",
294
+ "parse_meteora_dlmm_instruction",
267
295
  "parse_pump_fees_instruction",
268
296
  # gRPC types
269
297
  "OrderMode",
@@ -296,6 +324,14 @@ __all__ = [
296
324
  "event_type_filter_includes_pumpfun",
297
325
  "event_type_filter_includes_pumpswap",
298
326
  "event_type_filter_includes_meteora_damm_v2",
327
+ "event_type_filter_includes_meteora_dbc",
328
+ "event_type_filter_includes_meteora_pools",
329
+ "event_type_filter_includes_meteora_dlmm",
330
+ "event_type_filter_includes_raydium_clmm",
331
+ "event_type_filter_includes_raydium_cpmm",
332
+ "event_type_filter_includes_raydium_amm_v4",
333
+ "event_type_filter_includes_orca_whirlpool",
334
+ "event_type_filter_includes_raydium_launchlab",
299
335
  "event_type_filter_includes_pump_fees",
300
336
  "event_type_filter_allows_instruction_parsing",
301
337
  "all_event_types",
@@ -378,12 +414,16 @@ __all__ = [
378
414
  "MeteoraDammV2AddLiquidityEvent",
379
415
  "MeteoraDammV2RemoveLiquidityEvent",
380
416
  "MeteoraDammV2InitializePoolEvent",
381
- "BonkTradeEvent",
382
- "BonkPoolCreateEvent",
383
- "BonkMigrateAmmEvent",
417
+ "MeteoraDbcCurveCompleteEvent",
418
+ "MeteoraDbcInitializePoolEvent",
419
+ "MeteoraDbcSwapEvent",
420
+ "RaydiumLaunchlabTradeEvent",
421
+ "RaydiumLaunchlabPoolCreateEvent",
422
+ "RaydiumLaunchlabMigrateAmmEvent",
384
423
  "TypedDexEvent",
385
424
  "to_typed_event",
386
425
  "legacy_dict_to_dex_event",
426
+ "enrich_create_v2_from_create_events",
387
427
  "enrich_create_v2_observed_fee_recipient",
388
428
  "enrich_pumpfun_same_tx_post_merge",
389
429
  "enrich_pumpfun_trades_from_create_instructions",
@@ -6,12 +6,12 @@ from typing import Any, Dict, List, Optional, Tuple
6
6
 
7
7
  import base58
8
8
 
9
- from .account_fillers import bonk, meteora, orca, pumpfun, pumpswap, raydium
9
+ from .account_fillers import raydium_launchlab, meteora, orca, pumpfun, pumpswap, raydium
10
10
  from .event_types import DexEvent
11
11
  from .grpc_types import EventType
12
12
  from .instr_account_utils import get_instruction_account_getter
13
13
  from .instructions import (
14
- BONK_LAUNCHPAD_PROGRAM_ID,
14
+ RAYDIUM_LAUNCHLAB_PROGRAM_ID,
15
15
  METEORA_DAMM_V2_PROGRAM_ID,
16
16
  METEORA_DLMM_PROGRAM_ID,
17
17
  METEORA_POOLS_PROGRAM_ID,
@@ -179,10 +179,10 @@ def fill_accounts_with_owned_keys(
179
179
  run(METEORA_DLMM_PROGRAM_ID, lambda g: meteora.fill_dlmm_add_liquidity_accounts(data, g))
180
180
  elif et == EventType.METEORA_DLMM_REMOVE_LIQUIDITY:
181
181
  run(METEORA_DLMM_PROGRAM_ID, lambda g: meteora.fill_dlmm_remove_liquidity_accounts(data, g))
182
- elif et == EventType.BONK_TRADE:
183
- run(BONK_LAUNCHPAD_PROGRAM_ID, lambda g: bonk.fill_trade_accounts(data, g))
184
- elif et == EventType.BONK_POOL_CREATE:
185
- run(BONK_LAUNCHPAD_PROGRAM_ID, lambda g: bonk.fill_pool_create_accounts(data, g))
182
+ elif et == EventType.RAYDIUM_LAUNCHLAB_TRADE:
183
+ run(RAYDIUM_LAUNCHLAB_PROGRAM_ID, lambda g: raydium_launchlab.fill_trade_accounts(data, g))
184
+ elif et == EventType.RAYDIUM_LAUNCHLAB_POOL_CREATE:
185
+ run(RAYDIUM_LAUNCHLAB_PROGRAM_ID, lambda g: raydium_launchlab.fill_pool_create_accounts(data, g))
186
186
 
187
187
 
188
188
  def fill_data(
@@ -0,0 +1,5 @@
1
+ """账户填充子模块(对齐 Rust ``core/account_fillers``)。"""
2
+
3
+ from . import raydium_launchlab, meteora, orca, pumpfun, pumpswap, raydium
4
+
5
+ __all__ = ["raydium_launchlab", "meteora", "orca", "pumpfun", "pumpswap", "raydium"]
@@ -29,9 +29,7 @@ def fill_trade_accounts(e: PumpFunTradeEvent, get: AccountGetter) -> None:
29
29
  if _empty(getattr(e, name)):
30
30
  setattr(e, name, get(idx))
31
31
 
32
- is_v2 = e.ix_name in ("buy_v2", "sell_v2", "buy_exact_quote_in_v2") or (
33
- e.ix_name == "buy_exact_quote_in" and account_at_matches_mint(1)
34
- )
32
+ is_v2 = e.ix_name in ("buy_v2", "sell_v2", "buy_exact_quote_in_v2") or account_at_matches_mint(1)
35
33
  if is_v2:
36
34
  set_attr("global_account", 0)
37
35
  set_attr("quote_mint", 2)
@@ -51,7 +49,7 @@ def fill_trade_accounts(e: PumpFunTradeEvent, get: AccountGetter) -> None:
51
49
  set_attr("associated_quote_buyback_fee_recipient", 9)
52
50
  set_attr("associated_creator_vault", 17)
53
51
  set_attr("sharing_config", 18)
54
- if e.ix_name == "sell_v2":
52
+ if e.ix_name == "sell_v2" or (e.ix_name == "sell" and not e.is_buy):
55
53
  set_attr("user_volume_accumulator", 19)
56
54
  set_attr("associated_user_volume_accumulator", 20)
57
55
  set_attr("fee_config", 21)
@@ -0,0 +1,30 @@
1
+ """RaydiumLaunchlab 账户填充(对齐 ``account_fillers/raydium_launchlab.rs``)。"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Callable
6
+
7
+ from ..event_types import RaydiumLaunchlabPoolCreateEvent, RaydiumLaunchlabTradeEvent
8
+
9
+ Z = "11111111111111111111111111111111"
10
+
11
+
12
+ def _empty(s: str) -> bool:
13
+ return not s or s == Z
14
+
15
+
16
+ AccountGetter = Callable[[int], str]
17
+
18
+
19
+ def fill_trade_accounts(e: RaydiumLaunchlabTradeEvent, get: AccountGetter) -> None:
20
+ if _empty(e.user):
21
+ e.user = get(0)
22
+ if _empty(e.pool_state):
23
+ e.pool_state = get(4)
24
+
25
+
26
+ def fill_pool_create_accounts(e: RaydiumLaunchlabPoolCreateEvent, get: AccountGetter) -> None:
27
+ if _empty(e.pool_state):
28
+ e.pool_state = get(5)
29
+ if _empty(e.creator):
30
+ e.creator = get(1)