From 8048ac4bed2eda18284e3c022ea5ee4cce771134 Mon Sep 17 00:00:00 2001 From: Tsahi Zidenberg Date: Tue, 14 May 2024 19:10:16 -0600 Subject: [PATCH] api: use ArbosStateAddress directly --- internal/ethapi/api.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 0629e238b4..1223441b98 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -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 {