Skip to content

Super App White listing Guide

Didi edited this page Oct 23, 2023 · 2 revisions

Is this relevant for me?

This instructions apply to you only if you are deploying a Super App on a network where Super App Registration which is permissioned.
Super App registration is not permissioned on testnets and on some mainnets.
In order to find out if it is, query host.APP_WHITE_LISTING_ENABLED().
You can conveniently do so by heading to the protocol section of the console (e.g. here for Polygon Mainnet), click the Explorer link for Host, then in the Explorer navigate to Contract -> Read as Proxy, then expand WHITE_LISTING_ENABLED image

If this shows False, Super App Registration is not permissioned and you don't need to read on.
If however like in this screenshot this shows True, Super App Registration is permissioned, in this case read on:

Permissioned App Registration

Once you know App Registration is permissioned, you need to get a deployer account whitelisted.
A deployer can be an EOA or a contract.

If you're deploying a single Super App, the recommended method is for the Super App to register itself in the constructor or in an initialize method, by invoking host.registerApp(configWord).
In this case, you need to get the EOA doing this transaction whitelisted beforehand.

If you're going to deploy multiple instances of a Super App, e.g. using a factory pattern, you may instead want to get a contract whitelisted as deployer. In this case that contract shall register Super Apps by invoking host.registerApp(app, configWord) (note the additional argument app).

In case you want to deviate from this recommendations, keep this in mind:

  • If registerApp(configWord) is used, tx.origin needs to have been whitelisted
  • If registerApp(app, configWord) is used, the msg.sender needs to have been whitelisted

If you need help or further clarification about the process, please join our Discord and contact the Superfluid dev team in the #development channel.

Clone this wiki locally