Browse Source

docs: clarify how to use program keypair(#1812)

Co-authored-by: Paul Schaaf <paulsimonschaaf@gmail.com>
Nazreen 3 years ago
parent
commit
1222968ec3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      docs/src/tutorials/tutorial-0.md

+ 3 - 2
docs/src/tutorials/tutorial-0.md

@@ -115,6 +115,9 @@ file in your program's crate.
 If you've developed on Ethereum, the IDL is analogous to the `abi.json`.
 :::
 
+The `build` command also generates a random new keypair in the `target/` directory (if there's not one already) whose public key will be the address of your program once deployed. You can obtain the address by running `anchor keys list`.
+Make sure that the public key inside your `lib.rs` (the argument to `declare_id!`) file and your `Anchor.toml` matches the one returned by `anchor keys list`. Then run `build` again to include the `lib.rs` changes in the build.
+
 ## Deploying
 
 Once built, we can deploy the program by running
@@ -123,8 +126,6 @@ Once built, we can deploy the program by running
 anchor deploy
 ```
 
-Take note of the program's deployed address. We'll use it next.
-
 ## Generating a Client
 
 Now that we've built a program, deployed it to a local cluster, and generated an IDL,