Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,13 @@ else ifeq ($(CHAIN),polygon)
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"POLYGON\" CHAINID_COINNAME=\"MATIC\" CHAIN_KIND=CHAIN_KIND_POLYGON CHAIN_ID=137
APPNAME = "Polygon"
else ifeq ($(CHAIN),evmos)
APP_LOAD_PARAMS += --path "44'/60'"
DEFINES += CHAINID_UPCASE=\"EVMOS\" CHAINID_COINNAME=\"EVMOS\" CHAIN_KIND=CHAIN_KIND_EVMOS CHAIN_ID=9001
APPNAME = "Evmos"
else
ifeq ($(filter clean,$(MAKECMDGOALS)),)
$(error Unsupported CHAIN - use ethereum, ropsten, goerli, moonriver, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore, bsc, songbird, polygon)
$(error Unsupported CHAIN - use ethereum, ropsten, goerli, moonriver, ethereum_classic, expanse, poa, artis_sigma1, artis_tau1, rsk, rsk_testnet, ubiq, wanchain, kusd, musicoin, pirl, akroma, atheios, callisto, ethersocial, ellaism, ether1, ethergem, gochain, mix, reosc, hpb, tomochain, tobalaba, dexon, volta, ewc, webchain, thundercore, bsc, songbird, polygon, evmos)
endif
endif

Expand Down Expand Up @@ -407,4 +411,4 @@ include $(BOLOS_SDK)/Makefile.rules
dep/%.d: %.c Makefile

listvariants:
@echo VARIANTS CHAIN ethereum ropsten goerli moonriver ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore bsc songbird polygon
@echo VARIANTS CHAIN ethereum ropsten goerli moonriver ethereum_classic expanse poa rsk rsk_testnet ubiq wanchain pirl akroma atheios callisto ethersocial ether1 gochain musicoin ethergem mix ellaism reosc hpb tomochain dexon volta ewc thundercore bsc songbird polygon evmos
3 changes: 2 additions & 1 deletion src/chainConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ typedef enum chain_kind_e {
CHAIN_KIND_FLARE,
CHAIN_KIND_BSC,
CHAIN_KIND_SONGBIRD,
CHAIN_KIND_POLYGON
CHAIN_KIND_POLYGON,
CHAIN_KIND_EVMOS
} chain_kind_t;

typedef struct chain_config_s {
Expand Down
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_POLYGON:
numTokens = NUM_TOKENS_POLYGON;
break;
case CHAIN_KIND_EVMOS:
numTokens = NUM_TOKENS_EVMOS;
break;
}
for (i = 0; i < numTokens; i++) {
switch (chainConfig->kind) {
Expand Down Expand Up @@ -374,6 +377,9 @@ tokenDefinition_t *getKnownToken(uint8_t *contractAddress) {
case CHAIN_KIND_POLYGON:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_POLYGON[i]);
break;
case CHAIN_KIND_EVMOS:
currentToken = (tokenDefinition_t *) PIC(&TOKENS_EVMOS[i]);
break;
}
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
return currentToken;
Expand Down
2 changes: 2 additions & 0 deletions src/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
#define NUM_TOKENS_SONGBIRD 0
#define NUM_TOKENS_MOONRIVER 0
#define NUM_TOKENS_POLYGON 0
#define NUM_TOKENS_EVMOS 0

extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
Expand Down Expand Up @@ -137,6 +138,7 @@ extern tokenDefinition_t const TOKENS_BSC[NUM_TOKENS_BSC];
extern tokenDefinition_t const TOKENS_SONGBIRD[NUM_TOKENS_SONGBIRD];
extern tokenDefinition_t const TOKENS_MOONRIVER[NUM_TOKENS_MOONRIVER];
extern tokenDefinition_t const TOKENS_POLYGON[NUM_TOKENS_POLYGON];
extern tokenDefinition_t const TOKENS_EVMOS[NUM_TOKENS_EVMOS];

#endif /* HAVE_TOKENS_LIST */

Expand Down