computablelabs / goest

Golang testing and sandbox for the Computable Protocol. 0xb00.
MIT License
8 stars 0 forks source link

Ensure setPrivileged is called only once. #89

Closed rbharath closed 5 years ago

rbharath commented 5 years ago

https://github.com/computablelabs/goest/blob/master/contracts/MarketToken.vy#L166

This TODO needs to be implemented to make sure that theft of factory key can't take down deployed contracts

rbharath commented 5 years ago

Should do this here as well:

https://github.com/computablelabs/goest/blob/master/contracts/Voting.vy#L56

rbharath commented 5 years ago

Here as well:

https://github.com/computablelabs/goest/blob/master/contracts/Datatrust.vy#L91

robrobbins commented 5 years ago

so the actual code is the easy part:

assert self.foo_address == ZERO_ADDRESS

that assures it has not been set yet.

the fun part in this ticket is that many specs will need to be re-written which utilize the contracts "upstream" which have permission to do things (like create a voting candidate)

that, or, you can just introduce another deployed FooContract whose privileged addresses are something you choose for that spec (like an authUser for test simplicity).

either is ok

rbharath commented 5 years ago

Closed by #115