2022-03-07 14:21:32 +01:00
|
|
|
#ifndef _ETH_PLUGIN_HANDLER_H_
|
|
|
|
|
#define _ETH_PLUGIN_HANDLER_H_
|
2020-09-22 09:22:49 +02:00
|
|
|
|
|
|
|
|
#include "eth_plugin_interface.h"
|
|
|
|
|
|
2022-03-09 15:03:38 +01:00
|
|
|
#define NO_EXTRA_INFO(ctx, idx) \
|
|
|
|
|
(allzeroes(&(ctx.transactionContext.extraInfo[idx]), sizeof(extraInfo_t)))
|
|
|
|
|
|
2024-01-15 17:15:26 +01:00
|
|
|
#define NO_NFT_METADATA (NO_EXTRA_INFO(tmpCtx, 1))
|
|
|
|
|
|
2022-07-15 12:33:19 +02:00
|
|
|
void eth_plugin_prepare_init(ethPluginInitContract_t *init,
|
|
|
|
|
const uint8_t *selector,
|
|
|
|
|
uint32_t dataSize);
|
2020-12-01 16:20:13 +01:00
|
|
|
void eth_plugin_prepare_provide_parameter(ethPluginProvideParameter_t *provideParameter,
|
|
|
|
|
uint8_t *parameter,
|
|
|
|
|
uint32_t parameterOffset);
|
2020-09-22 09:22:49 +02:00
|
|
|
void eth_plugin_prepare_finalize(ethPluginFinalize_t *finalize);
|
2021-11-22 14:39:36 +01:00
|
|
|
void eth_plugin_prepare_provide_info(ethPluginProvideInfo_t *provideToken);
|
2020-12-01 16:20:13 +01:00
|
|
|
void eth_plugin_prepare_query_contract_ID(ethQueryContractID_t *queryContractID,
|
|
|
|
|
char *name,
|
|
|
|
|
uint32_t nameLength,
|
|
|
|
|
char *version,
|
|
|
|
|
uint32_t versionLength);
|
|
|
|
|
void eth_plugin_prepare_query_contract_UI(ethQueryContractUI_t *queryContractUI,
|
|
|
|
|
uint8_t screenIndex,
|
|
|
|
|
char *title,
|
|
|
|
|
uint32_t titleLength,
|
|
|
|
|
char *msg,
|
|
|
|
|
uint32_t msgLength);
|
2020-09-22 09:22:49 +02:00
|
|
|
|
2021-04-23 19:15:30 +02:00
|
|
|
eth_plugin_result_t eth_plugin_perform_init(uint8_t *contractAddress,
|
|
|
|
|
ethPluginInitContract_t *init);
|
2020-09-22 09:22:49 +02:00
|
|
|
// NULL for cached address, or base contract address
|
2021-05-06 12:29:17 +02:00
|
|
|
eth_plugin_result_t eth_plugin_call(int method, void *parameter);
|
2020-09-22 09:22:49 +02:00
|
|
|
|
2022-03-07 14:21:32 +01:00
|
|
|
#endif // _ETH_PLUGIN_HANDLER_H_
|