raiden-network / raiden

Raiden Network
https://developer.raiden.network
Other
1.84k stars 378 forks source link

Make sure that proxies have checks for all `assert()` and `require()` in TokenNetworkRegistry #4792

Open pirapira opened 5 years ago

pirapira commented 5 years ago

This is a part of #4763.

pirapira commented 5 years ago

The TokenNetworkRegistry version to go through is this: https://github.com/raiden-network/raiden-contracts/blob/7c1f1da47ae1b02c00f6388bb7be341c3fed3160/raiden_contracts/data/source/raiden/TokenNetworkRegistry.sol

pirapira commented 5 years ago

Does the client ever call the constructor of TokenNetworkRegistry? Asked https://ethereum.stackexchange.com/questions/74800/does-the-raiden-client-ever-deploy-tokennetworkregistry.

pirapira commented 5 years ago

createERC20TokenNetwork() has a modifier canCreateTokenNetwork.

https://github.com/raiden-network/raiden-contracts/blob/7c1f1da47ae1b02c00f6388bb7be341c3fed3160/raiden_contracts/data/source/raiden/TokenNetworkRegistry.sol#L76

Is this accounted in the proxy? No https://github.com/raiden-network/raiden/issues/4795

pirapira commented 5 years ago

Suspended till I understand the norm. https://github.com/raiden-network/raiden/issues/4828

pirapira commented 5 years ago

Also stuck on https://github.com/raiden-network/raiden/issues/4829

pirapira commented 5 years ago

Also stuck on https://github.com/raiden-network/raiden/issues/4830

pirapira commented 5 years ago

createERC20TokenNetwork() calls the constructor of TokenNetwork. The constructor has

pirapira commented 5 years ago

I've unassigned myself because I have some bottleneck work in the smart contracts.

karlb commented 2 years ago

Now that we have revert error messages, I would prefer to rely on the errors from the contract call in most cases rather then relying on correctly duplicating the logic.