Merge branch 'master' into externalize-erc20

This commit is contained in:
Nicolas Bacca
2019-03-17 10:52:15 +01:00
committed by GitHub
12 changed files with 22 additions and 6 deletions

View File

@@ -43,7 +43,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_GOCHAIN,
CHAIN_KIND_MIX,
CHAIN_KIND_REOSC,
CHAIN_KIND_HPB
CHAIN_KIND_HPB,
CHAIN_KIND_TOMOCHAIN
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -1483,6 +1483,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_HPB:
numTokens = NUM_TOKENS_HPB;
break;
case CHAIN_KIND_TOMOCHAIN:
numTokens = NUM_TOKENS_TOMOCHAIN;
break;
}
for (i=0; i<numTokens; i++) {
switch(chainConfig->kind) {
@@ -1549,6 +1552,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_HPB:
currentToken = (tokenDefinition_t *)PIC(&TOKENS_HPB[i]);
break;
case CHAIN_KIND_TOMOCHAIN:
currentToken = (tokenDefinition_t *)PIC(&TOKENS_TOMOCHAIN[i]);
break;
}
if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;

View File

@@ -1178,4 +1178,7 @@ const tokenDefinition_t const TOKENS_REOSC[NUM_TOKENS_REOSC] = {};
const tokenDefinition_t const TOKENS_HPB[NUM_TOKENS_HPB] = {};
const tokenDefinition_t const TOKENS_TOMOCHAIN[NUM_TOKENS_TOMOCHAIN] = {};
#endif

View File

@@ -49,6 +49,7 @@ typedef struct tokenDefinition_t {
#define NUM_TOKENS_MIX 0
#define NUM_TOKENS_REOSC 0
#define NUM_TOKENS_HPB 0
#define NUM_TOKENS_TOMOCHAIN 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -71,6 +72,7 @@ extern tokenDefinition_t const TOKENS_GOCHAIN[NUM_TOKENS_GOCHAIN];
extern tokenDefinition_t const TOKENS_MIX[NUM_TOKENS_MIX];
extern tokenDefinition_t const TOKENS_REOSC[NUM_TOKENS_REOSC];
extern tokenDefinition_t const TOKENS_HPB[NUM_TOKENS_HPB];
extern tokenDefinition_t const TOKENS_TOMOCHAIN[NUM_TOKENS_TOMOCHAIN];
#endif