Skip to content

Commit

Permalink
multisig + distribution fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed May 30, 2023
1 parent 3561196 commit f798997
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibctesting "github.com/cosmos/interchain-security/legacy_ibc_testing/testing"
providertypes "github.com/cosmos/interchain-security/x/ccv/provider/types"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand Down Expand Up @@ -269,10 +270,8 @@ func (app *GaiaApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[s
// remove module accounts that are ALLOWED to received funds
delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String())

// Remove the fee-pool from the group of blocked recipient addresses in bank
// this is required for the provider chain to be able to receive tokens from
// the consumer chain
delete(modAccAddrs, authtypes.NewModuleAddress(authtypes.FeeCollectorName).String())
// Remove the ConsumerRewardsPool from the group of blocked recipient addresses in bank
delete(modAccAddrs, authtypes.NewModuleAddress(providertypes.ConsumerRewardsPool).String())

return modAccAddrs
}
Expand Down
4 changes: 4 additions & 0 deletions app/app_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ func (app *GaiaApp) GetE2eSlashingKeeper() e2e.E2eSlashingKeeper { //nolint:noli
func (app *GaiaApp) GetE2eDistributionKeeper() e2e.E2eDistributionKeeper { //nolint:nolintlint
return app.DistrKeeper
}

func (app *GaiaApp) GetE2eAccountKeeper() e2e.E2eAccountKeeper { //nolint:nolintlint
return app.AccountKeeper
}
2 changes: 2 additions & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ func NewAppKeeper(
appKeepers.SlashingKeeper,
appKeepers.AccountKeeper,
appKeepers.EvidenceKeeper,
appKeepers.DistrKeeper,
appKeepers.BankKeeper,
authtypes.FeeCollectorName,
)

Expand Down
19 changes: 10 additions & 9 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ import (
)

var maccPerms = map[string][]string{
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
icatypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
authtypes.FeeCollectorName: nil,
distrtypes.ModuleName: nil,
icatypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
liquiditytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
providertypes.ConsumerRewardsPool: nil,
}

// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Expand Down

0 comments on commit f798997

Please sign in to comment.