Skip to content

Commit

Permalink
style: ci lint with black
Browse files Browse the repository at this point in the history
  • Loading branch information
Tritium-VLK authored and github-actions[bot] committed May 28, 2024
1 parent 15c5164 commit 93b0c63
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions generate_current_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,43 @@

w3_by_chain = {
"gnosis": Web3(Web3.HTTPProvider(f"https://rpc.gnosischain.com")),
"zkevm": Web3(Web3.HTTPProvider(f"https://polygonzkevm-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}")),
"zkevm": Web3(
Web3.HTTPProvider(
f"https://polygonzkevm-mainnet.g.alchemy.com/v2/{ALCHEMY_KEY}"
)
),
"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 @@ -48,7 +66,9 @@ 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 93b0c63

Please sign in to comment.