adding astar&shiden
This commit is contained in:
BIN
icons/nanos_app_astar.gif
Normal file
BIN
icons/nanos_app_astar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 B |
BIN
icons/nanos_app_shiden.gif
Normal file
BIN
icons/nanos_app_shiden.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 B |
BIN
icons/nanox_app_astar.gif
Normal file
BIN
icons/nanox_app_astar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 B |
BIN
icons/nanox_app_shiden.gif
Normal file
BIN
icons/nanox_app_shiden.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 B |
3
makefile_conf/chain/astar.mk
Normal file
3
makefile_conf/chain/astar.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
APP_LOAD_PARAMS += --path "44'/810'" --path "44'/60'"
|
||||
DEFINES += CHAINID_UPCASE=\"ASTAR\" CHAINID_COINNAME=\"ASTR\" CHAIN_KIND=CHAIN_KIND_ASTAR CHAIN_ID=592
|
||||
APPNAME = "Astar EVM"
|
||||
3
makefile_conf/chain/shiden.mk
Normal file
3
makefile_conf/chain/shiden.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
APP_LOAD_PARAMS += --path "44'/809'" --path "44'/60'"
|
||||
DEFINES += CHAINID_UPCASE=\"SHIDEN\" CHAINID_COINNAME=\"SDN\" CHAIN_KIND=CHAIN_KIND_SHIDEN CHAIN_ID=336
|
||||
APPNAME = "Shiden EVM"
|
||||
@@ -65,7 +65,9 @@ typedef enum chain_kind_e {
|
||||
CHAIN_KIND_KARDIACHAIN,
|
||||
CHAIN_KIND_WETHIO,
|
||||
CHAIN_KIND_OKC,
|
||||
CHAIN_KIND_CUBE
|
||||
CHAIN_KIND_CUBE,
|
||||
CHAIN_KIND_SHIDEN,
|
||||
CHAIN_KIND_ASTAR
|
||||
} chain_kind_t;
|
||||
|
||||
typedef struct chain_config_s {
|
||||
|
||||
12
src/main.c
12
src/main.c
@@ -290,6 +290,12 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
|
||||
case CHAIN_KIND_CUBE:
|
||||
numTokens = NUM_TOKENS_CUBE;
|
||||
break;
|
||||
case CHAIN_KIND_SHIDEN:
|
||||
numTokens = NUM_TOKENS_SHIDEN;
|
||||
break;
|
||||
case CHAIN_KIND_ASTAR:
|
||||
numTokens = NUM_TOKENS_ASTAR;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < numTokens; i++) {
|
||||
switch (chainConfig->kind) {
|
||||
@@ -422,6 +428,12 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
|
||||
case CHAIN_KIND_CUBE:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_CUBE[i]);
|
||||
break;
|
||||
case CHAIN_KIND_SHIDEN:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_SHIDEN[i]);
|
||||
break;
|
||||
case CHAIN_KIND_ASTAR:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_ASTAR[i]);
|
||||
break;
|
||||
}
|
||||
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
|
||||
return currentToken;
|
||||
|
||||
@@ -208,4 +208,8 @@ const tokenDefinition_t const TOKENS_OKC[NUM_TOKENS_OKC] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_CUBE[NUM_TOKENS_CUBE] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_ASTAR[NUM_TOKENS_ASTAR] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_SHIDEN[NUM_TOKENS_SHIDEN] = {};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,8 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
|
||||
#define NUM_TOKENS_WETHIO 0
|
||||
#define NUM_TOKENS_OKC 0
|
||||
#define NUM_TOKENS_CUBE 0
|
||||
#define NUM_TOKENS_ASTAR 0
|
||||
#define NUM_TOKENS_SHIDEN 0
|
||||
|
||||
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
|
||||
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
|
||||
@@ -151,6 +153,8 @@ 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];
|
||||
extern tokenDefinition_t const TOKENS_CUBE[NUM_TOKENS_CUBE];
|
||||
extern tokenDefinition_t const TOKENS_ASTAR[NUM_TOKENS_ASTAR];
|
||||
extern tokenDefinition_t const TOKENS_SHIDEN[NUM_TOKENS_SHIDEN];
|
||||
|
||||
#endif /* HAVE_TOKENS_LIST */
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ const network_info_t NETWORK_MAPPING[] = {
|
||||
{.chain_id = 44787, .name = "Celo Alfajores", .ticker = "aCELO "},
|
||||
{.chain_id = 62320, .name = "Celo Baklava", .ticker = "bCELO "},
|
||||
{.chain_id = 11297108109, .name = "Palm Network", .ticker = "PALM "},
|
||||
{.chain_id = 1818, .name = "Cube", .ticker = "CUBE "}};
|
||||
{.chain_id = 1818, .name = "Cube", .ticker = "CUBE "},
|
||||
{.chain_id = 336, .name = "Shiden", .ticker = "SDN "},
|
||||
{.chain_id = 592, .name = "Astar", .ticker = "ASTR "}};
|
||||
|
||||
uint64_t get_chain_id(void) {
|
||||
uint64_t chain_id = 0;
|
||||
|
||||
Reference in New Issue
Block a user