|
@@ -131,10 +131,19 @@ Notice how we dynamically created the `initialize` method under
|
|
the `rpc` namespace.
|
|
the `rpc` namespace.
|
|
|
|
|
|
Now, make sure to plugin your program's address into `<YOUR-PROGRAM-ID>` (a mild
|
|
Now, make sure to plugin your program's address into `<YOUR-PROGRAM-ID>` (a mild
|
|
-annoyance that we'll address next), and run
|
|
|
|
|
|
+annoyance that we'll address next). In order to run the client, you'll also need the path
|
|
|
|
+to your wallet's keypair you generated when you ran `solana-keygen new`; you can find it
|
|
|
|
+by running
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-node client.js
|
|
|
|
|
|
+solana config get keypair
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Once you've got it, run the client with the environment variable `ANCHOR_WALLET` set to
|
|
|
|
+that path, e.g.
|
|
|
|
+
|
|
|
|
+```bash
|
|
|
|
+ANCHOR_WALLET=<YOUR-KEYPAIR-PATH> node client.js
|
|
```
|
|
```
|
|
|
|
|
|
You just successfully created a client and executed a transaction on your localnet.
|
|
You just successfully created a client and executed a transaction on your localnet.
|
|
@@ -155,7 +164,7 @@ automatically updated to reflect the latest deployment, making it easy to change
|
|
your program, update your JavaScript, and run your tests in a fast feedback loop.
|
|
your program, update your JavaScript, and run your tests in a fast feedback loop.
|
|
|
|
|
|
::: tip NOTE
|
|
::: tip NOTE
|
|
-For now, the workspace feature is only available when running the `anchor test` command,
|
|
|
|
|
|
+For now, the workspace feature is only available when running the `anchor test` command,
|
|
which will automatically `build`, `deploy`, and `test` all programs against a localnet
|
|
which will automatically `build`, `deploy`, and `test` all programs against a localnet
|
|
in one command.
|
|
in one command.
|
|
:::
|
|
:::
|