Port the token fundraiser and order book Anchor v1 copies up to their v2 counterparts - #160
Merged
Merged
Conversation
A successful raise closes the vault and the fundraiser account but leaves every contributor account open, and refund, their only other closer, runs only on a failed raise. The v2 copy gained close_contributor for this; the v1 copy was left behind while anchor-v1/ was frozen. Port the handler, the FundraiserStillOpen error, the two tests, and the README and changelog text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8Wo5zNLqZ2NQqSjGD7WpK
…market PDAs The v2 copy moved the three vaults to PDAs of the market at ["base_vault", market], ["quote_vault", market] and ["fee_vault", market]; the v1 copy still created them at client-generated keys. Port the seeds, the tests (which now derive the vaults instead of generating and signing with them), and the README and changelog text. The v1 copy keeps checking the vaults it is passed with has_one, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8Wo5zNLqZ2NQqSjGD7WpK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#156 changed CONTRIBUTING.md so that
anchor-v1/copies track their Anchor v2 counterparts, and brought the betting market's v1 copy up to date. Its description named the two v1 copies that still lagged. This PR ports both, one commit each.Changes
close_contributor(f209222).refund, their only other closer, runs only on a failed raise, so the rent was stuck.FundraiserStillOpenerror, and closes the contributor account to the contributor.["base_vault", market],["quote_vault", market]and["fee_vault", market]instead of at client-generated keys, so a client derives them rather than generating and signing with three extra keypairs.has_oneconstraints, which is still what blocks passing the fee vault where the quote vault belongs.has_oneand v2 saysaddress =. I kept v1's constraint name.Verification
lib.rsentry repeats the file's existingneedless_borrowpattern, as every other handler there does.🤖 Generated with Claude Code
https://claude.ai/code/session_01F8Wo5zNLqZ2NQqSjGD7WpK
Generated by Claude Code