-
Notifications
You must be signed in to change notification settings - Fork 239
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
[ETHEREUM-CONTRACTS] [DEVX] simplify SuperApp registration #1660
Comments
https://github.com/superfluid-finance/protocol-monorepo/wiki/About-App-Registry updated accordingly: About APP_RULE_REGISTRATION_ONLY_IN_CONSTRUCTOR:
About app registration key:
-- After some discussion, the decision is to: deprecate APP_RULE_REGISTRATION_ONLY_IN_CONSTRUCTOR nanny rule and registration key usage. -- However, in the long run, the goal is still to depreciate app registration whitelisting process. |
Waiting for the PR #1706 to be ready. |
now behaves like this for existing authorizations:
new authorizations:
This covers all previous possibilities, but makes less assumptions. E.g. also allows registration of upgradable SuperApps without "abusing" a registration method not meant to be used that way. All new authorizations are mapped to the gov config key The expiration date is now set to (effectively) unlimited by default (to be more precise, to 2^64 - 1). It can still be set to any other value if the optional env var |
The registration key doesn't serve any purpose (anymore) after switching to an expire date based logic instead of one-time keys.
As a devx improvement, we could now simplify the logic to this:
registerApp(configWord)
for registration through the constructor, invoked by a deployer.registerApp(app, configWord)
for registration through a factory contract.Overloading isn't an issue in the Solidity API (it's a devx issue only with e.g. ethers.js).
registerAppWithKey
andregisterAppByFactory
can be kept for a while marked as deprecated (for backwards compatibility) and later removed. But docs and examples shouldn't use them anymore.Internally (in governance contract and scripts) we can either keep the logic as is (declaring e.g. the empty string as default key) or simplify the code. It could be simplified to just whitelist deployers, regardless of EOA or contract.
If we want to keep the distinction and associated constraints (EOA: call only from constructor), that could be achieved implicitly by checking if the msg.sender is an EOA or contract in
registerApp
.The text was updated successfully, but these errors were encountered: