From 70492fc781df55d93c4ea100c5b6bb1ee74d076b Mon Sep 17 00:00:00 2001 From: Michael Ira Krufky Date: Thu, 23 Aug 2018 11:06:12 -0400 Subject: [PATCH] Add support for AtheiosChain (ATH) EIP-155 is now properly working with Atheios!! Tested personally on the Ledger Nano S homepage : https://atheios.com block explorer : http://explorer.atheios.com | https://scan.atheios.com network statistics : http://stats.atheios.com slip0044 index : 1620 chainId : 1620 --- Makefile | 4 ++++ blue_app_atheios.gif | Bin 0 -> 405 bytes glyphs/blue_badge_atheios.gif | Bin 0 -> 347 bytes glyphs/nanos_badge_atheios.gif | Bin 0 -> 56 bytes nanos_app_atheios.gif | Bin 0 -> 68 bytes src_genericwallet/chainConfig.h | 3 ++- src_genericwallet/main.c | 6 ++++++ src_genericwallet/tokens.c | 2 ++ src_genericwallet/tokens.h | 2 ++ 9 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 blue_app_atheios.gif create mode 100644 glyphs/blue_badge_atheios.gif create mode 100644 glyphs/nanos_badge_atheios.gif create mode 100644 nanos_app_atheios.gif diff --git a/Makefile b/Makefile index a7805a0..e878102 100755 --- a/Makefile +++ b/Makefile @@ -106,6 +106,10 @@ else ifeq ($(CHAIN),ethergem) APP_LOAD_PARAMS += --path "44'/1987'" DEFINES += CHAINID_UPCASE=\"ETHERGEM\" CHAINID_COINNAME=\"EGEM\" CHAIN_KIND=CHAIN_KIND_ETHERGEM CHAIN_ID=1987 APPNAME = "EtherGem" +else ifeq ($(CHAIN),atheios) +APP_LOAD_PARAMS += --path "44'/1620'" +DEFINES += CHAINID_UPCASE=\"ATHEIOS\" CHAINID_COINNAME=\"ATH\" CHAIN_KIND=CHAIN_KIND_ATHEIOS CHAIN_ID=1620 +APPNAME = "Atheios" else ifeq ($(filter clean,$(MAKECMDGOALS)),) $(error Unsupported CHAIN - use ethereum, ethereum_classic, expanse, poa, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, callisto, ethersocial, ellaism, pirl, akroma, ether1, ethergem) diff --git a/blue_app_atheios.gif b/blue_app_atheios.gif new file mode 100644 index 0000000000000000000000000000000000000000..c3d5c4e1dc70b9a674bb9e74c88711501e93b7e2 GIT binary patch literal 405 zcmV;G0c!q7Nk%w1VKM+R0J8u9^ZELJ+~uw4?$hz~=l1sw!_t@G={?NZ0Kd;}+2c~t z-7v}50Km}s`T76<{{X$uEC2ui05SkF000F4u*pdq5kakjp8p_-6pIoFM5V3`U>spA z&)#7G>}nKr?|TJ9ZZd%Vj=jSmH{c16oa1f**9fP_ zzyzX%BcuK)qLzcE3h0?N}2 z36~4CMIQ>-vH{;73b7ALZqpvLhr|T}mD21$&JNKC0rv~_AqtHE+;foNQx{a6R$Up< z#TcbzYWj6y)aVhE5@UFI5@Vu|r9lcxKhf)g!rze;7EOZq(nckXGNoLCSTkXrOb=xy zr1Zy8muB=;w2_yx zH_%rkB;Xfv=2hgiQ3%11xI=P?p@PF{M)Igo=Ltk22%;p$gqnHN5$Jj;6I(m`ieZaF zi8{*1!H5bv#__9w!=@@hE7h|4eB9+eyhIT>_Cr6{}d=wluJ#9R0zBjq{0eKK!x@aF0`n{N~eP?Pc()( tqJ`2!I)>^s6f$y4$$5=TN;G7`#*0S!z$C*}gQ7s394XFB7ZXVV06SD}p<)04 literal 0 HcmV?d00001 diff --git a/glyphs/nanos_badge_atheios.gif b/glyphs/nanos_badge_atheios.gif new file mode 100644 index 0000000000000000000000000000000000000000..e7447fadc773b056f77006229f600305f26d3015 GIT binary patch literal 56 zcmZ?wbh9u|j>wsvG2m_ONPyb48Ugj>wsvG2m_OHPyfo(>=!On8=jF|*?RTC(#nO#bt>vp TA8uW>rbBH8XW!jg5e91jx8xWi literal 0 HcmV?d00001 diff --git a/src_genericwallet/chainConfig.h b/src_genericwallet/chainConfig.h index f0c717b..79c1636 100644 --- a/src_genericwallet/chainConfig.h +++ b/src_genericwallet/chainConfig.h @@ -20,7 +20,8 @@ typedef enum chain_kind_e { CHAIN_KIND_ETHERSOCIAL, CHAIN_KIND_ELLAISM, CHAIN_KIND_ETHER1, - CHAIN_KIND_ETHERGEM + CHAIN_KIND_ETHERGEM, + CHAIN_KIND_ATHEIOS } chain_kind_t; typedef struct chain_config_s { diff --git a/src_genericwallet/main.c b/src_genericwallet/main.c index cbf82ac..132903a 100644 --- a/src_genericwallet/main.c +++ b/src_genericwallet/main.c @@ -1558,6 +1558,9 @@ tokenDefinition_t* getKnownToken() { case CHAIN_KIND_ETHERGEM: numTokens = NUM_TOKENS_ETHERGEM; break; + case CHAIN_KIND_ATHEIOS: + numTokens = NUM_TOKENS_ATHEIOS; + break; } for (i=0; ikind) { @@ -1609,6 +1612,9 @@ tokenDefinition_t* getKnownToken() { case CHAIN_KIND_ETHERGEM: currentToken = PIC(&TOKENS_ETHERGEM[i]); break; + case CHAIN_KIND_ATHEIOS: + currentToken = PIC(&TOKENS_ATHEIOS[i]); + break; } if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) { return currentToken; diff --git a/src_genericwallet/tokens.c b/src_genericwallet/tokens.c index bc838c0..c9a898a 100644 --- a/src_genericwallet/tokens.c +++ b/src_genericwallet/tokens.c @@ -735,3 +735,5 @@ const tokenDefinition_t const TOKENS_MUSICOIN[NUM_TOKENS_MUSICOIN] = {}; const tokenDefinition_t const TOKENS_CALLISTO[NUM_TOKENS_CALLISTO] = {}; const tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM] = {}; + +const tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS] = {}; diff --git a/src_genericwallet/tokens.h b/src_genericwallet/tokens.h index 9f59dbc..6ab3082 100644 --- a/src_genericwallet/tokens.h +++ b/src_genericwallet/tokens.h @@ -39,6 +39,7 @@ typedef struct tokenDefinition_t { #define NUM_TOKENS_MUSICOIN 0 #define NUM_TOKENS_CALLISTO 0 #define NUM_TOKENS_ETHERGEM 0 +#define NUM_TOKENS_ATHEIOS 0 extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA]; extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM]; @@ -56,3 +57,4 @@ extern tokenDefinition_t const TOKENS_KUSD[NUM_TOKENS_KUSD]; extern tokenDefinition_t const TOKENS_MUSICOIN[NUM_TOKENS_MUSICOIN]; extern tokenDefinition_t const TOKENS_CALLISTO[NUM_TOKENS_CALLISTO]; extern tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM]; +extern tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS];