Skip to content

Commit

Permalink
Update x/cronos/keeper/precompiles/relayer.go
Browse files Browse the repository at this point in the history
Co-authored-by: yihuang <huang@crypto.com>
Signed-off-by: mmsqe <mavis@crypto.com>
  • Loading branch information
mmsqe and yihuang authored Nov 6, 2023
1 parent 7b3c0f4 commit 5eefb77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/cronos/keeper/precompiles/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5eefb77

Please sign in to comment.