Skip to content

Commit ef20b45

Browse files
authored
solana: Update README prerequisites and testing instructions (#491)
* solana: Update README * solana: Add screenshots for troubleshooting section in README
1 parent d4563e3 commit ef20b45

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

solana/README.md

+47-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
# Solana
1+
# Solana
22

33
## Prequisities
44

55
Ensure that you are using the correct version of the Solana and Anchor CLI tools by consulting `Anchor.toml`.
6+
67
```toml
78
[toolchain]
89
anchor_version = "0.29.0" # CLI
9-
solana_version = "1.17.2"
10+
solana_version = "1.18.10"
1011
```
1112

12-
You will also need to install the toolchain listed in `rust-toolchain`.
13+
You will also need to install the toolchain listed in `rust-toolchain`. You can verify this by running:
14+
15+
```sh
16+
rustup show
17+
```
1318

1419
## Design Overview
1520

@@ -92,8 +97,6 @@ Program log: Instruction: ReleaseInboundMint
9297
Program log: Instruction: ReleaseInboundUnlock
9398
```
9499

95-
96-
97100
## Testing
98101

99102
The test files are loacated in the `sdk/solana/__tests__/` directory
@@ -103,5 +106,42 @@ In order to run them, the Solana programs must be built and their IDL made avail
103106
To ensure the SDK has the generated IDL, run the tests with the make command:
104107

105108
```sh
106-
make anchor-test
107-
```
109+
make test
110+
```
111+
112+
### Troubleshooting
113+
114+
<details>
115+
<summary><code>make: *** No rule to make target `test'. Stop.</code></summary>
116+
117+
- Ensure `Makefile` has target `test`
118+
</details>
119+
120+
<details>
121+
<summary><code>tsx: command not found</code></summary>
122+
123+
- Screenshot:
124+
<img src="images/tsx-command-not-found.png" alt="tsx command not found screenshot">
125+
- Update `Makefile` ([line #29](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/Makefile#L29)) from:
126+
127+
```sh
128+
tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \
129+
```
130+
131+
to:
132+
133+
```sh
134+
npx tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \
135+
```
136+
137+
</details>
138+
139+
<details>
140+
<summary><code>Lifecycle script `build:esm` failed with error</code></summary>
141+
142+
- Screenshot:
143+
<img src="images/lifecycle-script.png" alt="lifecycle script screenshot">
144+
- This occurs due to Typescript files failing compilation.
145+
- [`patch-idl` script](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/scripts/patch-idl) requires [`jq`](https://jqlang.github.io/jq/) to be installed. Install `jq` and retry.
146+
147+
</details>

solana/images/lifecycle-script.png

38.9 KB
Loading
102 KB
Loading

0 commit comments

Comments
 (0)