Multiple ETH PRs (#289)

* adding Conflux espace

* adding Moonbeam

* kardiachain and bttc

* adding Wethio
This commit is contained in:
tjulien-ledger
2022-04-13 15:37:30 +02:00
committed by GitHub
parent 87fa920326
commit 6b24a045ce
19 changed files with 71 additions and 1 deletions

BIN
icons/nanos_app_bttc.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

BIN
icons/nanos_app_wethio.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
icons/nanox_app_bttc.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 B

BIN
icons/nanox_app_wethio.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"BTTC\" CHAINID_COINNAME=\"BTT\" CHAIN_KIND=CHAIN_KIND_BTTC CHAIN_ID=199
APPNAME = "BTTC"

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"CONFLUX\" CHAINID_COINNAME=\"CFX\" CHAIN_KIND=CHAIN_KIND_CONFLUX_ESPACE CHAIN_ID=1030
APPNAME = "Conflux eSpace"

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"KARDIACHAIN\" CHAINID_COINNAME=\"KAI\" CHAIN_KIND=CHAIN_KIND_KARDIACHAIN CHAIN_ID=24
APPNAME = "KardiaChain"

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/60'" --path "44'/1284'"
DEFINES += CHAINID_UPCASE=\"MOONBEAM\" CHAINID_COINNAME=\"GLMR\" CHAIN_KIND=CHAIN_KIND_MOONBEAM CHAIN_ID=1284
APPNAME = "Moonbeam"

View File

@@ -0,0 +1,3 @@
APP_LOAD_PARAMS += --path "44'/77777'"
DEFINES += CHAINID_UPCASE=\"WETHIO\" CHAINID_COINNAME=\"ZYN\" CHAIN_KIND=CHAIN_KIND_WETHIO CHAIN_ID=78
APPNAME = "Wethio"

View File

@@ -58,7 +58,12 @@ typedef enum chain_kind_e {
CHAIN_KIND_BSC,
CHAIN_KIND_SONGBIRD,
CHAIN_KIND_POLYGON,
CHAIN_KIND_SHYFT
CHAIN_KIND_SHYFT,
CHAIN_KIND_CONFLUX_ESPACE,
CHAIN_KIND_MOONBEAM,
CHAIN_KIND_BTTC,
CHAIN_KIND_KARDIACHAIN,
CHAIN_KIND_WETHIO
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -269,6 +269,21 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_SHYFT:
numTokens = NUM_TOKENS_SHYFT;
break;
case CHAIN_KIND_CONFLUX_ESPACE:
numTokens = NUM_TOKENS_CONFLUX_ESPACE;
break;
case CHAIN_KIND_MOONBEAM:
numTokens = NUM_TOKENS_MOONBEAM;
break;
case CHAIN_KIND_KARDIACHAIN:
numTokens = NUM_TOKENS_KARDIACHAIN;
break;
case CHAIN_KIND_BTTC:
numTokens = NUM_TOKENS_BTTC;
break;
case CHAIN_KIND_WETHIO:
numTokens = NUM_TOKENS_WETHIO;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
@@ -380,6 +395,21 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_SHYFT:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_SHYFT[i]);
break;
case CHAIN_KIND_CONFLUX_ESPACE:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_CONFLUX_ESPACE[i]);
break;
case CHAIN_KIND_MOONBEAM:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_MOONBEAM[i]);
break;
case CHAIN_KIND_BTTC:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_BTTC[i]);
break;
case CHAIN_KIND_KARDIACHAIN:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_KARDIACHAIN[i]);
break;
case CHAIN_KIND_WETHIO:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_WETHIO[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;

View File

@@ -194,4 +194,14 @@ const tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON] = {};
const tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT] = {};
const tokenDefinition_t const TOKENS_CONFLUX_ESPACE[NUM_TOKENS_CONFLUX_ESPACE] = {};
const tokenDefinition_t const TOKENS_MOONBEAM[NUM_TOKENS_MOONBEAM] = {};
const tokenDefinition_t const TOKENS_BTTC[NUM_TOKENS_BTTC] = {};
const tokenDefinition_t const TOKENS_KARDIACHAIN[NUM_TOKENS_KARDIACHAIN] = {};
const tokenDefinition_t const TOKENS_WETHIO[NUM_TOKENS_WETHIO] = {};
#endif

View File

@@ -101,6 +101,11 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
#define NUM_TOKENS_MOONRIVER 0
#define NUM_TOKENS_POLYGON 0
#define NUM_TOKENS_SHYFT 0
#define NUM_TOKENS_CONFLUX_ESPACE 0
#define NUM_TOKENS_MOONBEAM 0
#define NUM_TOKENS_BTTC 0
#define NUM_TOKENS_KARDIACHAIN 0
#define NUM_TOKENS_WETHIO 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -138,6 +143,11 @@ extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD];
extern tokenDefinition_t const TOKENS_MOONRIVER[NUM_TOKENS_MOONRIVER];
extern tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON];
extern tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT];
extern tokenDefinition_t const TOKENS_CONFLUX_ESPACE[NUM_TOKENS_CONFLUX_ESPACE];
extern tokenDefinition_t const TOKENS_MOONBEAM[NUM_TOKENS_MOONBEAM];
extern tokenDefinition_t const TOKENS_BTTC[NUM_TOKENS_BTTC];
extern tokenDefinition_t const TOKENS_KARDIACHAIN[NUM_TOKENS_KARDIACHAIN];
extern tokenDefinition_t const TOKENS_WETHIO[NUM_TOKENS_WETHIO];
#endif /* HAVE_TOKENS_LIST */