mirror of https://github.com/certusone/wasmd.git
Merge PR #70: supply genesis migration fix
* update to extended module account permissions * reflect pr comments * update go mod to be off commit on colin/supply_genesis on sdk
This commit is contained in:
parent
e1043a4e77
commit
70b486328e
18
app/app.go
18
app/app.go
|
@ -149,15 +149,19 @@ func NewGaiaApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b
|
|||
crisisSubspace := app.paramsKeeper.Subspace(crisis.DefaultParamspace)
|
||||
|
||||
// account permissions
|
||||
basicModuleAccs := []string{auth.FeeCollectorName, distr.ModuleName}
|
||||
minterModuleAccs := []string{mint.ModuleName}
|
||||
burnerModuleAccs := []string{staking.BondedPoolName, staking.NotBondedPoolName, gov.ModuleName}
|
||||
maccPerms := map[string][]string{
|
||||
auth.FeeCollectorName: []string{supply.Basic},
|
||||
distr.ModuleName: []string{supply.Basic},
|
||||
mint.ModuleName: []string{supply.Minter},
|
||||
staking.BondedPoolName: []string{supply.Burner, supply.Staking},
|
||||
staking.NotBondedPoolName: []string{supply.Burner, supply.Staking},
|
||||
gov.ModuleName: []string{supply.Burner},
|
||||
}
|
||||
|
||||
// add keepers
|
||||
app.accountKeeper = auth.NewAccountKeeper(app.cdc, app.keyAccount, authSubspace, auth.ProtoBaseAccount)
|
||||
app.bankKeeper = bank.NewBaseKeeper(app.accountKeeper, bankSubspace, bank.DefaultCodespace)
|
||||
app.supplyKeeper = supply.NewKeeper(app.cdc, app.keySupply, app.accountKeeper,
|
||||
app.bankKeeper, supply.DefaultCodespace, basicModuleAccs, minterModuleAccs, burnerModuleAccs)
|
||||
app.supplyKeeper = supply.NewKeeper(app.cdc, app.keySupply, app.accountKeeper, app.bankKeeper, supply.DefaultCodespace, maccPerms)
|
||||
stakingKeeper := staking.NewKeeper(app.cdc, app.keyStaking, app.tkeyStaking,
|
||||
app.supplyKeeper, stakingSubspace, staking.DefaultCodespace)
|
||||
app.mintKeeper = mint.NewKeeper(app.cdc, app.keyMint, mintSubspace, &stakingKeeper, app.supplyKeeper, auth.FeeCollectorName)
|
||||
|
@ -203,9 +207,9 @@ func NewGaiaApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b
|
|||
|
||||
// genutils must occur after staking so that pools are properly
|
||||
// initialized with tokens from genesis accounts.
|
||||
app.mm.SetOrderInitGenesis(genaccounts.ModuleName, supply.ModuleName, distr.ModuleName,
|
||||
app.mm.SetOrderInitGenesis(genaccounts.ModuleName, distr.ModuleName,
|
||||
staking.ModuleName, auth.ModuleName, bank.ModuleName, slashing.ModuleName,
|
||||
gov.ModuleName, mint.ModuleName, crisis.ModuleName, genutil.ModuleName)
|
||||
gov.ModuleName, mint.ModuleName, supply.ModuleName, crisis.ModuleName, genutil.ModuleName)
|
||||
|
||||
app.mm.RegisterInvariants(&app.crisisKeeper)
|
||||
app.mm.RegisterRoutes(app.Router(), app.QueryRouter())
|
||||
|
|
3
go.mod
3
go.mod
|
@ -4,7 +4,7 @@ go 1.12
|
|||
|
||||
require (
|
||||
github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c // indirect
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190705123402-2fdbf631e763
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190709192957-95f60ea120f0
|
||||
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect
|
||||
github.com/etcd-io/bbolt v1.3.3 // indirect
|
||||
github.com/go-kit/kit v0.9.0 // indirect
|
||||
|
@ -34,7 +34,6 @@ require (
|
|||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
|
||||
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
google.golang.org/appengine v1.4.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20190701230453-710ae3a149df // indirect
|
||||
google.golang.org/grpc v1.22.0 // indirect
|
||||
)
|
||||
|
|
5
go.sum
5
go.sum
|
@ -37,8 +37,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz
|
|||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190705123402-2fdbf631e763 h1:25yfmbpVGN0+5yijzd4XhAMx0tJ/y5Jrec0gRqczjuA=
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190705123402-2fdbf631e763/go.mod h1:ngmaRot5kvm4Op0NBgOgbOTWJOKw9cM2qAXv0DUs94Q=
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190709192957-95f60ea120f0 h1:tCKeNzuvp2M++DX64kkCkRWxxwwJXVFMdCrtptQnfk0=
|
||||
github.com/cosmos/cosmos-sdk v0.28.2-0.20190709192957-95f60ea120f0/go.mod h1:ngmaRot5kvm4Op0NBgOgbOTWJOKw9cM2qAXv0DUs94Q=
|
||||
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
|
||||
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU=
|
||||
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
|
||||
|
@ -232,7 +232,6 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd
|
|||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
|
||||
github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s=
|
||||
github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U=
|
||||
github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5 h1:u8i49c+BxloX3XQ55cvzFNXplizZP/q00i+IlttUjAU=
|
||||
github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk=
|
||||
github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso=
|
||||
github.com/tendermint/go-amino v0.15.0 h1:TC4e66P59W7ML9+bxio17CPKnxW3nKIRAYskntMAoRk=
|
||||
|
|
Loading…
Reference in New Issue