You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/tools/codegen/gen_eth_networks.py

15 lines
335 B

#!/usr/bin/env python3
import json
j = json.load(open("../../vendor/trezor-common/defs/ethereum/networks.json", "r"))
print("NETWORKS = [")
for n in j:
print(" NetworkInfo(")
for f in ["chain_id", "slip44", "shortcut", "name", "rskip60"]:
print(" %s=%s," % (f, repr(n[f])))
print(" ),")
print("]")