From 15c5164e314745fb08bca79d36b5252b15d477c5 Mon Sep 17 00:00:00 2001 From: Tritium-VLK Date: Tue, 28 May 2024 19:54:00 +0200 Subject: [PATCH] switch to alchemy for zkevm. --- generate_current_permissions.py | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/generate_current_permissions.py b/generate_current_permissions.py index e5d1e75f..b2a0ace5 100644 --- a/generate_current_permissions.py +++ b/generate_current_permissions.py @@ -13,35 +13,21 @@ "avalanche": Web3(Web3.HTTPProvider(f"https://api.avax.network/ext/bc/C/rpc")), ### Less reliable RPCs first to fail fast :) # "linea": Web3(Web3.HTTPProvider(f"https://linea-mainnet.infura.io/v3/{INFURA_KEY}")), - "mainnet": Web3( - Web3.HTTPProvider(f"https://eth-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), - "base": Web3( - Web3.HTTPProvider(f"https://base-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), - "arbitrum": Web3( - Web3.HTTPProvider(f"https://arb-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), - "optimism": Web3( - Web3.HTTPProvider(f"https://opt-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), - "polygon": Web3( - Web3.HTTPProvider(f"https://polygon-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), + "mainnet": Web3(Web3.HTTPProvider(f"https://eth-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")), + "base": Web3(Web3.HTTPProvider(f"https://base-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")), + "arbitrum": Web3(Web3.HTTPProvider(f"https://arb-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")), + "optimism": Web3(Web3.HTTPProvider(f"https://opt-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")), + "polygon": Web3(Web3.HTTPProvider(f"https://polygon-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")), "mode": Web3(Web3.HTTPProvider("https://mainnet.mode.network/")), "fraxtal": Web3(Web3.HTTPProvider("https://rpc.frax.com")), - "sepolia": Web3( - Web3.HTTPProvider(f"https://eth-sepolia.g.alchemy.com/v2/{ALCHEMY_KEY}") - ), + "sepolia": Web3(Web3.HTTPProvider(f"https://eth-sepolia.g.alchemy.com/v2/{ALCHEMY_KEY}")), } def build_chain_permissions_list(chain_name): a = AddrBook(chain_name) results = {} - action_ids_list = ( - f"{GITHUB_DEPLOYMENTS_RAW}/action-ids/{chain_name}/action-ids.json" - ) + action_ids_list = f"{GITHUB_DEPLOYMENTS_RAW}/action-ids/{chain_name}/action-ids.json" w3 = w3_by_chain[chain_name] authorizer = w3.eth.contract( address=a.search_unique("20210418-authorizer/Authorizer").address, @@ -62,9 +48,7 @@ def build_chain_permissions_list(chain_name): if numMembers > 0: memberAddressList = [] for i in range(0, numMembers, 1): - caller = str( - authorizer.functions.getRoleMember(action_id, i).call() - ) + caller = str(authorizer.functions.getRoleMember(action_id, i).call()) memberAddressList.append(caller) results[action_id] = memberAddressList