Codex/deposit plan eip7702 permit#14
Merged
Merged
Conversation
…ze hex quantities LI.FI's transactionRequest.value and gasLimit are hex-prefixed EVM quantities, which DepositPlanSchema's decimalStringSchema rejected with a Zod issues array surfaced as the 500 response message. Add toBaseUnitString helper (BigInt(input).toString(10)) and apply at value / gasLimit / meta.estimatedGas in mapQuoteToTransaction; update tests to mock the real hex format and add a regression test. Separately, LI.FI quotes are currently unreliable for this environment. For the Base USDC -> Base Morpho stable vault case (fromToken === vault.asset()), no swap or bridge is needed: encode the ERC4626 deposit() call directly with viem in buildSupplyTx and skip LI.FI. composeDeposit now forces 100% source-chain allocation (no bridge legs) and derives the approval/permit spender from the stable vault rather than LIFI_DIAMOND_ADDRESS, so the EIP-7702 / permit-multicall3 / sequential execution tiers in useInvestStrategy can run end-to-end. Cleanup: drop unused buildPermitRequest alias (knip duplicate), add missing entry: ['src/main.ts'] to account-engine knip config, ignore the workspace intent-engine dependency so knip --fix preserves it, remove unused createDepositPublicClientForChain alias, include knip.ts in account-engine's ESLint project config, and ignore Vite built-in import.meta.env flags in the env drift checker. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
<1-2 sentences: what changed and why>
Changes
Test Plan
pnpm check:localpasses locallypnpm --filter @zapengine/frontend test:unit>Risk
<What could break? Include affected services and blast radius.>
Rollback
Checklist
CLAUDE.mdfiles.env.exampleif added env-var referencespnpm --filter @zapengine/analytics-engine test:strategy-snapshot:fastpnpm contracts:checkcovers the change