Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4df5a8c
refactor: Migrate to Hono and modernize project structure
svemat01 Feb 19, 2025
5bb46aa
feat: Add header image support for ENS names
svemat01 Feb 19, 2025
eb4de52
CORS
LeonmanRolls Mar 11, 2025
7383e4a
chore: Update ESLint configuration and dependencies
svemat01 Mar 13, 2025
d882966
fix: Update header routes for consistency
svemat01 Mar 13, 2025
1649631
feat: Enhance avatar and header upload functionality
svemat01 Mar 13, 2025
311b6bf
chore: Update dependencies and TypeScript configuration
svemat01 Mar 13, 2025
dbba80f
feat: Implement media handling for avatars and headers
svemat01 Mar 16, 2025
9331db2
feat: Add environment configuration to worker settings
svemat01 Mar 16, 2025
a1be40b
refactor: Simplify hashing in avatar and header routes
svemat01 Mar 16, 2025
e0f1a94
feat: Add integration tests for avatar and header routes
svemat01 Mar 16, 2025
7a14c54
fix: Handle missing WEB3_ENDPOINT_MAP in client middleware
svemat01 Mar 17, 2025
8d6af81
feat: Implement HEAD method support for avatar and header routes
svemat01 Mar 24, 2025
d3c0b86
docs: Update README with installation, setup, and publishing instruct…
svemat01 Mar 24, 2025
bd7b86b
chore: Update wrangler-action version in deploy workflow
svemat01 Mar 24, 2025
5766a43
feat: Add Hono integration and localhost chain support
storywithoutend Sep 4, 2025
84b5cac
refactor: Clean up header.ts route handlers
storywithoutend Sep 4, 2025
5565c86
fix: Handle HEAD requests properly in avatar and header routes
storywithoutend Sep 5, 2025
2e7628a
fix: Update test script to use vitest run for CI compatibility
storywithoutend Sep 5, 2025
97ea1a1
fix: Add test environment variables for CI
storywithoutend Sep 5, 2025
c7802b9
Revert "fix: Add test environment variables for CI"
storywithoutend Sep 5, 2025
9e093e2
Revert "fix: Update test script to use vitest run for CI compatibility"
storywithoutend Sep 5, 2025
5e9b704
fix: Remove holesky from test networks due to viem chainId verificati…
storywithoutend Sep 5, 2025
01be7c6
test: Update GitHub Actions workflow and avatar integration tests
storywithoutend Sep 8, 2025
3fd85f5
feat: Add hono fixes and subname utility
storywithoutend Sep 10, 2025
574e0e6
refactor: Clean up imports and format subname utility
storywithoutend Sep 10, 2025
f1222e6
Merge pull request #25 from ensdomains/feat/hono-fixes
storywithoutend Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"permissions": {
"allow": [
"WebSearch",
"Bash(git add:*)"
],
"deny": [],
"ask": []
}
}
11 changes: 10 additions & 1 deletion .example.vars
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
WEB3_ENDPOINT_MAP='{ "mainnet": "<MAINNET_RPC>", "goerli": "<GOERLI_RPC>", "sepolia": "<SEPOLIA_RPC>", "holesky": "<HOLESKY_RPC>" }'
WEB3_ENDPOINT_MAP='{ "mainnet": "<MAINNET_RPC>", "goerli": "<GOERLI_RPC>", "sepolia": "<SEPOLIA_RPC>", "holesky": "<HOLESKY_RPC>", "localhost": "http://localhost:8545" }'

LOCALHOST_ENS_REGISTRY="<ENS_REGISTRY_ADDRESS>"
LOCALHOST_ENS_NAME_WRAPPER="<ENS_NAME_WRAPPER_ADDRESS>"
LOCALHOST_ENS_UNIVERSAL_RESOLVER="<ENS_UNIVERSAL_RESOLVER_ADDRESS>"
LOCALHOST_ENS_PUBLIC_RESOLVER="<ENS_PUBLIC_RESOLVER_ADDRESS>"
LOCALHOST_ENS_BASE_REGISTRAR_IMPLEMENTATION="<ENS_BASE_REGISTRAR_IMPLEMENTATION_ADDRESS>"
LOCALHOST_ENS_ETH_REGISTRAR_CONTROLLER="<ENS_ETH_REGISTRAR_CONTROLLER_ADDRESS>"
LOCALHOST_ENS_REVERSE_REGISTRAR="<ENS_REVERSE_REGISTRAR_ADDRESS>"
LOCALHOST_MULTICALL3="<MULTICALL3_ADDRESS>"
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
pnpm version ${{ github.event.release.tag_name }} --no-git-tag-version

- name: Publish
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push, pull_request]
on: [push]

jobs:
test:
Expand Down
36 changes: 33 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
/node_modules
# prod
dist/

# dev
.yarn/
!.yarn/releases
.vscode/*
!.vscode/launch.json
!.vscode/*.code-snippets
.idea/workspace.xml
.idea/usage.statistics.xml
.idea/shelf

# deps
node_modules/
.wrangler

# env
.env
.env.production
.dev.vars
/dist
.wrangler
.env.local

# logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# misc
.DS_Store
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Value structure:

```json
{
"mainnet": "<MAINNET_RPC>",
"goerli": "<GOERLI_RPC>",
"sepolia": "<SEPOLIA_RPC>",
"holesky": "<HOLESKY_RPC>"
"mainnet": "<MAINNET_RPC>",
"goerli": "<GOERLI_RPC>",
"sepolia": "<SEPOLIA_RPC>",
"holesky": "<HOLESKY_RPC>"
}
```

Expand Down
4 changes: 0 additions & 4 deletions bindings.d.ts

This file was deleted.

18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import { defineConfig } from "eslint/config";

/** @type {import('eslint').Linter.Config[]} */
export default defineConfig([
{ ignores: ["node_modules/", "dist/", ".wrangler/", "worker-configuration.d.ts"] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
stylistic.configs.customize({
quotes: "double",
semi: true,
indent: 2,
}),
]);
59 changes: 33 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
{
"name": "ens-avatar-worker",
"version": "0.0.0",
"type": "module",
"devDependencies": {
"@cloudflare/workers-types": "^4.20231218.0",
"@viem/anvil": "^0.0.10",
"miniflare": "^2.14.1",
"typescript": "^5.3.3",
"vitest": "^1.2.0",
"vitest-environment-miniflare": "^2.14.1",
"wrangler": "3.22.4"
},
"private": true,
"scripts": {
"start": "wrangler dev",
"publish": "wrangler publish",
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' vitest run"
},
"dependencies": {
"@ensdomains/ensjs": "^3.5.0-beta.1",
"@noble/hashes": "^1.3.1",
"itty-router": "^4.0.27",
"valibot": "^0.35.0",
"viem": "^2.23.2"
},
"packageManager": "pnpm@10.4.1"
"name": "ens-avatar-worker-v2",
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy --minify",
"generate-types": "wrangler types",
"type-check": "pnpm generate-types && tsc",
"lint": "eslint -c eslint.config.mjs",
"test": "vitest"
},
"dependencies": {
"@ensdomains/ensjs": "^4.0.2",
"@hono/valibot-validator": "^0.5.2",
"hono": "^4.7.4",
"valibot": "1.0.0-rc.4",
"viem": "^2.23.10"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.8.0",
"@eslint/js": "^9.22.0",
"@stylistic/eslint-plugin": "^4.2.0",
"eslint": "^9.22.0",
"globals": "^15.15.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.26.1",
"vitest": "3.0.8",
"wrangler": "^4.0.0"
},
"packageManager": "pnpm@10.4.1",
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
}
}
Loading