coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

lang: Add const of program ID to `declare_id!` and `declare_program!` #3019

Closed cryptopapi997 closed 1 week ago

cryptopapi997 commented 3 weeks ago

Reopening https://github.com/coral-xyz/anchor/pull/3002 because I had accidentally deleted my fork.

vercel[bot] commented 3 weeks ago

@cryptopapi997 is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

cryptopapi997 commented 2 weeks ago

thoughts on this @acheroncrypto ?

acheroncrypto commented 2 weeks ago

I think it's best to avoid this breaking change, and keep it consistent with solana-program's implementation. We can instead add the const ID as a separate definition.

cryptopapi997 commented 1 week ago

@acheroncrypto Sounds good to me! I've changed it accordingly (except in deprecated_id_to_tokens since this is deprecated and so shouldn't have any new updates anymore unless they're bug fixes)