diff --git a/Makefile b/Makefile index cb9efe0e..e8a1e923 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ include $(BOLOS_SDK)/Makefile.defines # Mandatory configuration # ######################################## # Application name +# Will be displayed on screen by the Ethereum app APPNAME = "PluginBoilerplate" # Application version diff --git a/src/contract.c b/src/contract.c index 3d37c153..ae5de4ee 100644 --- a/src/contract.c +++ b/src/contract.c @@ -16,7 +16,7 @@ ********************************************************************************/ #include -#include "boilerplate_plugin.h" +#include "plugin.h" #include "xmacro_helpers.h" const uint32_t SELECTORS[SELECTOR_COUNT] = {SELECTORS_LIST(TO_VALUE)}; diff --git a/src/handle_finalize.c b/src/handle_finalize.c index f6ba228e..eb01e6ea 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" void handle_finalize(void *parameters) { ethPluginFinalize_t *msg = (ethPluginFinalize_t *) parameters; diff --git a/src/handle_init_contract.c b/src/handle_init_contract.c index 77728ab8..331d854e 100644 --- a/src/handle_init_contract.c +++ b/src/handle_init_contract.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" #include "utils.h" // Called once to init. diff --git a/src/handle_provide_parameter.c b/src/handle_provide_parameter.c index f51a0061..b34e2926 100644 --- a/src/handle_provide_parameter.c +++ b/src/handle_provide_parameter.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" // EDIT THIS: Remove this function and write your own handlers! static void handle_swap_exact_eth_for_tokens(ethPluginProvideParameter_t *msg, context_t *context) { diff --git a/src/handle_provide_token.c b/src/handle_provide_token.c index 5e688505..b7e53979 100644 --- a/src/handle_provide_token.c +++ b/src/handle_provide_token.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" // EDIT THIS: Adapt this function to your needs! Remember, the information for tokens are held in // `msg->token1` and `msg->token2`. If those pointers are `NULL`, this means the ethereum app didn't diff --git a/src/handle_query_contract_id.c b/src/handle_query_contract_id.c index 9c31e502..8c52902e 100644 --- a/src/handle_query_contract_id.c +++ b/src/handle_query_contract_id.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" // Sets the first screen to display. void handle_query_contract_id(ethQueryContractID_t *msg) { @@ -7,7 +7,7 @@ void handle_query_contract_id(ethQueryContractID_t *msg) { // msg->version will be the lower sentence displayed on the screen. // For the first screen, display the plugin name. - strlcpy(msg->name, PLUGIN_NAME, msg->nameLength); + strlcpy(msg->name, APPNAME, msg->nameLength); // EDIT THIS: Adapt the cases by modifying the strings you pass to `strlcpy`. if (context->selectorIndex == SWAP_EXACT_ETH_FOR_TOKENS) { diff --git a/src/handle_query_contract_ui.c b/src/handle_query_contract_ui.c index dc9b0f77..6d2b8b49 100644 --- a/src/handle_query_contract_ui.c +++ b/src/handle_query_contract_ui.c @@ -1,4 +1,4 @@ -#include "boilerplate_plugin.h" +#include "plugin.h" // EDIT THIS: You need to adapt / remove the static functions (set_send_ui, set_receive_ui ...) to // match what you wish to display. diff --git a/src/boilerplate_plugin.h b/src/plugin.h similarity index 96% rename from src/boilerplate_plugin.h rename to src/plugin.h index 8db16a1d..1d1fbf5f 100644 --- a/src/boilerplate_plugin.h +++ b/src/plugin.h @@ -22,10 +22,6 @@ #include "eth_plugin_interface.h" #include "xmacro_helpers.h" -// Name of the plugin. -// EDIT THIS: Replace with your plugin name. -#define PLUGIN_NAME "PluginBoilerplate" - // All possible selectors of your plugin. // EDIT THIS: Enter your selectors here, in the format X(NAME, value) // A macro below will create for you: