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/event_types.py CHANGED
@@ -153,6 +153,8 @@ class PumpFunTradeEvent(DexEventBase):
153
153
  quote_amount: int = 0
154
154
  virtual_quote_reserves: int = 0
155
155
  real_quote_reserves: int = 0
156
+ holder_rewards_bps: int = 0
157
+ holder_rewards: int = 0
156
158
  is_cashback_coin: bool = False
157
159
  amount: int = 0
158
160
  max_sol_cost: int = 0
@@ -160,6 +162,11 @@ class PumpFunTradeEvent(DexEventBase):
160
162
  spendable_sol_in: int = 0
161
163
  spendable_quote_in: int = 0
162
164
  min_tokens_out: int = 0
165
+ # Transaction balance fields (raw units; None when meta unavailable)
166
+ pre_token_balance: Optional[int] = None
167
+ post_token_balance: Optional[int] = None
168
+ pre_sol_balance: Optional[int] = None
169
+ post_sol_balance: Optional[int] = None
163
170
  global_account: str = ""
164
171
  bonding_curve: str = ""
165
172
  bonding_curve_v2: str = ""
@@ -207,7 +214,11 @@ class PumpFunCreateEvent(DexEventBase):
207
214
  is_mayhem_mode: bool = False
208
215
  is_cashback_enabled: bool = False
209
216
  quote_mint: str = ""
217
+ quote_vault: str = ""
218
+ quote_token_program: str = ""
210
219
  virtual_quote_reserves: int = 0
220
+ creator_fee_bps: int = 0
221
+ is_holder_reward: bool = False
211
222
 
212
223
 
213
224
  @dataclass
@@ -233,7 +244,11 @@ class PumpFunCreateV2TokenEvent(DexEventBase):
233
244
  is_mayhem_mode: bool = False
234
245
  is_cashback_enabled: bool = False
235
246
  quote_mint: str = ""
247
+ quote_vault: str = ""
248
+ quote_token_program: str = ""
236
249
  virtual_quote_reserves: int = 0
250
+ creator_fee_bps: int = 0
251
+ is_holder_reward: bool = False
237
252
  mint_authority: str = ""
238
253
  associated_bonding_curve: str = ""
239
254
  global_account: str = "" # Rust `global` PumpFun global config
@@ -414,6 +429,13 @@ class PumpSwapBuyEvent(DexEventBase):
414
429
  mayhem_mode: bool = False
415
430
  cashback_fee_basis_points: int = 0
416
431
  cashback: int = 0
432
+ buyback_fee_basis_points: int = 0
433
+ buyback_fee: int = 0
434
+ virtual_quote_reserves: int = 0
435
+ can_boost: bool = False
436
+ base_supply: int = 0
437
+ holder_rewards_bps: int = 0
438
+ holder_rewards: int = 0
417
439
  is_cashback_coin: bool = False
418
440
  base_mint: str = ""
419
441
  quote_mint: str = ""
@@ -457,6 +479,13 @@ class PumpSwapSellEvent(DexEventBase):
457
479
  coin_creator_fee: int = 0
458
480
  cashback_fee_basis_points: int = 0
459
481
  cashback: int = 0
482
+ buyback_fee_basis_points: int = 0
483
+ buyback_fee: int = 0
484
+ virtual_quote_reserves: int = 0
485
+ can_boost: bool = False
486
+ base_supply: int = 0
487
+ holder_rewards_bps: int = 0
488
+ holder_rewards: int = 0
460
489
  base_mint: str = ""
461
490
  quote_mint: str = ""
462
491
  pool_base_token_account: str = ""
@@ -495,6 +524,10 @@ class PumpSwapCreatePoolEvent(DexEventBase):
495
524
  user_quote_token_account: str = ""
496
525
  coin_creator: str = ""
497
526
  is_mayhem_mode: bool = False
527
+ is_cashback_coin: bool = False
528
+ creator_fee_bps: int = 0
529
+ can_edit_creator_fee: bool = False
530
+ is_holder_reward: bool = False
498
531
 
499
532
 
500
533
  @dataclass
@@ -698,6 +731,10 @@ class RaydiumClmmIncreaseLiquidityEvent(DexEventBase):
698
731
  position_nft_mint: str = ""
699
732
  user: str = ""
700
733
  liquidity: str = ""
734
+ amount_0: int = 0
735
+ amount_1: int = 0
736
+ amount_0_transfer_fee: int = 0
737
+ amount_1_transfer_fee: int = 0
701
738
  amount0_max: int = 0
702
739
  amount1_max: int = 0
703
740
 
@@ -709,6 +746,13 @@ class RaydiumClmmDecreaseLiquidityEvent(DexEventBase):
709
746
  position_nft_mint: str = ""
710
747
  user: str = ""
711
748
  liquidity: str = ""
749
+ decrease_amount_0: int = 0
750
+ decrease_amount_1: int = 0
751
+ fee_amount_0: int = 0
752
+ fee_amount_1: int = 0
753
+ reward_amounts: List[int] = field(default_factory=list)
754
+ transfer_fee_0: int = 0
755
+ transfer_fee_1: int = 0
712
756
  amount0_min: int = 0
