Skip to content

Commit

Permalink
switch to alchemy for zkevm.
Browse files Browse the repository at this point in the history
  • Loading branch information
DontNeedGithubAccount committed May 28, 2024
1 parent da165d6 commit 15c5164
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions generate_current_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 15c5164

Please sign in to comment.