Skip to content

Governance Relayer#1819

Open
LeonardoVieira1630 wants to merge 47 commits intodevfrom
feat/relayer
Open

Governance Relayer#1819
LeonardoVieira1630 wants to merge 47 commits intodevfrom
feat/relayer

Conversation

@LeonardoVieira1630
Copy link
Copy Markdown
Member

Implements a standalone Hono service (apps/relayer/) that allows users to vote and delegate on governance proposals without paying gas. The relayer validates EIP-712 signatures, checks eligibility and on-chain state, enforces rate limits, and submits transactions via a funded wallet.

  • Pluggable signer interface (local private key for v1, KMS-ready)
  • Supports castVoteBySig and delegateBySig for all supported DAOs
  • In-memory sliding window rate limiter (per-address hourly + daily)
  • Zod OpenAPI schemas with /health, /relay/vote, /relay/delegate routes
  • 29 tests across 7 files (unit + integration with MSW)

Implements a standalone Hono service (apps/relayer/) that allows users
to vote and delegate on governance proposals without paying gas. The
relayer validates EIP-712 signatures, checks eligibility and on-chain
state, enforces rate limits, and submits transactions via a funded wallet.

- Pluggable signer interface (local private key for v1, KMS-ready)
- Supports castVoteBySig and delegateBySig for all supported DAOs
- In-memory sliding window rate limiter (per-address hourly + daily)
- Zod OpenAPI schemas with /health, /relay/vote, /relay/delegate routes
- 29 tests across 7 files (unit + integration with MSW)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@LeonardoVieira1630 LeonardoVieira1630 self-assigned this Apr 14, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 14, 2026

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

Project Deployment Actions Updated (UTC)
anticapture Error Error Apr 24, 2026 9:07pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture-storybook Skipped Skipped Apr 24, 2026 9:07pm

Request Review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 14, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@pikonha pikonha changed the title feat(relayer): add gasless relay service for votes and delegations Governance Relayer Apr 15, 2026
@vercel vercel Bot temporarily deployed to Preview – anticapture-storybook April 15, 2026 20:23 Inactive
Comment thread apps/relayer/src/index.ts Outdated
Comment thread apps/relayer/src/env.ts Outdated
Comment thread apps/relayer/src/index.ts Outdated
Comment thread apps/relayer/src/signer/local-signer.ts
Comment thread apps/relayer/src/signer/types.ts Outdated
Comment thread apps/relayer/src/services/relay.ts
Comment thread apps/relayer/src/services/relay.ts Outdated
Comment thread apps/relayer/src/services/relay.ts Outdated
Comment thread apps/relayer/src/schemas/relay-delegate.ts Outdated
Comment thread apps/relayer/src/schemas/relay-delegate.ts Outdated
pikonha

This comment was marked as resolved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 754b542efa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/relayer/src/services/relay.ts
Comment thread apps/relayer/src/index.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8b2d102b3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/relayer/src/schemas/relay-vote.ts Outdated
Comment thread apps/relayer/src/services/relay.ts
Comment thread apps/relayer/src/repository/rate-limit-storage.test.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ba5212868

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/relayer/src/index.ts
# Conflicts:
#	apps/gateful/src/config.ts
#	pnpm-lock.yaml
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d26a4cfb5f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/relayer/src/env.ts
.refine(isHex, "Invalid hex string")
.transform((v) => v as `0x${string}`),

MIN_VOTING_POWER: z.string().default("0"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate MIN_VOTING_POWER at configuration parse

MIN_VOTING_POWER is currently accepted as any string in envSchema, but main() later does BigInt(env.MIN_VOTING_POWER) before starting the server. A non-decimal value (for example "1e21" or a typo like "1000 ENS") passes env parsing and then crashes startup, taking the relayer down instead of returning a clear configuration error. Parsing/validating this field as a decimal integer in the schema would fail fast with an actionable message.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants