Repository navigation
Drop mixed classic/contract batching advice from the dapp skill - #174
Merged
Merged
Conversation
A smart contract transaction can hold only one operation, so a contract call cannot be batched with classic operations. prepareTransaction throws on that shape and stellar-core rejects it as txMALFORMED. Give the low-level path a real reason, state the one-operation rule, and point to contract composition or separate transactions instead. Add an eval scenario for the mixed-batch request.
prepareTransaction simulates first, and stellar-rpc refuses a transaction with more than one operation, so the throw comes from simulation, not from assembly.
|
Contributor
Author
|
🤖 Automated message from the Stellar Triage Bot. Verified at
|
3 tasks done
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.
🤖 Automated message from the Stellar Triage Bot.
The dapp skill said to use low-level invocation to batch a contract call with classic operations. That shape is not valid. A smart contract transaction holds exactly one operation.
skills/dapp/SKILL.md: give the low-level path a real reason, state the one-operation rule, and point to contract composition or separate transactions.evals/scenarios/dapp/04-no-mixed-batching.json: new scenario for a "contract call plus payment in one transaction" request.Sources checked:
simulate_transaction.go: simulation returns "Transaction contains more than one operation".prepareTransaction(js-stellar-sdk v17.4.0) throws that error.src/rpc/transaction.ts:assembleTransactionalso throws unless the transaction has exactly oneinvokeHostFunction,extendFootprintTtlorrestoreFootprintoperation.TransactionFrame.cpp: a Soroban operation with any other operation fails withtxMALFORMED.Closes #173