-
Notifications
You must be signed in to change notification settings - Fork 11
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
authorize enrico script #153
Conversation
KPrasch
commented
Oct 12, 2023
•
edited
Loading
edited
scripts/lynx/authorize_enrico.py
Outdated
@@ -0,0 +1,22 @@ | |||
#!/usr/bin/python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving this script to the common set of scripts scripts/
and use click
options? We'll probably have to do something similar for tapir
/ mainnet
.
Could do something like
ape run authorize_enrico --network polygon:mumbai:infura --registry-filepath <> --enrico <>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds like a great idea 👍🏻 we're gonna need documentation 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opened #154
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
scripts/lynx/authorize_enrico.py
Outdated
global_allow_list = deployments[project.GlobalAllowList.contract_type.name] | ||
ritual_id = int(input("Enter ritual ID: ")) | ||
addresses = [to_checksum_address(input("Enter address to authorize: "))] | ||
transactor.transact(global_allow_list.authorize, ritual_id, addresses) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be done as part of #154 as well, but should we check global_allow_list.isAddressAuthorized(...) first to potentially save some gas in case enrico is already authorized.
Similar to what we do here - https://github.com/nucypher/nucypher/blob/development/scripts/hooks/nucypher_dkg.py#L336.
Just something to think about.
"-e", | ||
help="Enrico address", | ||
type=str, | ||
required=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make this a multiple=True
if you want to do more than one authorization for a single execution of the script.