-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for publishing #35
base: staging
Are you sure you want to change the base?
Conversation
wallet = "~/.config/solana/id.json" | ||
|
||
[programs.mainnet] | ||
spl_token_lending = "<program-id-here>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When publishing, make sure to enter the program ID you want to use here.
ah, yeah usually we cd to the specific dir and build there. would it not make more sense to just add the Anchor.toml to the token-lending/program dir? |
The tricky part is that the root level workspace Cargo.toml references all the various programs in the monorepo. So the entire workspace needs to be uploaded to the registry to build, even if you cd into the relevant subdirectory. So we're left with a couple options.
Any other ideas? |
ahh makes sense, i guess the other way would be turning it into a subrepo but probably not worth the effort |
does this require docker to use? |
Yes. |
ah, yeah to have the builds consistent. im on wsl1 (can't use docker) so ill have to get someone else to run this later 🤦 my bad |
Adds an Anchor.toml to publish a deterministic build to https://anchor.projectserum.com by running in the root of the repo
Because this is a monorepo, in order to build any of the programs, all of them must be present. I've modified the Cargo.toml so that this isn't necessary. When you upload to the registry, only the code required to build the contract will be uploaded and displayed, instead of the entire repo.
You probably shouldn't merge the Cargo.toml changes, but you can refer to them for when you're ready to publish.