713
757
  amount1_min: int = 0
714
758
 
@@ -753,6 +797,9 @@ class RaydiumClmmCreatePoolEvent(DexEventBase):
753
797
  tick_spacing: int = 0
754
798
  fee_rate: int = 0
755
799
  sqrt_price_x64: str = ""
800
+ tick: int = 0
801
+ token_vault_0: str = ""
802
+ token_vault_1: str = ""
756
803
  open_time: int = 0
757
804
 
758
805
 
@@ -761,10 +808,109 @@ class RaydiumClmmCollectFeeEvent(DexEventBase):
761
808
  """Raydium CLMM 收取费用事件"""
762
809
  pool_state: str = ""
763
810
  position_nft_mint: str = ""
811
+ recipient_token_account_0: str = ""
812
+ recipient_token_account_1: str = ""
764
813
  amount_0: int = 0
765
814
  amount_1: int = 0
766
815
 
767
816
 
817
+ @dataclass
818
+ class RaydiumClmmLiquidityChangeEvent(DexEventBase):
819
+ pool_state: str = ""
820
+ tick: int = 0
821
+ tick_lower: int = 0
822
+ tick_upper: int = 0
823
+ liquidity_before: str = ""
824
+ liquidity_after: str = ""
825
+
826
+
827
+ @dataclass
828
+ class RaydiumClmmConfigChangeEvent(DexEventBase):
829
+ index: int = 0
830
+ owner: str = ""
831
+ protocol_fee_rate: int = 0
832
+ trade_fee_rate: int = 0
833
+ tick_spacing: int = 0
834
+ fund_fee_rate: int = 0
835
+ fund_owner: str = ""
836
+
837
+
838
+ @dataclass
839
+ class RaydiumClmmCreatePersonalPositionEvent(DexEventBase):
840
+ pool_state: str = ""
841
+ minter: str = ""
842
+ nft_owner: str = ""
843
+ tick_lower_index: int = 0
844
+ tick_upper_index: int = 0
845
+ liquidity: str = ""
846
+ deposit_amount_0: int = 0
847
+ deposit_amount_1: int = 0
848
+ deposit_amount_0_transfer_fee: int = 0
849
+ deposit_amount_1_transfer_fee: int = 0
850
+
851
+
852
+ @dataclass
853
+ class RaydiumClmmLiquidityCalculateEvent(DexEventBase):
854
+ pool_liquidity: str = ""
855
+ pool_sqrt_price_x64: str = ""
856
+ pool_tick: int = 0
857
+ calc_amount_0: int = 0
858
+ calc_amount_1: int = 0
859
+ trade_fee_owed_0: int = 0
860
+ trade_fee_owed_1: int = 0
861
+ transfer_fee_0: int = 0
862
+ transfer_fee_1: int = 0
863
+
864
+
865
+ @dataclass
866
+ class RaydiumClmmOpenLimitOrderEvent(DexEventBase):
867
+ pool_id: str = ""
868
+ limit_order: str = ""
869
+ zero_for_one: bool = False
870
+ tick_index: int = 0
871
+ total_amount: int = 0
872
+ transfer_fee: int = 0
873
+
874
+
875
+ @dataclass
876
+ class RaydiumClmmIncreaseLimitOrderEvent(DexEventBase):
877
+ pool_id: str = ""
878
+ limit_order: str = ""
879
+ zero_for_one: bool = False
880
+ tick_index: int = 0
881
+ total_amount: int = 0
882
+ increased_amount: int = 0
883
+ transfer_fee: int = 0
884
+
885
+
886
+ @dataclass
887
+ class RaydiumClmmDecreaseLimitOrderEvent(DexEventBase):
888
+ pool_id: str = ""
889
+ limit_order: str = ""
890
+ zero_for_one: bool = False
891
+ tick_index: int = 0
892
+ total_amount: int = 0
893
+ filled_amount: int = 0
894
+ settled_output_amount: int = 0
895
+ decreased_amount: int = 0
896
+
897
+
898
+ @dataclass
899
+ class RaydiumClmmSettleLimitOrderEvent(DexEventBase):
900
+ pool_id: str = ""
901
+ limit_order: str = ""
902
+ zero_for_one: bool = False
903
+ tick_index: int = 0
904
+ total_amount: int = 0
905
+ filled_amount: int = 0
906
+ settled_amount_out: int = 0
907
+
908
+
909
+ @dataclass
910
+ class RaydiumClmmUpdateRewardInfosEvent(DexEventBase):
911
+ reward_growth_global_x64: List[str] = field(default_factory=list)
912
+
913
+
768
914
  # ============================================================
769
915
  # Raydium CPMM 事件
770
916
  # ============================================================
@@ -880,6 +1026,12 @@ class OrcaWhirlpoolPoolInitializedEvent(DexEventBase):
880
1026
  @dataclass
881
1027
  class MeteoraDlmmSwapEvent(DexEventBase):
882
1028
  """Meteora DLMM 交换事件"""
1029
+ # Instruction / account context (not in Borsh event payload)
1030
+ token_x_mint: str = ""
1031
+ token_y_mint: str = ""
1032
+ user_token_in: str = ""
1033
+ user_token_out: str = ""
1034
+ min_amount_out: int = 0
883
1035
  pool: str = ""
