diff --git a/Makefile b/Makefile index c2b7b7e..fa01e71 100755 --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ APP_LOAD_PARAMS= --curve secp256k1 $(COMMON_LOAD_PARAMS) APP_LOAD_PARAMS += --path "45'" APPVERSION_M=1 -APPVERSION_N=1 -APPVERSION_P=9 +APPVERSION_N=2 +APPVERSION_P=0 APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) APP_LOAD_FLAGS= --appFlags 0x40 --dep Ethereum:$(APPVERSION) @@ -127,9 +127,13 @@ else ifeq ($(CHAIN),hpb) APP_LOAD_PARAMS += --path "44'/269'" DEFINES += CHAINID_UPCASE=\"HPB\" CHAINID_COINNAME=\"HPB\" CHAIN_KIND=CHAIN_KIND_HPB CHAIN_ID=269 APPNAME = "HPB" +else ifeq ($(CHAIN),tomochain) +APP_LOAD_PARAMS += --path "44'/889'" +DEFINES += CHAINID_UPCASE=\"TOMOCHAIN\" CHAINID_COINNAME=\"TOMO\" CHAIN_KIND=CHAIN_KIND_TOMOCHAIN CHAIN_ID=88 +APPNAME = "TomoChain" 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, gochain, mix, reosc, hpb) +$(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, mix, reosc, hpb, tomochain) endif endif @@ -221,4 +225,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 atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb + @echo VARIANTS CHAIN ethereum ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain kusd pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain diff --git a/README.md b/README.md index 1a1ea0d..021d045 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This follows the specification available in the doc/ folder To use the generic wallet (which disables all data transaction) refer to signTx.py (requires rlp package) or Ledger Ethereum Wallet Chrome application available on Github at https://github.com/LedgerHQ/ledger-wallet-ethereum-chrome or the Chrome Web store at https://chrome.google.com/webstore/detail/ledger-wallet-ethereum/hmlhkialjkaldndjnlcdfdphcgeadkkm -Other examples are provided reusing the Ethereum parsing framwork to implement some advanced use cases : +Other examples are provided reusing the Ethereum parsing framework to implement some advanced use cases : * An ETH/ETC splitting contract - see src_chainsplit, splitEther.py and our Medium post at https://blog.ledger.co/splitting-your-ethers-securely-on-your-nano-s-147f20e9e341 * An unsupported use case (transferring The DAO (RIP) tokens), using deprecated code - see src_daosend diff --git a/blue_app_tomochain.gif b/blue_app_tomochain.gif new file mode 100644 index 0000000..6ef28c7 Binary files /dev/null and b/blue_app_tomochain.gif differ diff --git a/blue_badge_tomochain.gif b/blue_badge_tomochain.gif new file mode 100644 index 0000000..cf7c4b5 Binary files /dev/null and b/blue_badge_tomochain.gif differ diff --git a/glyphs/blue_badge_tomochain.gif b/glyphs/blue_badge_tomochain.gif new file mode 100644 index 0000000..624837f Binary files /dev/null and b/glyphs/blue_badge_tomochain.gif differ diff --git a/glyphs/nanos_badge_tomochain.gif b/glyphs/nanos_badge_tomochain.gif new file mode 100644 index 0000000..f33c2ba Binary files /dev/null and b/glyphs/nanos_badge_tomochain.gif differ diff --git a/nanos_app_tomochain.gif b/nanos_app_tomochain.gif new file mode 100644 index 0000000..a1124f7 Binary files /dev/null and b/nanos_app_tomochain.gif differ diff --git a/src/chainConfig.h b/src/chainConfig.h index d87123d..fd7d6c1 100644 --- a/src/chainConfig.h +++ b/src/chainConfig.h @@ -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 { diff --git a/src/main.c b/src/main.c index 5beaaec..0ed1892 100644 --- a/src/main.c +++ b/src/main.c @@ -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; ikind) { @@ -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; diff --git a/src/tokens.c b/src/tokens.c index 8cf7fb5..8578c9f 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -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 + diff --git a/src/tokens.h b/src/tokens.h index 1ac75ad..bd83fbf 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -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 diff --git a/tomochain.png b/tomochain.png new file mode 100644 index 0000000..9e20e2c Binary files /dev/null and b/tomochain.png differ