From 6d14d5db81ec795efa0e13839fbc48a03cb9f307 Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Fri, 13 Oct 2023 10:29:58 +0200 Subject: [PATCH 1/3] [add] ledger_app.toml C manifest --- .github/workflows/build_and_functional_tests.yml | 1 - ledger_app.toml | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ledger_app.toml diff --git a/.github/workflows/build_and_functional_tests.yml b/.github/workflows/build_and_functional_tests.yml index 23376186..0aa6f42a 100644 --- a/.github/workflows/build_and_functional_tests.yml +++ b/.github/workflows/build_and_functional_tests.yml @@ -44,4 +44,3 @@ jobs: download_app_binaries_artifact: plugin_binaries additional_app_binaries_artifact: ethereum_build_develop additional_app_binaries_artifact_dir: ./tests/ethereum_build/build - test_dir: tests diff --git a/ledger_app.toml b/ledger_app.toml new file mode 100644 index 00000000..c264aa9d --- /dev/null +++ b/ledger_app.toml @@ -0,0 +1,7 @@ +[app] +build_directory = "./" +sdk = "C" +devices = ["nanos", "nanox", "nanos+", "stax"] + +[tests] +pytest_directory = "./tests/" From 8e479ad5912673fdcdd48a2cf240bba924effaa4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Nov 2023 16:21:53 +0000 Subject: [PATCH 2/3] [auto-update] Bump SDK to latest develop version 4d8e044 --- ethereum-plugin-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum-plugin-sdk b/ethereum-plugin-sdk index 1fe4085d..4d8e0448 160000 --- a/ethereum-plugin-sdk +++ b/ethereum-plugin-sdk @@ -1 +1 @@ -Subproject commit 1fe4085d04a88f4238103a4ed3db1484fdb69c63 +Subproject commit 4d8e04480530cd14dd670a0a6405bca992d16942 From c7772d68fb0b6d539ab5ea636748f47b0664ebca Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Fri, 10 Nov 2023 10:50:57 +0100 Subject: [PATCH 3/3] Fix handle_finalize parameter type and use common sdk size checker --- src/handle_finalize.c | 3 +-- src/plugin.h | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/handle_finalize.c b/src/handle_finalize.c index eb01e6ea..c8231770 100644 --- a/src/handle_finalize.c +++ b/src/handle_finalize.c @@ -1,7 +1,6 @@ #include "plugin.h" -void handle_finalize(void *parameters) { - ethPluginFinalize_t *msg = (ethPluginFinalize_t *) parameters; +void handle_finalize(ethPluginFinalize_t *msg) { context_t *context = (context_t *) msg->pluginContext; msg->uiType = ETH_UI_TYPE_GENERIC; diff --git a/src/plugin.h b/src/plugin.h index 327067f9..53449dbc 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -79,9 +79,6 @@ typedef struct context_s { selector_t selectorIndex; } context_t; -// Piece of code that will check that the above structure is not bigger than 5 * 32. Do not remove -// this check. -#define PLUGIN_CONTEXT_SIZE (5 * INT256_LENGTH) -#define ASSERT_SIZEOF_PLUGIN_CONTEXT(s) \ - _Static_assert(sizeof(s) <= PLUGIN_CONTEXT_SIZE, "Plugin context structure is too big.") +// Check if the context structure will fit in the RAM section ETH will prepare for us +// Do not remove! ASSERT_SIZEOF_PLUGIN_CONTEXT(context_t);