Skip to content

Commit

Permalink
Do not charge gas for feecollector address query (sei-protocol#1795)
Browse files Browse the repository at this point in the history
Do not charge cache for feecollector address query
  • Loading branch information
codchen authored Jul 30, 2024
1 parent 9355f52 commit d57ab7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/evm/keeper/coinbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func (k *Keeper) GetFeeCollectorAddress(ctx sdk.Context) (common.Address, error)
return *cache, nil
}
moduleAddr := k.accountKeeper.GetModuleAddress(authtypes.FeeCollectorName)
evmAddr, ok := k.GetEVMAddress(ctx, moduleAddr)
// we don't want to charge gas for this query, since it could cause non-determinism
evmAddr, ok := k.GetEVMAddress(ctx.WithGasMeter(sdk.NewInfiniteGasMeterWithMultiplier(ctx)), moduleAddr)
if !ok {
return common.Address{}, errors.New("fee collector's EVM address not found")
}
Expand Down

0 comments on commit d57ab7d

Please sign in to comment.