1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00
trezor-firmware/firmware/nem_mosaics.c.mako
2018-09-06 18:47:36 +02:00

37 lines
856 B
Mako

<%
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),
("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] = {
% 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;