Skip to content

Commit

Permalink
api: use ArbosStateAddress directly
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed May 15, 2024
1 parent c68494d commit 8048ac4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -962,16 +962,14 @@ type OverrideAccount struct {
// StateOverride is the collection of overridden accounts.
type StateOverride map[common.Address]OverrideAccount

var arbStorageAddress = common.HexToAddress("0xA4B05FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")

// Apply overrides the fields of specified accounts into the given state.
func (diff *StateOverride) Apply(state *state.StateDB) error {
if diff == nil {
return nil
}
for addr, account := range *diff {
if addr == arbStorageAddress {
return errors.New("overriding 0xA4B05FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF not allowed")
if addr == types.ArbosStateAddress {
return fmt.Errorf("overriding address %v not allowed", types.ArbosStateAddress)
}
// Override account nonce.
if account.Nonce != nil {
Expand Down

0 comments on commit 8048ac4

Please sign in to comment.