Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy using a signature from the User #108

Open
YamenMerhi opened this issue May 13, 2022 · 0 comments
Open

Deploy using a signature from the User #108

YamenMerhi opened this issue May 13, 2022 · 0 comments

Comments

@YamenMerhi
Copy link
Member

What this issue is about?

  • The current way of deploying the UniversalProfile - KM - URD requires the user to call claimOwnership(...) on the KM at the end of the process.
    Another way of taking the full responsibility for deploying is to set permission for the key of the lsp-factory, then the key of the lsp-factory will claimOwnership and then remove itself (permissions).

Enhancement

  • This process can be enhanced by requesting a signature from the user to deploy; this signature will be executed by the lsp-factory through executeRelayCall(...) and it contains a payload to claimOwnership(..).
    This signature could be determined beforehand as non of the parameters is depending on the potential owner of the UP.

This means that the address that will sign this message, will not affect any parameter of this signed message.

A signed message is constructed of :

  • chainId (independent from the signer)
  • Address of KM (independent from the signer, the KM address depends on the address of the UP)
  • nonce (independent from the signer because any number at the beginning will work fine)
  • calldata (independent from the signer, it will always be 0xfunctionSelectorForClaimOwnership)

So we have 3 fields already determined: chainId, nonce and calldata.
We just need the address of the UP and the address of the KM, that could be determined by precomputing using UniversalFacotry or any create2 factory contract that the lsp-factory could use.

This method could lower the gas cost of setting the UniversalProfile - KM - URD for the user with a little bit of extra complexity 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant