@@ -52,6 +52,7 @@ struct Position:
52
52
emissions_earned: uint256 # staked liq emissions earned on both v2 and v3
53
53
tick_lower: int24 # Position lower tick on v3, 0 on v2
54
54
tick_upper: int24 # Position upper tick on v3, 0 on v2
55
+ alm: bool # True if Position is deposited into ALM on v3, False on v2
55
56
56
57
struct Token :
57
58
token_address: address
@@ -100,6 +101,10 @@ struct Lp:
100
101
token0_fees: uint256
101
102
token1_fees: uint256
102
103
104
+ alm_vault: address # ALM vault address on v3, empty address on v2
105
+ alm_reserve0: uint256 # ALM token0 reserves on v3, 0 on v2
106
+ alm_reserve1: uint256 # ALM token1 reserves on v3, 0 on v2
107
+
103
108
positions: DynArray[Position, MAX_POSITIONS]
104
109
105
110
struct LpEpochReward :
@@ -206,11 +211,12 @@ voter: public(IVoter)
206
211
convertor: public (address )
207
212
router: public (address )
208
213
v1_factory: public (address )
214
+ alm_registry: public (address ) # todo: add ALM interface when ALM contracts are ready
209
215
210
216
# Methods
211
217
212
218
@external
213
- def __init__ (_voter: address , _registry: address , _convertor: address , _router: address ):
219
+ def __init__ (_voter: address , _registry: address , _convertor: address , _router: address , _alm_registry: address ):
214
220
"""
215
221
@dev Sets up our external contract addresses
216
222
"""
@@ -219,6 +225,7 @@ def __init__(_voter: address, _registry: address, _convertor: address, _router:
219
225
self .convertor = _convertor
220
226
self .router = _router
221
227
self .v1_factory = self .voter.v1Factory ()
228
+ self .alm_registry = _alm_registry
222
229
223
230
@internal
224
231
@view
@@ -486,7 +493,8 @@ def _byData(_data: address[3], _token0: address, _token1: address, _account: add
486
493
unstaked_earned1: pool.claimable1 (_account),
487
494
emissions_earned: earned,
488
495
tick_lower: 0 ,
489
- tick_upper: 0
496
+ tick_upper: 0 ,
497
+ alm: False
490
498
})
491
499
)
492
500
@@ -523,6 +531,10 @@ def _byData(_data: address[3], _token0: address, _token1: address, _account: add
523
531
token0_fees: token0.balanceOf (pool_fees),
524
532
token1_fees: token1.balanceOf (pool_fees),
525
533
534
+ alm_vault: empty (address ),
535
+ alm_reserve0: 0 ,
536
+ alm_reserve1: 0 ,
537
+
526
538
positions: positions
527
539
})
528
540
@@ -583,7 +595,8 @@ def _byDataCL(_data: address[3], _token0: address, _token1: address, _account: a
583
595
unstaked_earned1: convert (position_data.unstaked_earned1, uint256 ),
584
596
emissions_earned: emissions_earned,
585
597
tick_lower: position_data.tick_lower,
586
- tick_upper: position_data.tick_upper
598
+ tick_upper: position_data.tick_upper,
599
+ alm: False # todo: populate real ALM data when ALM contracts are ready
587
600
})
588
601
)
589
602
@@ -620,6 +633,11 @@ def _byDataCL(_data: address[3], _token0: address, _token1: address, _account: a
620
633
token0_fees: convert (gauge_fees.token0, uint256 ),
621
634
token1_fees: convert (gauge_fees.token1, uint256 ),
622
635
636
+ # todo: populate real ALM data when ALM contracts are ready
637
+ alm_vault: empty (address ),
638
+ alm_reserve0: 0 ,
639
+ alm_reserve1: 0 ,
640
+
623
641
positions: positions
624
642
})
625
643
0 commit comments