-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add documentation on coin tester * SPECULOS_API_PORT * coin-polkadot support websocket provider * rpc.polkadot.io endpoint in chopsticks
- Loading branch information
Showing
16 changed files
with
76 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ tsconfig.tsbuildinfo | |
rce | ||
.env | ||
coverage | ||
db.sqlite* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/coin-modules/coin-polkadot/src/test/coin-tester/.env.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# development seed only. generated with https://iancoleman.io/bip39 | ||
SEED=chronic find success crew board merit elder life achieve scout gravity soul brief pen job | ||
GH_TOKEN=gh_token | ||
API_PORT=4040 | ||
SPECULOS_API_PORT=4040 | ||
SPECULOS_IMAGE=speculos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
IMAGE_NAME = coin-tester-chopsticks | ||
CONTAINER_NAME = chopsticks | ||
CURRENT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
|
||
build: | ||
docker build -f $(CURRENT_DIR)/chopsticks.Dockerfile -t $(IMAGE_NAME)\:latest . | ||
docker build -f chopsticks.Dockerfile -t $(IMAGE_NAME)\:latest . | ||
|
||
run: | ||
docker run --rm -d -p "8000:8000" --name $(CONTAINER_NAME) $(IMAGE_NAME)\:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
libs/coin-modules/coin-polkadot/src/test/coin-tester/coin-tester-chopsticks.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ pnpm build:libs | |
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 [email protected]:LedgerHQ/speculos.git` | ||
|
||
2. Patch Dockerfile: | ||
|
||
```Dockerfile | ||
|
@@ -33,6 +34,7 @@ FROM speculos-builder:latest AS builder | |
``` | ||
|
||
3. Build image | ||
|
||
```sh | ||
cd speculos | ||
docker build -f build.Dockerfile -t speculos-builder:latest . | ||
|
@@ -41,7 +43,7 @@ docker build -f Dockerfile -t speculos:latest . | |
|
||
### Environment variables | ||
|
||
- Generate a [Github token classic](https://github.com/settings/tokens) and make sure to authorize Ledger SSO | ||
- Generate a [Github token classic](https://github.com/settings/tokens) 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`. | ||
|
@@ -70,15 +72,23 @@ If you want you can generate a new seed using [this tool](https://iancoleman.io/ | |
To coin Polkadot Coin tester we will need to build the local test node Docker image. | ||
|
||
```sh | ||
pnpm coin:polkadot coin-tester:build | ||
cd libs/coin-modules/coin-polkadot/src/test/coin-tester | ||
make build | ||
``` | ||
|
||
## Run tests for a coin module {#runtests} | ||
|
||
```sh | ||
pnpm coin:<coin-module-name> coin-tester | ||
|
||
# e.g | ||
# pnpm coin:ethereum coin-tester | ||
# 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](https://github.com/LedgerHQ/ledger-live/blob/develop/libs/coin-modules/coin-evm/src/__tests__/coin-tester/anvil.ts#L28) and [here](https://github.com/LedgerHQ/ledger-live/blob/develop/libs/coin-modules/coin-evm/src/__tests__/coin-tester/scenarios/ethereum.ts#L144) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export type ENV = { | ||
GH_TOKEN: string; | ||
SEED: string; | ||
API_PORT: string; | ||
SPECULOS_API_PORT: string; | ||
}; |
02f6ec0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Bot] Daily non-reg on develop with 'Nitrogen' ✅ 157 txs ❌ 15 txs 💰 15 miss funds ($1,090.08) ⏲ 53min 10s
4 critical spec errors
Spec injective failed!
Spec Peercoin failed!
Spec Polygon zkEVM Testnet failed!
Spec Solana failed!
❌ 15 mutation errors
Please increase the account target to at least 6 accounts
Please increase the account target to at least 6 accounts
Please increase the account target to at least 6 accounts
Please increase the account target to at least 6 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 4 accounts
Please increase the account target to at least 8 accounts
Portfolio ($1,090.08) – Details of the 71 currencies
02026B93627Ed2F76551E7CeF0466468B12db8Fab806266107b69947D9c95CEd9E7c
0x246FFDB387F1F8c48072E1C13443540017bC71b7
osmo1rs97j43nfyvc689y5rjvnnhrq3tes6ghn8m44l
desmos1rs97j43nfyvc689y5rjvnnhrq3tes6gh0y9454
dydx1rs97j43nfyvc689y5rjvnnhrq3tes6ghj9xpr6
umee1rs97j43nfyvc689y5rjvnnhrq3tes6ghf2468l
persistence1rs97j43nfyvc689y5rjvnnhrq3tes6gh4swkdf
quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l
onomy1rs97j43nfyvc689y5rjvnnhrq3tes6ghpaunjg
sei1rs97j43nfyvc689y5rjvnnhrq3tes6ghksen9v
stars1rs97j43nfyvc689y5rjvnnhrq3tes6gh0qlcgu
core1rs97j43nfyvc689y5rjvnnhrq3tes6ghgjs7yk
cro14zpaxs3msrdnx5ch3m3y3yue0wwwevrf2hmwra
erd18n5sk95fq9dtgdsa9m9q5ddp66ch9cq5lpjflwn5j9z8x2e9h0qqrvk5qp
0.0.3663977
f2ed4c9253d3aca7d679bfa9f528d13e85c7f522b8857e094c850a157b750209
SP2J4VHFRAT94KY6NFT6129HBA382S6R98W9ABFG2
GDJPZPOWITPCBX3TIHB6N7E4WCHS6JBZKSNWGU34QYCJXKWBTUZY5RYC
0xc4B17901FECf86932c3bb296BB00E7c6816Fd416
0xc4B17901FECf86932c3bb296BB00E7c6816Fd416
TM4WJOS4MZ2TD775W7GSXZMBUF74YT6SKSBXCZY3N7OUIAPXE54MZ5FCD4
tb1qqsk6rter25qfxful9dhzrtunyyaga2pvvv89vl
qqgq6klv8h8a592a8vtmdsafvzu3l639fsjv0y0lsw
AYikw3VbrCivc3KZUSBriFf2yfkWMbfcZ8
XinTss7uEgMEo6sbReTAZKburNSehxA5wG
dgb1q3tr3n52yqg4z8v2pxxykfhwpx22xfy3h53k5jp
DErywhANM2NfctPACWXX6rcemYF6L9gfAm
RDkzJayYAfwwEuh9Efz44ds3w3giNzqbaa
ltc1qk8c3e2tpyd2fj50jm03gzdhkklrvlsyav2klg6
DFfaBrPgNicDbdBqgxZ4f5mK8V8sC1XDpN
3PRX3xnmMDyJh2SsQPF3mJWCDhM7R2ctfw
Ed8hE3CZPp2JTTkVtNhYZqtngXdPqvZXPr
t1SDpcaNZmbCH5TCCb5vNAh5bXs3isDtA5h
znc25Kqjvpy65kYRCTzeun4jpFpomQ6EBGw
0x7584df0780C5eB83b26aE55abBc265014f8bf897
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0x60A4E7657D8df28594ac4A06CDe01E18E948a892
0573d7a9c745fa9fe224b080832aa93d740760b94f192c9c141c709945e9aaaf
tz1aDK1uFAmnUXZ7KJPEmcCEFeYHiVZ56zVF
r9etPtq3oboweMPju5gdYufmvwhH2euz8z
Performance ⏲ 53min 10s
Time spent for each spec: (total across mutations)