From 3ae82c0d6558960f509175379c892ac26bc3e9ae Mon Sep 17 00:00:00 2001 From: jinmannwong <38482272+jinmannwong@users.noreply.github.com> Date: Thu, 24 Sep 2020 11:47:58 +0100 Subject: [PATCH] Update consensus and sdk versions (#26) * Give bank bond denomination * Upgrade sdk and consensus versions --- app/app.go | 7 +++++-- go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/app.go b/app/app.go index e4603d17..7193c254 100644 --- a/app/app.go +++ b/app/app.go @@ -239,11 +239,11 @@ func NewWasmApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b app.accountKeeper = auth.NewAccountKeeper( app.cdc, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount, ) - app.bankKeeper = bank.NewBaseKeeper( + bankKeeper := bank.NewBaseKeeper( app.accountKeeper, app.subspaces[bank.ModuleName], app.ModuleAccountAddrs(), ) app.supplyKeeper = supply.NewKeeper( - app.cdc, keys[supply.StoreKey], app.accountKeeper, app.bankKeeper, maccPerms, + app.cdc, keys[supply.StoreKey], app.accountKeeper, &bankKeeper, maccPerms, ) stakingKeeper := staking.NewKeeper( app.cdc, keys[staking.StoreKey], app.supplyKeeper, app.subspaces[staking.ModuleName], @@ -288,6 +288,9 @@ func NewWasmApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest b staking.NewMultiStakingHooks(app.distrKeeper.Hooks(), app.slashingKeeper.Hooks()), ) + // Set function for obtaining bond denomination in bank + app.bankKeeper = bankKeeper.SetBondDenomFunc(app.stakingKeeper.BondDenom) + // just re-use the full router - do we want to limit this more? var wasmRouter = bApp.Router() // better way to get this dir??? diff --git a/go.mod b/go.mod index dc0faf75..f060c287 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,6 @@ require ( replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // this include a few extra debug helpers on top of cosmos v0.38.3 but original also works fine -replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.8.1 +replace github.com/cosmos/cosmos-sdk => github.com/fetchai/cosmos-sdk v0.9.0 -replace github.com/tendermint/tendermint => github.com/fetchai/cosmos-consensus v0.6.2 +replace github.com/tendermint/tendermint => github.com/fetchai/cosmos-consensus v0.7.0 diff --git a/go.sum b/go.sum index b2f20662..6d77b276 100644 --- a/go.sum +++ b/go.sum @@ -118,10 +118,10 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqL github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fetchai/cosmos-consensus v0.6.2 h1:GsEDy29KD8Qq3ZbOJ+SodJCBnZHpblfecXTCQ6Ze2vE= -github.com/fetchai/cosmos-consensus v0.6.2/go.mod h1:3uBzeHvXTweU0DE0ja1RmM/rxcf+tTajjRCfcF+DG3A= -github.com/fetchai/cosmos-sdk v0.8.1 h1:LWwGQ5IENug5c2NFwHy2nwIa2yguLuri6g60rLY2BN0= -github.com/fetchai/cosmos-sdk v0.8.1/go.mod h1:/JUzWHdDB6wi5Bay3lfawzPuq3A5at9LKFX5/+qeYgo= +github.com/fetchai/cosmos-consensus v0.7.0 h1:NPA4qazmamuXtjca44MORLa8gcbR1TggFOajKwqQZRc= +github.com/fetchai/cosmos-consensus v0.7.0/go.mod h1:3uBzeHvXTweU0DE0ja1RmM/rxcf+tTajjRCfcF+DG3A= +github.com/fetchai/cosmos-sdk v0.9.0 h1:+B/XDKx8a6A1IpoFcZ9ysu4KNp6AK2NchCkoUgAsyhc= +github.com/fetchai/cosmos-sdk v0.9.0/go.mod h1:rqs43C3LBC3OIkff8b/oHfXOtd7cLsT84IqgwvhENZg= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=