Skip to content

blooo-io/app-plugin-paraswap-1

 
 

Repository files navigation

Ledger Paraswap Plugin

This is a plugin for the Ethereum application which helps parsing and displaying relevant information when signing a Paraswap transaction.

Prerequisite

Be sure to have your environment correctly set up (see Getting Started) and ledgerblue and installed.

If you want to benefit from vscode integration, it's recommended to move the toolchain in /opt and set BOLOS_ENV environment variable as follows

BOLOS_ENV=/opt/bolos-devenv

and do the same with BOLOS_SDK environment variable

BOLOS_SDK=/opt/nanos-secure-sdk

Documentation

Need more information about the interface, the architecture, or general stuff about ethereum plugins? You can find more about them in the ethereum-app documentation.

Smart Contracts

Smart contracts covered by this plugin are:

Network Version Smart Contract
Arbitrum V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Base V5 0x59c7c832e96d2568bea6db468c1aadcbbda08a52
BSC V4 0x55a0e3b6579972055faa983482aceb4b251dcf15
BSC V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Ethereum V4 0x1bd435f3c054b6e901b7b108a0ab7617c808677b
Ethereum V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Fantom V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Optimism V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Polygon V4 0x90249ed4d69d70e709ffcd8bee2c5a566f65dade
Polygon V5 0xdef171fe48cf0115b1d80b88dc8eab59176fee57
Polygon ZK EVM V5 0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a

Compilation

make DEBUG=1  # compile optionally with PRINTF
make load     # load the app on the Nano using ledgerblue

This plugin uses the ethereum-plugin-sdk. If there's an error while building, try running git pull --recurse-submodules in order to update the sdk. If this fixes your bug, please file an issue or create a PR to add the new sdk version :)

If you need to update the sdk, you will need to do it locally and create a PR on the ethereum-plugin-sdk repo.

Tests & Continuous Integration

The flow processed in GitHub Actions is the following:

RDP tests execution

You can test the plugin using a remote development host, if you deal with an unsupported CPU architecture (Ex.: Apple M1). Your server must have a GUI Desktop installed.

  1. Install first xrdp on remote linux VM (Ex: Ubuntu 20.04.1)
sudo apt install xrdp
  1. Set access control to none :
xhost +

access control disabled, clients can connect from any host

  1. Connect to the VM using Remote Desktop Client using port forwarding through ssh connection on port 3389. This will keep the security at maximum and avoid exposing the VM to the web on RDP port.
ssh -i PRIVATEKEY USERNAME@PUBLICIP -L 3389:localhost:3389
  1. Identify the Display index:
echo $DISPLAY

:10.0

  1. In the terminal where are executed the tests set Display to the RDP previous value, here :10.0:
export DISPLAY=:10.0
  1. After this setup you could run yarn test and see the emulator in the RDP display going through the test sequence.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 74.6%
  • C 21.0%
  • JavaScript 1.8%
  • CMake 1.4%
  • Shell 0.6%
  • Makefile 0.4%
  • Dockerfile 0.2%