Setup

This step is getting the plugin to compile. But first, we need to set up the working environment linked to the Ethereum app.

Clone the Ethereum App

git clone --recurse-submodules https://github.com/LedgerHQ/app-ethereum
cd app-ethereum

Build the Ethereum App

You can easily build the Ethereum app by following these instructions.

Once you've successfully compiled the Ethereum app you are ready to walk through the Boilerplate plugin example.

Boilerplate plugin

Here is a boilerplate plugin to help you write your own. This guide walks you through the plugin.

You can follow it best by forking the repository app-plugin-boilerplate (opens in a new tab).

cd ..
git clone --recurse-submodules https://github.com/LedgerHQ/app-plugin-boilerplate

What's what

There is no need to build it right now, only after adding tests. For now, in app-plugin-boilerplate/ there are these folders:

  • ethereum-plugin-sdk: This repository contains information shared by the Ethereum app and your plugin, such as structure definitions, utility functions, etc.
  • icons and glyphs : plugin icons as displayed on the device. We will get to it later, but you can read about it here.
  • src: the actual source code (in C).
  • tests: the test folder (using the Ragger testing framework).
  • .github/workflows : the CI workflows which are a requirement to submit your plugin. To have more details you can refer to this section.

Change the plugin info

There is the Makefile directly in the repository root. You need to open Makefile and change the plugin infos including APPNAME to suit your plugin name (e.g., Paraswap, 1inch, Lido), APPVERSION for plugin version and other various infos.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Nano S, Ledger Vault, Bolos are registered trademarks of Ledger SAS