From 1bc2d5d91d1b9b8086c6fddee5f4dfc81a00addd Mon Sep 17 00:00:00 2001 From: Chinmay Mehta Date: Tue, 3 Oct 2023 00:54:56 +0530 Subject: [PATCH] Fixed Error Context in gas_price --- x/fungible/keeper/gas_price.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/fungible/keeper/gas_price.go b/x/fungible/keeper/gas_price.go index f492ddb2ec..16e46505f2 100644 --- a/x/fungible/keeper/gas_price.go +++ b/x/fungible/keeper/gas_price.go @@ -25,7 +25,10 @@ func (k Keeper) SetGasPrice(ctx sdk.Context, chainid *big.Int, gasPrice *big.Int return 0, sdkerrors.Wrapf(types.ErrABIGet, "SystemContractMetaData") } res, err := k.CallEVM(ctx, *abi, types.ModuleAddressEVM, oracle, BigIntZero, big.NewInt(50_000), true, false, "setGasPrice", chainid, gasPrice) - if err != nil || res.Failed() { + if err != nil { + return 0, sdkerrors.Wrapf(types.ErrABIGet, err.Error()) + } + if res.Failed() { return res.GasUsed, sdkerrors.Wrapf(types.ErrContractCall, "setGasPrice") }