OpenZeppelin / openzeppelin-labs

A space for the community to interact and exchange ideas on the OpenZeppelin platform. Do not use in production!
https://openzeppelin.com/
MIT License
375 stars 116 forks source link

Restrict vouching to (registered) kernel instances #74

Closed fiiiu closed 6 years ago

fiiiu commented 6 years ago

Right now, ZepCore.sol's stake will take any address, but will fail when calling instance.developer() if no such method is found in instance, or behave erratically if this method does not do what is expected.

We should have a check in place that guarantees that the vouches are only in favor of KernelInstances.

One way to do this would be to force vouches to be for registered instances, and delegate to KernelRegistry the responsibility of checking the validity of the addresses at registration time.