update plugin sdk

This commit is contained in:
pscott
2021-07-27 12:11:56 +02:00
11 changed files with 56 additions and 18 deletions

View File

@@ -54,7 +54,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_WEBCHAIN,
CHAIN_KIND_THUNDERCORE,
CHAIN_KIND_FLARE,
CHAIN_KIND_THETA
CHAIN_KIND_THETA,
CHAIN_KIND_BSC
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -254,6 +254,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_THETA:
numTokens = NUM_TOKENS_THETA;
break;
case CHAIN_KIND_BSC:
numTokens = NUM_TOKENS_BSC;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
@@ -352,6 +355,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
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;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;

View File

@@ -4566,4 +4566,6 @@ const tokenDefinition_t const TOKENS_FLARE[NUM_TOKENS_FLARE] = {};
const tokenDefinition_t const TOKENS_THETA[NUM_TOKENS_THETA] = {};
const tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC] = {};
#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_THETA 0
#define NUM_TOKENS_BSC 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_THETA[NUM_TOKENS_THETA];
extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC];
#endif /* HAVE_TOKENS_LIST */