1
- # Solana
1
+ # Solana
2
2
3
3
## Prequisities
4
4
5
5
Ensure that you are using the correct version of the Solana and Anchor CLI tools by consulting ` Anchor.toml ` .
6
+
6
7
``` toml
7
8
[toolchain ]
8
9
anchor_version = " 0.29.0" # CLI
9
- solana_version = " 1.17.2 "
10
+ solana_version = " 1.18.10 "
10
11
```
11
12
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
+ ```
13
18
14
19
## Design Overview
15
20
@@ -92,8 +97,6 @@ Program log: Instruction: ReleaseInboundMint
92
97
Program log: Instruction: ReleaseInboundUnlock
93
98
```
94
99
95
-
96
-
97
100
## Testing
98
101
99
102
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
103
106
To ensure the SDK has the generated IDL, run the tests with the make command:
104
107
105
108
``` 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 >
0 commit comments