Skip to content

Commit 45c049f

Browse files
Oasys (#413)
* correcting ticker * modifying conf file * updating main.c * updating chainConfig.h * Removed last bits of EWC * correcting arbitrum * adding oasys conf file * adding oasys icons * remaining changes for oasys * removing trailing space --------- Co-authored-by: Alexandre Paillier <[email protected]>
1 parent e8c44fc commit 45c049f

File tree

8 files changed

+17
-2
lines changed

8 files changed

+17
-2
lines changed

icons/nanos_app_oasys.gif

107 Bytes
Loading

icons/nanox_app_oasys.gif

104 Bytes
Loading

makefile_conf/chain/oasys.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_LOAD_PARAMS += --path "44'/685'" --path "44'/60'"
2+
DEFINES += CHAINID_UPCASE=\"OASYS\" CHAINID_COINNAME=\"OAS\" CHAIN_KIND=CHAIN_KIND_OASYS CHAIN_ID=248
3+
APPNAME = "Oasys"

src/chainConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ typedef enum chain_kind_e {
7373
CHAIN_KIND_MULTIVAC,
7474
CHAIN_KIND_TECRA,
7575
CHAIN_KIND_APOTHEMNETWORK,
76-
CHAIN_KIND_ID4GOOD
76+
CHAIN_KIND_ID4GOOD,
77+
CHAIN_KIND_OASYS
7778
} chain_kind_t;
7879

7980
typedef struct chain_config_s {

src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
297297
case CHAIN_KIND_ID4GOOD:
298298
numTokens = NUM_TOKENS_ID4GOOD;
299299
break;
300+
case CHAIN_KIND_OASYS:
301+
numTokens = NUM_TOKENS_OASYS;
302+
break;
300303
}
301304
for (i = 0; i < numTokens; i++) {
302305
switch (chainConfig->kind) {
@@ -453,6 +456,9 @@ extraInfo_t *getKnownToken(uint8_t *contractAddress) {
453456
case CHAIN_KIND_ID4GOOD:
454457
currentToken = (tokenDefinition_t *) PIC(&TOKENS_ID4GOOD[i]);
455458
break;
459+
case CHAIN_KIND_OASYS:
460+
currentToken = (tokenDefinition_t *) PIC(&TOKENS_OASYS[i]);
461+
break;
456462
}
457463
if (memcmp(currentToken->address, tmpContent.txContent.destination, ADDRESS_LENGTH) == 0) {
458464
return currentToken;

src/tokens.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,6 @@ const tokenDefinition_t const TOKENS_TECRA[NUM_TOKENS_TECRA] = {};
222222

223223
const tokenDefinition_t const TOKENS_APOTHEMNETWORK[NUM_TOKENS_APOTHEMNETWORK] = {};
224224

225+
const tokenDefinition_t const TOKENS_OASYS[NUM_TOKENS_OASYS] = {};
226+
225227
#endif

src/tokens.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
125125
#define NUM_TOKENS_MULTIVAC 0
126126
#define NUM_TOKENS_TECRA 0
127127
#define NUM_TOKENS_APOTHEMNETWORK 0
128+
#define NUM_TOKENS_OASYS 0
128129

129130
extern tokenDefinition_t const TOKENS_AKROMA[NUM_TOKENS_AKROMA];
130131
extern tokenDefinition_t const TOKENS_ELLAISM[NUM_TOKENS_ELLAISM];
@@ -175,6 +176,7 @@ extern tokenDefinition_t const TOKENS_METER[NUM_TOKENS_METER];
175176
extern tokenDefinition_t const TOKENS_MULTIVAC[NUM_TOKENS_MULTIVAC];
176177
extern tokenDefinition_t const TOKENS_TECRA[NUM_TOKENS_TECRA];
177178
extern tokenDefinition_t const TOKENS_APOTHEMNETWORK[NUM_TOKENS_APOTHEMNETWORK];
179+
extern tokenDefinition_t const TOKENS_OASYS[NUM_TOKENS_OASYS];
178180

179181
#endif /* HAVE_TOKENS_LIST */
180182

src_common/network.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static const network_info_t NETWORK_MAPPING[] = {
6161
{.chain_id = 57, .name = "Syscoin", .ticker = "SYS"},
6262
{.chain_id = 106, .name = "Velas EVM", .ticker = "VLX"},
6363
{.chain_id = 288, .name = "Boba Network", .ticker = "ETH"},
64-
{.chain_id = 39797, .name = "Energi", .ticker = "NRG"}};
64+
{.chain_id = 39797, .name = "Energi", .ticker = "NRG"},
65+
{.chain_id = 248, .name = "Oasys", .ticker = "OAS"}};
6566

6667
uint64_t get_chain_id(void) {
6768
uint64_t chain_id = 0;

0 commit comments

Comments
 (0)