event-design

Design Solidity event schemas for off-chain indexing and subgraph mapping.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill event-design-ccashwell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: event-design
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/event-design
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill event-design-ccashwell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Without a thoughtful event design, off-chain indexing, dashboards, and analytics for on-chain state changes become brittle, slow, and hard to evolve.

Core Features & Use Cases

  • Event-first design ensures state transitions are observable with properly structured events.
  • Clear event naming, parameter indexing strategies, and data placement optimize indexing, monitoring, and analytics.
  • Use cases include The Graph subgraphs, on-chain dashboards, governance explorers, and DeFi protocol analytics.

Quick Start

Define and emit a cohesive set of events at every state-changing function to enable reliable off-chain indexing and observability.

Frequently Asked Questions about event-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design Solidity events for The Graph subgraph indexing?▼

Design Solidity events for The Graph subgraph indexing by defining cohesive event schemas at every state-changing functions, utilizing indexed parameters for filtering and non-indexed data for detailed state tracking, enabling reliable off-chain subgraph mapping and protocol history observability.

What is event-first contract design in Solidity?▼

Event-first contract design in Solidity is an approach where contracts emit well-structured events at every state transition to ensure on-chain state changes are observable and easily indexed by off-chain systems like The Graph for analytics and monitoring.

When should I use indexed vs non-indexed event parameters in Solidity?▼

Use indexed event parameters in Solidity when you need to filter or search event logs efficiently by specific values like addresses or identifiers, and use non-indexed parameters for detailed data payloads to optimize gas costs and subgraph mapping performance.

Does event design impact gas costs in Solidity protocols?▼

Yes, event design impacts gas costs in Solidity protocols because emitting events and storing indexed parameters consumes gas, requiring careful placement of data in indexed vs non-indexed fields to balance indexing efficiency with transaction cost overhead.

What is the best way to structure events for DeFi protocol dashboards?▼

The best way to structure events for DeFi protocol dashboards is applying event-first design with clear naming conventions and comprehensive event coverage at state-changing functions, ensuring reliable data feeds for analytics, monitoring, and governance explorers.

Can I track protocol history without emitting structured events?▼

Tracking protocol history without structured events is brittle and slow because off-chain indexers rely on well-structured event schemas to capture state changes, making cohesive event emission essential for reliable protocol history tracking.