Skip to content
Back to skills

Cairo Contract Events

ASecurity

Explain Starknet contract events, event enums, and emitting events; use when a request involves defining or emitting events in Cairo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
documentation

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cairo-contract-events --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Contract Events?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cairo Contract Events
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-contract-events/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-contract-events)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cairo-contract-events
description: Explain Starknet contract events, event enums, and emitting events; use when a request involves defining or emitting events in Cairo.
---

# Cairo Contract Events

## Overview
Explain how to define events and emit them from Cairo contracts.

## Quick Use
- Read `references/contract-events.md` before answering.
- Define an `Event` enum with `#[event]` and `#[derive(starknet::Event)]`.
- Mark indexed fields with `#[key]`.

## Response Checklist
- Emit events with `self.emit(Event::Variant(...))`.
- Use struct variants to keep event fields clear and typed.
- Use `#[key]` for fields that should be indexed.

## Example Requests
- "How do I emit an event from a contract?"
- "What does #[key] do on an event field?"
- "How do I define multiple event types?"

Files in this skill

  • SKILL.md805 B
  • references/contract-events.md455 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…