Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbwasm revert fix #2656

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -133,6 +135,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
PlasmaPower marked this conversation as resolved.
Show resolved Hide resolved
}
return init, cached, err
}

Expand Down
Loading