2017-02-04 13:09:46 +01:00
|
|
|
/*******************************************************************************
|
2020-12-01 16:20:13 +01:00
|
|
|
* Ledger Ethereum App
|
|
|
|
|
* (c) 2016-2019 Ledger
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
********************************************************************************/
|
2017-02-04 13:09:46 +01:00
|
|
|
|
2024-01-15 17:09:30 +01:00
|
|
|
#pragma once
|
2019-01-03 16:05:21 +01:00
|
|
|
|
2019-01-04 10:31:57 +01:00
|
|
|
#include <stdint.h>
|
2024-01-16 13:51:36 +01:00
|
|
|
#include "common_utils.h"
|
2017-02-04 13:09:46 +01:00
|
|
|
|
2024-01-16 17:17:42 +01:00
|
|
|
// NFT
|
|
|
|
|
|
|
|
|
|
#define COLLECTION_NAME_MAX_LEN 70
|
|
|
|
|
|
|
|
|
|
typedef struct nftInfo_t {
|
|
|
|
|
uint8_t contractAddress[ADDRESS_LENGTH]; // must be first item
|
|
|
|
|
char collectionName[COLLECTION_NAME_MAX_LEN + 1];
|
|
|
|
|
} nftInfo_t;
|
|
|
|
|
|
|
|
|
|
// TOKENS
|
|
|
|
|
|
2023-01-10 14:12:39 +01:00
|
|
|
#define MAX_TICKER_LEN 11 // 10 characters + '\0'
|
2021-11-22 14:39:36 +01:00
|
|
|
#define MAX_ITEMS 2
|
2020-06-29 15:43:02 +02:00
|
|
|
|
2017-02-04 13:09:46 +01:00
|
|
|
typedef struct tokenDefinition_t {
|
2022-03-07 10:07:17 +01:00
|
|
|
uint8_t address[ADDRESS_LENGTH]; // must be first item
|
2020-10-07 16:56:40 +02:00
|
|
|
#ifdef HAVE_CONTRACT_NAME_IN_DESCRIPTOR
|
2021-04-30 18:22:15 +02:00
|
|
|
uint8_t contractName[ADDRESS_LENGTH];
|
2020-10-07 16:56:40 +02:00
|
|
|
#endif
|
2021-07-16 12:04:39 +02:00
|
|
|
char ticker[MAX_TICKER_LEN];
|
2017-02-04 13:09:46 +01:00
|
|
|
uint8_t decimals;
|
|
|
|
|
} tokenDefinition_t;
|
2024-01-16 17:17:42 +01:00
|
|
|
|
|
|
|
|
// UNION
|
|
|
|
|
|
|
|
|
|
typedef union extraInfo_t {
|
|
|
|
|
tokenDefinition_t token;
|
|
|
|
|
nftInfo_t nft;
|
|
|
|
|
} extraInfo_t;
|