compression: use solana-kite in the tests - #129
Merged
Conversation
These three were the only Anchor projects not using solana-kite, and each had hand-rolled a `send` helper that is kite's `send_transaction_from_instructions` statement for statement: build a Message, take the blockhash, sign, send, map the result. Three copies of a function already available from a dependency the other 53 projects use. Wallet setup goes the same way: `Keypair::new()` followed by `svm.airdrop(...)` is what `create_wallet` does. `assert_custom_error` in cnft-vault now takes kite's `SolanaKiteError`. It was already matching on the text of the debug-formatted failure for `Custom(N)`, and kite wraps the same `FailedTransactionMetadata` debug output, so the assertion checks exactly what it did before. The Bubblegum fixtures, the keccak hash recomputation, the Merkle proof building and the borsh mirror structs are untouched. Those are the bulk of these files and kite has nothing to say about them. Tests: cnft-burn 3, cnft-vault 6, cutils 3. (cherry picked from commit 0726129) (cherry picked from commit 978e1b6)
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.
Replaces #127, whose content never reached
main. That PR shows as merged, but its base wasclaude/anchor-v2-migration-d5hkh4rather thanmain, and that branch had already merged, so the merge went into a dead branch. This branch is offmainand carries the same six-file change.These three were the only Anchor projects not using solana-kite, and each had hand-rolled a
sendhelper that is kite'ssend_transaction_from_instructionsstatement for statement: build a Message, take the blockhash, sign, send, map the result. Three copies of a function already available from a dependency the other 52 projects use.Wallet setup goes the same way:
Keypair::new()followed bysvm.airdrop(...)is whatcreate_walletdoes.assert_custom_errorin cnft-vault now takes kite'sSolanaKiteError. It was already matching on the text of the debug-formatted failure forCustom(N), and kite wraps the sameFailedTransactionMetadatadebug output, so the assertion checks exactly what it did before.Net 114 lines removed, 73 added. The Bubblegum fixtures, the keccak hash recomputation, the Merkle proof building and the borsh mirror structs are untouched: those are the bulk of these files and kite has nothing to say about them.
Verification
cnft-burn 3 tests, cnft-vault 6, cutils 3, all passing.
Generated by Claude Code