884
1036
  from_addr: str = ""
885
1037
  start_bin_id: int = 0
@@ -1024,10 +1176,14 @@ class MeteoraPoolsPoolCreatedEvent(DexEventBase):
1024
1176
 
1025
1177
  @dataclass
1026
1178
  class MeteoraDammV2SwapEvent(DexEventBase):
1027
- """Meteora DAMM v2 交换事件"""
1179
+ """Meteora DAMM v2 交换事件(含 EvtSwap / EvtSwap2 全字段)"""
1028
1180
  pool: str = ""
1029
1181
  trade_direction: int = 0
1182
+ collect_fee_mode: int = 0
1030
1183
  has_referral: bool = False
1184
+ amount_0: int = 0
1185
+ amount_1: int = 0
1186
+ swap_mode: int = 0
1031
1187
  amount_in: int = 0
1032
1188
  minimum_amount_out: int = 0
1033
1189
  output_amount: int = 0
@@ -1037,7 +1193,16 @@ class MeteoraDammV2SwapEvent(DexEventBase):
1037
1193
  partner_fee: int = 0
1038
1194
  referral_fee: int = 0
1039
1195
  actual_amount_in: int = 0
1196
+ excluded_fee_input_amount: int = 0
1197
+ amount_left: int = 0
1198
+ claiming_fee: int = 0
1199
+ compounding_fee: int = 0
1200
+ included_transfer_fee_amount_in: int = 0
1201
+ included_transfer_fee_amount_out: int = 0
1202
+ excluded_transfer_fee_amount_out: int = 0
1040
1203
  current_timestamp: int = 0
1204
+ reserve_a_amount: int = 0
1205
+ reserve_b_amount: int = 0
1041
1206
  token_a_vault: str = ""
1042
1207
  token_b_vault: str = ""
1043
1208
  token_a_mint: str = ""
@@ -1077,6 +1242,8 @@ class MeteoraDammV2AddLiquidityEvent(DexEventBase):
1077
1242
  token_b_amount: int = 0
1078
1243
  total_amount_a: int = 0
1079
1244
  total_amount_b: int = 0
1245
+ reserve_a_amount: int = 0
1246
+ reserve_b_amount: int = 0
1080
1247
 
1081
1248
 
1082
1249
  @dataclass
@@ -1090,12 +1257,18 @@ class MeteoraDammV2RemoveLiquidityEvent(DexEventBase):
1090
1257
  token_b_amount_threshold: int = 0
1091
1258
  token_a_amount: int = 0
1092
1259
  token_b_amount: int = 0
1260
+ total_amount_a: int = 0
1261
+ total_amount_b: int = 0
1262
+ reserve_a_amount: int = 0
1263
+ reserve_b_amount: int = 0
1093
1264
 
1094
1265
 
1095
1266
  @dataclass
1096
1267
  class MeteoraDammV2InitializePoolEvent(DexEventBase):
1097
1268
  """Meteora DAMM v2 初始化池子事件"""
1098
1269
  pool: str = ""
1270
+ position: str = ""
1271
+ position_nft_mint: str = ""
1099
1272
  token_a_mint: str = ""
1100
1273
  token_b_mint: str = ""
1101
1274
  creator: str = ""
@@ -1118,6 +1291,62 @@ class MeteoraDammV2InitializePoolEvent(DexEventBase):
1118
1291
  pool_type: int = 0
1119
1292
 
1120
1293
 
1294
+ @dataclass
1295
+ class MeteoraDammV2DynamicFeeParameters:
1296
+ """DAMM v2 PoolFeeParameters.dynamic_fee"""
1297
+ bin_step: int = 0
1298
+ bin_step_u128: str = "0"
1299
+ filter_period: int = 0
1300
+ decay_period: int = 0
1301
+ reduction_factor: int = 0
1302
+ max_volatility_accumulator: int = 0
1303
+ variable_fee_control: int = 0
1304
+
1305
+
1306
+ @dataclass
1307
+ class MeteoraDammV2UpdateDelegatePermissionEvent(DexEventBase):
1308
+ """Meteora DAMM v2 EvtUpdateDelegatePermission"""
1309
+ position: str = ""
1310
+ owner: str = ""
1311
+ permission: int = 0
1312
+ delegate: Optional[str] = None
1313
+
1314
+
1315
+ @dataclass
1316
+ class MeteoraDammV2WithdrawDeadLiquidityRewardEvent(DexEventBase):
1317
+ """Meteora DAMM v2 EvtWithdrawDeadLiquidityReward"""
1318
+ pool: str = ""
1319
+ reward_mint: str = ""
1320
+ amount: int = 0
1321
+
1322
+
1323
+ @dataclass
1324
+ class MeteoraDammV2CreateConfigEvent(DexEventBase):
1325
+ """Meteora DAMM v2 EvtCreateConfig(含 0.2.4 permission)"""
1326
+ base_fee_data: bytes = field(default_factory=lambda: bytes(27))
1327
+ compounding_fee_bps: int = 0
1328
+ padding: int = 0
1329
+ dynamic_fee: Optional[MeteoraDammV2DynamicFeeParameters] = None
1330
+ vault_config_key: str = ""
1331
+ pool_creator_authority: str = ""
1332
+ activation_type: int = 0
1333
+ sqrt_min_price: str = "0"
1334
+ sqrt_max_price: str = "0"
1335
+ collect_fee_mode: int = 0
1336
+ index: int = 0
1337
+ config: str = ""
1338
+ permission: str = "0"
1339
+
1340
+
1341
+ @dataclass
1342
+ class MeteoraDammV2CreateDynamicConfigEvent(DexEventBase):
1343
+ """Meteora DAMM v2 EvtCreateDynamicConfig"""
1344
+ config: str = ""
1345
+ pool_creator_authority: str = ""
1346
+ index: int = 0
1347
+ permission: str = "0"
1348
+
1349
+
1121
1350
  @dataclass
