CLI + SDK Improvements#430
Merged
Merged
Conversation
added 9 commits
May 6, 2026 08:44
3ba3a09 to
d9be111
Compare
its-everdred
commented
May 7, 2026
Comment on lines
96
to
-91
| const receipt = await this.send(tx, chainId) | ||
| const publicClient = this.chainManager.getPublicClient(chainId) | ||
| // wait an extra confirmation so give time for nonce to be updated | ||
| await publicClient.waitForTransactionReceipt({ | ||
| hash: receipt.transactionHash, | ||
| confirmations: 2, | ||
| }) |
Collaborator
Author
There was a problem hiding this comment.
safe to remove the waitForTransactionReceipt altogether because this.send() already awaits confirmation.
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.
Summary
Three SDK performance wins that cut a USDC→OP swap on Base Sepolia from ~18s to ~6-9s wall time, plus a CLI demo config tweak so recurring swaps skip the per-call approval cost. A handful of incidental SDK cleanups along the way.
Performance
EOAWallet.sendBatch. Was waiting for 2 confirmations between txs; one is enough. Saves a full block-time per sub-tx in a multi-tx batch.pollingIntervalis 4000ms (sized for L1 mainnet). Default to 1500ms for fast chains; mainnet stays at 4000ms. Configurable per-chain. Bundler client shares the same default.approvalMode: 'max'for both lend and swap settings inpackages/cli/src/demo/config.ts. Subsequent swaps for the same token pair skip Permit2 + ERC-20 approval txs entirely.SDK / demo cleanup
getLendMarketAllowlist,Wallet.has(namespace)capability check,CHAIN_SHORTNAMESconstant.LEND_ACTIONS,LendProviderName,ApprovalMode/APPROVAL_MODES.getMarketnow takes the market directly.getAssetAddress.settingskey.format DeployMorphoMarket prettier drift.Test plan
Notes