1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 03:18:20 +00:00

ethereum: add new tokens

This commit is contained in:
Pavol Rusnak 2017-06-27 13:51:45 +02:00
parent 73708aa47e
commit 01b4825d53
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 30 additions and 4 deletions

View File

@ -25,5 +25,11 @@ def print_tokens(chain, chain_id):
address = '\\x'.join([address[i:i + 2] for i in range(0, len(address), 2)])[2:].lower()
print('\t{%2d, "%s", " %s", %d},' % (chain_id, address, symbol, decimal))
print_tokens('eth', 1)
print_tokens('etc', 61)
return len(tokens)
count = 0
count += print_tokens('eth', 1)
count += print_tokens('etc', 61)
print('#define TOKENS_COUNT %d' % count)

View File

@ -8,14 +8,19 @@ const TokenType tokens[TOKENS_COUNT] = {
{ 1, "\x0d\x87\x75\xf6\x48\x43\x06\x79\xa7\x09\xe9\x8d\x2b\x0c\xb6\x25\x0d\x28\x87\xef", " BAT", 18},
{ 1, "\x74\xc1\xe4\xb8\xca\xe5\x92\x69\xec\x1d\x85\xd3\xd4\xf3\x24\x39\x60\x48\xf4\xac", " BEER", 0},
{ 1, "\x1e\x79\x7c\xe9\x86\xc3\xcf\xf4\x47\x2f\x7d\x38\xd5\xc4\xab\xa5\x5d\xfe\xfe\x40", " BCDN", 15},
{ 1, "\xdd\x6b\xf5\x6c\xa2\xad\xa2\x4c\x68\x3f\xac\x50\xe3\x77\x83\xe5\x5b\x57\xaf\x9f", " BNC", 12},
{ 1, "\x1f\x57\x3d\x6f\xb3\xf1\x3d\x68\x9f\xf8\x44\xb4\xce\x37\x79\x4d\x79\xa7\xff\x1c", " BNT", 18},
{ 1, "\x12\xfe\xf5\xe5\x7b\xf4\x58\x73\xcd\x9b\x62\xe9\xdb\xd7\xbf\xb9\x9e\x32\xd7\x3e", " CFI", 18},
{ 1, "\xae\xf3\x8f\xbf\xbf\x93\x2d\x1a\xef\x3b\x80\x8b\xc8\xfb\xd8\xcd\x8e\x1f\x8b\xc5", " CRB", 8},
{ 1, "\xe4\xc9\x4d\x45\xf7\xae\xf7\x01\x8a\x5d\x66\xf4\x4a\xf7\x80\xec\x60\x23\x37\x8e", " CCRB", 6},
{ 1, "\xbb\x9b\xc2\x44\xd7\x98\x12\x3f\xde\x78\x3f\xcc\x1c\x72\xd3\xbb\x8c\x18\x94\x13", " DAO", 16},
{ 1, "\x5c\x40\xef\x6f\x52\x7f\x4f\xba\x68\x36\x87\x74\xe6\x13\x0c\xe6\x51\x51\x23\xf2", " DAOe", 0},
{ 1, "\xe0\xb7\x92\x7c\x4a\xf2\x37\x65\xcb\x51\x31\x4a\x0e\x05\x21\xa9\x64\x5f\x0e\x2a", " DGD", 9},
{ 1, "\x55\xb9\xa1\x1c\x2e\x83\x51\xb4\xff\xc7\xb1\x15\x61\x14\x8b\xfa\xc9\x97\x78\x55", " DGX1", 9},
{ 1, "\x62\x1d\x78\xf2\xef\x2f\xd9\x37\xbf\xca\x69\x6c\xab\xaf\x9a\x77\x9f\x59\xb3\xed", " DRP", 2},
{ 1, "\x08\x71\x1d\x3b\x02\xc8\x75\x8f\x2f\xb3\xab\x4e\x80\x22\x84\x18\xa7\xf8\xe3\x9c", " EDG", 0},
{ 1, "\xb8\x02\xb2\x4e\x06\x37\xc2\xb8\x7d\x2e\x8b\x77\x84\xc0\x55\xbb\xe9\x21\x01\x1a", " EMV", 2},
{ 1, "\xbb\xb1\xbd\x2d\x74\x1f\x05\xe1\x44\xe6\xc4\x51\x76\x76\xa1\x55\x54\xfd\x4b\x8d", " FUN", 8},
{ 1, "\x68\x10\xe7\x76\x88\x0c\x02\x93\x3d\x47\xdb\x1b\x9f\xc0\x59\x08\xe5\x38\x6b\x96", " GNO", 18},
{ 1, "\xa7\x44\x76\x44\x31\x19\xa9\x42\xde\x49\x85\x90\xfe\x1f\x24\x54\xd7\xd4\xac\x0d", " GNT", 18},
{ 1, "\xf7\xb0\x98\x29\x8f\x7c\x69\xfc\x14\x61\x0b\xf7\x1d\x5e\x02\xc6\x07\x92\x89\x4c", " GUP", 3},
@ -27,21 +32,34 @@ const TokenType tokens[TOKENS_COUNT] = {
{ 1, "\xfa\x05\xa7\x3f\xfe\x78\xef\x8f\x1a\x73\x94\x73\xe4\x62\xc5\x4b\xae\x65\x67\xd9", " LUN", 18},
{ 1, "\x93\xe6\x82\x10\x7d\x1e\x9d\xef\xb0\xb5\xee\x70\x1c\x71\x70\x7a\x4b\x2e\x46\xbc", " MCAP", 8},
{ 1, "\xb0\x4c\xfa\x8a\x26\xd6\x02\xfb\x50\x23\x2c\xee\x0d\xaf\x29\x06\x02\x64\xe0\x4b", " MCO", 8},
{ 1, "\x40\x39\x50\x44\xac\x3c\x0c\x57\x05\x19\x06\xda\x93\x8b\x54\xbd\x65\x57\xf2\x12", " MGO", 8},
{ 1, "\xd0\xb1\x71\xeb\x0b\x0f\x2c\xbd\x35\xcc\xd9\x7c\xdc\x5e\xdc\x3f\xfe\x48\x71\xaa", " MDA", 18},
{ 1, "\xe2\x3c\xd1\x60\x76\x1f\x63\xfc\x3a\x1c\xf7\x8a\xa0\x34\xb6\xcd\xf9\x7d\x3e\x0c", " MIT", 18},
{ 1, "\xc6\x6e\xa8\x02\x71\x7b\xfb\x98\x33\x40\x02\x64\xdd\x12\xc2\xbc\xea\xa3\x4a\x6d", " MKR", 18},
{ 1, "\xbe\xb9\xef\x51\x4a\x37\x9b\x99\x7e\x07\x98\xfd\xcc\x90\x1e\xe4\x74\xb6\xd9\xa1", " MLN", 18},
{ 1, "\x1a\x95\xb2\x71\xb0\x53\x5d\x15\xfa\x49\x93\x2d\xab\xa3\x1b\xa6\x12\xb5\x29\x46", " MNE", 8},
{ 1, "\xa6\x45\x26\x4c\x56\x03\xe9\x6c\x3b\x0b\x07\x8c\xda\xb6\x87\x33\x79\x4b\x0a\x71", " MYST", 8},
{ 1, "\xcf\xb9\x86\x37\xbc\xae\x43\xc1\x33\x23\xea\xa1\x73\x1c\xed\x2b\x71\x69\x62\xfd", " NET", 18},
{ 1, "\x17\x76\xe1\xf2\x6f\x98\xb1\xa5\xdf\x9c\xd3\x47\x95\x3a\x26\xdd\x3c\xb4\x66\x71", " NMR", 18},
{ 1, "\x45\xe4\x2d\x65\x9d\x9f\x94\x66\xcd\x5d\xf6\x22\x50\x60\x33\x14\x5a\x9b\x89\xbc", " NxC", 3},
{ 1, "\x70\x1c\x24\x4b\x98\x8a\x51\x3c\x94\x59\x73\xde\xfa\x05\xde\x93\x3b\x23\xfe\x1d", " OAX", 18},
{ 1, "\xb9\x70\x48\x62\x8d\xb6\xb6\x61\xd4\xc2\xaa\x83\x3e\x95\xdb\xe1\xa9\x05\xb2\x80", " PAY", 18},
{ 1, "\x8a\xe4\xbf\x2c\x33\xa8\xe6\x67\xde\x34\xb5\x49\x38\xb0\xcc\xd0\x3e\xb8\xcc\x06", " PTOY", 8},
{ 1, "\xd8\x91\x2c\x10\x68\x1d\x8b\x21\xfd\x37\x42\x24\x4f\x44\x65\x8d\xba\x12\x26\x4e", " PLU", 18},
{ 1, "\x67\x1a\xbb\xe5\xce\x65\x24\x91\x98\x53\x42\xe8\x54\x28\xeb\x1b\x07\xbc\x6c\x64", " QAU", 8},
{ 1, "\x69\x7b\xea\xc2\x8b\x09\xe1\x22\xc4\x33\x2d\x16\x39\x85\xe8\xa7\x31\x21\xb9\x7f", " QRL", 8},
{ 1, "\x48\xc8\x0f\x1f\x4d\x53\xd5\x95\x1e\x5d\x54\x38\xb5\x4c\xba\x84\xf2\x9f\x32\xa5", " REP", 18},
{ 1, "\x60\x7f\x4c\x5b\xb6\x72\x23\x0e\x86\x72\x08\x55\x32\xf7\xe9\x01\x54\x4a\x73\x75", " RLC", 9},
{ 1, "\x2e\x07\x1d\x29\x66\xaa\x7d\x8d\xec\xb1\x00\x58\x85\xba\x19\x77\xd6\x03\x8a\x65", " ROL", 16},
{ 1, "\xcc\xed\x5b\x82\x88\x08\x6b\xe8\xc3\x8e\x23\x56\x7e\x68\x4c\x37\x40\xbe\x4d\x48", " RLT", 10},
{ 1, "\x2e\x07\x1d\x29\x66\xaa\x7d\x8d\xec\xb1\x00\x58\x85\xba\x19\x77\xd6\x03\x8a\x65", " DICE", 16},
{ 1, "\x49\x93\xcb\x95\xc7\x44\x3b\xdc\x06\x15\x5c\x5f\x56\x88\xbe\x9d\x8f\x69\x99\xa5", " ROUND", 18},
{ 1, "\xd2\x48\xb0\xd4\x8e\x44\xaa\xf9\xc4\x9a\xea\x03\x12\xbe\x7e\x13\xa6\xdc\x14\x68", " SGT", 1},
{ 1, "\xef\x2e\x99\x66\xeb\x61\xbb\x49\x4e\x53\x75\xd5\xdf\x8d\x67\xb7\xdb\x8a\x78\x0d", " SHIT", 0},
{ 1, "\x2b\xdc\x0d\x42\x99\x60\x17\xfc\xe2\x14\xb2\x16\x07\xa5\x15\xda\x41\xa9\xe0\xc5", " SKIN", 6},
{ 1, "\xae\xc2\xe8\x7e\x0a\x23\x52\x66\xd9\xc5\xad\xc9\xde\xb4\xb2\xe2\x9b\x54\xd0\x09", " SNGLS", 0},
{ 1, "\x98\x3f\x6d\x60\xdb\x79\xea\x8c\xa4\xeb\x99\x68\xc6\xaf\xf8\xcf\xa0\x4b\x3c\x63", " SNM", 18},
{ 1, "\x1d\xce\x4f\xa0\x36\x39\xb7\xf0\xc3\x8e\xe5\xbb\x60\x65\x04\x5e\xdc\xf9\x81\x9a", " SRC", 8},
{ 1, "\xb6\x4e\xf5\x1c\x88\x89\x72\xc9\x08\xcf\xac\xf5\x9b\x47\xc1\xaf\xbc\x0a\xb8\xac", " STORJ", 8},
{ 1, "\xb9\xe7\xf8\x56\x8e\x08\xd5\x65\x9f\x5d\x29\xc4\x99\x71\x73\xd8\x4c\xdf\x26\x07", " SWT", 18},
{ 1, "\xe7\x77\x5a\x6e\x9b\xcf\x90\x4e\xb3\x9d\xa2\xb6\x8c\x5e\xfb\x4f\x93\x60\xe0\x8c", " TaaS", 6},
{ 1, "\x65\x31\xf1\x33\xe6\xde\xeb\xe7\xf2\xdc\xe5\xa0\x44\x1a\xa7\xef\x33\x0b\x4e\x53", " TIME", 8},
@ -49,9 +67,11 @@ const TokenType tokens[TOKENS_COUNT] = {
{ 1, "\xcb\x94\xbe\x6f\x13\xa1\x18\x2e\x4a\x4b\x61\x40\xcb\x7b\xf2\x02\x5d\x28\xe4\x1b", " TRST", 6},
{ 1, "\x89\x20\x5a\x3a\x3b\x2a\x69\xde\x6d\xbf\x7f\x01\xed\x13\xb2\x10\x8b\x2c\x43\xe7", " UNCRN", 0},
{ 1, "\x5c\x54\x3e\x7a\xe0\xa1\x10\x4f\x78\x40\x6c\x34\x0e\x9c\x64\xfd\x9f\xce\x51\x70", " VSL", 18},
{ 1, "\x82\x66\x57\x64\xea\x0b\x58\x15\x7e\x1e\x5e\x9b\xab\x32\xf6\x8c\x76\xec\x0c\xdf", " VSM", 0},
{ 1, "\x8f\x34\x70\xa7\x38\x8c\x05\xee\x4e\x7a\xf3\xd0\x1d\x8c\x72\x2b\x0f\xf5\x23\x74", " VERI", 18},
{ 1, "\x66\x70\x88\xb2\x12\xce\x3d\x06\xa1\xb5\x53\xa7\x22\x1e\x1f\xd1\x90\x00\xd9\xaf", " WINGS", 18},
{ 1, "\x4d\xf8\x12\xf6\x06\x4d\xef\x1e\x5e\x02\x9f\x1c\xa8\x58\x77\x7c\xc9\x8d\x2d\x81", " XAUR", 8},
{ 1, "\x74\x4d\x70\xfd\xbe\x2b\xa4\xcf\x95\x13\x16\x26\x61\x4a\x17\x63\xdf\x80\x5b\x9e", " SNT", 18},
{61, "\x08\x5f\xb4\xf2\x40\x31\xea\xed\xbc\x2b\x61\x1a\xa5\x28\xf2\x23\x43\xeb\x52\xdb", " BEC", 8},
};

View File

@ -22,7 +22,7 @@
#include <stdint.h>
#define TOKENS_COUNT 51
#define TOKENS_COUNT 71
typedef struct {
uint8_t chain_id;