0.2.4 • Published 8 months ago

@ledgerhq/coin-tester v0.2.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Coin-tester

What is the coin config

Find more information here

Setup

Prerequisites

  • Ledger Live development setup
git clone git@github.com:LedgerHQ/ledger-live.git
cd ledger-live
pnpm install
pnpm build:libs

Build the speculos image

You only have to build speculos locally if you are on a Mac M1. Otherwise you can uncomment the image provided in the docker-compose.yml

  1. Clone speculos: git clone git@github.com:LedgerHQ/speculos.git

  2. Patch Dockerfile:

# before
FROM ghcr.io/ledgerhq/speculos-builder:latest AS builder
# after
FROM speculos-builder:latest AS builder
  1. Build image
cd speculos
docker build -f build.Dockerfile -t speculos-builder:latest .
docker build -f Dockerfile -t speculos:latest .

Environment variables

  • Generate a Github token classic and give it full "repo" and "project" rights. Make sure to authorize Ledger SSO.

  • Go in the coin-module you want to test and create a .env in the folder where your test resides. For exemple for coin-evm create the file should be located in: src/__test__/coin-tester/.env.

Copy .env.example.

cp .env.example .env

A .env should have at the very least the following attributes:

SEED=chronic find success crew board merit elder life achieve scout gravity soul brief pen job
GH_TOKEN=
SPECULOS_API_PORT=4040
SPECULOS_IMAGE=speculos

If you want you can generate a new seed using this tool

Coin Module Specific setup

Polkadot

To coin Polkadot Coin tester we will need to build the local test node Docker image.

cd libs/coin-modules/coin-polkadot/src/test/coin-tester
make build

Run tests for a coin module

pnpm coin:<coin-module-name> coin-tester

# e.g
# pnpm coin:evm coin-tester
# pnpm coin:polkadot coin-tester

Troubleshooting

EVM Coin tester

The \"RPC\" variable is not set. Defaulting to a blank string.

This error can safely be ignored. The RPC is passed as a variable env at runtime. Check here and here

0.2.5-spl-test.0

8 months ago

0.2.5-nightly.0

8 months ago

0.2.4

9 months ago

0.2.4-next.0

9 months ago

0.2.4-next.1

9 months ago

0.2.3

9 months ago

0.2.3-nightly.4

9 months ago

0.2.3-next.0

9 months ago

0.2.3-nightly.3

10 months ago

0.2.3-nightly.2

10 months ago

0.2.3-nightly.1

10 months ago

0.2.3-nightly.0

10 months ago

0.2.1-nightly.3

11 months ago

0.2.0-next.0

1 year ago

0.2.1-nightly.0

12 months ago

0.2.1-next.0

11 months ago

0.2.1-nightly.2

11 months ago

0.2.1-nightly.1

12 months ago

0.1.1-nightly.1

1 year ago

0.2.1

11 months ago

0.1.1-nightly.2

1 year ago

0.2.0

12 months ago

0.1.1-nightly.3

1 year ago

0.2.0-nightly.4

1 year ago

0.2.2-hotfix.0

11 months ago

0.2.2

11 months ago

0.1.1-nightly.0

1 year ago

0.1.0

1 year ago