1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00
trezor-firmware/tools/codegen/gen_eth_networks.py

15 lines
335 B
Python
Raw Normal View History

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