Files
app-ethereum/src_common/network.h

24 lines
695 B
C
Raw Normal View History

#ifndef _NETWORK_H_
#define _NETWORK_H_
#include <stdint.h>
#include "tokens.h"
2021-08-26 13:21:10 +02:00
#include "shared_context.h"
typedef struct network_info_s {
2022-09-15 09:35:47 +02:00
const char *name;
const char *ticker;
2021-08-26 13:02:07 +02:00
uint64_t chain_id;
} network_info_t;
// Returns the current chain id. Defaults to 0 if txType was not found.
2021-08-26 13:02:07 +02:00
uint64_t get_chain_id(void);
// Returns a pointer to the network struct, or NULL if there is none.
const network_info_t *get_network(void);
// Returns a pointer to the network name, or NULL if there is none.
const char *get_network_name(void);
// Returns a pointer to the network ticker, or chainConfig->coinName if there is none.
const char *get_network_ticker(void);
#endif // _NETWORK_H_