forked from akash-network/node
/
mac.go
34 lines (30 loc) · 1.14 KB
/
mac.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package app
import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
escrowtypes "github.com/akash-network/node/x/escrow/types/v1beta2"
)
func MacPerms() map[string][]string {
return map[string][]string{
authtypes.FeeCollectorName: nil,
escrowtypes.ModuleName: nil,
distrtypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}
}
func MacAddrs() map[string]bool {
perms := MacPerms()
addrs := make(map[string]bool, len(perms))
for k := range perms {
addrs[authtypes.NewModuleAddress(k).String()] = true
}
return addrs
}