erasureprotocol / erasure-protocol

Information wants to be expensive
https://erasure.world/
MIT License
164 stars 27 forks source link

[Factory] Improve instance creator authentication. #128

Closed thegostep closed 5 years ago

thegostep commented 5 years ago

There are some template where it is important to perform access control based on the creator of the instance. This means we need a way to pass through the msg.sender who called the factory into the instance.

Examples are: Posts, Feeds

The current solution is to use msg.sender in the initialization calldata of the template.

Alternatives include to create a special function authenticate() on the template which can only be called at creation time or to store a reference of the creator of each instance in the factory.

thegostep commented 5 years ago

Decided to store creator in factory