Skip to content

Commit

Permalink
Fixed Error Context in gas_price
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinmay Mehta committed Oct 2, 2023
1 parent 7991fad commit 1bc2d5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/fungible/keeper/gas_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 1bc2d5d

Please sign in to comment.