Add support for EOS Classic (EOSC)

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

homepage : https://eos-classic.io
block explorer : https://explorer.eos-classic.io
network statistics : https://stats.eos-classic.io
slip0044 index : 2018
chainId : 20

Proof of EIP-155 in genesis block:
https://github.com/eosclassic/eosclassic/blob/master/params/config.go#L63

cc: @eosclassic
This commit is contained in:
Michael Ira Krufky
2018-08-26 00:10:49 -04:00
committed by GitHub
parent a6fc547fc9
commit 0a5359afa5
10 changed files with 18 additions and 3 deletions

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_EOSCLASSIC
} chain_kind_t;
typedef struct chain_config_s {

View File

@@ -1561,6 +1561,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ATHEIOS:
numTokens = NUM_TOKENS_ATHEIOS;
break;
case CHAIN_KIND_EOSCLASSIC:
numTokens = NUM_TOKENS_EOSCLASSIC;
break;
}
for (i=0; i<numTokens; i++) {
switch(chainConfig->kind) {
@@ -1615,6 +1618,9 @@ tokenDefinition_t* getKnownToken() {
case CHAIN_KIND_ATHEIOS:
currentToken = PIC(&TOKENS_ATHEIOS[i]);
break;
case CHAIN_KIND_EOSCLASSIC:
currentToken = PIC(&TOKENS_EOSCLASSIC[i]);
break;
}
if (os_memcmp(currentToken->address, tmpContent.txContent.destination, 20) == 0) {
return currentToken;

View File

@@ -737,3 +737,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_EOSCLASSIC[NUM_TOKENS_EOSCLASSIC] = {};

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_EOSCLASSIC 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_EOSCLASSIC[NUM_TOKENS_EOSCLASSIC];