diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index d922561a6..77c91f459 100644 --- a/examples/oft-solana/README.md +++ b/examples/oft-solana/README.md @@ -13,7 +13,7 @@ ## Setup We recommend using `pnpm` as a package manager (but you can of course use a package manager of your choice). -Additionally, we highly recommend that you use the most up-to-date Docker version to avoid any issues with anchor +Docker is required to build using anchor. We highly recommend that you use the most up-to-date Docker version to avoid any issues with anchor builds. ### Get the code @@ -49,10 +49,28 @@ anchor keys sync :warning: `--force` flag overwrites the existing keys with the ones you generate. -:warning: Ensure that [lib.rs](./programs/oft/src/lib.rs) has the updated programId. +Run `anchor keys list` to view the generated programIds (public keys). The output should look something like this: + +``` +endpoint: +oft: +``` + +Copy the OFT's programId and go into [lib.rs](./programs/oft/src/lib.rs). Note the following snippet: + +``` +declare_id!(Pubkey::new_from_array(program_id_from_env!( + "OFT_ID", + "9UovNrJD8pQyBLheeHNayuG1wJSEAoxkmM14vw5gcsTT" +))); +``` + +Replace `9UovNrJD8pQyBLheeHNayuG1wJSEAoxkmM14vw5gcsTT` with the programId that you have copied. ### Building and Deploying the OFT Program +Ensure you have Docker running before running the build command. + ```bash anchor build -v # verification flag enabled solana program deploy --program-id target/deploy/oft-keypair.json target/verifiable/oft.so -u mainnet-beta