Prerequisite
Before proceeding with the SWAP integration, ensure that your application:
- Uses the Standard Makefile.
- Follows the Standard application format.
- Has the correct tests structure.
Although these steps may seem unrelated to the SWAP feature, they significantly simplify the integration process, to the point that no support is provided if you skip them.
You should use the app-boilerplate as an example. Depending on the date of your fork from the Boilerplate application, most of these steps may already be done.
Standard Makefile
Ensure that, like the Boilerplate Makefile, your Makefile contains:
Standard application files
Ensure that, like the Boilerplate Makefile, the DISABLE_STANDARD_APP_FILES
is not set to 1
:
Test structure
Ensure that your tests directory follows the structure below:
The application_client
directory contains the minimalist python client for crafting and sending APDUs to the application.
It is extracted in order to be able to be used in both tests setup.
The standalone
directory contains the standalone tests of the application, when it is started from the Dashboard of the device (main use case).
The swap
directory contains the tests of the SWAP feature of the application, when it is started by the Exchange application through the os_lib_call
API.
This setup needs the Exchange and Ethereum binaries compiled.