diff --git a/defs/duplicity_overrides.json b/defs/duplicity_overrides.json new file mode 100644 index 0000000000..a4a535a426 --- /dev/null +++ b/defs/duplicity_overrides.json @@ -0,0 +1,6 @@ +{ + "erc20:eth:BTL (Battle)": true, + "erc20:eth:BTL (Bitlle)": true, + "erc20:eth:LINK Platform": true, + "erc20:eth:NXX": false +} diff --git a/defs/support.json b/defs/support.json index ff2833e90c..90d7f1daf2 100644 --- a/defs/support.json +++ b/defs/support.json @@ -207,7 +207,6 @@ "erc20:eth:CryptoCarbon": "1.6.2", "erc20:eth:DAB": "1.6.2", "erc20:eth:DADI": "1.6.2", - "erc20:eth:DAI": "1.6.2", "erc20:eth:DALC": "1.6.2", "erc20:eth:DAN": "1.6.2", "erc20:eth:DAO": "1.6.2", @@ -224,7 +223,6 @@ "erc20:eth:DEB": "1.6.2", "erc20:eth:DEEZ": "1.6.2", "erc20:eth:DENT": "1.6.2", - "erc20:eth:DGD": "1.6.2", "erc20:eth:DGPT": "1.6.2", "erc20:eth:DGX": "1.6.2", "erc20:eth:DICE": "1.6.2", @@ -275,7 +273,6 @@ "erc20:eth:EVX": "1.6.2", "erc20:eth:EXMR": "1.6.2", "erc20:eth:FAM": "1.6.2", - "erc20:eth:FANX": "1.6.2", "erc20:eth:FKX": "1.6.2", "erc20:eth:FLIXX": "1.6.2", "erc20:eth:FLP": "1.6.2", @@ -284,7 +281,6 @@ "erc20:eth:FLX": "1.6.2", "erc20:eth:FND": "1.6.2", "erc20:eth:FRD": "1.6.2", - "erc20:eth:FTC": "1.6.2", "erc20:eth:FTR": "1.6.2", "erc20:eth:FTT": "1.6.2", "erc20:eth:FUEL": "1.6.2", @@ -303,7 +299,6 @@ "erc20:eth:GIM": "1.6.2", "erc20:eth:GMT": "1.6.2", "erc20:eth:GNO": "1.6.2", - "erc20:eth:GNT": "1.6.2", "erc20:eth:GOLDX": "1.6.2", "erc20:eth:GRID": "1.6.2", "erc20:eth:GROW": "1.6.2", @@ -376,7 +371,6 @@ "erc20:eth:LIF": "1.6.2", "erc20:eth:LIFE": "1.6.2", "erc20:eth:LIVE": "1.6.2", - "erc20:eth:LNC": "1.6.2", "erc20:eth:LND": "1.6.2", "erc20:eth:LOC": "1.6.2", "erc20:eth:LOCI": "1.6.2", @@ -404,9 +398,7 @@ "erc20:eth:MEST": "1.6.2", "erc20:eth:MFG": "1.6.2", "erc20:eth:MGO": "1.6.2", - "erc20:eth:MKR": "1.6.2", "erc20:eth:MKT": "1.6.2", - "erc20:eth:MLN": "1.6.2", "erc20:eth:MNE": "1.6.2", "erc20:eth:MNT": "1.6.2", "erc20:eth:MNTP": "1.6.2", @@ -415,7 +407,6 @@ "erc20:eth:MRP": "1.6.2", "erc20:eth:MRV": "1.6.2", "erc20:eth:MSP": "1.6.2", - "erc20:eth:MTC": "1.6.2", "erc20:eth:MTH": "1.6.2", "erc20:eth:MTL": "1.6.2", "erc20:eth:MTN": "1.6.2", @@ -491,7 +482,6 @@ "erc20:eth:PRS": "1.6.2", "erc20:eth:PRSP": "1.6.2", "erc20:eth:PT": "1.6.2", - "erc20:eth:PTC": "1.6.2", "erc20:eth:PTOY": "1.6.2", "erc20:eth:PTWO": "1.6.2", "erc20:eth:PUC": "1.6.2", @@ -545,7 +535,6 @@ "erc20:eth:SKO1": "1.6.2", "erc20:eth:SKR": "1.6.2", "erc20:eth:SLT": "1.6.2", - "erc20:eth:SMART": "1.6.2", "erc20:eth:SNC": "1.6.2", "erc20:eth:SND": "1.6.2", "erc20:eth:SNG": "1.6.2", @@ -593,7 +582,6 @@ "erc20:eth:TIX": "1.6.2", "erc20:eth:TKN": "1.6.2", "erc20:eth:TNT": "1.6.2", - "erc20:eth:TRC": "1.6.2", "erc20:eth:TRCN": "1.6.2", "erc20:eth:TRST": "1.6.2", "erc20:eth:TRX": "1.6.2", @@ -654,13 +642,11 @@ "erc20:eth:XNT": "1.6.2", "erc20:eth:XRL": "1.6.2", "erc20:eth:XSC": "1.6.2", - "erc20:eth:YEED": "1.6.2", "erc20:eth:YUPIE": "1.6.2", "erc20:eth:ZAP": "1.6.2", "erc20:eth:ZCS": "1.6.2", "erc20:eth:ZIL": "1.6.2", "erc20:eth:ZMN": "1.6.2", - "erc20:eth:ZRX": "1.6.2", "erc20:eth:ZST": "1.6.2", "erc20:eth:cV": "1.6.2", "erc20:eth:eBCH": "1.6.2", @@ -717,39 +703,111 @@ "coin:CRW": "address_type collides with Bitcoin", "coin:TRC": "address_type collides with Bitcoin", "coin:ZEN": "not implemented on T1", - "erc20:etc:PLAY": "duplicate key", - "erc20:eth:ATH": "duplicate key", - "erc20:eth:ATH (AIgatha Token)": "duplicate key", - "erc20:eth:BLX (Bullion)": "duplicate key", - "erc20:eth:BLX (Iconomi)": "duplicate key", - "erc20:eth:BTL (Battle)": "duplicate key", - "erc20:eth:BTL (Bitlle)": "duplicate key", - "erc20:eth:CAR": "duplicate key", - "erc20:eth:CAR (CarBlock)": "duplicate key", - "erc20:eth:CAT (BitClave)": "duplicate key", - "erc20:eth:CAT (Blockcat)": "duplicate key", - "erc20:eth:CCC (CryptoCrashCourse)": "duplicate key", - "erc20:eth:CCC (ICONOMI)": "duplicate key", - "erc20:eth:DEPO": "duplicate key", - "erc20:eth:DEPO (Depository Network)": "duplicate key", - "erc20:eth:DROP": "duplicate key", - "erc20:eth:DROP (dropil)": "duplicate key", - "erc20:eth:GUP": "duplicate key", - "erc20:eth:KC": "duplicate key", - "erc20:eth:LINK (Chainlink)": "duplicate key", - "erc20:eth:LINK Platform": "duplicate key", - "erc20:eth:MIT": "duplicate key", - "erc20:eth:MIT (Mychatcoin)": "duplicate key", - "erc20:eth:NONE": "duplicate key", - "erc20:eth:NXX": "duplicate key", - "erc20:eth:NXX OLD": "duplicate key", - "erc20:eth:PLAY": "duplicate key", - "erc20:eth:RDN": "duplicate key", - "erc20:kov:GUP": "duplicate key", - "erc20:rin:KC": "duplicate key", - "erc20:rin:NONE": "duplicate key", - "erc20:rin:RDN": "duplicate key", - "erc20:rop:NONE": "duplicate key", + "erc20:etc:PLAY": "(AUTO) duplicate key", + "erc20:eth:ATH": "(AUTO) duplicate key", + "erc20:eth:ATH (AIgatha Token)": "(AUTO) duplicate key", + "erc20:eth:BTL (Battle)": "(AUTO) duplicate key", + "erc20:eth:BTL (Bitlle)": "(AUTO) duplicate key", + "erc20:eth:CAR": "(AUTO) duplicate key", + "erc20:eth:CAR (CarBlock)": "(AUTO) duplicate key", + "erc20:eth:CARD:0": "(AUTO) duplicate key", + "erc20:eth:CARD:1": "(AUTO) duplicate key", + "erc20:eth:CDX:0": "(AUTO) duplicate key", + "erc20:eth:CDX:1": "(AUTO) duplicate key", + "erc20:eth:COSS:0": "(AUTO) duplicate key", + "erc20:eth:COSS:1": "(AUTO) duplicate key", + "erc20:eth:DAI": "(AUTO) duplicate key", + "erc20:eth:DEPO": "(AUTO) duplicate key", + "erc20:eth:DEPO (Depository Network)": "(AUTO) duplicate key", + "erc20:eth:DGD": "(AUTO) duplicate key", + "erc20:eth:DOW:0": "(AUTO) duplicate key", + "erc20:eth:DOW:1": "(AUTO) duplicate key", + "erc20:eth:DROP": "(AUTO) duplicate key", + "erc20:eth:DROP (dropil)": "(AUTO) duplicate key", + "erc20:eth:DRP:0": "(AUTO) duplicate key", + "erc20:eth:DRP:1": "(AUTO) duplicate key", + "erc20:eth:DUBI:0": "(AUTO) duplicate key", + "erc20:eth:DUBI:1": "(AUTO) duplicate key", + "erc20:eth:EDU:0": "(AUTO) duplicate key", + "erc20:eth:EDU:1": "(AUTO) duplicate key", + "erc20:eth:FANX:0": "(AUTO) duplicate key", + "erc20:eth:FANX:1": "(AUTO) duplicate key", + "erc20:eth:FLMC:0": "(AUTO) duplicate key", + "erc20:eth:FLMC:1": "(AUTO) duplicate key", + "erc20:eth:FTC": "(AUTO) duplicate key", + "erc20:eth:FUCK:0": "(AUTO) duplicate key", + "erc20:eth:FUCK:1": "(AUTO) duplicate key", + "erc20:eth:GANA:0": "(AUTO) duplicate key", + "erc20:eth:GANA:1": "(AUTO) duplicate key", + "erc20:eth:GNT": "(AUTO) duplicate key", + "erc20:eth:GUP": "(AUTO) duplicate key", + "erc20:eth:HOT:0": "(AUTO) duplicate key", + "erc20:eth:HOT:1": "(AUTO) duplicate key", + "erc20:eth:JBX:0": "(AUTO) duplicate key", + "erc20:eth:JBX:1": "(AUTO) duplicate key", + "erc20:eth:KC": "(AUTO) duplicate key", + "erc20:eth:KEY:0": "(AUTO) duplicate key", + "erc20:eth:KEY:1": "(AUTO) duplicate key", + "erc20:eth:LEMO:0": "(AUTO) duplicate key", + "erc20:eth:LEMO:1": "(AUTO) duplicate key", + "erc20:eth:LEMO:2": "(AUTO) duplicate key", + "erc20:eth:LINK Platform": "(AUTO) duplicate key", + "erc20:eth:LNC": "(AUTO) duplicate key", + "erc20:eth:LNC (Linker Coin)": "(AUTO) duplicate key", + "erc20:eth:MIT": "(AUTO) duplicate key", + "erc20:eth:MIT (Mychatcoin)": "(AUTO) duplicate key", + "erc20:eth:MKR": "(AUTO) duplicate key", + "erc20:eth:MLN": "(AUTO) duplicate key", + "erc20:eth:MTC:0": "(AUTO) duplicate key", + "erc20:eth:MTC:1": "(AUTO) duplicate key", + "erc20:eth:NONE": "(AUTO) duplicate key", + "erc20:eth:NXX OLD": "(AUTO) duplicate key", + "erc20:eth:OHNI:0": "(AUTO) duplicate key", + "erc20:eth:OHNI:1": "(AUTO) duplicate key", + "erc20:eth:OPEN:0": "(AUTO) duplicate key", + "erc20:eth:OPEN:1": "(AUTO) duplicate key", + "erc20:eth:PLAY": "(AUTO) duplicate key", + "erc20:eth:PRPS:0": "(AUTO) duplicate key", + "erc20:eth:PRPS:1": "(AUTO) duplicate key", + "erc20:eth:PTC": "(AUTO) duplicate key", + "erc20:eth:RDN": "(AUTO) duplicate key", + "erc20:eth:REP:0": "(AUTO) duplicate key", + "erc20:eth:REP:1": "(AUTO) duplicate key", + "erc20:eth:SGT:0": "(AUTO) duplicate key", + "erc20:eth:SGT:1": "(AUTO) duplicate key", + "erc20:eth:SKRP:0": "(AUTO) duplicate key", + "erc20:eth:SKRP:1": "(AUTO) duplicate key", + "erc20:eth:SKRP:2": "(AUTO) duplicate key", + "erc20:eth:SMART": "(AUTO) duplicate key", + "erc20:eth:SMT:0": "(AUTO) duplicate key", + "erc20:eth:SMT:1": "(AUTO) duplicate key", + "erc20:eth:SMT:2": "(AUTO) duplicate key", + "erc20:eth:SS:0": "(AUTO) duplicate key", + "erc20:eth:SS:1": "(AUTO) duplicate key", + "erc20:eth:TRC": "(AUTO) duplicate key", + "erc20:eth:UMKA:0": "(AUTO) duplicate key", + "erc20:eth:UMKA:1": "(AUTO) duplicate key", + "erc20:eth:VIBEX:0": "(AUTO) duplicate key", + "erc20:eth:VIBEX:1": "(AUTO) duplicate key", + "erc20:eth:WHO:0": "(AUTO) duplicate key", + "erc20:eth:WHO:1": "(AUTO) duplicate key", + "erc20:eth:WOLK:0": "(AUTO) duplicate key", + "erc20:eth:WOLK:1": "(AUTO) duplicate key", + "erc20:eth:YEED:0": "(AUTO) duplicate key", + "erc20:eth:YEED:1": "(AUTO) duplicate key", + "erc20:eth:ZRX": "(AUTO) duplicate key", + "erc20:kov:DAI": "(AUTO) duplicate key", + "erc20:kov:DGD": "(AUTO) duplicate key", + "erc20:kov:GNT": "(AUTO) duplicate key", + "erc20:kov:GUP": "(AUTO) duplicate key", + "erc20:kov:MKR": "(AUTO) duplicate key", + "erc20:kov:MLN": "(AUTO) duplicate key", + "erc20:kov:REP": "(AUTO) duplicate key", + "erc20:kov:ZRX": "(AUTO) duplicate key", + "erc20:rin:KC": "(AUTO) duplicate key", + "erc20:rin:NONE": "(AUTO) duplicate key", + "erc20:rin:RDN": "(AUTO) duplicate key", + "erc20:rop:NONE": "(AUTO) duplicate key", "misc:ADA": "not implemented on T1", "misc:LSK": "not implemented on T1", "misc:XMR": "not implemented on T1", @@ -950,7 +1008,6 @@ "erc20:eth:CryptoCarbon": "2.0.7", "erc20:eth:DAB": "2.0.7", "erc20:eth:DADI": "2.0.7", - "erc20:eth:DAI": "2.0.7", "erc20:eth:DALC": "2.0.7", "erc20:eth:DAN": "2.0.7", "erc20:eth:DAO": "2.0.7", @@ -967,7 +1024,6 @@ "erc20:eth:DEB": "2.0.7", "erc20:eth:DEEZ": "2.0.7", "erc20:eth:DENT": "2.0.7", - "erc20:eth:DGD": "2.0.7", "erc20:eth:DGPT": "2.0.7", "erc20:eth:DGX": "2.0.7", "erc20:eth:DICE": "2.0.7", @@ -1018,7 +1074,6 @@ "erc20:eth:EVX": "2.0.7", "erc20:eth:EXMR": "2.0.7", "erc20:eth:FAM": "2.0.7", - "erc20:eth:FANX": "2.0.7", "erc20:eth:FKX": "2.0.7", "erc20:eth:FLIXX": "2.0.7", "erc20:eth:FLP": "2.0.7", @@ -1027,7 +1082,6 @@ "erc20:eth:FLX": "2.0.7", "erc20:eth:FND": "2.0.7", "erc20:eth:FRD": "2.0.7", - "erc20:eth:FTC": "2.0.7", "erc20:eth:FTR": "2.0.7", "erc20:eth:FTT": "2.0.7", "erc20:eth:FUEL": "2.0.7", @@ -1046,7 +1100,6 @@ "erc20:eth:GIM": "2.0.7", "erc20:eth:GMT": "2.0.7", "erc20:eth:GNO": "2.0.7", - "erc20:eth:GNT": "2.0.7", "erc20:eth:GOLDX": "2.0.7", "erc20:eth:GRID": "2.0.7", "erc20:eth:GROW": "2.0.7", @@ -1119,7 +1172,6 @@ "erc20:eth:LIF": "2.0.7", "erc20:eth:LIFE": "2.0.7", "erc20:eth:LIVE": "2.0.7", - "erc20:eth:LNC": "2.0.7", "erc20:eth:LND": "2.0.7", "erc20:eth:LOC": "2.0.7", "erc20:eth:LOCI": "2.0.7", @@ -1147,9 +1199,7 @@ "erc20:eth:MEST": "2.0.7", "erc20:eth:MFG": "2.0.7", "erc20:eth:MGO": "2.0.7", - "erc20:eth:MKR": "2.0.7", "erc20:eth:MKT": "2.0.7", - "erc20:eth:MLN": "2.0.7", "erc20:eth:MNE": "2.0.7", "erc20:eth:MNT": "2.0.7", "erc20:eth:MNTP": "2.0.7", @@ -1158,7 +1208,6 @@ "erc20:eth:MRP": "2.0.7", "erc20:eth:MRV": "2.0.7", "erc20:eth:MSP": "2.0.7", - "erc20:eth:MTC": "2.0.7", "erc20:eth:MTH": "2.0.7", "erc20:eth:MTL": "2.0.7", "erc20:eth:MTN": "2.0.7", @@ -1234,7 +1283,6 @@ "erc20:eth:PRS": "2.0.7", "erc20:eth:PRSP": "2.0.7", "erc20:eth:PT": "2.0.7", - "erc20:eth:PTC": "2.0.7", "erc20:eth:PTOY": "2.0.7", "erc20:eth:PTWO": "2.0.7", "erc20:eth:PUC": "2.0.7", @@ -1288,7 +1336,6 @@ "erc20:eth:SKO1": "2.0.7", "erc20:eth:SKR": "2.0.7", "erc20:eth:SLT": "2.0.7", - "erc20:eth:SMART": "2.0.7", "erc20:eth:SNC": "2.0.7", "erc20:eth:SND": "2.0.7", "erc20:eth:SNG": "2.0.7", @@ -1336,7 +1383,6 @@ "erc20:eth:TIX": "2.0.7", "erc20:eth:TKN": "2.0.7", "erc20:eth:TNT": "2.0.7", - "erc20:eth:TRC": "2.0.7", "erc20:eth:TRCN": "2.0.7", "erc20:eth:TRST": "2.0.7", "erc20:eth:TRX": "2.0.7", @@ -1397,13 +1443,11 @@ "erc20:eth:XNT": "2.0.7", "erc20:eth:XRL": "2.0.7", "erc20:eth:XSC": "2.0.7", - "erc20:eth:YEED": "2.0.7", "erc20:eth:YUPIE": "2.0.7", "erc20:eth:ZAP": "2.0.7", "erc20:eth:ZCS": "2.0.7", "erc20:eth:ZIL": "2.0.7", "erc20:eth:ZMN": "2.0.7", - "erc20:eth:ZRX": "2.0.7", "erc20:eth:ZST": "2.0.7", "erc20:eth:cV": "2.0.7", "erc20:eth:eBCH": "2.0.7", @@ -1466,39 +1510,111 @@ "coin:DCR": "not implemented on Trezor T", "coin:TDCR": "not implemented on Trezor T", "coin:TRC": "address_type collides with Bitcoin", - "erc20:etc:PLAY": "duplicate key", - "erc20:eth:ATH": "duplicate key", - "erc20:eth:ATH (AIgatha Token)": "duplicate key", - "erc20:eth:BLX (Bullion)": "duplicate key", - "erc20:eth:BLX (Iconomi)": "duplicate key", - "erc20:eth:BTL (Battle)": "duplicate key", - "erc20:eth:BTL (Bitlle)": "duplicate key", - "erc20:eth:CAR": "duplicate key", - "erc20:eth:CAR (CarBlock)": "duplicate key", - "erc20:eth:CAT (BitClave)": "duplicate key", - "erc20:eth:CAT (Blockcat)": "duplicate key", - "erc20:eth:CCC (CryptoCrashCourse)": "duplicate key", - "erc20:eth:CCC (ICONOMI)": "duplicate key", - "erc20:eth:DEPO": "duplicate key", - "erc20:eth:DEPO (Depository Network)": "duplicate key", - "erc20:eth:DROP": "duplicate key", - "erc20:eth:DROP (dropil)": "duplicate key", - "erc20:eth:GUP": "duplicate key", - "erc20:eth:KC": "duplicate key", - "erc20:eth:LINK (Chainlink)": "duplicate key", - "erc20:eth:LINK Platform": "duplicate key", - "erc20:eth:MIT": "duplicate key", - "erc20:eth:MIT (Mychatcoin)": "duplicate key", - "erc20:eth:NONE": "duplicate key", - "erc20:eth:NXX": "duplicate key", - "erc20:eth:NXX OLD": "duplicate key", - "erc20:eth:PLAY": "duplicate key", - "erc20:eth:RDN": "duplicate key", - "erc20:kov:GUP": "duplicate key", - "erc20:rin:KC": "duplicate key", - "erc20:rin:NONE": "duplicate key", - "erc20:rin:RDN": "duplicate key", - "erc20:rop:NONE": "duplicate key" + "erc20:etc:PLAY": "(AUTO) duplicate key", + "erc20:eth:ATH": "(AUTO) duplicate key", + "erc20:eth:ATH (AIgatha Token)": "(AUTO) duplicate key", + "erc20:eth:BTL (Battle)": "(AUTO) duplicate key", + "erc20:eth:BTL (Bitlle)": "(AUTO) duplicate key", + "erc20:eth:CAR": "(AUTO) duplicate key", + "erc20:eth:CAR (CarBlock)": "(AUTO) duplicate key", + "erc20:eth:CARD:0": "(AUTO) duplicate key", + "erc20:eth:CARD:1": "(AUTO) duplicate key", + "erc20:eth:CDX:0": "(AUTO) duplicate key", + "erc20:eth:CDX:1": "(AUTO) duplicate key", + "erc20:eth:COSS:0": "(AUTO) duplicate key", + "erc20:eth:COSS:1": "(AUTO) duplicate key", + "erc20:eth:DAI": "(AUTO) duplicate key", + "erc20:eth:DEPO": "(AUTO) duplicate key", + "erc20:eth:DEPO (Depository Network)": "(AUTO) duplicate key", + "erc20:eth:DGD": "(AUTO) duplicate key", + "erc20:eth:DOW:0": "(AUTO) duplicate key", + "erc20:eth:DOW:1": "(AUTO) duplicate key", + "erc20:eth:DROP": "(AUTO) duplicate key", + "erc20:eth:DROP (dropil)": "(AUTO) duplicate key", + "erc20:eth:DRP:0": "(AUTO) duplicate key", + "erc20:eth:DRP:1": "(AUTO) duplicate key", + "erc20:eth:DUBI:0": "(AUTO) duplicate key", + "erc20:eth:DUBI:1": "(AUTO) duplicate key", + "erc20:eth:EDU:0": "(AUTO) duplicate key", + "erc20:eth:EDU:1": "(AUTO) duplicate key", + "erc20:eth:FANX:0": "(AUTO) duplicate key", + "erc20:eth:FANX:1": "(AUTO) duplicate key", + "erc20:eth:FLMC:0": "(AUTO) duplicate key", + "erc20:eth:FLMC:1": "(AUTO) duplicate key", + "erc20:eth:FTC": "(AUTO) duplicate key", + "erc20:eth:FUCK:0": "(AUTO) duplicate key", + "erc20:eth:FUCK:1": "(AUTO) duplicate key", + "erc20:eth:GANA:0": "(AUTO) duplicate key", + "erc20:eth:GANA:1": "(AUTO) duplicate key", + "erc20:eth:GNT": "(AUTO) duplicate key", + "erc20:eth:GUP": "(AUTO) duplicate key", + "erc20:eth:HOT:0": "(AUTO) duplicate key", + "erc20:eth:HOT:1": "(AUTO) duplicate key", + "erc20:eth:JBX:0": "(AUTO) duplicate key", + "erc20:eth:JBX:1": "(AUTO) duplicate key", + "erc20:eth:KC": "(AUTO) duplicate key", + "erc20:eth:KEY:0": "(AUTO) duplicate key", + "erc20:eth:KEY:1": "(AUTO) duplicate key", + "erc20:eth:LEMO:0": "(AUTO) duplicate key", + "erc20:eth:LEMO:1": "(AUTO) duplicate key", + "erc20:eth:LEMO:2": "(AUTO) duplicate key", + "erc20:eth:LINK Platform": "(AUTO) duplicate key", + "erc20:eth:LNC": "(AUTO) duplicate key", + "erc20:eth:LNC (Linker Coin)": "(AUTO) duplicate key", + "erc20:eth:MIT": "(AUTO) duplicate key", + "erc20:eth:MIT (Mychatcoin)": "(AUTO) duplicate key", + "erc20:eth:MKR": "(AUTO) duplicate key", + "erc20:eth:MLN": "(AUTO) duplicate key", + "erc20:eth:MTC:0": "(AUTO) duplicate key", + "erc20:eth:MTC:1": "(AUTO) duplicate key", + "erc20:eth:NONE": "(AUTO) duplicate key", + "erc20:eth:NXX OLD": "(AUTO) duplicate key", + "erc20:eth:OHNI:0": "(AUTO) duplicate key", + "erc20:eth:OHNI:1": "(AUTO) duplicate key", + "erc20:eth:OPEN:0": "(AUTO) duplicate key", + "erc20:eth:OPEN:1": "(AUTO) duplicate key", + "erc20:eth:PLAY": "(AUTO) duplicate key", + "erc20:eth:PRPS:0": "(AUTO) duplicate key", + "erc20:eth:PRPS:1": "(AUTO) duplicate key", + "erc20:eth:PTC": "(AUTO) duplicate key", + "erc20:eth:RDN": "(AUTO) duplicate key", + "erc20:eth:REP:0": "(AUTO) duplicate key", + "erc20:eth:REP:1": "(AUTO) duplicate key", + "erc20:eth:SGT:0": "(AUTO) duplicate key", + "erc20:eth:SGT:1": "(AUTO) duplicate key", + "erc20:eth:SKRP:0": "(AUTO) duplicate key", + "erc20:eth:SKRP:1": "(AUTO) duplicate key", + "erc20:eth:SKRP:2": "(AUTO) duplicate key", + "erc20:eth:SMART": "(AUTO) duplicate key", + "erc20:eth:SMT:0": "(AUTO) duplicate key", + "erc20:eth:SMT:1": "(AUTO) duplicate key", + "erc20:eth:SMT:2": "(AUTO) duplicate key", + "erc20:eth:SS:0": "(AUTO) duplicate key", + "erc20:eth:SS:1": "(AUTO) duplicate key", + "erc20:eth:TRC": "(AUTO) duplicate key", + "erc20:eth:UMKA:0": "(AUTO) duplicate key", + "erc20:eth:UMKA:1": "(AUTO) duplicate key", + "erc20:eth:VIBEX:0": "(AUTO) duplicate key", + "erc20:eth:VIBEX:1": "(AUTO) duplicate key", + "erc20:eth:WHO:0": "(AUTO) duplicate key", + "erc20:eth:WHO:1": "(AUTO) duplicate key", + "erc20:eth:WOLK:0": "(AUTO) duplicate key", + "erc20:eth:WOLK:1": "(AUTO) duplicate key", + "erc20:eth:YEED:0": "(AUTO) duplicate key", + "erc20:eth:YEED:1": "(AUTO) duplicate key", + "erc20:eth:ZRX": "(AUTO) duplicate key", + "erc20:kov:DAI": "(AUTO) duplicate key", + "erc20:kov:DGD": "(AUTO) duplicate key", + "erc20:kov:GNT": "(AUTO) duplicate key", + "erc20:kov:GUP": "(AUTO) duplicate key", + "erc20:kov:MKR": "(AUTO) duplicate key", + "erc20:kov:MLN": "(AUTO) duplicate key", + "erc20:kov:REP": "(AUTO) duplicate key", + "erc20:kov:ZRX": "(AUTO) duplicate key", + "erc20:rin:KC": "(AUTO) duplicate key", + "erc20:rin:NONE": "(AUTO) duplicate key", + "erc20:rin:RDN": "(AUTO) duplicate key", + "erc20:rop:NONE": "(AUTO) duplicate key" } }, "webwallet": { diff --git a/tools/support.py b/tools/support.py index 0e90e96173..ddb6efc7a4 100755 --- a/tools/support.py +++ b/tools/support.py @@ -7,11 +7,11 @@ import coin_info import json SUPPORT_INFO = coin_info.get_support_data() -MISSING_MEANS_NO = ("connect", "webwallet") -VERSIONED_SUPPORT_INFO = ("trezor1", "trezor2") VERSION_RE = re.compile(r"\d+.\d+.\d+") +ERC20_DUPLICATE_KEY = "(AUTO) duplicate key" + def write_support_info(): with open(os.path.join(coin_info.DEFS_DIR, "support.json"), "w") as f: @@ -19,6 +19,33 @@ def write_support_info(): f.write("\n") +def support_dicts(device): + return SUPPORT_INFO[device]["supported"], SUPPORT_INFO[device]["unsupported"] + + +def all_support_dicts(): + for device in SUPPORT_INFO: + yield (device, *support_dicts(device)) + + +def clear_support(device, key): + supported, unsupported = support_dicts(device) + supported.pop(key, None) + unsupported.pop(key, None) + + +def set_supported(device, key, value): + clear_support(device, key) + supported, _ = support_dicts(device) + supported[key] = value + + +def set_unsupported(device, key, value): + clear_support(device, key) + _, unsupported = support_dicts(device) + unsupported[key] = value + + def print_support(coin): def support_value(where, key, missing_means_no=False): if "supported" in where and key in where["supported"]: @@ -42,13 +69,13 @@ def print_support(coin): key, name, shortcut = coin["key"], coin["name"], coin["shortcut"] print(f"{key} - {name} ({shortcut})") if coin.get("duplicate"): - if key.startswith("erc20:"): + if coin_info.is_token(coin): print(" * DUPLICATE SYMBOL (no support)") return else: print(" * DUPLICATE SYMBOL") for dev, where in SUPPORT_INFO.items(): - missing_means_no = dev in MISSING_MEANS_NO + missing_means_no = dev in coin_info.MISSING_SUPPORT_MEANS_NO print(" *", dev, ":", support_value(where, key, missing_means_no)) @@ -73,7 +100,7 @@ def check_support_values(): else: for key, value in supported.items(): try: - if device in VERSIONED_SUPPORT_INFO: + if device in coin_info.VERSIONED_SUPPORT_INFO: _check_value_version_soon(value) else: if value is not True: @@ -94,48 +121,113 @@ def check_support_values(): def find_unsupported_coins(coins_dict): result = {} - for device in VERSIONED_SUPPORT_INFO: - values = SUPPORT_INFO[device] - support_set = set() - support_set.update(values["supported"].keys()) - support_set.update(values["unsupported"].keys()) + for device in coin_info.VERSIONED_SUPPORT_INFO: + supported, unsupported = support_dicts(device) + support_set = set(supported.keys()) + support_set.update(unsupported.keys()) - result[device] = unsupported = [] + result[device] = [] for key, coin in coins_dict.items(): if coin.get("duplicate"): continue if key not in support_set: - unsupported.append(coin) + result[device].append(coin) return result def find_orphaned_support_keys(coins_dict): - result = {} - for device, values in SUPPORT_INFO.items(): - device_res = {} - for supkey, supvalues in values.items(): - orphans = set() - for coin_key in supvalues.keys(): - if coin_key not in coins_dict: - orphans.add(coin_key) - device_res[supkey] = orphans - result[device] = device_res + orphans = set() + for _, supported, unsupported in all_support_dicts(): + orphans.update(key for key in supported if key not in coins_dict) + orphans.update(key for key in unsupported if key not in coins_dict) + return orphans + + +def find_supported_duplicate_tokens(coins_dict): + result = [] + for _, supported, _ in all_support_dicts(): + for key in supported: + if not key.startswith("erc20:"): + continue + if coins_dict.get(key, {}).get("duplicate"): + result.append(key) return result +def process_erc20(coins_dict): + """Make sure that: + * orphaned ERC20 support info is cleared out + * duplicate ERC20 tokens are not listed as supported + * non-duplicate ERC20 tokens are cleared out from the unsupported list + """ + erc20_dict = { + key: coin.get("duplicate", False) + for key, coin in coins_dict.items() + if coin_info.is_token(coin) + } + for device, supported, unsupported in all_support_dicts(): + nondups = set() + dups = set(key for key, value in erc20_dict.items() if value) + for key in supported: + if key not in erc20_dict: + continue + if not erc20_dict[key]: + dups.discard(key) + + for key in unsupported: + if key not in erc20_dict: + continue + # ignore dups that are unsupported now + dups.discard(key) + + if not erc20_dict[key] and unsupported[key] == ERC20_DUPLICATE_KEY: + # remove duplicate status + nondups.add(key) + + for key in dups: + if device in coin_info.MISSING_SUPPORT_MEANS_NO: + clear_support(device, key) + else: + print(f"ERC20 on {device}: adding duplicate {key}") + set_unsupported(device, key, ERC20_DUPLICATE_KEY) + + for key in nondups: + print(f"ERC20 on {device}: clearing non-duplicate {key}") + clear_support(device, key) + + @click.group() def cli(): pass +@cli.command() +def fix(): + """Fix expected problems. + + Prunes orphaned keys and ensures that ERC20 duplicate info matches support info. + """ + all_coins = coin_info.get_all(deduplicate=False) + coin_info.mark_duplicate_shortcuts(all_coins.as_list()) + coins_dict = all_coins.as_dict() + + orphaned = find_orphaned_support_keys(coins_dict) + for orphan in orphaned: + print(f"pruning orphan {orphan}") + for device in SUPPORT_INFO: + clear_support(device, orphan) + + process_erc20(coins_dict) + write_support_info() + + @cli.command() # fmt: off -@click.option("-p", "--prune-orphans", is_flag=True, help="Remove orphaned keys for which there is no corresponding coin info") @click.option("-t", "--ignore-tokens", is_flag=True, help="Ignore unsupported ERC20 tokens") # fmt: on -def check(prune_orphans, ignore_tokens): +def check(ignore_tokens): """Check validity of support information. Ensures that `support.json` data is well formed, there are no keys without @@ -158,28 +250,25 @@ def check(prune_orphans, ignore_tokens): checks_ok = False orphaned = find_orphaned_support_keys(coins_dict) - for device, values in orphaned.items(): - for supkey, supvalues in values.items(): - for key in supvalues: - print(f"orphaned key {device} -> {supkey} -> {key}") - if prune_orphans: - del SUPPORT_INFO[device][supkey][key] - else: - checks_ok = False - - if prune_orphans: - write_support_info() + for orphan in orphaned: + print(f"orphaned key {orphan}") + checks_ok = False missing = find_unsupported_coins(coins_dict) for device, values in missing.items(): if ignore_tokens: - values = [coin for coin in values if not coin["key"].startswith("erc20:")] + values = [coin for coin in values if not coin_info.is_token(coin)] if values: checks_ok = False print(f"Device {device} has missing support infos:") for coin in values: print(f"{coin['key']} - {coin['name']}") + supported_dups = find_supported_duplicate_tokens(coins_dict) + for coin in supported_dups: + checks_ok = False + print(f"Token {coin['key']} ({coin['name']}) is duplicate but supported") + if not checks_ok: print("Some checks have failed") sys.exit(1) @@ -189,11 +278,12 @@ def check(prune_orphans, ignore_tokens): # fmt: off @click.argument("version") @click.option("--git-tag/--no-git-tag", "-g", default=False, help="create a corresponding Git tag") -@click.option("--soon/--no-soon", default=True, help="Release coins marked 'soon'") -@click.option("--missing/--no-missing", default=True, help="Release coins with missing support info") +@click.option("--release-soon/--no-release-soon", default=True, help="Release coins marked 'soon'") +@click.option("--release-missing/--no-release-missing", default=True, help="Release coins with missing support info") @click.option("-n", "--dry-run", is_flag=True, help="Do not write changes") +@click.option("-s", "--soon", is_flag=True, help="Only set missing support-infos to be released 'soon'.") # fmt: on -def release(version, git_tag, soon, missing, dry_run): +def release(version, git_tag, release_soon, release_missing, dry_run, soon): """Release a new Trezor firmware. Update support infos so that all coins have a clear support status. @@ -206,33 +296,43 @@ def release(version, git_tag, soon, missing, dry_run): version_tuple = list(map(int, version.split("."))) device = f"trezor{version_tuple[0]}" - print(f"Releasing {device} firmware version {version}") + if soon and git_tag: + raise click.ClickException("Cannot git-tag a 'soon' revision") + + if soon: + version = "soon" + print(f"Moving {device} missing infos to 'soon'") + else: + print(f"Releasing {device} firmware version {version}") defs = coin_info.get_all(deduplicate=False) coin_info.mark_duplicate_shortcuts(defs.as_list()) coins_dict = defs.as_dict() - if missing: + # process those darned ERC20 duplicates + + if release_missing: missing_list = find_unsupported_coins(coins_dict)[device] for coin in missing_list: key = coin["key"] - if coin.get("duplicate"): + if coin.get("duplicate") and coin_info.is_token(coin): print(f"UNsupporting duplicate coin {key} ({coin['name']})") - SUPPORT_INFO[device]["unsupported"][key] = "duplicate key" + set_unsupported(device, key, ERC20_DUPLICATE_KEY) else: print(f"Adding missing {key} ({coin['name']})") - SUPPORT_INFO[device]["supported"][key] = version + set_supported(device, key, version) - if soon: + if not soon and release_soon: + supported, _ = support_dicts(device) soon_list = [ coins_dict[key] - for key, val in SUPPORT_INFO[device]["supported"].items() + for key, val in supported if val == "soon" and key in coins_dict ] for coin in soon_list: key = coin["key"] print(f"Adding soon-released {key} ({coin['name']})") - SUPPORT_INFO[device]["supported"][key] = version + set_supported(device, key, version) if git_tag: print("git tag not supported yet") @@ -253,23 +353,9 @@ def show(keyword): defs = coin_info.get_all(deduplicate=False).as_list() coin_info.mark_duplicate_shortcuts(defs) - for coin in defs: - key = coin["key"].lower() - name = coin["name"].lower() - shortcut = coin["shortcut"].lower() - symsplit = shortcut.split(" ", maxsplit=1) - symbol = symsplit[0] - suffix = symsplit[1] if len(symsplit) > 1 else "" - for kw in keyword: - kwl = kw.lower() - if ( - kwl == key - or kwl in name - or kwl == shortcut - or kwl == symbol - or kwl in suffix - ): - print_support(coin) + for kw in keyword: + for coin in coin_info.search(defs, kw): + print_support(coin) @cli.command(name="set") @@ -304,7 +390,7 @@ def set_support_value(key, entries, reason): click.echo("Use 'support.py show' to search for the right one.") sys.exit(1) - if coins[key].get("duplicate"): + if coins[key].get("duplicate") and coin_info.is_token(coins[key]): shortcut = coins[key]["shortcut"] click.echo(f"Note: shortcut {shortcut} is a duplicate.") click.echo(f"Coin will NOT be listed regardless of support.json status.") @@ -319,26 +405,20 @@ def set_support_value(key, entries, reason): if device not in SUPPORT_INFO: raise click.ClickException(f"unknown device: {device}") - where = SUPPORT_INFO[device] - # clear existing info - where["supported"].pop(key, None) - where["unsupported"].pop(key, None) - if value in ("yes", "true", "1"): - where["supported"][key] = True + set_supported(device, key, True) elif value in ("no", "false", "0"): - if device in MISSING_MEANS_NO: + if device in coin_info.MISSING_SUPPORT_MEANS_NO: click.echo("Setting explicitly unsupported for {device}.") click.echo("Perhaps you meant removing support, i.e., '{device}=' ?") if not reason: reason = click.prompt(f"Enter reason for not supporting on {device}:") - where["unsupported"][key] = reason + set_unsupported(device, key, reason) elif value == "": - # do nothing, existing info is cleared - pass + clear_support(device, key) else: - # arbitrary string? - where["supported"][key] = value + # arbitrary string + set_supported(device, key, value) print_support(coins[key]) write_support_info()