Skip to content

Commit

Permalink
Add comment for nil fee-currency code path
Browse files Browse the repository at this point in the history
  • Loading branch information
ezdac committed Aug 5, 2024
1 parent 410be53 commit d5fef79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/celo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ func MaxAllowedIntrinsicGasCost(i IntrinsicGasCosts, feeCurrency *Address) (uint
if !ok {
return 0, false
}
// allow the contract to overshoot 2 times the deducted intrinsic gas
// during execution
// Allow the contract to overshoot 2 times the deducted intrinsic gas
// during execution.
// If the feeCurrency is nil, then the max allowed intrinsic gas cost
// is 0 (i.e. not allowed) for a fee-currency specific EVM call within the STF.
return intrinsicGas * 3, true
}

func CurrencyIntrinsicGasCost(i IntrinsicGasCosts, feeCurrency *Address) (uint64, bool) {
// the additional intrinsic gas cost for a non fee-currency
// transaction is 0
if feeCurrency == nil {
return 0, true
}
Expand Down

0 comments on commit d5fef79

Please sign in to comment.