Can't SwapOwner

Hello, we have a multisig Safe and I am trying to swap owner. The current state of owners are:

["0xd0","0xd1",0xd2","0xd3"]

My address, the one I'm making the calls from through defender is 0xd1. I wish to swap my ownership for another address lets call it 0xd10.

I am going to New admin actions proposal and choosing the function swapOwner() with:

prevOwner: 0xd1
oldOwner: 0xd1
newOwner: 0xd10

This is reverting the TX. I also had one of the other owners of the safe try to submit the same TX but through their account and its still reverting. Any tips on whats going on here? Thanks

Adding a new owner works, but removing one I also get a revert.

Hi bitsandtea,

I noticed that in your example, you are specifying the same address for prevOwner and oldOwner; that can be the issue.

prevOwner should be the owner that is immediately before in the list; this is because owners it's a linked list. (The prevOwner for the first owner it's 0x0000000000000000000000000000000000000001)

In your example, you provide this list:
["0xd0","0xd1",0xd2","0xd3"]

So, to remove or swap 0xd1, prevOwner should be set to 0xd0.

prevOwner: 0xd0
oldOwner: 0xd1
newOwner: 0xd10

Can you try that and let me know if it works?

Luis Urrutia
OpenZeppelin

Hello @LuisUrrutia yes that did it. thank you for your help. Although I would strongly recommend you update the docs, maybe add a tooltip - even the smart contract comment wasn't so clear for me without your answer.

Happy holidays