diff --git a/Makefile b/Makefile index 06ed804..3aeeb14 100755 --- a/Makefile +++ b/Makefile @@ -207,9 +207,13 @@ else ifeq ($(CHAIN),bsc) APP_LOAD_PARAMS += --path "44'/60'" DEFINES += CHAINID_UPCASE=\"BSC\" CHAINID_COINNAME=\"BNB\" CHAIN_KIND=CHAIN_KIND_BSC CHAIN_ID=56 APPNAME = "Binance Smart Chain" +else ifeq ($(CHAIN),songbird) +APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'" +DEFINES += CHAINID_UPCASE=\"SONGBIRD\" CHAINID_COINNAME=\"SGB\" CHAIN_KIND=CHAIN_KIND_SONGBIRD CHAIN_ID=19 +APPNAME = "Songbird" 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, bsc, songbird) endif endif @@ -380,4 +384,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 bsc + @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 bsc songbird diff --git a/icons/nanos_app_songbird.gif b/icons/nanos_app_songbird.gif new file mode 100644 index 0000000..302030b Binary files /dev/null and b/icons/nanos_app_songbird.gif differ diff --git a/icons/nanox_app_songbird.gif b/icons/nanox_app_songbird.gif new file mode 100644 index 0000000..1361a68 Binary files /dev/null and b/icons/nanox_app_songbird.gif differ diff --git a/icons/songbird.png b/icons/songbird.png new file mode 100644 index 0000000..0fd35ec Binary files /dev/null and b/icons/songbird.png differ diff --git a/src/chainConfig.h b/src/chainConfig.h index b99b365..83d7157 100644 --- a/src/chainConfig.h +++ b/src/chainConfig.h @@ -54,7 +54,8 @@ typedef enum chain_kind_e { CHAIN_KIND_WEBCHAIN, CHAIN_KIND_THUNDERCORE, CHAIN_KIND_FLARE, - CHAIN_KIND_BSC + CHAIN_KIND_BSC, + CHAIN_KIND_SONGBIRD } chain_kind_t; typedef struct chain_config_s { diff --git a/src/main.c b/src/main.c index 41237d7..3820fd6 100644 --- a/src/main.c +++ b/src/main.c @@ -253,6 +253,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { case CHAIN_KIND_BSC: numTokens = NUM_TOKENS_BSC; break; + case CHAIN_KIND_SONGBIRD: + numTokens = NUM_TOKENS_SONGBIRD; + break; } for (i = 0; i < numTokens; i++) { switch (chainConfig->kind) { @@ -352,6 +355,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) { case CHAIN_KIND_BSC: currentToken = (tokenDefinition_t *) PIC(&TOKENS_BSC[i]); break; + case CHAIN_KIND_SONGBIRD: + currentToken = (tokenDefinition_t *) PIC(&TOKENS_SONGBIRD[i]); + break; } if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) { return currentToken; diff --git a/src/tokens.c b/src/tokens.c index 3142bed..ce7a92d 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -4562,4 +4562,6 @@ const tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE] = {}; const tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC] = {}; +const tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD] = {}; + #endif diff --git a/src/tokens.h b/src/tokens.h index 7b34b20..f57cbb0 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -96,6 +96,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = { #define NUM_TOKENS_THUNDERCORE 0 #define NUM_TOKENS_FLARE 0 #define NUM_TOKENS_BSC 0 +#define NUM_TOKENS_SONGBIRD 0 extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA]; extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM]; @@ -129,6 +130,7 @@ 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]; extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC]; +extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD]; #endif /* HAVE_TOKENS_LIST */