1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00
trezor-firmware/legacy/firmware/nem_mosaics.c.mako
grdddj 76c6e9cd9d feat(all): implement support information for T2B1
WIP - change trezor{1,2} to their internal names, add support for model R

WIP - add EOS and NEM features Capability only for TT

WIP - not include EOS and NEM into TR

WIP - choose between device models when generating coininfo

WIP - regenerate coininfo.py

WIP - skip NEM, EOS, Dash, BGold and Decred device tests for TR

WIP - fix python support

WIP - fix unit tests

WIP - import bitcoin-like code only when needed

WIP - remove ignored coins for TR in fixtures.json

WIP - make all the external references to models UPPERCASE

WIP - do the model separation in mako script also for tokens and networks

WIP - hot-fixing non-supporting RELEASES_URL for new model names

WIP - support.py releases CLI command takes a list of -r key-value pairs DEVICE=VERSION

WIP - run `python support.py release`

WIP - use utils.MODEL_IS_T2B1 to ignore NEM and EOS

WIP - change all the docs and commands to have UPPERCASE model names

[no changelog]
2023-09-14 13:54:09 +02:00

46 lines
1.0 KiB
Mako

<%
ATTRIBUTES_REQUIRED = (
("namespace", c_str),
("mosaic", c_str),
)
ATTRIBUTES_OPTIONAL = (
("name", c_str),
("ticker", lambda s: c_str(" " + s) if s else "NULL"),
("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("T1B1", nem):
{
% for attr, func in ATTRIBUTES_REQUIRED:
% if attr in m:
.${attr} = ${func(m[attr])},
% endif
% endfor
.description = "",
% for attr, func in ATTRIBUTES_OPTIONAL:
% 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;