Add support for EtherGem (EGEM) (#1)

* Add support for EtherGem (EGEM)

* Add graphic assets for EtherGem (EGEM)

EIP-155 is now properly working with EtherGem!! Tested personally on the Ledger Nano S

homepage : https://egem.io
block explorer : https://explorer.egem.io
network statistics : https://network.egem.io
slip0044 index : 1987
chainId : 1987
This commit is contained in:
Michael Ira Krufky
2018-08-10 14:54:56 -04:00
committed by GitHub
parent 3f6bb939e7
commit bbd2b06b52
10 changed files with 18 additions and 3 deletions

View File

@@ -19,7 +19,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_CALLISTO,
CHAIN_KIND_ETHERSOCIAL,
CHAIN_KIND_ELLAISM,
CHAIN_KIND_ETHER1
CHAIN_KIND_ETHER1,
CHAIN_KIND_ETHERGEM
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -1555,6 +1555,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ETHER1:
numTokens = NUM_TOKENS_ETHER1;
break;
case CHAIN_KIND_ETHERGEM:
numTokens = NUM_TOKENS_ETHERGEM;
break;
}
for (i=0; i<numTokens; i++) {
switch(chainConfig->kind) {
@@ -1603,6 +1606,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ETHER1:
currentToken = PIC(&TOKENS_ETHER1[i]);
break;
case CHAIN_KIND_ETHERGEM:
currentToken = PIC(&TOKENS_ETHERGEM[i]);
break;
}
if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;

View File

@@ -733,3 +733,5 @@ const tokenDefinition_t const TOKENS_KUSD[NUM_TOKENS_KUSD] = {};
const tokenDefinition_t const TOKENS_MUSICOIN[NUM_TOKENS_MUSICOIN] = {};
const tokenDefinition_t const TOKENS_CALLISTO[NUM_TOKENS_CALLISTO] = {};
const tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM] = {};

View File

@@ -38,6 +38,7 @@ typedef struct tokenDefinition_t {
#define NUM_TOKENS_KUSD 0
#define NUM_TOKENS_MUSICOIN 0
#define NUM_TOKENS_CALLISTO 0
#define NUM_TOKENS_ETHERGEM 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -54,3 +55,4 @@ extern tokenDefinition_t const TOKENS_WANCHAIN[NUM_TOKENS_WANCHAIN];
extern tokenDefinition_t const TOKENS_KUSD[NUM_TOKENS_KUSD];
extern tokenDefinition_t const TOKENS_MUSICOIN[NUM_TOKENS_MUSICOIN];
extern tokenDefinition_t const TOKENS_CALLISTO[NUM_TOKENS_CALLISTO];
extern tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM];