Skip to content

Commit b707fc1

Browse files
authored
Merge pull request #5 from gitopia/genesis-params
Genesis params
2 parents 8c79092 + 14f3609 commit b707fc1

11 files changed

Lines changed: 305 additions & 41258 deletions

File tree

app/keepers/keepers.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ type AppKeepers struct {
7373
StakingKeeper stakingkeeper.Keeper
7474
SlashingKeeper slashingkeeper.Keeper
7575
MintKeeper mintkeeper.Keeper
76-
DistrKeeper distrkeeper.Keeper
76+
DistrKeeper *distrkeeper.Keeper
7777
GovKeeper govkeeper.Keeper
7878
CrisisKeeper crisiskeeper.Keeper
7979
UpgradeKeeper upgradekeeper.Keeper
@@ -197,7 +197,7 @@ func NewAppKeeper(
197197
appKeepers.BankKeeper,
198198
gitopiatypes.MinterAccountName,
199199
)
200-
appKeepers.DistrKeeper = distrkeeper.NewKeeper(
200+
distrKeeper := distrkeeper.NewKeeper(
201201
appCodec,
202202
appKeepers.keys[distrtypes.StoreKey],
203203
appKeepers.GetSubspace(distrtypes.ModuleName),
@@ -206,6 +206,7 @@ func NewAppKeeper(
206206
&stakingKeeper,
207207
authtypes.FeeCollectorName,
208208
)
209+
appKeepers.DistrKeeper = &distrKeeper
209210
appKeepers.SlashingKeeper = slashingkeeper.NewKeeper(
210211
appCodec,
211212
appKeepers.keys[slashingtypes.StoreKey],
@@ -243,7 +244,7 @@ func NewAppKeeper(
243244
govRouter := govv1beta1.NewRouter()
244245
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
245246
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)).
246-
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(appKeepers.DistrKeeper)).
247+
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(*appKeepers.DistrKeeper)).
247248
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)).
248249
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper))
249250
govConfig := govtypes.DefaultConfig()
@@ -299,13 +300,14 @@ func NewAppKeeper(
299300
appKeepers.AuthzKeeper,
300301
appKeepers.BankKeeper,
301302
appKeepers.MintKeeper,
303+
appKeepers.DistrKeeper,
302304
)
303305
appKeepers.RewardKeeper = *rewardskeeper.NewKeeper(
304-
appCodec,
305-
appKeepers.keys[rewardtypes.StoreKey],
306-
appKeepers.keys[rewardtypes.MemStoreKey],
307-
&appKeepers.GitopiaKeeper,
308-
appKeepers.StakingKeeper,
306+
appCodec,
307+
appKeepers.keys[rewardtypes.StoreKey],
308+
appKeepers.keys[rewardtypes.MemStoreKey],
309+
&appKeepers.GitopiaKeeper,
310+
appKeepers.StakingKeeper,
309311
appKeepers.GovKeeper,
310312
appKeepers.BankKeeper,
311313
appKeepers.AccountKeeper,

app/modules.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var maccPerms = map[string][]string{
6464
gitopiatypes.TeamAccountName: nil,
6565
gitopiatypes.LiquidityBootstrappingPoolAccountName: {authtypes.Minter},
6666
gitopiatypes.EcosystemIncentivesAccountName: {authtypes.Minter},
67+
gitopiatypes.CommunityPoolGenesisAccountName: {authtypes.Minter},
6768
rewardtypes.RewardsSeriesOneAccount: {authtypes.Minter},
6869
rewardtypes.RewardsSeriesTwoAccount: {authtypes.Minter},
6970
rewardtypes.RewardsSeriesThreeAccount: {authtypes.Minter},
@@ -131,7 +132,7 @@ func appModules(
131132
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
132133
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, app.GitopiaKeeper.InflationFn),
133134
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
134-
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
135+
distr.NewAppModule(appCodec, *app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
135136
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
136137
upgrade.NewAppModule(app.UpgradeKeeper),
137138
evidence.NewAppModule(app.EvidenceKeeper),

0 commit comments

Comments
 (0)