feat: Add new apps - DeFis#225
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR extends the ENS Awards platform to support DeFi as a first-class application type. It introduces a new ChangesDeFi Apps and Platform Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds four new DeFi apps (Uniswap, Aave, 1inch, Lido) under a new
Confidence Score: 5/5Safe to merge — changes are well-coordinated data additions with no functional regressions found. The four new DeFi app entries follow the same pattern as existing apps; the ProtocolTypes.DeFi rename is fully covered by a URL redirect, renamed public OG images, and updated utility functions. The Astro leaderboard page derives its OG image paths dynamically from the protocol type slug, so renaming the public files alongside the constant keeps them in sync. All changed switch statements are exhaustive and TypeScript-checked. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[AppTypes] -->|Wallet| B[wallet apps]
A -->|Explorer| C[explorer apps]
A -->|DeFi - NEW| D[defi-app apps]
D --> D1[uniswap-defi]
D --> D2[aave-defi]
D --> D3[1inch-defi]
D --> D4[lido-defi]
E[ProtocolTypes] -->|DAO| F[leaderboards dao]
E -->|DeFi renamed| G[leaderboards defi-protocol]
H[leaderboards defi OLD URL] -->|redirect| G
I[ensv2-ready-resolution] -->|appliesTo now includes DeFi| A
J[display-named-smart-contracts-mainnet] -->|appliesTo now includes DeFi| A
K[display-named-smart-contracts-l2-chains] -->|appliesTo now includes DeFi| A
Reviews (6): Last reviewed commit: "Apply AI agents' suggestions, pt.2" | Re-trigger Greptile |
| appSlug: "1inch-defi-app", | ||
| type: AppTypes.DeFi, | ||
| project: OneInchProject, | ||
| name: '1inch"', |
There was a problem hiding this comment.
The quote character is a part of the app's name. The current version is correct
There was a problem hiding this comment.
Pull request overview
This PR expands ENSAwards’ dataset to support a new DeFi app category and adds initial DeFi apps (and their benchmark evidence) to the site, alongside some related copy/label updates for protocol leaderboards.
Changes:
- Introduces
AppTypes.DeFi(defi-app) and updates app/best-practice formatting utilities and targets to include DeFi apps. - Adds 4 DeFi apps (Uniswap, Aave, 1inch, Lido) with corresponding projects, icons, and app benchmark entries.
- Updates protocol-type formatting/copy (including a change to the DeFi protocol type slug) and adjusts several UI strings that reference protocol types.
Reviewed changes
Copilot reviewed 29 out of 36 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ensawards.org/src/pages/leaderboards/[protocolType].astro | Updates “view details” label to rely on formatProtocolType output. |
| ensawards.org/src/pages/index.astro | Updates “view details” label to rely on formatProtocolType output. |
| ensawards.org/src/components/organisms/ProtocolBestPracticeDetails.astro | Updates “view details” label to rely on formatProtocolType output. |
| ensawards.org/data/protocols/utils.ts | Updates protocol type parsing/formatting for DeFi. |
| ensawards.org/data/protocols/types.ts | Changes canonical DeFi protocol type slug to defi-protocol. |
| ensawards.org/data/projects/types.ts | Adds ProjectIds entries for 1inch and Lido. |
| ensawards.org/data/projects/lido/index.ts | Adds Lido project definition. |
| ensawards.org/data/projects/lido/icon.tsx | Adds Lido project SVG icon. |
| ensawards.org/data/projects/1inch/index.ts | Adds 1inch project definition. |
| ensawards.org/data/projects/1inch/icon.tsx | Adds 1inch project SVG icon. |
| ensawards.org/data/ens-best-practices/utils.ts | Enables formatting for DeFi app targets. |
| ensawards.org/data/ens-best-practices/ensv2-readiness/ensv2-ready-resolution/index.ts | Extends this best practice to apply to DeFi apps. |
| ensawards.org/data/ens-best-practices/contract-naming/display-named-smart-contracts-mainnet/index.ts | Extends this best practice to apply to DeFi apps. |
| ensawards.org/data/ens-best-practices/contract-naming/display-named-smart-contracts-l2-chains/index.ts | Extends this best practice to apply to DeFi apps. |
| ensawards.org/data/apps/utils.ts | Adds DeFi app parsing/formatting and preserves “DeFi” capitalization for lowercase mode. |
| ensawards.org/data/apps/utils.test.ts | Updates applies-to-all-apps test to include DeFi. |
| ensawards.org/data/apps/types.ts | Adds AppTypes.DeFi. |
| ensawards.org/data/apps/uniswap-defi-app/index.ts | Adds Uniswap DeFi app definition. |
| ensawards.org/data/apps/uniswap-defi-app/icon.tsx | Adds Uniswap DeFi app SVG icon. |
| ensawards.org/data/apps/uniswap-defi-app/benchmarks/index.tsx | Adds Uniswap DeFi app benchmark evidence entries. |
| ensawards.org/data/apps/aave-defi-app/index.ts | Adds Aave DeFi app definition. |
| ensawards.org/data/apps/aave-defi-app/icon.tsx | Adds Aave DeFi app SVG icon. |
| ensawards.org/data/apps/aave-defi-app/benchmarks/index.tsx | Adds Aave DeFi app benchmark evidence entries. |
| ensawards.org/data/apps/1inch-defi-app/index.ts | Adds 1inch DeFi app definition. |
| ensawards.org/data/apps/1inch-defi-app/icon.tsx | Adds 1inch DeFi app SVG icon. |
| ensawards.org/data/apps/1inch-defi-app/benchmarks/index.tsx | Adds 1inch DeFi app benchmark evidence entries. |
| ensawards.org/data/apps/lido-defi-app/index.ts | Adds Lido DeFi app definition. |
| ensawards.org/data/apps/lido-defi-app/icon.tsx | Adds Lido DeFi app SVG icon. |
| ensawards.org/data/apps/lido-defi-app/benchmarks/index.tsx | Adds Lido DeFi app benchmark evidence entries. |
Comments suppressed due to low confidence (1)
ensawards.org/data/protocols/utils.ts:92
- asProtocolType() no longer accepts the previously valid "defi" protocol type value. That will cause runtime errors for any existing inbound links/bookmarks that still use /leaderboards/defi (and any other parsing paths). Consider accepting both "defi" and "defi-protocol" as aliases to preserve backward compatibility.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export const ProtocolTypes = { | ||
| DAO: "dao", | ||
| DeFi: "defi", | ||
| DeFi: "defi-protocol", | ||
| } as const; |
There was a problem hiding this comment.
Updated the names of the OG images and added a redirect to the Defi protocol leaderboard
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ensawards.org/data/apps/utils.test.ts (1)
95-103: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winAdd direct tests for DeFi parsing/formatting branches.
This update covers
appliesToAllApps, but the newasAppType("defi-app")andformatAppType(AppTypes.DeFi, …)paths remain untested.Suggested test additions
import { appliesToAllApps, asAppType, calcAppScore, + formatAppType, getAppById, getAppByName, getAppBySlug, sortApps, } from "./utils.ts"; @@ describe("validateAppType", () => { it("Should return the app type for a valid AppType value", () => { expect(asAppType("wallet")).toEqual(AppTypes.Wallet); }); + + it("Should return DeFi for defi-app", () => { + expect(asAppType("defi-app")).toEqual(AppTypes.DeFi); + }); @@ }); + + describe("formatAppType", () => { + it("Should format DeFi type correctly", () => { + expect(formatAppType(AppTypes.DeFi)).toEqual("DeFi app"); + expect(formatAppType(AppTypes.DeFi, { plural: true, lowercase: false })).toEqual("DeFi apps"); + expect(formatAppType(AppTypes.DeFi, { plural: false, lowercase: true })).toEqual("DeFi app"); + }); + });Also applies to: 214-217
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ensawards.org/data/apps/utils.test.ts` around lines 95 - 103, Add unit tests covering the DeFi parsing/formatting branches: call asAppType("defi-app") and assert it returns AppTypes.DeFi; add tests for formatAppType by calling formatAppType(AppTypes.DeFi, ...) for both appliesToAllApps true and false (use the same second-argument shape used elsewhere in tests) and assert the returned string matches the expected formatted DeFi value; also include a test that verifies appliesToAllApps behavior when used with AppTypes.DeFi. Locate these calls near the existing validateAppType tests and reuse function names asAppType, formatAppType and the enum AppTypes to implement the new assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ensawards.org/data/apps/1inch-defi-app/index.ts`:
- Line 16: The app display name has a stray trailing double-quote in the object
property name: change the value for the name property (the "name" field in
index.ts) from "1inch\"" to "1inch" so the string literal does not include the
extra quote; update the token for name in the exported app object (the name
property) to use a clean quoted string '1inch' (or "1inch") with no trailing
characters.
In `@ensawards.org/data/apps/lido-defi-app/benchmarks/index.tsx`:
- Around line 38-41: In the paragraph element (the JSX element with className
"w-full" in index.tsx) remove the duplicated word "when" so the sentence reads
"but when it receives one"; update the string in the JSX to eliminate the extra
"when" and keep punctuation/spacing intact.
In `@ensawards.org/data/apps/lido-defi-app/icon.tsx`:
- Around line 20-251: SVG attributes are in kebab-case which breaks JSX; update
all occurrences of fill-opacity to fillOpacity (e.g., on the <path> using
id("paint8_linear")), and convert all stop-color and stop-opacity attributes
inside the <stop> elements in the gradient defs (ids via id("paint0_radial") ...
id("paint14_radial") and the linear gradient id("paint8_linear")) to camelCase
stopColor and stopOpacity respectively so the gradients and opacity props are
valid in React/JSX.
In `@ensawards.org/data/projects/lido/icon.tsx`:
- Line 27: In the icon component's JSX, replace all kebab-case SVG attributes
with their React camelCase equivalents: change fill-opacity to fillOpacity,
stop-color to stopColor, and stop-opacity to stopOpacity wherever they appear
(notably on <stop> elements and any shape elements) so the TSX compiles
correctly; update every occurrence across the file and run the provided ripgrep
check to confirm no matches remain.
---
Outside diff comments:
In `@ensawards.org/data/apps/utils.test.ts`:
- Around line 95-103: Add unit tests covering the DeFi parsing/formatting
branches: call asAppType("defi-app") and assert it returns AppTypes.DeFi; add
tests for formatAppType by calling formatAppType(AppTypes.DeFi, ...) for both
appliesToAllApps true and false (use the same second-argument shape used
elsewhere in tests) and assert the returned string matches the expected
formatted DeFi value; also include a test that verifies appliesToAllApps
behavior when used with AppTypes.DeFi. Locate these calls near the existing
validateAppType tests and reuse function names asAppType, formatAppType and the
enum AppTypes to implement the new assertions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2973c94e-9b2f-4a23-bfef-8cc0fbf8ef13
⛔ Files ignored due to path filters (7)
ensawards.org/data/apps/1inch-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-portfolio.gifis excluded by!**/*.gifensawards.org/data/apps/1inch-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-send.pngis excluded by!**/*.pngensawards.org/data/apps/aave-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-v3.gifis excluded by!**/*.gifensawards.org/data/apps/aave-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-v4.pngis excluded by!**/*.pngensawards.org/data/apps/lido-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-address.pngis excluded by!**/*.pngensawards.org/data/apps/lido-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof-name.PNGis excluded by!**/*.pngensawards.org/data/apps/uniswap-defi-app/benchmarks/correctly-resolve-ensv2-test-name-address-proof.pngis excluded by!**/*.png
📒 Files selected for processing (29)
ensawards.org/data/apps/1inch-defi-app/benchmarks/index.tsxensawards.org/data/apps/1inch-defi-app/icon.tsxensawards.org/data/apps/1inch-defi-app/index.tsensawards.org/data/apps/aave-defi-app/benchmarks/index.tsxensawards.org/data/apps/aave-defi-app/icon.tsxensawards.org/data/apps/aave-defi-app/index.tsensawards.org/data/apps/lido-defi-app/benchmarks/index.tsxensawards.org/data/apps/lido-defi-app/icon.tsxensawards.org/data/apps/lido-defi-app/index.tsensawards.org/data/apps/types.tsensawards.org/data/apps/uniswap-defi-app/benchmarks/index.tsxensawards.org/data/apps/uniswap-defi-app/icon.tsxensawards.org/data/apps/uniswap-defi-app/index.tsensawards.org/data/apps/utils.test.tsensawards.org/data/apps/utils.tsensawards.org/data/ens-best-practices/contract-naming/display-named-smart-contracts-l2-chains/index.tsensawards.org/data/ens-best-practices/contract-naming/display-named-smart-contracts-mainnet/index.tsensawards.org/data/ens-best-practices/ensv2-readiness/ensv2-ready-resolution/index.tsensawards.org/data/ens-best-practices/utils.tsensawards.org/data/projects/1inch/icon.tsxensawards.org/data/projects/1inch/index.tsensawards.org/data/projects/lido/icon.tsxensawards.org/data/projects/lido/index.tsensawards.org/data/projects/types.tsensawards.org/data/protocols/types.tsensawards.org/data/protocols/utils.tsensawards.org/src/components/organisms/ProtocolBestPracticeDetails.astroensawards.org/src/pages/index.astroensawards.org/src/pages/leaderboards/[protocolType].astro
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
ensawards.org/data/apps/lido-defi/benchmarks/index.tsx (1)
10-10: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winRemove
.tsextension from type import for consistency.This file imports from
"data/ens-best-practices/types.ts"while the 1inch and Aave benchmark files import from"data/ens-best-practices/types"without the extension. TypeScript and modern bundlers resolve module paths without file extensions, and omitting.tsis the conventional practice. Standardizing across all four DeFi benchmark files improves maintainability.♻️ Proposed fix
-import type { BestPracticeBenchmarks } from "data/ens-best-practices/types.ts"; +import type { BestPracticeBenchmarks } from "data/ens-best-practices/types";🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ensawards.org/data/apps/lido-defi/benchmarks/index.tsx` at line 10, Update the import path so it omits the .ts extension for consistency: change the import of the type BestPracticeBenchmarks (the `import type { BestPracticeBenchmarks } from "data/ens-best-practices/types.ts";` statement) to import from "data/ens-best-practices/types" instead, keeping the same named type and import style to match the other benchmark files.ensawards.org/data/apps/uniswap-defi/benchmarks/index.tsx (1)
10-10: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winRemove
.tsextension from type import for consistency.This file imports from
"data/ens-best-practices/types.ts"while the 1inch and Aave benchmark files import from"data/ens-best-practices/types"without the extension. TypeScript and modern bundlers resolve module paths without file extensions, and omitting.tsis the conventional practice. Standardizing across all four DeFi benchmark files improves maintainability.♻️ Proposed fix
-import type { BestPracticeBenchmarks } from "data/ens-best-practices/types.ts"; +import type { BestPracticeBenchmarks } from "data/ens-best-practices/types";🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ensawards.org/data/apps/uniswap-defi/benchmarks/index.tsx` at line 10, The import of the BestPracticeBenchmarks type uses a file extension; update the import statement (import type { BestPracticeBenchmarks } from "data/ens-best-practices/types.ts") to remove the ".ts" extension so it reads from "data/ens-best-practices/types" to match the other benchmark files and maintain consistent module resolution.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@ensawards.org/data/apps/lido-defi/benchmarks/index.tsx`:
- Line 10: Update the import path so it omits the .ts extension for consistency:
change the import of the type BestPracticeBenchmarks (the `import type {
BestPracticeBenchmarks } from "data/ens-best-practices/types.ts";` statement) to
import from "data/ens-best-practices/types" instead, keeping the same named type
and import style to match the other benchmark files.
In `@ensawards.org/data/apps/uniswap-defi/benchmarks/index.tsx`:
- Line 10: The import of the BestPracticeBenchmarks type uses a file extension;
update the import statement (import type { BestPracticeBenchmarks } from
"data/ens-best-practices/types.ts") to remove the ".ts" extension so it reads
from "data/ens-best-practices/types" to match the other benchmark files and
maintain consistent module resolution.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1dc010ca-f22c-4709-91d9-33c67fac86e0
⛔ Files ignored due to path filters (9)
ensawards.org/data/apps/1inch-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof-portfolio.gifis excluded by!**/*.gifensawards.org/data/apps/1inch-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof-send.pngis excluded by!**/*.pngensawards.org/data/apps/aave-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof-v3.gifis excluded by!**/*.gifensawards.org/data/apps/aave-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof-v4.pngis excluded by!**/*.pngensawards.org/data/apps/lido-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof-address.pngis excluded by!**/*.pngensawards.org/data/apps/lido-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof.pngis excluded by!**/*.pngensawards.org/data/apps/uniswap-defi/benchmarks/correctly-resolve-ensv2-test-name-address-proof.pngis excluded by!**/*.pngensawards.org/public/defi-protocol_leaderboard_og_image.pngis excluded by!**/*.pngensawards.org/public/defi-protocol_leaderboard_twitter_og_image.pngis excluded by!**/*.png
📒 Files selected for processing (17)
ensawards.org/astro.config.mjsensawards.org/data/apps/1inch-defi/benchmarks/index.tsxensawards.org/data/apps/1inch-defi/icon.tsxensawards.org/data/apps/1inch-defi/index.tsensawards.org/data/apps/aave-defi/benchmarks/index.tsxensawards.org/data/apps/aave-defi/icon.tsxensawards.org/data/apps/aave-defi/index.tsensawards.org/data/apps/lido-defi/benchmarks/index.tsxensawards.org/data/apps/lido-defi/icon.tsxensawards.org/data/apps/lido-defi/index.tsensawards.org/data/apps/uniswap-defi/benchmarks/index.tsxensawards.org/data/apps/uniswap-defi/icon.tsxensawards.org/data/apps/uniswap-defi/index.tsensawards.org/data/apps/utils.test.tsensawards.org/data/projects/1inch/icon.tsxensawards.org/data/projects/lido/icon.tsxensawards.org/src/components/contract-naming-season/ContractNamingHero.astro
💤 Files with no reviewable changes (4)
- ensawards.org/data/apps/1inch-defi/icon.tsx
- ensawards.org/data/apps/uniswap-defi/icon.tsx
- ensawards.org/data/projects/1inch/icon.tsx
- ensawards.org/data/apps/aave-defi/icon.tsx
tk-o
left a comment
There was a problem hiding this comment.
The updates look good to me, tested the preview website and it all looks great!
Lite PR → Add new apps - DeFis
Summary
DeFitype from the spec (from both tranches) provided by @caldonia-eth:Why
Testing
typecheck,lint, andtestcommands locally to ensure that the migration didn't break anything, and later confirmed that in our CI workflowNotes for reviewer
Curve DeFiagainst our benchmark.Lidois a bit far-fetching (no better way to test). I don't feel super confident about how convincing it is. Please let me know if I should delete that DeFi for nowAppType→Exchange(remaining apps from tranche 2 of the provided spec). This will probably take me a bit more time and will translate into tomorrow.Pre-Review Checklist (Blocking)