diff --git a/Makefile b/Makefile index 258a4f7..b98bd83 100755 --- a/Makefile +++ b/Makefile @@ -188,9 +188,17 @@ else ifeq ($(CHAIN),thundercore) APP_LOAD_PARAMS += --path "44'/1001'" DEFINES += CHAINID_UPCASE=\"THUNDERCORE\" CHAINID_COINNAME=\"TT\" CHAIN_KIND=CHAIN_KIND_THUNDERCORE CHAIN_ID=108 APPNAME = "ThunderCore" +else ifeq ($(CHAIN),flare) +APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'" +DEFINES += CHAINID_UPCASE=\"FLARE\" CHAINID_COINNAME=\"FLR\" CHAIN_KIND=CHAIN_KIND_FLARE CHAIN_ID=14 +APPNAME = "Flare" +else ifeq ($(CHAIN),flare_coston) +APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'" +DEFINES += CHAINID_UPCASE=\"FLARE\" CHAINID_COINNAME=\"FLR\" CHAIN_KIND=CHAIN_KIND_FLARE CHAIN_ID=16 +APPNAME = "Flare Coston" else ifeq ($(filter clean,$(MAKECMDGOALS)),) -$(error Unsupported CHAIN - use ethereum, ropsten, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore) +$(error Unsupported CHAIN - use ethereum, ropsten, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore, flare, flare_coston) endif endif @@ -326,4 +334,4 @@ include $(BOLOS_SDK)/Makefile.rules dep/%.d: %.c Makefile listvariants: - @echo VARIANTS CHAIN ethereum ropsten ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore + @echo VARIANTS CHAIN ethereum ropsten ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore flare flare_coston diff --git a/icons/flare.png b/icons/flare.png new file mode 100644 index 0000000..57d5519 Binary files /dev/null and b/icons/flare.png differ diff --git a/icons/nanos_app_flare.gif b/icons/nanos_app_flare.gif new file mode 100644 index 0000000..e90dc8a Binary files /dev/null and b/icons/nanos_app_flare.gif differ diff --git a/icons/nanox_app_flare.gif b/icons/nanox_app_flare.gif new file mode 100644 index 0000000..3a617f8 Binary files /dev/null and b/icons/nanox_app_flare.gif differ diff --git a/src/chainConfig.h b/src/chainConfig.h index 2172b0b..27b4845 100644 --- a/src/chainConfig.h +++ b/src/chainConfig.h @@ -52,7 +52,8 @@ typedef enum chain_kind_e { CHAIN_KIND_ARTIS_SIGMA1, CHAIN_KIND_ARTIS_TAU1, CHAIN_KIND_WEBCHAIN, - CHAIN_KIND_THUNDERCORE + CHAIN_KIND_THUNDERCORE, + CHAIN_KIND_FLARE } chain_kind_t; typedef struct chain_config_s { diff --git a/src/main.c b/src/main.c index ee18750..0151db3 100644 --- a/src/main.c +++ b/src/main.c @@ -262,6 +262,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { case CHAIN_KIND_THUNDERCORE: numTokens = NUM_TOKENS_THUNDERCORE; break; + case CHAIN_KIND_FLARE: + numTokens = NUM_TOKENS_FLARE; + break; } for (i = 0; i < numTokens; i++) { switch (chainConfig->kind) { @@ -354,6 +357,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { break; case CHAIN_KIND_THUNDERCORE: currentToken = (tokenDefinition_t *) PIC(&TOKENS_THUNDERCORE[i]); + break; + case CHAIN_KIND_FLARE: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_FLARE[i]); break } if (memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) { diff --git a/src/tokens.c b/src/tokens.c index 9c019f7..c1a5b49 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -4562,4 +4562,6 @@ const tokenDefinition_t const TOKENS_WEBCHAIN[NUM_TOKENS_WEBCHAIN] = {}; const tokenDefinition_t const TOKENS_THUNDERCORE[NUM_TOKENS_THUNDERCORE] = {}; +const tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE] = {}; + #endif diff --git a/src/tokens.h b/src/tokens.h index 06a6677..31ea004 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -71,6 +71,7 @@ extern tokenDefinition_t const TOKENS_EXTRA[NUM_TOKENS_EXTRA]; #define NUM_TOKENS_ARTIS_TAU1 0 #define NUM_TOKENS_WEBCHAIN 0 #define NUM_TOKENS_THUNDERCORE 0 +#define NUM_TOKENS_FLARE 0 extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA]; extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM]; @@ -102,6 +103,7 @@ extern tokenDefinition_t const TOKENS_ARTIS_SIGMA1[NUM_TOKENS_ARTIS_SIGMA1]; extern tokenDefinition_t const TOKENS_ARTIS_TAU1[NUM_TOKENS_ARTIS_TAU1]; extern tokenDefinition_t const TOKENS_WEBCHAIN[NUM_TOKENS_WEBCHAIN]; extern tokenDefinition_t const TOKENS_THUNDERCORE[NUM_TOKENS_THUNDERCORE]; +extern tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE]; #endif /* HAVE_TOKENS_LIST */