@@ -146,6 +146,9 @@ import (
146
146
erc20client "github.com/haqq-network/haqq/x/erc20/client"
147
147
erc20keeper "github.com/haqq-network/haqq/x/erc20/keeper"
148
148
erc20types "github.com/haqq-network/haqq/x/erc20/types"
149
+ "github.com/haqq-network/haqq/x/liquidvesting"
150
+ liquidvestingkeeper "github.com/haqq-network/haqq/x/liquidvesting/keeper"
151
+ liquidvestingtypes "github.com/haqq-network/haqq/x/liquidvesting/types"
149
152
"github.com/haqq-network/haqq/x/vesting"
150
153
vestingkeeper "github.com/haqq-network/haqq/x/vesting/keeper"
151
154
vestingtypes "github.com/haqq-network/haqq/x/vesting/types"
@@ -157,6 +160,7 @@ import (
157
160
v164 "github.com/haqq-network/haqq/app/upgrades/v1.6.4"
158
161
v170 "github.com/haqq-network/haqq/app/upgrades/v1.7.0"
159
162
v171 "github.com/haqq-network/haqq/app/upgrades/v1.7.1"
163
+ v172 "github.com/haqq-network/haqq/app/upgrades/v1.7.2"
160
164
161
165
// NOTE: override ICS20 keeper to support IBC transfers of ERC20 tokens
162
166
"github.com/haqq-network/haqq/x/ibc/transfer"
@@ -232,6 +236,7 @@ var (
232
236
erc20.AppModuleBasic {},
233
237
epochs.AppModuleBasic {},
234
238
consensus.AppModuleBasic {},
239
+ liquidvesting.AppModuleBasic {},
235
240
)
236
241
237
242
// module account permissions
@@ -247,6 +252,7 @@ var (
247
252
erc20types .ModuleName : {authtypes .Minter , authtypes .Burner },
248
253
coinomicstypes .ModuleName : {authtypes .Minter },
249
254
vestingtypes .ModuleName : nil , // Add vesting module account
255
+ liquidvestingtypes .ModuleName : {authtypes .Minter , authtypes .Burner },
250
256
}
251
257
252
258
// module accounts that are allowed to receive tokens
@@ -307,9 +313,10 @@ type Haqq struct {
307
313
FeeMarketKeeper feemarketkeeper.Keeper
308
314
309
315
// Evmos keepers
310
- Erc20Keeper erc20keeper.Keeper
311
- EpochsKeeper epochskeeper.Keeper
312
- VestingKeeper vestingkeeper.Keeper
316
+ Erc20Keeper erc20keeper.Keeper
317
+ EpochsKeeper epochskeeper.Keeper
318
+ VestingKeeper vestingkeeper.Keeper
319
+ LiquidVestingKeeper liquidvestingkeeper.Keeper
313
320
314
321
// Haqq keepers
315
322
CoinomicsKeeper coinomicskeeper.Keeper
@@ -384,6 +391,7 @@ func NewHaqq(
384
391
epochstypes .StoreKey , vestingtypes .StoreKey ,
385
392
// haqq keys
386
393
coinomicstypes .StoreKey ,
394
+ liquidvestingtypes .StoreKey ,
387
395
)
388
396
389
397
// Add the EVM transient store key
@@ -528,6 +536,11 @@ func NewHaqq(
528
536
app .AccountKeeper , app .BankKeeper , app .EvmKeeper , app .StakingKeeper ,
529
537
)
530
538
539
+ app .LiquidVestingKeeper = liquidvestingkeeper .NewKeeper (
540
+ keys [vestingtypes .StoreKey ], appCodec , app .GetSubspace (liquidvestingtypes .ModuleName ),
541
+ app .AccountKeeper , app .BankKeeper , app .Erc20Keeper , app .VestingKeeper ,
542
+ )
543
+
531
544
epochsKeeper := epochskeeper .NewKeeper (appCodec , keys [epochstypes .StoreKey ])
532
545
app .EpochsKeeper = * epochsKeeper .SetHooks (
533
546
epochskeeper .NewMultiEpochHooks (
@@ -649,6 +662,7 @@ func NewHaqq(
649
662
erc20 .NewAppModule (app .Erc20Keeper , app .AccountKeeper , app .GetSubspace (erc20types .ModuleName )),
650
663
epochs .NewAppModule (appCodec , app .EpochsKeeper ),
651
664
vesting .NewAppModule (app .VestingKeeper , app .AccountKeeper , app .BankKeeper , app .StakingKeeper ),
665
+ liquidvesting .NewAppModule (appCodec , app .LiquidVestingKeeper , app .AccountKeeper , app .BankKeeper , app .Erc20Keeper ),
652
666
653
667
// Haqq app modules
654
668
coinomics .NewAppModule (app .CoinomicsKeeper , app .AccountKeeper , app .StakingKeeper ),
@@ -687,6 +701,7 @@ func NewHaqq(
687
701
erc20types .ModuleName ,
688
702
coinomicstypes .ModuleName ,
689
703
consensusparamtypes .ModuleName ,
704
+ liquidvestingtypes .ModuleName ,
690
705
)
691
706
692
707
// NOTE: fee market module must go last in order to retrieve the block gas used.
@@ -721,6 +736,7 @@ func NewHaqq(
721
736
// Haqq modules
722
737
coinomicstypes .ModuleName ,
723
738
consensusparamtypes .ModuleName ,
739
+ liquidvestingtypes .ModuleName ,
724
740
)
725
741
726
742
// NOTE: The genutils module must occur after staking so that pools are
@@ -755,6 +771,7 @@ func NewHaqq(
755
771
upgradetypes .ModuleName ,
756
772
// Evmos modules
757
773
vestingtypes .ModuleName ,
774
+ liquidvestingtypes .ModuleName ,
758
775
coinomicstypes .ModuleName ,
759
776
erc20types .ModuleName ,
760
777
epochstypes .ModuleName ,
@@ -1118,6 +1135,7 @@ func initParamsKeeper(
1118
1135
paramsKeeper .Subspace (erc20types .ModuleName )
1119
1136
// haqq subspaces
1120
1137
paramsKeeper .Subspace (coinomicstypes .ModuleName )
1138
+ paramsKeeper .Subspace (liquidvestingtypes .ModuleName )
1121
1139
1122
1140
return paramsKeeper
1123
1141
}
@@ -1196,6 +1214,12 @@ func (app *Haqq) setupUpgradeHandlers() {
1196
1214
v171 .CreateUpgradeHandler (app .mm , app .configurator ),
1197
1215
)
1198
1216
1217
+ // v1.7.2 Add Liquid Vesting Module
1218
+ app .UpgradeKeeper .SetUpgradeHandler (
1219
+ v172 .UpgradeName ,
1220
+ v172 .CreateUpgradeHandler (app .mm , app .configurator ),
1221
+ )
1222
+
1199
1223
// When a planned update height is reached, the old binary will panic
1200
1224
// writing on disk the height and name of the update that triggered it
1201
1225
// This will read that value, and execute the preparations for the upgrade.
@@ -1224,6 +1248,12 @@ func (app *Haqq) setupUpgradeHandlers() {
1224
1248
crisistypes .ModuleName ,
1225
1249
},
1226
1250
}
1251
+ case v172 .UpgradeName :
1252
+ storeUpgrades = & storetypes.StoreUpgrades {
1253
+ Added : []string {
1254
+ liquidvestingtypes .ModuleName ,
1255
+ },
1256
+ }
1227
1257
}
1228
1258
1229
1259
if storeUpgrades != nil {
0 commit comments