Files
app-ethereum/src_common/eth_plugin_interface.h

225 lines
7.4 KiB
C
Raw Normal View History

2023-11-06 19:24:25 +01:00
// clang-format off
#pragma once
2020-09-22 09:22:49 +02:00
#include "os.h"
#include "cx.h"
// Include other header compatible with plugins
#include "asset_info.h"
#include "caller_api.h"
#include "common_utils.h"
#include "plugin_utils.h"
#include "tx_content.h"
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
/*************************************************************************************************
* Comments provided in this file are quick reminders on the usage of the plugin interface *
* Reading the real plugin documentation is GREATLY recommended. *
* You can find the latest version here: *
* https://github.com/LedgerHQ/app-ethereum/blob/develop/doc/ethapp_plugins.adoc *
*************************************************************************************************/
// Interface version. Will be updated every time a breaking change in the interface is introduced.
2023-11-06 18:12:06 +01:00
typedef enum eth_plugin_interface_version_e {
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
ETH_PLUGIN_INTERFACE_VERSION_1 = 1,
ETH_PLUGIN_INTERFACE_VERSION_2 = 2,
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
ETH_PLUGIN_INTERFACE_VERSION_3 = 3,
2022-03-15 14:19:30 +01:00
ETH_PLUGIN_INTERFACE_VERSION_4 = 4,
2023-01-06 11:29:49 +01:00
ETH_PLUGIN_INTERFACE_VERSION_5 = 5,
2023-11-06 18:12:06 +01:00
ETH_PLUGIN_INTERFACE_VERSION_LATEST = 6,
} eth_plugin_interface_version_t;
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
// Codes for the different requests Ethereum can send to the plugin
// The dispatch is handled by the SDK itself, the plugin code does not have to handle it
typedef enum eth_plugin_msg_e {
// Codes for actions the Ethereum app can ask the plugin to perform
2020-12-01 16:20:13 +01:00
ETH_PLUGIN_INIT_CONTRACT = 0x0101,
ETH_PLUGIN_PROVIDE_PARAMETER = 0x0102,
ETH_PLUGIN_FINALIZE = 0x0103,
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
ETH_PLUGIN_PROVIDE_INFO = 0x0104,
2020-12-01 16:20:13 +01:00
ETH_PLUGIN_QUERY_CONTRACT_ID = 0x0105,
2020-12-03 16:32:40 +01:00
ETH_PLUGIN_QUERY_CONTRACT_UI = 0x0106,
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
// Special request: the Ethereum app is checking if we are installed on the device
ETH_PLUGIN_CHECK_PRESENCE = 0x01FF,
2020-09-22 09:22:49 +02:00
} eth_plugin_msg_t;
2023-11-06 19:24:25 +01:00
// Reply codes when responding to the Ethereum application
2023-11-06 18:12:06 +01:00
typedef enum eth_plugin_result_e {
2023-11-06 19:24:25 +01:00
// Unsuccessful return values
2020-12-01 16:20:13 +01:00
ETH_PLUGIN_RESULT_ERROR = 0x00,
2021-04-24 12:14:36 +02:00
ETH_PLUGIN_RESULT_UNAVAILABLE = 0x01,
2021-04-27 10:37:22 +02:00
ETH_PLUGIN_RESULT_UNSUCCESSFUL = 0x02, // Used for comparison
2021-04-24 12:14:36 +02:00
// Successful return values
2021-04-27 10:37:22 +02:00
ETH_PLUGIN_RESULT_SUCCESSFUL = 0x03, // Used for comparison
2021-04-24 12:14:36 +02:00
ETH_PLUGIN_RESULT_OK = 0x04,
ETH_PLUGIN_RESULT_OK_ALIAS = 0x05,
2023-11-06 18:12:06 +01:00
ETH_PLUGIN_RESULT_FALLBACK = 0x06,
2020-09-22 09:22:49 +02:00
} eth_plugin_result_t;
2023-11-06 19:24:25 +01:00
// Format of UI the Ethereum application has to use for this plugin
typedef enum eth_ui_type_e {
// If uiType is UI_AMOUNT_ADDRESS, Ethereum will use the amount/address UI
// the amount and address provided by the plugin will be used
// If tokenLookup1 is set, the amount is provided for this token
2020-12-01 16:20:13 +01:00
ETH_UI_TYPE_AMOUNT_ADDRESS = 0x01,
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
// If uiType is UI_TYPE_GENERIC, Ethereum will use the dedicated ETH plugin UI
// the ETH application provides tokens if requested then prompts for each UI field
// The first field is forced by the ETH app to be the name + version of the plugin handling the
// request. The last field is the fee amount
ETH_UI_TYPE_GENERIC = 0x02,
2020-09-22 09:22:49 +02:00
} eth_ui_type_t;
2023-11-06 19:24:25 +01:00
// Scratch objects and utilities available to the plugin READ-WRITE
2023-11-06 18:12:06 +01:00
typedef struct ethPluginSharedRW_s {
2020-12-01 16:20:13 +01:00
cx_sha3_t *sha3;
2020-09-22 09:22:49 +02:00
} ethPluginSharedRW_t;
2023-11-06 19:24:25 +01:00
// Transaction data available to the plugin READ-ONLY
2023-11-06 18:12:06 +01:00
typedef struct ethPluginSharedRO_s {
2020-12-01 16:20:13 +01:00
txContent_t *txContent;
2020-09-22 09:22:49 +02:00
} ethPluginSharedRO_t;
2023-11-06 19:24:25 +01:00
// Plugin-only memory allocated by the Ethereum application and used by the plugin.
#define PLUGIN_CONTEXT_SIZE (5 * INT256_LENGTH)
// It is recommended to cast the raw uin8_t array to a structure meaningfull for your plugin
// Helper to check that the actual plugin context structure is not bigger than the allocated memory
#define ASSERT_SIZEOF_PLUGIN_CONTEXT(s) \
_Static_assert(sizeof(s) <= PLUGIN_CONTEXT_SIZE, "Plugin context structure is too big.")
/*
* HANDLERS AND PARAMETERS
* Parameters associated with the requests the Ethereum application can ask the plugin to perform
* The plugin SDK will automatically call the relevant handler for the received code, so the plugin
* has to define each of the handler functions declared below.
*/
2020-09-22 09:22:49 +02:00
// Init Contract
2023-11-06 18:12:06 +01:00
typedef struct ethPluginInitContract_s {
2023-11-06 19:24:25 +01:00
eth_plugin_interface_version_t interfaceVersion;
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
// in
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
uint8_t *pluginContext;
2021-05-17 17:09:29 +02:00
size_t pluginContextLength;
const uint8_t *selector; // 4 bytes selector
2021-05-17 17:09:29 +02:00
size_t dataSize;
2020-09-22 09:22:49 +02:00
2020-12-01 16:20:13 +01:00
char *alias; // 29 bytes alias if ETH_PLUGIN_RESULT_OK_ALIAS set
2020-09-22 09:22:49 +02:00
} ethPluginInitContract_t;
2023-11-06 19:24:25 +01:00
// void handle_init_contract(ethPluginInitContract_t *parameters);
2020-09-22 09:22:49 +02:00
// Provide parameter
2023-11-06 18:12:06 +01:00
typedef struct ethPluginProvideParameter_s {
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
2023-11-06 19:24:25 +01:00
uint8_t *pluginContext; // PLUGIN_CONTEXT_SIZE
const uint8_t *parameter; // 32 bytes parameter
2020-12-01 16:20:13 +01:00
uint32_t parameterOffset;
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
} ethPluginProvideParameter_t;
2023-11-06 19:24:25 +01:00
// void handle_provide_parameter(ethPluginProvideParameter_t *parameters);
2020-09-22 09:22:49 +02:00
// Finalize
2023-11-06 18:12:06 +01:00
typedef struct ethPluginFinalize_s {
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
2023-11-06 19:24:25 +01:00
uint8_t *pluginContext; // PLUGIN_CONTEXT_SIZE
2020-09-22 09:22:49 +02:00
2020-12-01 16:20:13 +01:00
uint8_t *tokenLookup1; // set by the plugin if a token should be looked up
uint8_t *tokenLookup2;
2020-09-22 09:22:49 +02:00
const uint8_t *amount; // set an uint256 pointer if uiType is UI_AMOUNT_ADDRESS
const uint8_t *address; // set to the destination address if uiType is UI_AMOUNT_ADDRESS. Set
// to the user's address if uiType is UI_TYPE_GENERIC
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
eth_ui_type_t uiType;
2020-12-01 16:20:13 +01:00
uint8_t numScreens; // ignored if uiType is UI_AMOUNT_ADDRESS
2023-11-06 19:24:25 +01:00
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
} ethPluginFinalize_t;
2023-11-06 19:24:25 +01:00
// void handle_finalize(ethPluginFinalize_t *parameters);
2020-09-22 09:22:49 +02:00
2020-12-01 16:20:13 +01:00
// Provide token
2020-09-22 09:22:49 +02:00
2023-11-06 18:12:06 +01:00
typedef struct ethPluginProvideInfo_s {
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
2023-11-06 19:24:25 +01:00
uint8_t *pluginContext; // PLUGIN_CONTEXT_SIZE
2020-09-22 09:22:49 +02:00
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
union extraInfo_t *item1; // set by the ETH application, to be saved by the plugin
union extraInfo_t *item2;
2020-09-22 09:22:49 +02:00
2021-05-20 14:34:45 +02:00
uint8_t additionalScreens; // Used by the plugin if it needs to display additional screens
// based on the information received from the token definitions.
2021-05-20 14:34:32 +02:00
2023-11-06 19:24:25 +01:00
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
} ethPluginProvideInfo_t;
2023-11-06 19:24:25 +01:00
// void handle_provide_token(ethPluginProvideInfo_t *parameters);
2020-09-22 09:22:49 +02:00
// Query Contract name and version
// This is always called on the non aliased contract
2023-11-06 18:12:06 +01:00
typedef struct ethQueryContractID_s {
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
2023-11-06 19:24:25 +01:00
uint8_t *pluginContext; // PLUGIN_CONTEXT_SIZE
2020-09-22 09:22:49 +02:00
2020-12-01 16:20:13 +01:00
char *name;
2021-05-17 17:09:29 +02:00
size_t nameLength;
2020-12-01 16:20:13 +01:00
char *version;
2021-05-17 17:09:29 +02:00
size_t versionLength;
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
} ethQueryContractID_t;
2023-11-06 19:24:25 +01:00
// void handle_query_contract_id(ethQueryContractID_t *parameters);
2020-09-22 09:22:49 +02:00
// Query Contract UI
2023-11-06 18:12:06 +01:00
typedef struct ethQueryContractUI_s {
2020-12-01 16:20:13 +01:00
ethPluginSharedRW_t *pluginSharedRW;
ethPluginSharedRO_t *pluginSharedRO;
Add support for ERC-721 and ERC-1155 (v3) (#218) * First draft for erc721 token allowance * Split ui and provide parameters into their own files * Print txtype when not supported * fix compilation for erc721 * Use pluginType * Add debug statement in compound plugin * add debug error msg in plugin error * Add parameter parsing for all methods * Remove debug logs * Add SET_APPROVAL_FOR_ALL; Add correct parsing method on contract init * Add dst_size parameter to copy functions * Add query contract id code * format * Add UIs * update ethapp.asc * Change setExternalPlugin to setPlugin; Add support for ERC721 * clang-format * Fix typo Unconsistent -> Inconsistent * Add support for 721; use extraInfo * Add extraInfo to ethpluginQueryConractUI * Rename extraInfo to item * Add txFromEtherscan to tests * Add nft key and temp padding * Remove comments around HAVE_BYPASS_SIGNATURES * Rename TESTING_KEY to NFT_TESTING_KEY * Add comments regarding value of queryContractUI->item * Fix comment regarding method selector * Rename provideToken to provideInfo; Update plugin doc * fix caps of eth_plugin_prepare_provide_info * fix caps of handle_provide_info * Use verificationFn insead of hardcoded cx_ecdsa_verify * Add comments about nftInfo_t and tokenDefinition_t * Add erc721 test * Remove comment from plugin interface version * Fix network_ticker duplicate * Add setPlugin and provideNFTInfo to doc.asc * Add back setExternalPlugin; implement new setPlugin * Update plugin sdk * Call setPlugin instead of setExternalPlugin * setPlugin work without checking sig * Remove printf of displayed fees * Add working 721 test * Finalize ERC721 and add simple test * Display NFT address on set approval and operator * Support set approval for all for erc721 * Finish UI for set approval for all erc721 * Move copy_parameter and copy_address to eth_plugin_internal; Add tests for erc721 * update plugin sdk * Add erc1155 plugin and 1155 tests placeholder * Add restriction for AWS key and setPlugin * Add NOT_OLD_INTERNAL variant; Add erc_1155_plugin_call * Fixed compilation warnings (function pointer casting) Co-authored-by: pscott <scott.piriou@ledger.fr>
2021-11-22 14:39:36 +01:00
union extraInfo_t *item1;
union extraInfo_t *item2;
char network_ticker[MAX_TICKER_LEN];
2023-11-06 19:24:25 +01:00
uint8_t *pluginContext; // PLUGIN_CONTEXT_SIZE
2020-12-01 16:20:13 +01:00
uint8_t screenIndex;
2020-12-01 16:20:13 +01:00
char *title;
2021-05-17 17:09:29 +02:00
size_t titleLength;
2020-12-01 16:20:13 +01:00
char *msg;
2021-05-17 17:09:29 +02:00
size_t msgLength;
2020-09-22 09:22:49 +02:00
2023-11-06 19:24:25 +01:00
eth_plugin_result_t result;
2020-09-22 09:22:49 +02:00
} ethQueryContractUI_t;
2023-11-06 19:24:25 +01:00
// void handle_query_contract_ui(ethQueryContractUI_t *parameters);
2023-11-06 18:12:06 +01:00
2023-11-06 19:24:25 +01:00
// clang-format on