> For the complete documentation index, see [llms.txt](https://solstep.gitbook.io/solidity-steps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solstep.gitbook.io/solidity-steps/step-2/11-events.md).

# 11: Events

Events in Solidity allow you to trigger actions based on specific conditions, and are an essential part of a smart contract's functionality. Events are declared with the event keyword and can have any number of arguments of any type.

Example:

```solidity
event Transfer(address indexed _from, address indexed _to, uint256 _value);
```

This event will emit a log when a transfer of value occurs from one address to another, and this log can be used to trigger other actions. The indexed keyword is used to indicate that the argument should be indexed and stored for efficient lookups.

Events are useful for debugging and for allowing external applications to interact with the smart contract, as logs are stored on the blockchain and can be read and used by external applications.

*That's it for the lesson 11! In the next lesson, Condition*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://solstep.gitbook.io/solidity-steps/step-2/11-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
