Skip to content

Commit 37b6489

Browse files
committed
stateOverride: don't allow arbOS
1 parent 515e912 commit 37b6489

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/ethapi/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,12 +962,17 @@ type OverrideAccount struct {
962962
// StateOverride is the collection of overridden accounts.
963963
type StateOverride map[common.Address]OverrideAccount
964964

965+
var arbStorageAddress = common.HexToAddress("0xA4B05FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")
966+
965967
// Apply overrides the fields of specified accounts into the given state.
966968
func (diff *StateOverride) Apply(state *state.StateDB) error {
967969
if diff == nil {
968970
return nil
969971
}
970972
for addr, account := range *diff {
973+
if addr == arbStorageAddress {
974+
return errors.New("overriding 0xA4B05FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF not allowed")
975+
}
971976
// Override account nonce.
972977
if account.Nonce != nil {
973978
state.SetNonce(addr, uint64(*account.Nonce))

0 commit comments

Comments
 (0)