diff --git a/x/cronos/keeper/precompiles/relayer.go b/x/cronos/keeper/precompiles/relayer.go index 95eddc0880..136d03dd2d 100644 --- a/x/cronos/keeper/precompiles/relayer.go +++ b/x/cronos/keeper/precompiles/relayer.go @@ -64,7 +64,7 @@ func (bc *RelayerContract) Address() common.Address { } // RequiredGas calculates the contract gas use -// `len(input) * DefaultTxSizeCostPerByte + requiredGasTable[methodPrefix] - intrinsicGas` +// `max(0, len(input) * DefaultTxSizeCostPerByte + requiredGasTable[methodPrefix] - intrinsicGas)` func (bc *RelayerContract) RequiredGas(input []byte) (gas uint64) { if len(input) < prefixSize4Bytes { return 0