Add support for GoChain

Ledger Nano S is now properly working with GoChain!!

homepage: https://gochain.io
block explorer: https://explorer.gochain.io
network statistics : https://stats.gochain.io/
slip0044 index : 6060
chain ID: 60
This commit is contained in:
Michael Ira Krufky
2018-09-08 07:27:12 -04:00
committed by GitHub
parent be7b68c97f
commit 1aeb759c15
10 changed files with 18 additions and 3 deletions

View File

@@ -110,9 +110,13 @@ else ifeq ($(CHAIN),atheios)
APP_LOAD_PARAMS += --path "44'/1620'"
DEFINES += CHAINID_UPCASE=\"ATHEIOS\" CHAINID_COINNAME=\"ATH\" CHAIN_KIND=CHAIN_KIND_ATHEIOS CHAIN_ID=1620
APPNAME = "Atheios"
else ifeq ($(CHAIN),gochain)
APP_LOAD_PARAMS += --path "44'/6060'"
DEFINES += CHAINID_UPCASE=\"GOCHAIN\" CHAINID_COINNAME=\"GO\" CHAIN_KIND=CHAIN_KIND_GOCHAIN CHAIN_ID=60
APPNAME = "GoChain"
else
ifeq ($(filter clean,$(MAKECMDGOALS)),)
$(error Unsupported CHAIN - use ethereum, ethereum_classic, expanse, poa, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem)
$(error Unsupported CHAIN - use ethereum, ethereum_classic, expanse, poa, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain)
endif
endif
@@ -204,4 +208,4 @@ include $(BOLOS_SDK)/Makefile.rules
dep/%.d: %.c Makefile
listvariants:
@echo VARIANTS CHAIN ethereum ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain kusd pirl akroma # musicoin atheios callisto ethersocial ellaism ether1 ethergem
@echo VARIANTS CHAIN ethereum ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain kusd pirl akroma # musicoin atheios callisto ethersocial ellaism ether1 ethergem gochain

BIN
blue_app_gochain.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
gochain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
nanos_app_gochain.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

View File

@@ -21,7 +21,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_ELLAISM,
CHAIN_KIND_ETHER1,
CHAIN_KIND_ETHERGEM,
CHAIN_KIND_ATHEIOS
CHAIN_KIND_ATHEIOS,
CHAIN_KIND_GOCHAIN
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -1511,6 +1511,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ATHEIOS:
numTokens = NUM_TOKENS_ATHEIOS;
break;
case CHAIN_KIND_GOCHAIN:
numTokens = NUM_TOKENS_GOCHAIN;
break;
}
for (i=0; i<numTokens; i++) {
switch(chainConfig->kind) {
@@ -1565,6 +1568,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ATHEIOS:
currentToken = PIC(&TOKENS_ATHEIOS[i]);
break;
case CHAIN_KIND_GOCHAIN:
currentToken = PIC(&TOKENS_GOCHAIN[i]);
break;
}
if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;

View File

@@ -782,3 +782,5 @@ const tokenDefinition_t const TOKENS_CALLISTO[NUM_TOKENS_CALLISTO] = {};
const tokenDefinition_t const TOKENS_ETHERGEM[NUM_TOKENS_ETHERGEM] = {};
const tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS] = {};
const tokenDefinition_t const TOKENS_GOCHAIN[NUM_TOKENS_GOCHAIN] = {};

View File

@@ -40,6 +40,7 @@ typedef struct tokenDefinition_t {
#define NUM_TOKENS_CALLISTO 0
#define NUM_TOKENS_ETHERGEM 0
#define NUM_TOKENS_ATHEIOS 0
#define NUM_TOKENS_GOCHAIN 0
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -58,3 +59,4 @@ 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];
extern tokenDefinition_t const TOKENS_ATHEIOS[NUM_TOKENS_ATHEIOS];
extern tokenDefinition_t const TOKENS_GOCHAIN[NUM_TOKENS_GOCHAIN];