1122
1351
  class MeteoraDbcSwapEvent(DexEventBase):
1123
1352
  """Meteora DBC 交易事件"""
@@ -1170,6 +1399,16 @@ class RaydiumLaunchlabTradeEvent(DexEventBase):
1170
1399
  is_buy: bool = False
1171
1400
  trade_direction: str = ""
1172
1401
  exact_in: bool = False
1402
+ global_config: str = ""
1403
+ platform_config: str = ""
1404
+ user_base_token: str = ""
1405
+ user_quote_token: str = ""
1406
+ base_vault: str = ""
1407
+ quote_vault: str = ""
1408
+ base_mint: str = ""
1409
+ quote_mint: str = ""
1410
+ base_token_program: str = ""
1411
+ quote_token_program: str = ""
1173
1412
 
1174
1413
 
1175
1414
  @dataclass
@@ -1178,6 +1417,15 @@ class RaydiumLaunchlabPoolCreateEvent(DexEventBase):
1178
1417
  pool_state: str = ""
1179
1418
  creator: str = ""
1180
1419
  base_mint_param: Optional[Dict[str, Any]] = None
1420
+ payer: str = ""
1421
+ global_config: str = ""
1422
+ platform_config: str = ""
1423
+ base_mint: str = ""
1424
+ quote_mint: str = ""
1425
+ base_vault: str = ""
1426
+ quote_vault: str = ""
1427
+ base_token_program: str = ""
1428
+ quote_token_program: str = ""
1181
1429
 
1182
1430
 
1183
1431
  @dataclass
@@ -1254,6 +1502,10 @@ TypedDexEvent = Union[
1254
1502
  MeteoraDammV2AddLiquidityEvent,
1255
1503
  MeteoraDammV2RemoveLiquidityEvent,
1256
1504
  MeteoraDammV2InitializePoolEvent,
1505
+ MeteoraDammV2UpdateDelegatePermissionEvent,
1506
+ MeteoraDammV2WithdrawDeadLiquidityRewardEvent,
1507
+ MeteoraDammV2CreateConfigEvent,
1508
+ MeteoraDammV2CreateDynamicConfigEvent,
1257
1509
  RaydiumLaunchlabTradeEvent,
1258
1510
  RaydiumLaunchlabPoolCreateEvent,
1259
1511
  RaydiumLaunchlabMigrateAmmEvent,
@@ -1290,11 +1542,20 @@ def _get_int(m: dict, key: str) -> int:
1290
1542
  v = m.get(key, 0)
1291
1543
  if isinstance(v, int):
1292
1544
  return v
1293
- if isinstance(v, str) and v.isdigit():
1294
- return int(v)
1545
+ if isinstance(v, str):
1546
+ try:
1547
+ return int(v, 10)
1548
+ except ValueError:
1549
+ pass
1295
1550
  return 0
1296
1551
 
1297
1552
 
1553
+ def _get_optional_int(m: dict, key: str) -> Optional[int]:
1554
+ if key not in m or m.get(key) is None:
1555
+ return None
1556
+ return _get_int(m, key)
1557
+
1558
+
1298
1559
  def _get_bool(m: dict, key: str) -> bool:
1299
1560
  v = m.get(key, False)
1300
1561
  return bool(v)
@@ -1398,6 +1659,8 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1398
1659
  quote_amount=_get_int(data, "quote_amount"),
1399
1660
  virtual_quote_reserves=_get_int(data, "virtual_quote_reserves"),
1400
1661
  real_quote_reserves=_get_int(data, "real_quote_reserves"),
1662
+ holder_rewards_bps=_get_int(data, "holder_rewards_bps"),
1663
+ holder_rewards=_get_int(data, "holder_rewards"),
1401
1664
  is_cashback_coin=_get_bool(data, "is_cashback_coin"),
1402
1665
  amount=_get_int(data, "amount"),
1403
1666
  max_sol_cost=_get_int(data, "max_sol_cost"),
@@ -1405,6 +1668,10 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1405
1668
  spendable_sol_in=_get_int(data, "spendable_sol_in"),
1406
1669
  spendable_quote_in=_get_int(data, "spendable_quote_in"),
1407
1670
  min_tokens_out=_get_int(data, "min_tokens_out"),
1671
+ pre_token_balance=_get_optional_int(data, "pre_token_balance"),
1672
+ post_token_balance=_get_optional_int(data, "post_token_balance"),
1673
+ pre_sol_balance=_get_optional_int(data, "pre_sol_balance"),
1674
+ post_sol_balance=_get_optional_int(data, "post_sol_balance"),
1408
1675
  global_account=_get_str(data, "global") or _get_str(data, "global_account"),
1409
1676
  bonding_curve=_get_str(data, "bonding_curve"),
1410
1677
  bonding_curve_v2=_get_str(data, "bonding_curve_v2"),
@@ -1451,7 +1718,11 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1451
1718
  is_mayhem_mode=_get_bool(data, "is_mayhem_mode"),
1452
1719
  is_cashback_enabled=_get_bool(data, "is_cashback_enabled"),
1453
1720
  quote_mint=_get_str(data, "quote_mint"),
1721
+ quote_vault=_get_str(data, "quote_vault"),
1722
+ quote_token_program=_get_str(data, "quote_token_program"),
1454
1723
  virtual_quote_reserves=_get_int(data, "virtual_quote_reserves"),
1724
+ creator_fee_bps=_get_int(data, "creator_fee_bps"),
1725
+ is_holder_reward=_get_bool(data, "is_holder_reward"),
1455
1726
  )
1456
1727
 
1457
1728
  if event_type == EventType.PUMP_FUN_CREATE_V2:
@@ -1474,7 +1745,11 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1474
1745
  is_mayhem_mode=_get_bool(data, "is_mayhem_mode"),
1475
1746
  is_cashback_enabled=_get_bool(data, "is_cashback_enabled"),
1476
1747
  quote_mint=_get_str(data, "quote_mint"),
1748
+ quote_vault=_get_str(data, "quote_vault"),
1749
+ quote_token_program=_get_str(data, "quote_token_program"),
1477
1750
  virtual_quote_reserves=_get_int(data, "virtual_quote_reserves"),
1751
+ creator_fee_bps=_get_int(data, "creator_fee_bps"),
1752
+ is_holder_reward=_get_bool(data, "is_holder_reward"),
1478
1753
  mint_authority=_get_str(data, "mint_authority"),
1479
1754
  associated_bonding_curve=_get_str(data, "associated_bonding_curve"),
1480
1755
  global_account=g,
@@ -1540,6 +1815,13 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1540
1815
  mayhem_mode=_get_bool(data, "mayhem_mode"),
1541
1816
  cashback_fee_basis_points=_get_int(data, "cashback_fee_basis_points"),
1542
1817
  cashback=_get_int(data, "cashback"),
1818
+ buyback_fee_basis_points=_get_int(data, "buyback_fee_basis_points"),
1819
+ buyback_fee=_get_int(data, "buyback_fee"),
1820
+ virtual_quote_reserves=_get_int(data, "virtual_quote_reserves"),
1821
+ can_boost=_get_bool(data, "can_boost"),
1822
+ base_supply=_get_int(data, "base_supply"),
1823
+ holder_rewards_bps=_get_int(data, "holder_rewards_bps"),
1824
+ holder_rewards=_get_int(data, "holder_rewards"),
1543
1825
  is_cashback_coin=_get_bool(data, "is_cashback_coin"),
1544
1826
  is_pump_pool=_get_bool(data, "is_pump_pool"),
1545
1827
  base_mint=_get_str(data, "base_mint"),
@@ -1583,6 +1865,13 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1583
1865
  coin_creator_fee=_get_int(data, "coin_creator_fee"),
1584
1866
  cashback_fee_basis_points=_get_int(data, "cashback_fee_basis_points"),
1585
1867
  cashback=_get_int(data, "cashback"),
1868
+ buyback_fee_basis_points=_get_int(data, "buyback_fee_basis_points"),
1869
+ buyback_fee=_get_int(data, "buyback_fee"),
1870
+ virtual_quote_reserves=_get_int(data, "virtual_quote_reserves"),
1871
+ can_boost=_get_bool(data, "can_boost"),
1872
+ base_supply=_get_int(data, "base_supply"),
1873
+ holder_rewards_bps=_get_int(data, "holder_rewards_bps"),
1874
+ holder_rewards=_get_int(data, "holder_rewards"),
1586
1875
  is_pump_pool=_get_bool(data, "is_pump_pool"),
1587
1876
  base_mint=_get_str(data, "base_mint"),
1588
1877
  quote_mint=_get_str(data, "quote_mint"),
@@ -1621,6 +1910,10 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1621
1910
  user_quote_token_account=_get_str(data, "user_quote_token_account"),
1622
1911
  coin_creator=_get_str(data, "coin_creator"),
1623
1912
  is_mayhem_mode=_get_bool(data, "is_mayhem_mode"),
1913
+ is_cashback_coin=_get_bool(data, "is_cashback_coin"),
1914
+ creator_fee_bps=_get_int(data, "creator_fee_bps"),
1915
+ can_edit_creator_fee=_get_bool(data, "can_edit_creator_fee"),
1916
+ is_holder_reward=_get_bool(data, "is_holder_reward"),
1624
1917
  )
1625
1918
 
1626
1919
  if event_type == EventType.PUMP_SWAP_LIQUIDITY_ADDED:
