Skip to content

Commit

Permalink
Merge pull request #2656 from OffchainLabs/arbwasm_revert_fix
Browse files Browse the repository at this point in the history
Arbwasm revert fix
  • Loading branch information
tsahee authored Sep 20, 2024
2 parents 3befb69 + e919082 commit 6c62bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts
5 changes: 5 additions & 0 deletions precompiles/ArbWasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package precompiles

import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
gethparams "github.com/ethereum/go-ethereum/params"
"github.com/offchainlabs/nitro/arbos/programs"
"github.com/offchainlabs/nitro/arbos/util"
"github.com/offchainlabs/nitro/util/arbmath"
Expand Down Expand Up @@ -134,6 +136,9 @@ func (con ArbWasm) MinInitGas(c ctx, _ mech) (uint64, uint64, error) {
params, err := c.State.Programs().Params()
init := uint64(params.MinInitGas) * programs.MinInitGasUnits
cached := uint64(params.MinCachedInitGas) * programs.MinCachedGasUnits
if c.State.ArbOSVersion() < gethparams.ArbosVersion_StylusChargingFixes {
return 0, 0, vm.ErrExecutionReverted
}
return init, cached, err
}

Expand Down

0 comments on commit 6c62bf8

Please sign in to comment.