Skip to content

Commit 5fc60d3

Browse files
committed
add Conflux eSpace (chain ID 1030)
1 parent 170f3ee commit 5fc60d3

File tree

7 files changed

+16
-1
lines changed

7 files changed

+16
-1
lines changed

icons/nanos_app_conflux_espace.gif

1.11 KB
Loading

icons/nanox_app_conflux_espace.gif

1.1 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_LOAD_PARAMS += --path "44'/60'"
2+
DEFINES += CHAINID_UPCASE=\"CONFLUX\" CHAINID_COINNAME=\"CFX\" CHAIN_KIND=CHAIN_KIND_CONFLUX_ESPACE CHAIN_ID=1030
3+
APPNAME = "Conflux eSpace"

src/chainConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ typedef enum chain_kind_e {
5858
CHAIN_KIND_BSC,
5959
CHAIN_KIND_SONGBIRD,
6060
CHAIN_KIND_POLYGON,
61-
CHAIN_KIND_SHYFT
61+
CHAIN_KIND_SHYFT,
62+
CHAIN_KIND_CONFLUX_ESPACE,
6263
} chain_kind_t;
6364

6465
typedef struct chain_config_s {

src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
269269
case CHAIN_KIND_SHYFT:
270270
numTokens = NUM_TOKENS_SHYFT;
271271
break;
272+
case CHAIN_KIND_CONFLUX_ESPACE:
273+
numTokens = NUM_TOKENS_CONFLUX_ESPACE;
274+
break;
272275
}
273276
for (i = 0; i < numTokens; i++) {
274277
switch (chainConfig->kind) {
@@ -380,6 +383,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
380383
case CHAIN_KIND_SHYFT:
381384
currentToken = (tokenDefinition_t *) PIC(&TOKENS_SHYFT[i]);
382385
break;
386+
case CHAIN_KIND_CONFLUX_ESPACE:
387+
currentToken = (tokenDefinition_t *) PIC(&TOKENS_CONFLUX_ESPACE[i]);
388+
break;
383389
}
384390
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
385391
return currentToken;

src/tokens.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,6 @@ const tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON] = {};
194194

195195
const tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT] = {};
196196

197+
const tokenDefinition_t const TOKENS_CONFLUX_ESPACE[NUM_TOKENS_CONFLUX_ESPACE] = {};
198+
197199
#endif

src/tokens.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
101101
#define NUM_TOKENS_MOONRIVER 0
102102
#define NUM_TOKENS_POLYGON 0
103103
#define NUM_TOKENS_SHYFT 0
104+
#define NUM_TOKENS_CONFLUX_ESPACE 0
105+
104106

105107
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
106108
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -138,6 +140,7 @@ extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD];
138140
extern tokenDefinition_t const TOKENS_MOONRIVER[NUM_TOKENS_MOONRIVER];
139141
extern tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON];
140142
extern tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT];
143+
extern tokenDefinition_t const TOKENS_CONFLUX_ESPACE[NUM_TOKENS_CONFLUX_ESPACE];
141144

142145
#endif /* HAVE_TOKENS_LIST */
143146

0 commit comments

Comments
 (0)