Add Shyft support
This commit is contained in:
committed by
Lucas PASCAL
parent
24f4ecd671
commit
c8bf437424
@@ -57,7 +57,8 @@ typedef enum chain_kind_e {
|
||||
CHAIN_KIND_FLARE,
|
||||
CHAIN_KIND_BSC,
|
||||
CHAIN_KIND_SONGBIRD,
|
||||
CHAIN_KIND_POLYGON
|
||||
CHAIN_KIND_POLYGON,
|
||||
CHAIN_KIND_SHYFT
|
||||
} chain_kind_t;
|
||||
|
||||
typedef struct chain_config_s {
|
||||
|
||||
@@ -266,6 +266,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
|
||||
case CHAIN_KIND_POLYGON:
|
||||
numTokens = NUM_TOKENS_POLYGON;
|
||||
break;
|
||||
case CHAIN_KIND_SHYFT:
|
||||
numTokens = NUM_TOKENS_SHYFT;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < numTokens; i++) {
|
||||
switch (chainConfig->kind) {
|
||||
@@ -374,6 +377,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
|
||||
case CHAIN_KIND_POLYGON:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_POLYGON[i]);
|
||||
break;
|
||||
case CHAIN_KIND_SHYFT:
|
||||
currentToken = (tokenDefinition_t *) PIC(&TOKENS_SHYFT[i]);
|
||||
break;
|
||||
}
|
||||
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
|
||||
return currentToken;
|
||||
|
||||
@@ -192,4 +192,6 @@ const tokenDefinition_t const TOKENS_MOONRIVER[NUM_TOKENS_MOONRIVER] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON] = {};
|
||||
|
||||
const tokenDefinition_t const TOKENS_SHYFT[NUM_TOKENS_SHYFT] = {};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -101,6 +101,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
|
||||
#define NUM_TOKENS_SONGBIRD 0
|
||||
#define NUM_TOKENS_MOONRIVER 0
|
||||
#define NUM_TOKENS_POLYGON 0
|
||||
#define NUM_TOKENS_SHYFT 0
|
||||
|
||||
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
|
||||
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
|
||||
@@ -137,6 +138,7 @@ extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC];
|
||||
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];
|
||||
|
||||
#endif /* HAVE_TOKENS_LIST */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user