2

I'm trying to understand the logic of Consensys' MultiSigWallet and being stuck with the understanding that onlyWallet can call addOwner() or removeOwner() or replaceOwner().

There are no such function-calls in the contract. It looks like it is for externals (human) calls.

On the other hand, the onlyWallet() modifier that will "revert() if the caller != contract itself" and prevent such calls.

How does it work? Who can actually call these functions and how exactly?

2

Oh, I just found that transactions can send the code as a "byte data" param and thus call any contract's functions. :)

addTransaction(address destination, uint value, bytes data)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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