sol-parser-sdk-python 0.5.6__py3-none-any.whl → 0.5.8__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 +28 -0
- sol_parser/account_dispatcher.py +81 -0
- sol_parser/account_fillers/meteora.py +25 -2
- sol_parser/account_fillers/pumpfun.py +11 -0
- sol_parser/account_fillers/raydium.py +3 -2
- sol_parser/account_fillers/raydium_launchlab.py +50 -0
- sol_parser/accounts/__init__.py +47 -2
- sol_parser/check_migration.py +3 -0
- sol_parser/dex_parsers.py +1521 -124
- sol_parser/event_type_parity.py +133 -0
- sol_parser/event_types.py +473 -3
- sol_parser/grpc_client.py +3 -4
- sol_parser/grpc_instruction_parser.py +98 -28
- sol_parser/grpc_types.py +61 -21
- sol_parser/inner_instruction_parser.py +142 -18
- sol_parser/instructions.py +501 -101
- sol_parser/log_instr_dedup.py +90 -16
- sol_parser/merger.py +188 -126
- sol_parser/parser.py +37 -6
- sol_parser/pumpfun_fee_enrich.py +14 -1
- sol_parser/rpc_parser.py +82 -11
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.8.dist-info}/METADATA +26 -9
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.8.dist-info}/RECORD +25 -24
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.8.dist-info}/WHEEL +1 -1
- {sol_parser_sdk_python-0.5.6.dist-info → sol_parser_sdk_python-0.5.8.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""EventType inventory parity with Rust ``sol_parser_sdk::grpc::EventType``."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .grpc_types import all_event_types
|
|
6
|
+
|
|
7
|
+
RUST_EVENT_TYPES = [
|
|
8
|
+
"BlockMeta",
|
|
9
|
+
"RaydiumLaunchlabTrade",
|
|
10
|
+
"RaydiumLaunchlabPoolCreate",
|
|
11
|
+
"RaydiumLaunchlabMigrateAmm",
|
|
12
|
+
"PumpFunTrade",
|
|
13
|
+
"PumpFunBuy",
|
|
14
|
+
"PumpFunSell",
|
|
15
|
+
"PumpFunBuyExactSolIn",
|
|
16
|
+
"PumpFunCreate",
|
|
17
|
+
"PumpFunCreateV2",
|
|
18
|
+
"PumpFunComplete",
|
|
19
|
+
"PumpFunMigrate",
|
|
20
|
+
"PumpFeesCreateFeeSharingConfig",
|
|
21
|
+
"PumpFeesInitializeFeeConfig",
|
|
22
|
+
"PumpFeesResetFeeSharingConfig",
|
|
23
|
+
"PumpFeesRevokeFeeSharingAuthority",
|
|
24
|
+
"PumpFeesTransferFeeSharingAuthority",
|
|
25
|
+
"PumpFeesUpdateAdmin",
|
|
26
|
+
"PumpFeesUpdateFeeConfig",
|
|
27
|
+
"PumpFeesUpdateFeeShares",
|
|
28
|
+
"PumpFeesUpsertFeeTiers",
|
|
29
|
+
"PumpFunMigrateBondingCurveCreator",
|
|
30
|
+
"PumpSwapTrade",
|
|
31
|
+
"PumpSwapBuy",
|
|
32
|
+
"PumpSwapSell",
|
|
33
|
+
"PumpSwapCreatePool",
|
|
34
|
+
"PumpSwapLiquidityAdded",
|
|
35
|
+
"PumpSwapLiquidityRemoved",
|
|
36
|
+
"RaydiumCpmmSwap",
|
|
37
|
+
"RaydiumCpmmDeposit",
|
|
38
|
+
"RaydiumCpmmWithdraw",
|
|
39
|
+
"RaydiumCpmmInitialize",
|
|
40
|
+
"RaydiumClmmSwap",
|
|
41
|
+
"RaydiumClmmCreatePool",
|
|
42
|
+
"RaydiumClmmOpenPosition",
|
|
43
|
+
"RaydiumClmmClosePosition",
|
|
44
|
+
"RaydiumClmmIncreaseLiquidity",
|
|
45
|
+
"RaydiumClmmDecreaseLiquidity",
|
|
46
|
+
"RaydiumClmmLiquidityChange",
|
|
47
|
+
"RaydiumClmmConfigChange",
|
|
48
|
+
"RaydiumClmmCreatePersonalPosition",
|
|
49
|
+
"RaydiumClmmLiquidityCalculate",
|
|
50
|
+
"RaydiumClmmOpenLimitOrder",
|
|
51
|
+
"RaydiumClmmIncreaseLimitOrder",
|
|
52
|
+
"RaydiumClmmDecreaseLimitOrder",
|
|
53
|
+
"RaydiumClmmSettleLimitOrder",
|
|
54
|
+
"RaydiumClmmUpdateRewardInfos",
|
|
55
|
+
"RaydiumClmmOpenPositionWithTokenExtNft",
|
|
56
|
+
"RaydiumClmmCollectFee",
|
|
57
|
+
"RaydiumAmmV4Swap",
|
|
58
|
+
"RaydiumAmmV4Deposit",
|
|
59
|
+
"RaydiumAmmV4Withdraw",
|
|
60
|
+
"RaydiumAmmV4Initialize2",
|
|
61
|
+
"RaydiumAmmV4WithdrawPnl",
|
|
62
|
+
"OrcaWhirlpoolSwap",
|
|
63
|
+
"OrcaWhirlpoolLiquidityIncreased",
|
|
64
|
+
"OrcaWhirlpoolLiquidityDecreased",
|
|
65
|
+
"OrcaWhirlpoolPoolInitialized",
|
|
66
|
+
"MeteoraPoolsSwap",
|
|
67
|
+
"MeteoraPoolsAddLiquidity",
|
|
68
|
+
"MeteoraPoolsRemoveLiquidity",
|
|
69
|
+
"MeteoraPoolsBootstrapLiquidity",
|
|
70
|
+
"MeteoraPoolsPoolCreated",
|
|
71
|
+
"MeteoraPoolsSetPoolFees",
|
|
72
|
+
"MeteoraDammV2Swap",
|
|
73
|
+
"MeteoraDammV2AddLiquidity",
|
|
74
|
+
"MeteoraDammV2RemoveLiquidity",
|
|
75
|
+
"MeteoraDammV2InitializePool",
|
|
76
|
+
"MeteoraDammV2CreatePosition",
|
|
77
|
+
"MeteoraDammV2ClosePosition",
|
|
78
|
+
"MeteoraDammV2UpdateDelegatePermission",
|
|
79
|
+
"MeteoraDammV2WithdrawDeadLiquidityReward",
|
|
80
|
+
"MeteoraDammV2CreateConfig",
|
|
81
|
+
"MeteoraDammV2CreateDynamicConfig",
|
|
82
|
+
"MeteoraDbcSwap",
|
|
83
|
+
"MeteoraDbcInitializePool",
|
|
84
|
+
"MeteoraDbcCurveComplete",
|
|
85
|
+
"MeteoraDlmmSwap",
|
|
86
|
+
"MeteoraDlmmAddLiquidity",
|
|
87
|
+
"MeteoraDlmmRemoveLiquidity",
|
|
88
|
+
"MeteoraDlmmInitializePool",
|
|
89
|
+
"MeteoraDlmmInitializeBinArray",
|
|
90
|
+
"MeteoraDlmmCreatePosition",
|
|
91
|
+
"MeteoraDlmmClosePosition",
|
|
92
|
+
"MeteoraDlmmClaimFee",
|
|
93
|
+
"TokenAccount",
|
|
94
|
+
"TokenInfo",
|
|
95
|
+
"NonceAccount",
|
|
96
|
+
"AccountPumpFunGlobal",
|
|
97
|
+
"AccountPumpFunBondingCurve",
|
|
98
|
+
"AccountPumpFunFeeConfig",
|
|
99
|
+
"AccountPumpFunSharingConfig",
|
|
100
|
+
"AccountPumpFunGlobalVolumeAccumulator",
|
|
101
|
+
"AccountPumpFunUserVolumeAccumulator",
|
|
102
|
+
"AccountPumpSwapGlobalConfig",
|
|
103
|
+
"AccountPumpSwapPool",
|
|
104
|
+
"AccountRaydiumClmmAmmConfig",
|
|
105
|
+
"AccountRaydiumClmmPoolState",
|
|
106
|
+
"AccountRaydiumClmmTickArrayState",
|
|
107
|
+
"AccountRaydiumCpmmAmmConfig",
|
|
108
|
+
"AccountRaydiumCpmmPoolState",
|
|
109
|
+
"AccountOrcaWhirlpool",
|
|
110
|
+
"AccountOrcaPosition",
|
|
111
|
+
"AccountOrcaTickArray",
|
|
112
|
+
"AccountOrcaFeeTier",
|
|
113
|
+
"AccountOrcaWhirlpoolsConfig",
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def run_event_type_parity_check() -> int:
|
|
118
|
+
actual = [event_type.value for event_type in all_event_types()]
|
|
119
|
+
if actual == RUST_EVENT_TYPES:
|
|
120
|
+
print(f"[event-type-parity] OK:EventType 与 Rust 清单一致(共 {len(actual)} 个)")
|
|
121
|
+
return 0
|
|
122
|
+
only_expected = [x for x in RUST_EVENT_TYPES if x not in actual]
|
|
123
|
+
only_actual = [x for x in actual if x not in RUST_EVENT_TYPES]
|
|
124
|
+
print("[event-type-parity] EventType 与 Rust 清单不一致")
|
|
125
|
+
if only_expected:
|
|
126
|
+
print(" Python 缺:", ", ".join(only_expected))
|
|
127
|
+
if only_actual:
|
|
128
|
+
print(" Python 多:", ", ".join(only_actual))
|
|
129
|
+
return 1
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if __name__ == "__main__":
|
|
133
|
+
raise SystemExit(run_event_type_parity_check())
|