You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the owner role is assigned to the msg.sender at construction time in ownable, ownable_2step, and access_control (here specifically the role DEFAULT_ADMIN_ROLE is assigned to msg.sender). If you deploy, for example, via a factory contract, this can become an issue as in this case you make the factory the owner. To improve the overall devex, we should make it possible to make the owner explicit.
As discussed here, we will use the yet-to-be-implemented Vyper @deploy decorator (vyperlang/vyper#3740) to implement this feature:
from snekmate.auth import access_control as ac
initializes: ac
@deploydef __init__():
ac.init_with_caller_as_default_admin()
# OR@deploydef __init__(default_admin: address):
ac.init_with_explicit_default_admin(default_admin)
The text was updated successfully, but these errors were encountered:
Currently, the
owner
role is assigned to themsg.sender
at construction time inownable
,ownable_2step
, andaccess_control
(here specifically the roleDEFAULT_ADMIN_ROLE
is assigned tomsg.sender
). If you deploy, for example, via a factory contract, this can become an issue as in this case you make the factory theowner
. To improve the overall devex, we should make it possible to make theowner
explicit.As discussed here, we will use the yet-to-be-implemented Vyper
@deploy
decorator (vyperlang/vyper#3740) to implement this feature:And after that the user will be able to do:
The text was updated successfully, but these errors were encountered: