Add support for Songbird (SGB)
This commit is contained in:
@@ -55,7 +55,8 @@ typedef enum chain_kind_e {
|
||||
CHAIN_KIND_THUNDERCORE,
|
||||
CHAIN_KIND_FLARE,
|
||||
CHAIN_KIND_THETA,
|
||||
CHAIN_KIND_BSC
|
||||
CHAIN_KIND_BSC,
|
||||
CHAIN_KIND_SONGBIRD
|
||||
} chain_kind_t;
|
||||
|
||||
typedef struct chain_config_s {
|
||||
|
||||
11
src/main.c
11
src/main.c
@@ -256,6 +256,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) {
|
||||
@@ -351,12 +354,16 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
|
||||
break;
|
||||
case CHAIN_KIND_FLARE:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_FLARE[i]);
|
||||
break case CHAIN_KIND_THETA : currentToken =
|
||||
(tokenDefinition_t *) PIC(&TOKENS_THETA[i]);
|
||||
break;
|
||||
case CHAIN_KIND_THETA:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_THETA[i]);
|
||||
break;
|
||||
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;
|
||||
|
||||
@@ -4568,4 +4568,6 @@ const tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD] = {};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -97,6 +97,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
|
||||
#define NUM_TOKENS_FLARE 0
|
||||
#define NUM_TOKENS_THETA 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];
|
||||
@@ -131,6 +132,7 @@ extern tokenDefinition_t const TOKENS_THUNDERCORE[NUM_TOKENS_THUNDERCORE];
|
||||
extern tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE];
|
||||
extern tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA];
|
||||
extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC];
|
||||
extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD];
|
||||
|
||||
#endif /* HAVE_TOKENS_LIST */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user