fix: auto-wrap non-composable additionalInstructions in prepareForPer…#204
Open
fichiokaku wants to merge 1 commit into
Open
fix: auto-wrap non-composable additionalInstructions in prepareForPer…#204fichiokaku wants to merge 1 commit into
fichiokaku wants to merge 1 commit into
Conversation
…missions Since the smart-sessions revamp (#181), `prepareInstallSmartSessions` emits composable instructions, while `additionalInstructions` passed in raw `{ chainId, calls }` form (the supported shape in v1.1.x) are non-composable. `buildBatch` rejects mixed batches with: "All the instructions must be built with buildComposable in order to support the runtime time parameters." Auto-wrap any non-composable resolved instructions as composable `rawCalldata` instructions when the batch contains composable ones, restoring the v1.1.x calling convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
Collaborator
|
Hey @fichiokaku Good catch on this, but why not change the calls directly from AbstractCall[] to ComposableCall[]? So any additional calls must be composable, and this is a strict type-safe behaviour rather than runtime conversions. There is no scope for having a non-composable call here, given the recent change. So this conversion is unnecessary |
vr16x
requested changes
May 1, 2026
vr16x
left a comment
Collaborator
There was a problem hiding this comment.
Haven't reviewed the code, but suggested a high level directional change
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.
…missions
Since the smart-sessions revamp (#181),
prepareInstallSmartSessionsemits composable instructions, whileadditionalInstructionspassed in raw{ chainId, calls }form (the supported shape in v1.1.x) are non-composable.buildBatchrejects mixed batches with:"All the instructions must be built with buildComposable in order
to support the runtime time parameters."
Auto-wrap any non-composable resolved instructions as composable
rawCalldatainstructions when the batch contains composable ones, restoring the v1.1.x calling convention.PR-Codex overview
This PR focuses on enhancing the
prepareForPermissionsfunction by introducing a new utility function,normalizeInstructionComposability, which ensures that all instructions in a batch are composable, thereby improving compatibility with previous versions.Detailed summary
normalizeInstructionComposabilityfunction to enforce composability of instructions.resolvedInstructionsto usenormalizeInstructionComposability.rawCalldatainstructions.