Merge branch 'TowoLabs-master' into bigger_chainid

This commit is contained in:
pscott
2021-09-03 15:02:30 +02:00
8 changed files with 18 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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

View File

@@ -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 */