Add support for Flare Network (FLR) (#148)
Signed-off-by: RareData <44319370+RareData@users.noreply.github.com>
This commit is contained in:
12
Makefile
12
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
|
||||
|
||||
BIN
icons/flare.png
Normal file
BIN
icons/flare.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
icons/nanos_app_flare.gif
Normal file
BIN
icons/nanos_app_flare.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 B |
BIN
icons/nanox_app_flare.gif
Normal file
BIN
icons/nanox_app_flare.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 B |
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user