-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: use separate program id for dev env #87
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
=====================================
Coverage 0.74% 0.74%
=====================================
Files 1 1
Lines 667 667
=====================================
Hits 5 5
Misses 662 662 ☔ View full report in Codecov by Sentry. |
@skosito when I run:
I get:
|
sorry forgot to mention, can you please try running from gateway folder? |
Running @skosito gateway keypair that is generated:
differs from the one being used in localnet: Is this important? |
i think we just need to use correct key pair when we deploy program (it is deployment key pair), for IDL generation it doesn't matter |
Ok, so I suppose we can copy this file: From the node repo into protocol-contracts-solana so that it's published on npm alongside the gateway IDL. |
lets do that in separate PR, i also have 1 more question, since our prod program id starts with Zeta prefix, do we want to generate dev program id with specific prefix so it is better from UI/UX perspective, or keeping this random one is ok? |
@skosito I think a random program ID for dev purposes is fine. |
Using
features
it is possible to toggle between different program ids.However, in latest anchor 0.30.1 there is a bug preventing that coral-xyz/anchor#3465
It is stated in issue that fixed commit can be used. Normally it is not ok to use non-released version like this, but this is just couple of commits after 0.30.1, and all those commits are not breaking or anything that would have impact.
With this,
anchor build
would work like currently, andanchor build -- --features="dev"
would create IDL with dev program id we use for development in localnet, node etc.