farcasterxyz / contracts

Implementation of the Farcaster contracts
https://www.farcaster.xyz/
MIT License
340 stars 122 forks source link

feat: pass initial owner as constructor arg #258

Closed horsefacts closed 1 year ago

horsefacts commented 1 year ago

What is the feature you would like to implement?

Our Ownable2Step contracts rely on the default Ownable behavior, which sets the owner to msg.sender at construction time. We should instead pass the initial owner as a constructor arg and transfer ownership from msg.sender in the constructor.

Why is this feature important? If we deploy our contracts using a CREATE2 factory, we need to transfer ownership from the factory contract address to the initial owner. I added a fab contract to deploy and transfer atomically, but this is not necessary—we should simply transfer at construction time.

Will the protocol spec need to be updated?? No

Additional context I intend to do this along with #257