mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-24 13:22:05 +00:00
coins_details: update tool, overrides, generated files and upstream
token source
This commit is contained in:
parent
a3240380c6
commit
e070b22aa3
File diff suppressed because it is too large
Load Diff
@ -5,26 +5,6 @@
|
|||||||
"erc20:eth:GNT": {
|
"erc20:eth:GNT": {
|
||||||
"coinmarketcap_alias": "golem-network-tokens"
|
"coinmarketcap_alias": "golem-network-tokens"
|
||||||
},
|
},
|
||||||
"eth:ESN": {
|
|
||||||
"t1_support": "soon",
|
|
||||||
"t2_support": "soon"
|
|
||||||
},
|
|
||||||
"eth:AKA": {
|
|
||||||
"t1_support": "soon",
|
|
||||||
"t2_support": "soon"
|
|
||||||
},
|
|
||||||
"eth:ETHO": {
|
|
||||||
"t1_support": "soon",
|
|
||||||
"t2_support": "soon"
|
|
||||||
},
|
|
||||||
"eth:MUSI": {
|
|
||||||
"t1_support": "soon",
|
|
||||||
"t2_support": "soon"
|
|
||||||
},
|
|
||||||
"eth:PIRL": {
|
|
||||||
"t1_support": "soon",
|
|
||||||
"t2_support": "soon"
|
|
||||||
},
|
|
||||||
"coin:BCH": {
|
"coin:BCH": {
|
||||||
"wallet": {
|
"wallet": {
|
||||||
"Electron Cash": "https://electroncash.org"
|
"Electron Cash": "https://electroncash.org"
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 33e5c5decb94227abe116589c650ddfa66dbe9e5
|
Subproject commit 44826a687a155bc0bb5e121370a07f5a95689d09
|
@ -122,6 +122,8 @@
|
|||||||
"erc20:eth:BKX": "1.6.2",
|
"erc20:eth:BKX": "1.6.2",
|
||||||
"erc20:eth:BLT": "1.6.2",
|
"erc20:eth:BLT": "1.6.2",
|
||||||
"erc20:eth:BLUE": "1.6.2",
|
"erc20:eth:BLUE": "1.6.2",
|
||||||
|
"erc20:eth:BLX (Bullion)": "1.6.2",
|
||||||
|
"erc20:eth:BLX (Iconomi)": "1.6.2",
|
||||||
"erc20:eth:BLZ": "1.6.2",
|
"erc20:eth:BLZ": "1.6.2",
|
||||||
"erc20:eth:BMC": "1.6.2",
|
"erc20:eth:BMC": "1.6.2",
|
||||||
"erc20:eth:BMT": "1.6.2",
|
"erc20:eth:BMT": "1.6.2",
|
||||||
@ -161,8 +163,12 @@
|
|||||||
"erc20:eth:CARCO": "1.6.2",
|
"erc20:eth:CARCO": "1.6.2",
|
||||||
"erc20:eth:CARE": "1.6.2",
|
"erc20:eth:CARE": "1.6.2",
|
||||||
"erc20:eth:CAS": "1.6.2",
|
"erc20:eth:CAS": "1.6.2",
|
||||||
|
"erc20:eth:CAT (BitClave)": "1.6.2",
|
||||||
|
"erc20:eth:CAT (Blockcat)": "1.6.2",
|
||||||
"erc20:eth:CATs (BitClave)_Old": "1.6.2",
|
"erc20:eth:CATs (BitClave)_Old": "1.6.2",
|
||||||
"erc20:eth:CC3": "1.6.2",
|
"erc20:eth:CC3": "1.6.2",
|
||||||
|
"erc20:eth:CCC (CryptoCrashCourse)": "1.6.2",
|
||||||
|
"erc20:eth:CCC (ICONOMI)": "1.6.2",
|
||||||
"erc20:eth:CCLC": "1.6.2",
|
"erc20:eth:CCLC": "1.6.2",
|
||||||
"erc20:eth:CCS": "1.6.2",
|
"erc20:eth:CCS": "1.6.2",
|
||||||
"erc20:eth:CDL": "1.6.2",
|
"erc20:eth:CDL": "1.6.2",
|
||||||
@ -370,6 +376,7 @@
|
|||||||
"erc20:eth:LGR": "1.6.2",
|
"erc20:eth:LGR": "1.6.2",
|
||||||
"erc20:eth:LIF": "1.6.2",
|
"erc20:eth:LIF": "1.6.2",
|
||||||
"erc20:eth:LIFE": "1.6.2",
|
"erc20:eth:LIFE": "1.6.2",
|
||||||
|
"erc20:eth:LINK (Chainlink)": "1.6.2",
|
||||||
"erc20:eth:LIVE": "1.6.2",
|
"erc20:eth:LIVE": "1.6.2",
|
||||||
"erc20:eth:LND": "1.6.2",
|
"erc20:eth:LND": "1.6.2",
|
||||||
"erc20:eth:LOC": "1.6.2",
|
"erc20:eth:LOC": "1.6.2",
|
||||||
@ -434,6 +441,7 @@
|
|||||||
"erc20:eth:NPER": "1.6.2",
|
"erc20:eth:NPER": "1.6.2",
|
||||||
"erc20:eth:NPXS": "1.6.2",
|
"erc20:eth:NPXS": "1.6.2",
|
||||||
"erc20:eth:NULS": "1.6.2",
|
"erc20:eth:NULS": "1.6.2",
|
||||||
|
"erc20:eth:NXX": "1.6.2",
|
||||||
"erc20:eth:NxC": "1.6.2",
|
"erc20:eth:NxC": "1.6.2",
|
||||||
"erc20:eth:OAK": "1.6.2",
|
"erc20:eth:OAK": "1.6.2",
|
||||||
"erc20:eth:OAX": "1.6.2",
|
"erc20:eth:OAX": "1.6.2",
|
||||||
@ -923,6 +931,8 @@
|
|||||||
"erc20:eth:BKX": "2.0.7",
|
"erc20:eth:BKX": "2.0.7",
|
||||||
"erc20:eth:BLT": "2.0.7",
|
"erc20:eth:BLT": "2.0.7",
|
||||||
"erc20:eth:BLUE": "2.0.7",
|
"erc20:eth:BLUE": "2.0.7",
|
||||||
|
"erc20:eth:BLX (Bullion)": "2.0.7",
|
||||||
|
"erc20:eth:BLX (Iconomi)": "2.0.7",
|
||||||
"erc20:eth:BLZ": "2.0.7",
|
"erc20:eth:BLZ": "2.0.7",
|
||||||
"erc20:eth:BMC": "2.0.7",
|
"erc20:eth:BMC": "2.0.7",
|
||||||
"erc20:eth:BMT": "2.0.7",
|
"erc20:eth:BMT": "2.0.7",
|
||||||
@ -962,8 +972,12 @@
|
|||||||
"erc20:eth:CARCO": "2.0.7",
|
"erc20:eth:CARCO": "2.0.7",
|
||||||
"erc20:eth:CARE": "2.0.7",
|
"erc20:eth:CARE": "2.0.7",
|
||||||
"erc20:eth:CAS": "2.0.7",
|
"erc20:eth:CAS": "2.0.7",
|
||||||
|
"erc20:eth:CAT (BitClave)": "2.0.7",
|
||||||
|
"erc20:eth:CAT (Blockcat)": "2.0.7",
|
||||||
"erc20:eth:CATs (BitClave)_Old": "2.0.7",
|
"erc20:eth:CATs (BitClave)_Old": "2.0.7",
|
||||||
"erc20:eth:CC3": "2.0.7",
|
"erc20:eth:CC3": "2.0.7",
|
||||||
|
"erc20:eth:CCC (CryptoCrashCourse)": "2.0.7",
|
||||||
|
"erc20:eth:CCC (ICONOMI)": "2.0.7",
|
||||||
"erc20:eth:CCLC": "2.0.7",
|
"erc20:eth:CCLC": "2.0.7",
|
||||||
"erc20:eth:CCS": "2.0.7",
|
"erc20:eth:CCS": "2.0.7",
|
||||||
"erc20:eth:CDL": "2.0.7",
|
"erc20:eth:CDL": "2.0.7",
|
||||||
@ -1171,6 +1185,7 @@
|
|||||||
"erc20:eth:LGR": "2.0.7",
|
"erc20:eth:LGR": "2.0.7",
|
||||||
"erc20:eth:LIF": "2.0.7",
|
"erc20:eth:LIF": "2.0.7",
|
||||||
"erc20:eth:LIFE": "2.0.7",
|
"erc20:eth:LIFE": "2.0.7",
|
||||||
|
"erc20:eth:LINK (Chainlink)": "2.0.7",
|
||||||
"erc20:eth:LIVE": "2.0.7",
|
"erc20:eth:LIVE": "2.0.7",
|
||||||
"erc20:eth:LND": "2.0.7",
|
"erc20:eth:LND": "2.0.7",
|
||||||
"erc20:eth:LOC": "2.0.7",
|
"erc20:eth:LOC": "2.0.7",
|
||||||
@ -1235,6 +1250,7 @@
|
|||||||
"erc20:eth:NPER": "2.0.7",
|
"erc20:eth:NPER": "2.0.7",
|
||||||
"erc20:eth:NPXS": "2.0.7",
|
"erc20:eth:NPXS": "2.0.7",
|
||||||
"erc20:eth:NULS": "2.0.7",
|
"erc20:eth:NULS": "2.0.7",
|
||||||
|
"erc20:eth:NXX": "2.0.7",
|
||||||
"erc20:eth:NxC": "2.0.7",
|
"erc20:eth:NxC": "2.0.7",
|
||||||
"erc20:eth:OAK": "2.0.7",
|
"erc20:eth:OAK": "2.0.7",
|
||||||
"erc20:eth:OAX": "2.0.7",
|
"erc20:eth:OAX": "2.0.7",
|
||||||
|
@ -143,60 +143,6 @@ def _webwallet_support(coin, support):
|
|||||||
return any(".trezor.io" in url for url in coin["blockbook"] + coin["bitcore"])
|
return any(".trezor.io" in url for url in coin["blockbook"] + coin["bitcore"])
|
||||||
|
|
||||||
|
|
||||||
def update_coins(coins, support_info):
|
|
||||||
res = {}
|
|
||||||
for coin in coins:
|
|
||||||
key = coin["key"]
|
|
||||||
support = support_info[key]
|
|
||||||
details = dict(
|
|
||||||
type="coin",
|
|
||||||
shortcut=coin["shortcut"],
|
|
||||||
name=coin["coin_label"],
|
|
||||||
links=dict(Homepage=coin["website"], Github=coin["github"]),
|
|
||||||
t1_enabled=_is_supported(support, 1),
|
|
||||||
t2_enabled=_is_supported(support, 2),
|
|
||||||
wallet={},
|
|
||||||
)
|
|
||||||
if _webwallet_support(coin, support):
|
|
||||||
details["wallet"]["Trezor"] = "https://wallet.trezor.io"
|
|
||||||
if support.get("other"):
|
|
||||||
details["wallet"].update(support["other"])
|
|
||||||
|
|
||||||
res[key] = details
|
|
||||||
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
def update_erc20(coins, support_info):
|
|
||||||
# TODO skip disabled networks?
|
|
||||||
res = {}
|
|
||||||
for coin in coins:
|
|
||||||
key = coin["key"]
|
|
||||||
support = support_info[key]
|
|
||||||
details = dict(
|
|
||||||
type="erc20",
|
|
||||||
network=coin["chain"],
|
|
||||||
address=coin["address"],
|
|
||||||
shortcut=coin["shortcut"],
|
|
||||||
name=coin["name"],
|
|
||||||
links={},
|
|
||||||
wallet=dict(
|
|
||||||
MyCrypto="https://mycrypto.com",
|
|
||||||
MyEtherWallet="https://www.myetherwallet.com",
|
|
||||||
),
|
|
||||||
t1_enabled=support["trezor1"],
|
|
||||||
t2_enabled=support["trezor2"],
|
|
||||||
)
|
|
||||||
if coin.get("website"):
|
|
||||||
details["links"]["Homepage"] = coin["website"]
|
|
||||||
if coin.get("social", {}).get("github"):
|
|
||||||
details["links"]["Github"] = coin["social"]["github"]
|
|
||||||
|
|
||||||
res[key] = details
|
|
||||||
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
def update_simple(coins, support_info, type):
|
def update_simple(coins, support_info, type):
|
||||||
res = {}
|
res = {}
|
||||||
for coin in coins:
|
for coin in coins:
|
||||||
@ -219,16 +165,62 @@ def update_simple(coins, support_info, type):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
def update_coins(coins, support_info):
|
||||||
|
res = update_simple(coins, support_info, "coin")
|
||||||
|
for coin in coins:
|
||||||
|
key = coin["key"]
|
||||||
|
support = support_info[key]
|
||||||
|
details = dict(
|
||||||
|
name=coin["coin_label"],
|
||||||
|
links=dict(Homepage=coin["website"], Github=coin["github"]),
|
||||||
|
wallet={},
|
||||||
|
)
|
||||||
|
if _webwallet_support(coin, support):
|
||||||
|
details["wallet"]["Trezor"] = "https://wallet.trezor.io"
|
||||||
|
|
||||||
|
res[key].update(details)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
def update_erc20(coins, support_info):
|
||||||
|
# TODO skip disabled networks?
|
||||||
|
res = update_simple(coins, support_info, "erc20")
|
||||||
|
for coin in coins:
|
||||||
|
key = coin["key"]
|
||||||
|
details = dict(
|
||||||
|
network=coin["chain"],
|
||||||
|
address=coin["address"],
|
||||||
|
shortcut=coin["shortcut"],
|
||||||
|
links={},
|
||||||
|
wallet=dict(
|
||||||
|
MyCrypto="https://mycrypto.com",
|
||||||
|
MyEtherWallet="https://www.myetherwallet.com",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
if coin.get("website"):
|
||||||
|
details["links"]["Homepage"] = coin["website"]
|
||||||
|
if coin.get("social", {}).get("github"):
|
||||||
|
details["links"]["Github"] = coin["social"]["github"]
|
||||||
|
|
||||||
|
res[key].update(details)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
def update_ethereum_networks(coins, support_info):
|
def update_ethereum_networks(coins, support_info):
|
||||||
res = update_simple(coins, support_info, "coin")
|
res = update_simple(coins, support_info, "coin")
|
||||||
for coin in coins:
|
for coin in coins:
|
||||||
res[coin["key"]].update(
|
key = coin["key"]
|
||||||
|
details = dict(
|
||||||
wallet=dict(
|
wallet=dict(
|
||||||
MyCrypto="https://mycrypto.com",
|
MyCrypto="https://mycrypto.com",
|
||||||
MyEtherWallet="https://www.myetherwallet.com",
|
MyEtherWallet="https://www.myetherwallet.com",
|
||||||
),
|
),
|
||||||
links=dict(Homepage=coin.get("url")),
|
links=dict(Homepage=coin.get("url")),
|
||||||
)
|
)
|
||||||
|
res[key].update(details)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@ -236,6 +228,7 @@ def check_missing_data(coins):
|
|||||||
for k, coin in coins.items():
|
for k, coin in coins.items():
|
||||||
hide = False
|
hide = False
|
||||||
|
|
||||||
|
print(coin)
|
||||||
if "Homepage" not in coin.get("links", {}):
|
if "Homepage" not in coin.get("links", {}):
|
||||||
print("%s: Missing homepage" % k)
|
print("%s: Missing homepage" % k)
|
||||||
hide = True
|
hide = True
|
||||||
@ -285,6 +278,7 @@ def apply_overrides(coins):
|
|||||||
if isinstance(new, dict) and isinstance(orig, dict):
|
if isinstance(new, dict) and isinstance(orig, dict):
|
||||||
for k, v in new.items():
|
for k, v in new.items():
|
||||||
orig[k] = recursive_update(orig.get(k), v)
|
orig[k] = recursive_update(orig.get(k), v)
|
||||||
|
return orig
|
||||||
else:
|
else:
|
||||||
return new
|
return new
|
||||||
|
|
||||||
@ -301,7 +295,7 @@ if __name__ == "__main__":
|
|||||||
root.addHandler(handler)
|
root.addHandler(handler)
|
||||||
|
|
||||||
defs = coin_info.get_all()
|
defs = coin_info.get_all()
|
||||||
support_info = coin_info.support_info(defs, erc20_versions=VERSIONS)
|
support_info = coin_info.support_info(defs)
|
||||||
|
|
||||||
coins = {}
|
coins = {}
|
||||||
coins.update(update_coins(defs.coins, support_info))
|
coins.update(update_coins(defs.coins, support_info))
|
||||||
|
Loading…
Reference in New Issue
Block a user