sol-parser-sdk-python 0.5.6__py3-none-any.whl → 0.5.7__py3-none-any.whl
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.
- sol_parser/__init__.py +18 -0
- sol_parser/account_dispatcher.py +2 -0
- sol_parser/account_fillers/meteora.py +15 -0
- sol_parser/account_fillers/pumpfun.py +11 -0
- sol_parser/check_migration.py +3 -0
- sol_parser/dex_parsers.py +881 -64
- sol_parser/event_type_parity.py +129 -0
- sol_parser/event_types.py +252 -0
- sol_parser/grpc_client.py +3 -4
- sol_parser/grpc_instruction_parser.py +14 -3
- sol_parser/grpc_types.py +49 -21
- sol_parser/inner_instruction_parser.py +138 -12
- sol_parser/instructions.py +293 -57
- sol_parser/log_instr_dedup.py +34 -4
- sol_parser/merger.py +115 -41
- sol_parser/parser.py +26 -6
- sol_parser/pumpfun_fee_enrich.py +12 -1
- sol_parser/rpc_parser.py +56 -11
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.7.dist-info}/METADATA +2 -2
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.7.dist-info}/RECORD +22 -21
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.7.dist-info}/WHEEL +1 -1
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.7.dist-info}/entry_points.txt +0 -0
sol_parser/__init__.py
CHANGED
|
@@ -104,6 +104,15 @@ from .event_types import (
|
|
|
104
104
|
RaydiumClmmOpenPositionWithTokenExtNftEvent,
|
|
105
105
|
RaydiumClmmClosePositionEvent,
|
|
106
106
|
RaydiumClmmCollectFeeEvent,
|
|
107
|
+
RaydiumClmmLiquidityChangeEvent,
|
|
108
|
+
RaydiumClmmConfigChangeEvent,
|
|
109
|
+
RaydiumClmmCreatePersonalPositionEvent,
|
|
110
|
+
RaydiumClmmLiquidityCalculateEvent,
|
|
111
|
+
RaydiumClmmOpenLimitOrderEvent,
|
|
112
|
+
RaydiumClmmIncreaseLimitOrderEvent,
|
|
113
|
+
RaydiumClmmDecreaseLimitOrderEvent,
|
|
114
|
+
RaydiumClmmSettleLimitOrderEvent,
|
|
115
|
+
RaydiumClmmUpdateRewardInfosEvent,
|
|
107
116
|
# Raydium AMM V4 (legacy)
|
|
108
117
|
RaydiumAmmV4SwapEvent,
|
|
109
118
|
RaydiumAmmV4DepositEvent,
|
|
@@ -381,6 +390,15 @@ __all__ = [
|
|
|
381
390
|
"RaydiumClmmOpenPositionWithTokenExtNftEvent",
|
|
382
391
|
"RaydiumClmmClosePositionEvent",
|
|
383
392
|
"RaydiumClmmCollectFeeEvent",
|
|
393
|
+
"RaydiumClmmLiquidityChangeEvent",
|
|
394
|
+
"RaydiumClmmConfigChangeEvent",
|
|
395
|
+
"RaydiumClmmCreatePersonalPositionEvent",
|
|
396
|
+
"RaydiumClmmLiquidityCalculateEvent",
|
|
397
|
+
"RaydiumClmmOpenLimitOrderEvent",
|
|
398
|
+
"RaydiumClmmIncreaseLimitOrderEvent",
|
|
399
|
+
"RaydiumClmmDecreaseLimitOrderEvent",
|
|
400
|
+
"RaydiumClmmSettleLimitOrderEvent",
|
|
401
|
+
"RaydiumClmmUpdateRewardInfosEvent",
|
|
384
402
|
"RaydiumAmmV4SwapEvent",
|
|
385
403
|
"RaydiumAmmV4DepositEvent",
|
|
386
404
|
"RaydiumAmmV4WithdrawEvent",
|
sol_parser/account_dispatcher.py
CHANGED
|
@@ -167,6 +167,8 @@ def fill_accounts_with_owned_keys(
|
|
|
167
167
|
run(METEORA_DAMM_V2_PROGRAM_ID, lambda g: meteora.fill_damm_v2_add_liquidity_accounts(data, g))
|
|
168
168
|
elif et == EventType.METEORA_DAMM_V2_REMOVE_LIQUIDITY:
|
|
169
169
|
run(METEORA_DAMM_V2_PROGRAM_ID, lambda g: meteora.fill_damm_v2_remove_liquidity_accounts(data, g))
|
|
170
|
+
elif et == EventType.METEORA_DAMM_V2_INITIALIZE_POOL:
|
|
171
|
+
run(METEORA_DAMM_V2_PROGRAM_ID, lambda g: meteora.fill_damm_v2_initialize_pool_accounts(data, g))
|
|
170
172
|
elif et == EventType.METEORA_POOLS_SWAP:
|
|
171
173
|
run(METEORA_POOLS_PROGRAM_ID, lambda g: meteora.fill_pools_swap_accounts(data, g))
|
|
172
174
|
elif et == EventType.METEORA_POOLS_ADD_LIQUIDITY:
|
|
@@ -27,6 +27,21 @@ def fill_damm_v2_remove_liquidity_accounts(_e: Any, _get: AccountGetter) -> None
|
|
|
27
27
|
pass
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
def fill_damm_v2_initialize_pool_accounts(e: Any, get: AccountGetter) -> None:
|
|
31
|
+
if getattr(e, "creator", "") == "":
|
|
32
|
+
e.creator = get(0)
|
|
33
|
+
if getattr(e, "position_nft_mint", "") == "":
|
|
34
|
+
e.position_nft_mint = get(1)
|
|
35
|
+
if getattr(e, "pool", "") == "":
|
|
36
|
+
e.pool = get(6)
|
|
37
|
+
if getattr(e, "position", "") == "":
|
|
38
|
+
e.position = get(7)
|
|
39
|
+
if getattr(e, "token_a_mint", "") == "":
|
|
40
|
+
e.token_a_mint = get(8)
|
|
41
|
+
if getattr(e, "token_b_mint", "") == "":
|
|
42
|
+
e.token_b_mint = get(9)
|
|
43
|
+
|
|
44
|
+
|
|
30
45
|
def fill_pools_swap_accounts(_e: Any, _get: AccountGetter) -> None:
|
|
31
46
|
pass
|
|
32
47
|
|
|
@@ -113,6 +113,9 @@ def fill_trade_accounts(e: PumpFunTradeEvent, get: AccountGetter) -> None:
|
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
def fill_create_accounts(e: PumpFunCreateEvent, get: AccountGetter) -> None:
|
|
116
|
+
if get(15) == "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P":
|
|
117
|
+
fill_create_v2_accounts(e, get) # type: ignore[arg-type]
|
|
118
|
+
return
|
|
116
119
|
if _empty(e.mint):
|
|
117
120
|
e.mint = get(0)
|
|
118
121
|
if _empty(e.bonding_curve):
|
|
@@ -154,6 +157,14 @@ def fill_create_v2_accounts(e: PumpFunCreateV2TokenEvent, get: AccountGetter) ->
|
|
|
154
157
|
e.event_authority = get(14)
|
|
155
158
|
if _empty(e.program):
|
|
156
159
|
e.program = get(15)
|
|
160
|
+
if _empty(e.quote_mint) or e.quote_mint == "So11111111111111111111111111111111111111111":
|
|
161
|
+
e.quote_mint = get(16)
|
|
162
|
+
if _empty(e.quote_vault):
|
|
163
|
+
e.quote_vault = get(17)
|
|
164
|
+
if _empty(e.quote_token_program):
|
|
165
|
+
e.quote_token_program = get(18)
|
|
166
|
+
if getattr(e, "ix_name", "") in ("", "create"):
|
|
167
|
+
e.ix_name = "create_v2"
|
|
157
168
|
|
|
158
169
|
|
|
159
170
|
def fill_migrate_accounts(_e: PumpFunMigrateEvent, _get: AccountGetter) -> None:
|
sol_parser/check_migration.py
CHANGED
|
@@ -6,11 +6,14 @@ import sys
|
|
|
6
6
|
|
|
7
7
|
from .u128_parity import run_all_u128_checks
|
|
8
8
|
from .verify_discriminators import main as _verify_main
|
|
9
|
+
from .event_type_parity import run_event_type_parity_check
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def main() -> None:
|
|
12
13
|
if _verify_main() != 0:
|
|
13
14
|
sys.exit(1)
|
|
15
|
+
if run_event_type_parity_check() != 0:
|
|
16
|
+
sys.exit(1)
|
|
14
17
|
sys.exit(run_all_u128_checks())
|
|
15
18
|
|
|
16
19
|
|