> For the complete documentation index, see [llms.txt](https://docs.sharemint.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sharemint.xyz/fundamentals/referee-requirements/smart-contract-events.md).

# Smart Contract Events

This section explains how to reward affiliates based on the smart contract events performed by the users they invite.

To add a Smart Contract Event requirement, navigate to your project's settings page. In the *Affiliates* section, click on *Advanced Referee Requirements*, and choose *Smart Contract Event* as the requirement type.

You will be asked to fill in the following fields:

* **Event Name** - a user friendly name that is displayed in our UI.
* **What is the minimum value required to be considered a referral?** - This is a numeric value threshold above which an affiliate is considered to be valid. You can leave this blank or set it to 0 if you'd like to allow any value.
* **Chain** - Which blockchain the event occurs on.
* **Smart Contract Address** - The smart contract on which to track the events.
* **Event ABI** - The ABI for the event to track. This can be copied and pasted from Etherscan. Ask a developer or reach out to us if you need help with this.
* **Event ABI Address Field** - This is the address to track within the event. For example,  if you have a staking event represented by `Stake(address staker, unit256 value)` this field would be set to `staker`.\
  Note, this field will only be editable once a valid ABI is set. Only indexed topics can be tracked.
* **Event ABI Value Field** - This is the value field to track within the event. For example,  if you have a staking event represented by `Stake(address staker, unit256 value)` this field would be set to `value`. So if you want to reward affiliates with 5 USDC for every referee that stakes at least 100 value, this is the field we'd check to see if the condition has been fulfilled.\
  Note, this field will only be editable once a valid ABI is set.

This is an example of settings for tracking Lido staking:

<figure><img src="/files/ySPd2LcU1JchDjult3nh" alt=""><figcaption><p>Tracking Lido staking</p></figcaption></figure>

You can require that referees complete multiple requirements to be considered eligible for a reward to be unlocked. To require multiple requirements, click on the plus icon at the bottom of a requirement. You can combine smart contract requirements with other types of requirements.


---

# 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:

```
GET https://docs.sharemint.xyz/fundamentals/referee-requirements/smart-contract-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
