use anchor keys list instead of solana address -k (#26)

This commit is contained in:
Paul 2022-03-06 16:15:34 -05:00 committed by GitHub
parent 2d921ac23b
commit 9b36e8f1d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ use std::mem;
use anchor_lang::prelude::*; use anchor_lang::prelude::*;
// this key needs to be changed to whatever public key is returned by "anchor keys list"
declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
#[program] #[program]

View File

@ -484,9 +484,9 @@ We are going to deploy on `devnet`.
Here is your deployment checklist 🚀 Here is your deployment checklist 🚀
1. Run `anchor build`. Your program keypair is now in `target/deploy`. Keep this secret. You can reuse it on all clusters. 1. Run `anchor build`. Your program keypair is now in `target/deploy`. Keep this keypair secret. You can reuse it on all clusters.
2. Run `solana address -k target/deploy/tic_tac_toe-keypair.json` and copy the address into your `declare_id!` macro at the top of `lib.rs`. 2. Run `anchor keys list` to display the keypair's public key and copy it into your `declare_id!` macro at the top of `lib.rs`.
3. Run `anchor build` again. This step is necessary to include our new program id in the binary. 3. Run `anchor build` again. This step is necessary to include the new program id in the binary.
4. Change the `provider.cluster` variable in `Anchor.toml` to `devnet`. 4. Change the `provider.cluster` variable in `Anchor.toml` to `devnet`.
5. Run `anchor deploy` 5. Run `anchor deploy`
6. Run `anchor test` 6. Run `anchor test`