I'm trying to figure out the right way to modify gnosis safe's created via defender, particularly changing the members in the gnosis safe and the threshold.
I can see 2 possible ways:
New Proposal -> Admin Action -> addOwnerWithThreshold/removeOwner/swapOwner. But I can't find any documentation for these methods.
Import the gnosis safe address created on defender to the gnosis app. https://gnosis-safe.io/app/ -> Add existing Safe. And do the required owner changes there via their UI.
Which is the right approach? Or is there another method I should be using?
Code to reproduce
The functions you're talking about are documented in the Open Source safe contracts code, right here.
The Gnosis UI uses these functions in the background, so it's an equivalent action if you do it through Defender or via Gnosis UI, and if you want to know what function is the Gnosis UI running, just try to perform the operation and decode the data before signing the execution.
Whether you go via Defender or the Gnosis UI, shouldn't be a problem since both Defender and Gnosis use some sync methods to find out what's the current safe nonce, so once executed, you can continue creating proposals on Defender.
Hope this solves your questions.
Awesome I should have checked out the contracts! Seems to be a bit complex as you need to confirm what the
prevOwner is but looks doable.
Would be nice to have such functionality be available through defender (like how gnosis UI abstracts away some complexity) sometime in the future.
Yeah, using an Admin Action via Defender will require more configuration.
I created a ticket with your suggestion so we can prioritize accordingly in case we ever discuss adding this option as an identified type of action.
Thanks for your feedback!