@@ -1678,6 +1971,35 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1678
1971
  return MeteoraDammV2ClosePositionEvent(metadata=meta, pool=_get_str(data, "pool"))
1679
1972
  if event_type == EventType.METEORA_DAMM_V2_INITIALIZE_POOL:
1680
1973
  return MeteoraDammV2InitializePoolEvent(metadata=meta, pool=_get_str(data, "pool"))
1974
+ if event_type == EventType.METEORA_DAMM_V2_UPDATE_DELEGATE_PERMISSION:
1975
+ return MeteoraDammV2UpdateDelegatePermissionEvent(
1976
+ metadata=meta,
1977
+ position=_get_str(data, "position"),
1978
+ owner=_get_str(data, "owner"),
1979
+ permission=_get_int(data, "permission"),
1980
+ delegate=data.get("delegate"),
1981
+ )
1982
+ if event_type == EventType.METEORA_DAMM_V2_WITHDRAW_DEAD_LIQUIDITY_REWARD:
1983
+ return MeteoraDammV2WithdrawDeadLiquidityRewardEvent(
1984
+ metadata=meta,
1985
+ pool=_get_str(data, "pool"),
1986
+ reward_mint=_get_str(data, "reward_mint"),
1987
+ amount=_get_int(data, "amount"),
1988
+ )
1989
+ if event_type == EventType.METEORA_DAMM_V2_CREATE_CONFIG:
1990
+ return MeteoraDammV2CreateConfigEvent(
1991
+ metadata=meta,
1992
+ config=_get_str(data, "config"),
1993
+ permission=str(data.get("permission", "0")),
1994
+ )
1995
+ if event_type == EventType.METEORA_DAMM_V2_CREATE_DYNAMIC_CONFIG:
1996
+ return MeteoraDammV2CreateDynamicConfigEvent(
1997
+ metadata=meta,
1998
+ config=_get_str(data, "config"),
1999
+ pool_creator_authority=_get_str(data, "pool_creator_authority"),
2000
+ index=_get_int(data, "index"),
2001
+ permission=str(data.get("permission", "0")),
2002
+ )
1681
2003
 
1682
2004
  if event_type == EventType.RAYDIUM_CLMM_SWAP:
1683
2005
  return RaydiumClmmSwapEvent(
@@ -1702,6 +2024,10 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1702
2024
  position_nft_mint=_get_str(data, "position_nft_mint"),
1703
2025
  user=_get_str(data, "user"),
1704
2026
  liquidity=_get_str(data, "liquidity"),
2027
+ amount_0=_get_int(data, "amount_0"),
2028
+ amount_1=_get_int(data, "amount_1"),
2029
+ amount_0_transfer_fee=_get_int(data, "amount_0_transfer_fee"),
2030
+ amount_1_transfer_fee=_get_int(data, "amount_1_transfer_fee"),
1705
2031
  amount0_max=_get_int(data, "amount0_max"),
1706
2032
  amount1_max=_get_int(data, "amount1_max"),
1707
2033
  )
@@ -1712,6 +2038,13 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1712
2038
  position_nft_mint=_get_str(data, "position_nft_mint"),
1713
2039
  user=_get_str(data, "user"),
1714
2040
  liquidity=_get_str(data, "liquidity"),
2041
+ decrease_amount_0=_get_int(data, "decrease_amount_0"),
2042
+ decrease_amount_1=_get_int(data, "decrease_amount_1"),
2043
+ fee_amount_0=_get_int(data, "fee_amount_0"),
2044
+ fee_amount_1=_get_int(data, "fee_amount_1"),
2045
+ reward_amounts=list(data.get("reward_amounts", [])) if isinstance(data, dict) else [],
2046
+ transfer_fee_0=_get_int(data, "transfer_fee_0"),
2047
+ transfer_fee_1=_get_int(data, "transfer_fee_1"),
1715
2048
  amount0_min=_get_int(data, "amount0_min"),
1716
2049
  amount1_min=_get_int(data, "amount1_min"),
1717
2050
  )
@@ -1725,6 +2058,9 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1725
2058
  tick_spacing=_get_int(data, "tick_spacing"),
1726
2059
  fee_rate=_get_int(data, "fee_rate"),
1727
2060
  sqrt_price_x64=_get_str(data, "sqrt_price_x64"),
2061
+ tick=_get_int(data, "tick"),
2062
+ token_vault_0=_get_str(data, "token_vault_0"),
2063
+ token_vault_1=_get_str(data, "token_vault_1"),
1728
2064
  open_time=_get_int(data, "open_time"),
1729
2065
  )
1730
2066
  if event_type == EventType.RAYDIUM_CLMM_OPEN_POSITION:
@@ -1759,9 +2095,110 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1759
2095
  metadata=meta,
1760
2096
  pool_state=_get_str(data, "pool_state"),
1761
2097
  position_nft_mint=_get_str(data, "position_nft_mint"),
2098
+ recipient_token_account_0=_get_str(data, "recipient_token_account_0"),
2099
+ recipient_token_account_1=_get_str(data, "recipient_token_account_1"),
1762
2100
  amount_0=_get_int(data, "amount_0"),
1763
2101
  amount_1=_get_int(data, "amount_1"),
