Frontend: wire TimeCurveBuyRouter single-tx ETH/USDM buy (buyViaKumbaya) #66
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Onchain companion
TimeCurveBuyRouter+TimeCurve.buyForshipped in issue #65 /TimeCurveBuyRouter.sol. The sale still settles in CL8Y throughbuyFor; the UI today uses separate KumbayaexactOutput+TimeCurve.buyinuseTimeCurveSaleSession/TimeCurveSimplePage.Goal
Offer an optional single-signature path when
VITE_*(or runtime config) exposes a deployedTimeCurveBuyRouterandtimeCurveBuyRouteris set on TimeCurve:buildV3PathExactOutput/routingForPayAsset), deriveswapDeadlineandamountInMaximum(quoter + existing slippage helpers, e.g.swapMaxInputFromQuoted), callbuyViaKumbayawithPAY_ETH/PAY_STABLE.buyunchanged.Acceptance criteria
kumbayaRoutes(or small helper) resolve TimeCurveBuyRouter address when present; no silent fallback.docs/testing/e2e-anvil.mdif Anvil stack deploys the router (seeDeployKumbayaAnvilFixtures).References
contracts/src/TimeCurveBuyRouter.soldocs/integrations/kumbaya.md(single-tx section)frontend/src/pages/timecurve/useTimeCurveSaleSession.ts,frontend/src/lib/kumbayaRoutes.tsCompanion: indexer work for
buyFor+ ETH/USDM enrichment — https://gitlab.com/PlasticDigits/yieldomega/-/issues/67mentioned in issue #67
mentioned in commit
2a89c4941ementioned in commit
46c4523f97mentioned in commit
aba4a6d6a1@brouie — #66 fix merged to
main(commitaba4a6don the merge; branchfix/issue-66-buy-via-kumbayaworktree removed after push).What changed
TimeCurve.timeCurveBuyRouter() != 0for ETH and USDM pay modes: quote → slippage →USDM.approveto router as needed →TimeCurveBuyRouter.buyViaKumbayawith the sameplantWarBowFlag/ pay-kind wiring as the rest of the app (seefrontend/src/lib/timeCurveKumbayaSingleTx.ts,kumbayaRoutes.tsresolveTimeCurveBuyRouterForKumbayaSingleTx).VITE_KUMBAYA_TIMECURVE_BUY_ROUTERmust match the onchain router when set; mismatch or unsupported chain → no silent fallback to two-step.TimeCurve.buypath unchanged.docs/integrations/kumbaya.md,docs/testing/invariants-and-business-logic.md(#66 + cross-refs to #56/#63/#67),docs/testing/e2e-anvil.md,skills/README.md,.cursor/skills/yieldomega-guardrails/SKILL.md.scripts/lib/anvil_deploy_dev.shsurfacesKUMBAYA_BUY_ROUTER;scripts/e2e-anvil.shexportsVITE_KUMBAYA_TIMECURVE_BUY_ROUTERwhen non-empty.frontendnpm testincludeskumbayaRoutes.test.tscases for the resolver.Verification checklist (please spot-check in your env)
timeCurveBuyRouteris zero: ETH/USDM Kumbaya still use the two-step flow; no regression to CL8Ybuy.buy/buyForbehavior.VITE_KUMBAYA_TIMECURVE_BUY_ROUTERto a wrong address: UI does not use single-tx (clear fail-closed behavior, no wrong-router swap).bash scripts/e2e-anvil.shwith a deploy that printsKUMBAYA_BUY_ROUTERand confirm the app picks up the env mirror.Leaving the issue open for your sign-off. Thanks!
mentioned in issue #72
mentioned in issue #74
@PlasticDigits source-level verification of
aba4a6d.Source review
Resolver (frontend/src/lib/kumbayaRoutes.ts):
Submit path (frontend/src/pages/timecurve/useTimeCurveSaleSession.ts):
Display path:
Helper (frontend/src/lib/timeCurveKumbayaSingleTx.ts):
Tests
cd frontend && npx vitest run src/lib/kumbayaRoutes.test.ts:
Anvil / e2e env mirror
scripts/lib/anvil_deploy_dev.sh:
scripts/e2e-anvil.sh:
Docs
References to issue #66 / buyViaKumbaya in:
Browser-side verification deferred
Filed #74 to track the live walkthrough items: ETH single-signature buy, USDM single-signature with approve+buy, WarBow plant flag-through, quote-refresh CTA preservation per #56, fail-closed visual confirmation on mismatched env, two-step fallback when onchain zero.
Closing #66 at the source / unit-test / env-mirror level. Live walkthrough proceeds via #74 in a future frontend session.
mentioned in issue #83
mentioned in issue #118