How Does The Ethereum Multisig Contract Wallet Execute Contract Functions?

In particular, how does the wallet execute(...) function call the functions in other contracts?

I’m trying to work out how contract wallets execute The DAO refund contract approve(...) and withdraw() functions, as this was asked by a user referencing the Q&A – How do I convert my The DAO tokens into ethers on the Ethereum Classic chain?.

The highlighted lines 344 and 349 in the source code below show the execute(...) function calling the; for a single signature transaction.

The highlighted lines 364 and 366 in the source code below show the confirm(...) function calling the m_txs[_h][_h].value)(m_txs[_h].data); for a multisig transaction.

For this to work, the Ethereum Wallet converts the function call into the data parameter sent above using the same procedure as show under the Use Your Contract Using curl And JSON-RPC section in How to call a contract method using the eth_call JSON-RPC API.

The Ethereum Wallet then converts the execute(...) with the data parameter, converted again using the same procedure as described in the previous paragraph.



This entry was posted in Blog and tagged , . Bookmark the permalink.