1764
2102
  )
2103
+ if event_type == EventType.RAYDIUM_CLMM_LIQUIDITY_CHANGE:
2104
+ return RaydiumClmmLiquidityChangeEvent(
2105
+ metadata=meta,
2106
+ pool_state=_get_str(data, "pool_state"),
2107
+ tick=_get_int(data, "tick"),
2108
+ tick_lower=_get_int(data, "tick_lower"),
2109
+ tick_upper=_get_int(data, "tick_upper"),
2110
+ liquidity_before=_get_str(data, "liquidity_before"),
2111
+ liquidity_after=_get_str(data, "liquidity_after"),
2112
+ )
2113
+ if event_type == EventType.RAYDIUM_CLMM_CONFIG_CHANGE:
2114
+ return RaydiumClmmConfigChangeEvent(
2115
+ metadata=meta,
2116
+ index=_get_int(data, "index"),
2117
+ owner=_get_str(data, "owner"),
2118
+ protocol_fee_rate=_get_int(data, "protocol_fee_rate"),
2119
+ trade_fee_rate=_get_int(data, "trade_fee_rate"),
2120
+ tick_spacing=_get_int(data, "tick_spacing"),
2121
+ fund_fee_rate=_get_int(data, "fund_fee_rate"),
2122
+ fund_owner=_get_str(data, "fund_owner"),
2123
+ )
2124
+ if event_type == EventType.RAYDIUM_CLMM_CREATE_PERSONAL_POSITION:
2125
+ return RaydiumClmmCreatePersonalPositionEvent(
2126
+ metadata=meta,
2127
+ pool_state=_get_str(data, "pool_state"),
2128
+ minter=_get_str(data, "minter"),
2129
+ nft_owner=_get_str(data, "nft_owner"),
2130
+ tick_lower_index=_get_int(data, "tick_lower_index"),
2131
+ tick_upper_index=_get_int(data, "tick_upper_index"),
2132
+ liquidity=_get_str(data, "liquidity"),
2133
+ deposit_amount_0=_get_int(data, "deposit_amount_0"),
2134
+ deposit_amount_1=_get_int(data, "deposit_amount_1"),
2135
+ deposit_amount_0_transfer_fee=_get_int(data, "deposit_amount_0_transfer_fee"),
2136
+ deposit_amount_1_transfer_fee=_get_int(data, "deposit_amount_1_transfer_fee"),
2137
+ )
2138
+ if event_type == EventType.RAYDIUM_CLMM_LIQUIDITY_CALCULATE:
2139
+ return RaydiumClmmLiquidityCalculateEvent(
2140
+ metadata=meta,
2141
+ pool_liquidity=_get_str(data, "pool_liquidity"),
2142
+ pool_sqrt_price_x64=_get_str(data, "pool_sqrt_price_x64"),
2143
+ pool_tick=_get_int(data, "pool_tick"),
2144
+ calc_amount_0=_get_int(data, "calc_amount_0"),
2145
+ calc_amount_1=_get_int(data, "calc_amount_1"),
2146
+ trade_fee_owed_0=_get_int(data, "trade_fee_owed_0"),
2147
+ trade_fee_owed_1=_get_int(data, "trade_fee_owed_1"),
2148
+ transfer_fee_0=_get_int(data, "transfer_fee_0"),
2149
+ transfer_fee_1=_get_int(data, "transfer_fee_1"),
2150
+ )
2151
+ if event_type == EventType.RAYDIUM_CLMM_OPEN_LIMIT_ORDER:
2152
+ return RaydiumClmmOpenLimitOrderEvent(
2153
+ metadata=meta,
2154
+ pool_id=_get_str(data, "pool_id"),
2155
+ limit_order=_get_str(data, "limit_order"),
2156
+ zero_for_one=_get_bool(data, "zero_for_one"),
2157
+ tick_index=_get_int(data, "tick_index"),
2158
+ total_amount=_get_int(data, "total_amount"),
2159
+ transfer_fee=_get_int(data, "transfer_fee"),
2160
+ )
2161
+ if event_type == EventType.RAYDIUM_CLMM_INCREASE_LIMIT_ORDER:
2162
+ return RaydiumClmmIncreaseLimitOrderEvent(
2163
+ metadata=meta,
2164
+ pool_id=_get_str(data, "pool_id"),
2165
+ limit_order=_get_str(data, "limit_order"),
2166
+ zero_for_one=_get_bool(data, "zero_for_one"),
2167
+ tick_index=_get_int(data, "tick_index"),
2168
+ total_amount=_get_int(data, "total_amount"),
2169
+ increased_amount=_get_int(data, "increased_amount"),
2170
+ transfer_fee=_get_int(data, "transfer_fee"),
2171
+ )
2172
+ if event_type == EventType.RAYDIUM_CLMM_DECREASE_LIMIT_ORDER:
2173
+ return RaydiumClmmDecreaseLimitOrderEvent(
2174
+ metadata=meta,
2175
+ pool_id=_get_str(data, "pool_id"),
2176
+ limit_order=_get_str(data, "limit_order"),
2177
+ zero_for_one=_get_bool(data, "zero_for_one"),
2178
+ tick_index=_get_int(data, "tick_index"),
2179
+ total_amount=_get_int(data, "total_amount"),
2180
+ filled_amount=_get_int(data, "filled_amount"),
2181
+ settled_output_amount=_get_int(data, "settled_output_amount"),
2182
+ decreased_amount=_get_int(data, "decreased_amount"),
2183
+ )
2184
+ if event_type == EventType.RAYDIUM_CLMM_SETTLE_LIMIT_ORDER:
2185
+ return RaydiumClmmSettleLimitOrderEvent(
2186
+ metadata=meta,
2187
+ pool_id=_get_str(data, "pool_id"),
2188
+ limit_order=_get_str(data, "limit_order"),
2189
+ zero_for_one=_get_bool(data, "zero_for_one"),
2190
+ tick_index=_get_int(data, "tick_index"),
2191
+ total_amount=_get_int(data, "total_amount"),
2192
+ filled_amount=_get_int(data, "filled_amount"),
2193
+ settled_amount_out=_get_int(data, "settled_amount_out"),
2194
+ )
2195
+ if event_type == EventType.RAYDIUM_CLMM_UPDATE_REWARD_INFOS:
2196
+ raw = data.get("reward_growth_global_x64", [])
2197
+ rewards = [str(v) for v in raw] if isinstance(raw, list) else []
2198
+ return RaydiumClmmUpdateRewardInfosEvent(
2199
+ metadata=meta,
2200
+ reward_growth_global_x64=rewards,
2201
+ )
1765
2202
 
