Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Created September 14, 2021 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DougAnderson444/e285709c4670b992f185ae32a1a13204 to your computer and use it in GitHub Desktop.
Save DougAnderson444/e285709c4670b992f185ae32a1a13204 to your computer and use it in GitHub Desktop.
Value for the declare_id field of the Solana Anchor program
Ref: https://discord.com/channels/739225212658122886/838515957042774038/886918683203625001
regarding the hardcoded value in the declare_id field of the rust program, the workflow look like this:
1. build only with placeholder ID
2. solana address -k <the-program-keypair-in-target-deploy-folder>
3. Update lib.rs
4. build AND deploy
@DougAnderson444
Copy link
Author

But also:

coral-xyz/anchor#695

They might add a macro for this by the time you read this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment