From 875524f5cc0a49461a5bbbe7e2df4f1aaa014a59 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 9 Feb 2024 23:59:06 -0600 Subject: [PATCH] setup app with staking keeper better --- app/ante.go | 2 +- app/app.go | 1 + x/globalfee/ante/fee.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/ante.go b/app/ante.go index b235ec0..26da4a2 100644 --- a/app/ante.go +++ b/app/ante.go @@ -29,7 +29,7 @@ type HandlerOptions struct { GlobalFeeKeeper globalfeekeeper.Keeper BypassMinFeeMsgTypes []string - StakingKeeper stakingkeeper.Keeper // TODO: save the bond denom instead + StakingKeeper *stakingkeeper.Keeper // TODO: save the bond denom instead } diff --git a/app/app.go b/app/app.go index e476cae..b41c6ac 100644 --- a/app/app.go +++ b/app/app.go @@ -863,6 +863,7 @@ func (app *ChainApp) setAnteHandler(txConfig client.TxConfig) { GlobalFeeKeeper: app.GlobalFeeKeeper, BypassMinFeeMsgTypes: GetDefaultBypassFeeMessages(), + StakingKeeper: app.StakingKeeper, }, ) if err != nil { diff --git a/x/globalfee/ante/fee.go b/x/globalfee/ante/fee.go index cf8854b..8204c93 100644 --- a/x/globalfee/ante/fee.go +++ b/x/globalfee/ante/fee.go @@ -31,11 +31,11 @@ var _ sdk.AnteDecorator = FeeDecorator{} type FeeDecorator struct { BypassMinFeeMsgTypes []string GlobalFeeKeeper globalfeekeeper.Keeper - StakingKeeper stakingkeeper.Keeper + StakingKeeper *stakingkeeper.Keeper MaxTotalBypassMinFeeMsgGasUsage uint64 } -func NewFeeDecorator(bypassMsgTypes []string, gfk globalfeekeeper.Keeper, sk stakingkeeper.Keeper, maxTotalBypassMinFeeMsgGasUsage uint64) FeeDecorator { +func NewFeeDecorator(bypassMsgTypes []string, gfk globalfeekeeper.Keeper, sk *stakingkeeper.Keeper, maxTotalBypassMinFeeMsgGasUsage uint64) FeeDecorator { return FeeDecorator{ BypassMinFeeMsgTypes: bypassMsgTypes, GlobalFeeKeeper: gfk,