1766
2203
  if event_type == EventType.RAYDIUM_CPMM_SWAP:
1767
2204
  return RaydiumCpmmSwapEvent(
@@ -1860,6 +2297,20 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1860
2297
  token_a_transfer_fee=_get_int(data, "token_a_transfer_fee"),
1861
2298
  token_b_transfer_fee=_get_int(data, "token_b_transfer_fee"),
1862
2299
  )
2300
+ if event_type == EventType.ORCA_WHIRLPOOL_POOL_INITIALIZED:
2301
+ return OrcaWhirlpoolPoolInitializedEvent(
2302
+ metadata=meta,
2303
+ whirlpool=_get_str(data, "whirlpool"),
2304
+ whirlpools_config=_get_str(data, "whirlpools_config"),
2305
+ token_mint_a=_get_str(data, "token_mint_a"),
2306
+ token_mint_b=_get_str(data, "token_mint_b"),
2307
+ tick_spacing=_get_int(data, "tick_spacing"),
2308
+ token_program_a=_get_str(data, "token_program_a"),
2309
+ token_program_b=_get_str(data, "token_program_b"),
2310
+ decimals_a=_get_int(data, "decimals_a"),
2311
+ decimals_b=_get_int(data, "decimals_b"),
2312
+ initial_sqrt_price=_get_str(data, "initial_sqrt_price"),
2313
+ )
1863
2314
 
1864
2315
  # RaydiumLaunchlab events
1865
2316
  if event_type == EventType.RAYDIUM_LAUNCHLAB_TRADE:
@@ -1872,6 +2323,16 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1872
2323
  is_buy=_get_bool(data, "is_buy"),
1873
2324
  trade_direction=_get_str(data, "trade_direction"),
1874
2325
  exact_in=_get_bool(data, "exact_in"),
2326
+ global_config=_get_str(data, "global_config"),
2327
+ platform_config=_get_str(data, "platform_config"),
2328
+ user_base_token=_get_str(data, "user_base_token"),
2329
+ user_quote_token=_get_str(data, "user_quote_token"),
2330
+ base_vault=_get_str(data, "base_vault"),
2331
+ quote_vault=_get_str(data, "quote_vault"),
2332
+ base_mint=_get_str(data, "base_mint"),
2333
+ quote_mint=_get_str(data, "quote_mint"),
2334
+ base_token_program=_get_str(data, "base_token_program"),
2335
+ quote_token_program=_get_str(data, "quote_token_program"),
1875
2336
  )
1876
2337
 
1877
2338
  if event_type == EventType.RAYDIUM_LAUNCHLAB_POOL_CREATE:
@@ -1880,6 +2341,15 @@ def to_typed_event(event: dict) -> Optional[TypedDexEvent]:
1880
2341
  pool_state=_get_str(data, "pool_state"),
1881
2342
  creator=_get_str(data, "creator"),
1882
2343
  base_mint_param=_get_dict_any(data, "base_mint_param"),
2344
+ payer=_get_str(data, "payer"),
2345
+ global_config=_get_str(data, "global_config"),
2346
+ platform_config=_get_str(data, "platform_config"),
2347
+ base_mint=_get_str(data, "base_mint"),
2348
+ quote_mint=_get_str(data, "quote_mint"),
2349
+ base_vault=_get_str(data, "base_vault"),
2350
+ quote_vault=_get_str(data, "quote_vault"),
2351
+ base_token_program=_get_str(data, "base_token_program"),
2352
+ quote_token_program=_get_str(data, "quote_token_program"),
1883
2353
  )
1884
2354
 
1885
2355
  if event_type == EventType.RAYDIUM_LAUNCHLAB_MIGRATE_AMM: