feat(batch): add dryRun option to submitBatch (#608) - #677
Open
ZacLou wants to merge 2 commits into
Open
Conversation
…uit-protocol#606) - Export resolveFee from src/index.ts so consumers can compute effective fees - Add fee and feeMultiplier rows to ConduitClient configuration table - Add Fee Precedence section to README explaining the resolution order: explicit fee > feeMultiplier * BASE_FEE > BASE_FEE Closes conduit-protocol#606
- Add dryRun flag to BatchSubmitOptions - In dryRun mode, simulate every transaction via server.simulateTransaction() instead of submitting to the network - Successful simulations return status 'SIMULATED' - Failed simulations return status 'FAILED' with the simulation error - All transactions are simulated independently (no SKIPPED cascade) - Add type-level test confirming the option is accepted Closes conduit-protocol#608
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.
Adds a dryRun flag so pre-flight UIs can simulate every transaction and preview outcomes without submitting anything to the network.
Changes
dryRun?: booleanonBatchSubmitOptionsdryRunis true,submitBatchcallsserver.simulateTransaction()for each built transaction instead ofsendTransaction+ polling'SIMULATED''FAILED'with the simulation error messagesrc/tests/submitBatch-dryRun.test.tsverifies the option is accepted by the type systemCloses #608