Commit 74268b69 authored by Matthew Slipper's avatar Matthew Slipper

use correct owner v2

parent 82f328e6
......@@ -314,16 +314,7 @@ func PostCheckPredeployStorage(db vm.StateDB, finalSystemOwner common.Address, p
for key, value := range expSlots {
// The owner slots for the L2XDM and ProxyAdmin are special cases.
// They are set to the final system owner in the config.
if *addr == predeploys.L2CrossDomainMessengerAddr && key == L2XDMOwnerSlot {
actualOwner := common.BytesToAddress(slots[key].Bytes())
if actualOwner != finalSystemOwner {
return fmt.Errorf("expected owner for %s to be %s but got %s", name, finalSystemOwner, actualOwner)
}
log.Debug("validated special case owner slot", "value", actualOwner, "name", name)
continue
}
if *addr == predeploys.ProxyAdminAddr && key == ProxyAdminOwnerSlot {
if (*addr == predeploys.L2CrossDomainMessengerAddr && key == L2XDMOwnerSlot) || (*addr == predeploys.ProxyAdminAddr && key == ProxyAdminOwnerSlot) {
actualOwner := common.BytesToAddress(slots[key].Bytes())
if actualOwner != proxyAdminOwner {
return fmt.Errorf("expected owner for %s to be %s but got %s", name, proxyAdminOwner, actualOwner)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment