File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
errorsmod "cosmossdk.io/errors"
24
24
sdkmath "cosmossdk.io/math"
25
25
distributiontypes "cosmossdk.io/x/distribution/types"
26
+ stakingtypes "cosmossdk.io/x/staking/types"
26
27
cmttypes "github.com/cometbft/cometbft/types"
27
28
"github.com/cosmos/cosmos-sdk/client/flags"
28
29
"github.com/cosmos/cosmos-sdk/client/tx"
@@ -278,8 +279,12 @@ func (b *Backend) SetGasPrice(gasPrice hexutil.Big) bool {
278
279
279
280
// use default base denom in case it's not currently defined on the node config
280
281
if len (minGasPrices ) == 0 || minGasPrices .Empty () {
281
- // mmsqe stakingKeeper.BondDenom
282
- unit = ethermint .AttoPhoton
282
+ params , err := b .queryClient .Staking .Params (b .ctx , & stakingtypes.QueryParamsRequest {})
283
+ if err != nil {
284
+ b .logger .Debug ("could not get the denom of smallest unit registered" , "error" , err .Error ())
285
+ return false
286
+ }
287
+ unit = params .Params .GetBondDenom ()
283
288
} else {
284
289
unit = minGasPrices [0 ].Denom
285
290
}
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ func (suite *BackendTestSuite) TestSetGasPrice() {
86
86
suite .backend .clientCtx .Viper = viper .New ()
87
87
},
88
88
* defaultGasPrice ,
89
- false , //mmsqe
89
+ false ,
90
90
},
91
91
{
92
92
"pass - cannot find coin denom" ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
25
25
26
26
"github.com/cosmos/cosmos-sdk/client"
27
27
28
+ stakingtypes "cosmossdk.io/x/staking/types"
28
29
evmtypes "github.com/evmos/ethermint/x/evm/types"
29
30
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"
30
31
)
@@ -37,6 +38,7 @@ type QueryClient struct {
37
38
tx.ServiceClient
38
39
evmtypes.QueryClient
39
40
FeeMarket feemarkettypes.QueryClient
41
+ Staking stakingtypes.QueryClient
40
42
}
41
43
42
44
// NewQueryClient creates a new gRPC query client
@@ -45,6 +47,7 @@ func NewQueryClient(clientCtx client.Context) *QueryClient {
45
47
ServiceClient : tx .NewServiceClient (clientCtx ),
46
48
QueryClient : evmtypes .NewQueryClient (clientCtx ),
47
49
FeeMarket : feemarkettypes .NewQueryClient (clientCtx ),
50
+ Staking : stakingtypes .NewQueryClient (clientCtx ),
48
51
}
49
52
}
50
53
You can’t perform that action at this time.
0 commit comments