Skip to content

Commit

Permalink
Added missing plugin SDK changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apaillier-ledger committed Oct 19, 2023
1 parent d414819 commit bdec1cd
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
36 changes: 36 additions & 0 deletions src_plugin_sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Ethereum Plugin SDK changelog

| Icon | Impact |
|----------------------|-------------------------------|
| :rotating_light: | Breaks build |
| :warning: | Breaks compatibility with app |

## [latest](/) - 2023/10/19

### Changed

* Now only uses *\_no\_throw* functions, SDK functions now return a boolean
(keeps the guidelines enforcer happy)

### Added

* *main* & *dispatch\_call* functions are now part of the SDK and don't need to
be implemented by each plugin :rotating_light:

## [b9777e7](/../../commit/b9777e7) - 2023/05/16

### Added

* Stax support with information passed from plugin to app-ethereum (with caller app struct)

## [a4b971f](/../../commit/a4b971f) - 2023/01/24

### Changed

* Removed end space in tickers :warning:

## [81eb658](/../../commit/81eb658) - 2022/11/17

### Added

* *U2BE\_from\_parameter* & *U4BE\_from\_parameter* safe functions
18 changes: 18 additions & 0 deletions src_plugin_sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ethereum-plugin-sdk

This repository is meant to be linked as submodule and used in external plugins working with [app-ethereum](https://github.com/LedgerHQ/app-ethereum).
It is composed of a few headers containing definitions about app-ethereum's internal transaction parsing state and some structures to communicate via shared memory.

## Updating this SDK

This SDK is updated at (app-ethereum) build time every time one of app-ethereum internals structures of interest are modified.
If this SDK gets updated, it is possible that all plugins must be recompiled (and eventually updated to work again with the update) with this new SDK.
Be careful, and weight your choices.

## Manual build

If for some reasons you want to rebuild this SDK manually from [app-ethereum](https://github.com/LedgerHQ/app-ethereum) (reminder: it is rebuild automatically when building app-ethereum itself):

```shell
$> python3 tools/build_sdk.py
```
2 changes: 1 addition & 1 deletion src_plugin_sdk/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void handle_query_contract_id(ethQueryContractID_t *parameters);
void handle_query_contract_ui(ethQueryContractUI_t *parameters);

// Calls the ethereum app.
void call_app_ethereum() {
static void call_app_ethereum() {
unsigned int libcall_params[5];
libcall_params[0] = (unsigned int) "Ethereum";
libcall_params[1] = 0x100;
Expand Down
9 changes: 8 additions & 1 deletion tools/build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ def merge_c_files(sources, nodes_to_extract):
"utils.c",
"utils.h",
]

for file in files_to_copy:
shutil.copyfile("src_plugin_sdk/" + file,
"ethereum-plugin-sdk/include/" + file)

files_to_copy = [
"CHANGELOG.md",
"README.md",
]
for file in files_to_copy:
shutil.copyfile("src_plugin_sdk/" + file,
"ethereum-plugin-sdk/" + file)

0 comments on commit bdec1cd

Please sign in to comment.