Repository navigation
feat: MomoSwap NFT queue settle/refund, drop graduation, unwrap_cook - #13
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Closes the gaps between cookie-mcp and the transactions MomoSwap's API builds. Tools: 73 → 76.
New tools
nft_drop_settle: after a drop graduates at its target, each mint is a request a keeper settles. If the keeper never does, the buyer was stuck: the tool even said "it can only be refunded" but offered no way to do it. This pushes the drop's FIFO mint queue up to the wallet's own request, at most 5 heads per call. For each head it asks for/v1/nft/tx/settle-mint, and if MomoSwap refuses,/v1/nft/tx/refund-mint. When both refuse, the settle reason is shown. Heads ahead of ours pay out to their own buyers. The caller pays fees only: a settle's rent is repaid in the same instruction, and a refund may open the buyer's wCOOK account.nft_drop_graduate:/v1/nft/tx/graduatefor a sold-out drop (permissionless).unwrap_cook: closes the wallet's wCOOK account and returns its balance as native COOK. This is where launchpad referral earnings and NFT sell-backs collect. It's built locally (oneCloseAccounton our own account) and simulated with a zero-spend budget.Safety
verify.tsgets three kinds,settle/refund/graduate, with this wallet held to thesettler/caller/signerslot. Every PDA is re-derived from the vendored IDL as before.Not added
/v1/nft/tx/buy-many: item k of a batch can't be simulated before k−1 lands, sonft_drop_mintkeeps building one fresh/tx/buyper item.Docs
README now says MomoSwap launches NFT collections too (intro and "What it can do"), and documents the new tools. CHANGELOG has an Unreleased entry.
Verification
yarn testgreen (868 tests),smoke --strictOK with 76 tools.holderExitfor sold-out, andunwrapPlan.