Skip to content

feat: Yield+ infra and contract plumbing#5503

Draft
therealemjy wants to merge 2 commits intofeat/yield-plus-pr02-shared-groundworkfrom
feat/yield-plus-pr03-yieldplus-infra
Draft

feat: Yield+ infra and contract plumbing#5503
therealemjy wants to merge 2 commits intofeat/yield-plus-pr02-shared-groundworkfrom
feat/yield-plus-pr03-yieldplus-infra

Conversation

@therealemjy
Copy link
Copy Markdown
Member

Jira ticket(s)

VPD-634
VPD-632
VPD-629
VPD-640
VPD-633
VPD-638
VPD-637
VPD-643
VPD-635
VPD-639

Changes

  • add the Yield+ API, websocket, contract ABI, and configuration plumbing\n- wire the core constants and test setup support needed before the feature UI can land

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 9f54af2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Apr 10, 2026 9:24am
dapp-testnet Ready Ready Preview Apr 10, 2026 9:24am
venus.io Ready Ready Preview Apr 10, 2026 9:24am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 76.45% 38744 / 50673
🔵 Statements 76.45% 38744 / 50673
🔵 Functions 58.97% 611 / 1036
🔵 Branches 71.15% 4430 / 6226
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/config/apiUrls.ts 83.33% 0% 100% 83.33% 5
apps/evm/src/config/index.ts 97.05% 0% 100% 97.05% 3
apps/evm/src/constants/functionKey.ts 100% 50% 100% 100%
apps/evm/src/constants/klineCandles.ts 0% 100% 100% 0% 8-10
apps/evm/src/constants/time.ts 100% 0% 100% 100%
apps/evm/src/libs/webSocket/index.ts 0% 0% 0% 0% 1-119
apps/evm/src/types/index.ts 98.07% 88.88% 100% 98.07% 9
Generated in workflow #13168 for commit 9f54af2 by the Vitest Coverage Report Action

@therealemjy
Copy link
Copy Markdown
Member Author

@greptile

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 10, 2026

Greptile Summary

This PR adds the Yield+ infrastructure plumbing: a WsClient abstract base class with exponential-backoff reconnect and idle-disconnect logic, a wsApiUrl config entry, three new FunctionKey entries, K-line candle constants, time constants, Vault domain types, and the RelativePositionManager ABI. All findings are minor style/quality suggestions (P2) with no blocking issues.

Confidence Score: 5/5

Safe to merge — all findings are non-blocking P2 style suggestions.

No P0 or P1 issues found. The WebSocket implementation is logically sound (correct reconnect/idle-disconnect lifecycle, no timer leaks, rogue-reconnection guard). The two WsClient comments and the cent-type inconsistency in Vault types are quality improvements worth addressing but do not affect correctness or production reliability.

apps/evm/src/libs/webSocket/index.ts and apps/evm/src/types/index.ts have minor style findings worth a quick look.

Important Files Changed

Filename Overview
apps/evm/src/libs/webSocket/index.ts New WsClient abstract base with exponential-backoff reconnect and idle-disconnect logic; error handler discards error detail and openChannel may send duplicate subscribe messages.
apps/evm/src/types/index.ts Adds Vault type hierarchy (BaseVault, VenusVault, PendleVault) and ApiOhlcInterval; cent-value types are inconsistent (number vs BigNumber) across the Vault interfaces.
apps/evm/src/config/index.ts Adds wsApiUrl to Config interface, derived as wss://${apiHost}/ws — straightforward and consistent with existing config pattern.
apps/evm/src/constants/functionKey.ts Adds three new FunctionKey entries (GET_RAW_YIELD_PLUS_POSITIONS, GET_TOKEN_PAIR_K_LINE_CANDLES, GET_FIXED_RATED_VAULTS) following existing naming conventions.
apps/evm/src/constants/klineCandles.ts New file exporting INTERVAL (ApiOhlcInterval) and CHART_PERIOD for K-line chart configuration; naming and typing are consistent with project conventions.
apps/evm/src/setupTests.tsx Adds wsApiUrl: 'fakeWsApiUrl' to the shared test config mock to satisfy the new Config shape; no issues.
apps/evm/src/config/apiUrls.ts Unchanged API host mapping; WebSocket URL is derived in config/index.ts from the existing host.
apps/evm/src/constants/time.ts Adds ONE_HOUR_MS and ONE_DAY_MS convenience constants; follows UPPER_SNAKE_CASE convention.
.claude/scripts/utils/image.ts New utility that wraps macOS sips to downscale PNG images; correctly no-ops on non-macOS platforms.
.changeset/yield-plus-pr03-yieldplus-infra.md Standard changeset entry for the Yield+ infra patch; no issues.

Reviews (1): Last reviewed commit: "feat: yield+ infra and contract plumbing" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant