2

I was searching through docs and youtube guides but couldn't find an answer - I have a multisigwallet in rinkeby network. How can I add/remove an owner from solidity smart contract?

More info: I have a voting smart-contract which is getting weight as balanseOf(voter). So if weight of voter is more than some value - they can add owners to MultiSigWallet. There I need to call somehow add-owner function from gnosis-safe.

there was a function addOwnerWithThreshold(address owner, uint256 _threshold) but I kinda not get it - if I just import 'https://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol' to my .sol contract and call addOwnerWithThreshold from my contract - it's not deploying

so how can I call/use this add-owner thing?

1 Answer 1

4

addOwnerThreshold is a protected function. Check authorized modifier in the function definition. It can be called only by the Safe itself. If any contract could simply call this function, it would be nothing but a security flaw.

What you can do is to call execTransaction with all necessary signatures and encoded transaction data for addOwnerThreshold.

OR

you can create a module contract, modules can be used to extend the Safe functionality, and they can execute transactions from the Safe: https://docs.gnosis-safe.io/contracts/modules-1 https://gist.github.com/rmeissner/c66371a4b030109cde1020f427122462

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.