1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-21 05:48:23 +00:00
trezor-firmware/legacy/firmware/nem_mosaics.c.mako

37 lines
856 B
Plaintext
Raw Normal View History

2018-07-30 15:40:07 +00:00
<%
ATTRIBUTES = (
("name", c_str),
("ticker", lambda s: c_str(" " + s) if s else "NULL"),
("namespace", c_str),
("mosaic", c_str),
("divisibility", int),
("levy", lambda s: "NEMMosaicLevy_" + s),
2018-07-30 15:40:07 +00:00
("fee", int),
("levy_namespace", c_str),
("levy_mosaic", c_str),
)
%>\
// This file is automatically generated from nem_mosaics.c.mako
// DO NOT EDIT
#include "nem_mosaics.h"
const NEMMosaicDefinition NEM_MOSAIC_DEFINITIONS[NEM_MOSAIC_DEFINITIONS_COUNT] = {
2018-07-30 15:40:07 +00:00
% for m in supported_on("trezor1", nem):
{
% for attr, func in ATTRIBUTES:
% if attr in m:
.has_${attr} = true,
.${attr} = ${func(m[attr])},
% endif
% endfor
% if "networks" in m:
.networks_count = ${len(m["networks"])},
.networks = { ${", ".join(map(str, m["networks"]))} },
% endif
},
% endfor
};
const NEMMosaicDefinition *NEM_MOSAIC_DEFINITION_XEM = NEM_MOSAIC_DEFINITIONS;