From 1929208e1b735ddd17d468a23c6fddbf61110228 Mon Sep 17 00:00:00 2001 From: nazreen Date: Thu, 21 Nov 2024 16:57:44 +0800 Subject: [PATCH 1/4] clarify on what to do with OFT programId --- examples/oft-solana/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index d922561a6..7102a0384 100644 --- a/examples/oft-solana/README.md +++ b/examples/oft-solana/README.md @@ -47,9 +47,28 @@ solana-keygen new -o target/deploy/oft-keypair.json --force 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 generated programIds. 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 From 7eee1472cc46eddb4cc5346a7f2533766198b007 Mon Sep 17 00:00:00 2001 From: nazreen Date: Thu, 21 Nov 2024 17:03:17 +0800 Subject: [PATCH 2/4] rm extra line --- examples/oft-solana/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index 7102a0384..078477007 100644 --- a/examples/oft-solana/README.md +++ b/examples/oft-solana/README.md @@ -47,11 +47,10 @@ solana-keygen new -o target/deploy/oft-keypair.json --force anchor keys sync ``` - :warning: `--force` flag overwrites the existing keys with the ones you generate. -Run `anchor keys list` to view generated programIds. The output should look something like this: +Run `anchor keys list` to view the generated programIds (public keys). The output should look something like this: ``` endpoint: From 726a2ab213e2158ec292f5a746f4d4ec13656b15 Mon Sep 17 00:00:00 2001 From: nazreen Date: Thu, 21 Nov 2024 17:10:30 +0800 Subject: [PATCH 3/4] note on docker before building --- examples/oft-solana/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index 078477007..a3b513af8 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,7 +49,6 @@ anchor keys sync :warning: `--force` flag overwrites the existing keys with the ones you generate. - Run `anchor keys list` to view the generated programIds (public keys). The output should look something like this: ``` @@ -71,6 +70,8 @@ Replace `9UovNrJD8pQyBLheeHNayuG1wJSEAoxkmM14vw5gcsTT` with the programId that y ### 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 From 9d4412059227c9a7bf58355d4ae89b895e9dda02 Mon Sep 17 00:00:00 2001 From: nazreen Date: Thu, 21 Nov 2024 17:54:14 +0800 Subject: [PATCH 4/4] line --- examples/oft-solana/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/oft-solana/README.md b/examples/oft-solana/README.md index a3b513af8..77c91f459 100644 --- a/examples/oft-solana/README.md +++ b/examples/oft-solana/README.md @@ -56,7 +56,6 @@ endpoint: oft: ``` - Copy the OFT's programId and go into [lib.rs](./programs/oft/src/lib.rs). Note the following snippet: ```