test(soroban): add comprehensive error handling and validation test suite#693
Open
Shredder401k wants to merge 1 commit into
Open
test(soroban): add comprehensive error handling and validation test suite#693Shredder401k wants to merge 1 commit into
Shredder401k wants to merge 1 commit into
Conversation
|
@Shredder401k Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Stellar Contract Validation Suite
Summary
Implements comprehensive validation infrastructure for Stellar and Soroban operations, including contract error taxonomy, trustline validation, WASM size constraints, and transaction envelope serialization tests.
Changes
Issue #633: Soroban Contract Error Code Taxonomy
StellarErrorCodetype with 7 new Soroban error categoriesSOROBAN_ERROR_CODESmapping with 23 contract error codes covering:mapSorobanError()function with fallback for unknown codesparseStellarError()to detect and categorize Soroban errorsFiles Modified:
packages/stellar/src/errors.ts- Added Soroban error taxonomypackages/stellar/src/soroban-errors.test.ts- Test coverage for all error codesIssue #634: Trustline Validation Logic
trustline-validation.tsmodule with deployment validationvalidateTrustlines()for checking required trustlinescanEstablishTrustlines()to verify account capacityvalidateAssetIssuanceDeployment()for pre-deployment checksformatTrustlineError()for user-friendly error messagesMAX_TRUSTLINES_PER_ACCOUNTlimit (1000)Files Added:
packages/stellar/src/trustline-validation.ts- Trustline validation logicpackages/stellar/src/trustline-validation.test.ts- Comprehensive test suiteIssue #635: Transaction Envelope Serialization Tests
createAccount,payment,changeTrust,setOptions,manageDataFiles Added:
packages/stellar/src/transaction-envelope.test.ts- Serialization test suiteIssue #636: WASM Binary Size Validation
MAX_WASM_SIZE_BYTESconstant (65536 bytes / 64 KB)validateWasmSize()for pre-deployment size checksassertValidWasmSize()for throwing validationBufferandUint8ArrayinputsFiles Modified:
packages/stellar/src/soroban.ts- Added WASM size validationpackages/stellar/src/soroban-wasm-validation.test.ts- Boundary and integration testsPackage Exports
packages/stellar/src/index.tsto export trustline validationTesting
All features include comprehensive test coverage:
Documentation
Breaking Changes
None. All changes are additive.
Closes
Closes #633
Closes #634
Closes #635
Closes #636