counterfactual / monorepo

Home for all packages related to the Counterfactual project
https://counterfactual.com
MIT License
187 stars 44 forks source link

[node] Update CREATE_CHANNEL method to use CREATE2 to determine channel identifier #1172

Closed snario closed 5 years ago

snario commented 5 years ago

We do not need to be computing the address of the multisignature wallet via a deploy transaction anymore. Instead, let's use CREATE2 and have the CREATE_CHANNEL method return the computed address after signing the necessary setup protocol commitments.

Note this also requires modifying the setup protocol slightly.

snario commented 5 years ago

The address can be computed using ProxyFactory.address as msg.sender in the calculation. Initcode will be bytecode of a Proxy and the arguments of the owners.