# Smart Contract Developers

Smart contract developers often need to analyze their data. Assuming you are a developer from EigenLayer, and your community is requesting a comprehensive dashboard on how each wallet addresses stake with EigenLayer, here are the steps you can follow to accomplish this using the Hemera Protocol.

#### Create your data model

To store the result, we can design a simple data model

<pre><code>class DailyWalletTokenStaking(BaseModel):
<strong>    date = Column(Date)
</strong>    wallet_address = Column(String)
    token_address = Column(String)
    balance = Column(Numeric)
</code></pre>

#### Understand your smart contract data

You must include all the transactions/logs/traces, which may change your output data. For your use case, you need to identify all the staking balance changes.&#x20;

If you understand your contract well, you should figure out that this transaction will trigger a user-staking balance change.&#x20;

Method: depositIntoStrategy: <https://etherscan.io/tx/0x7269c2cf90779d82b3b53f6c997cabd25243cb60f6f136e8ce5a1e6d510d478e>

#### Design trigger event

To summarize, whenever you see a transaction that interacts with this specific address (EigenLayer: Strategy Manager) and calls this specific function (depositIntoStrategy) from your smart contract, you should update the user staking balance.&#x20;

You can define this customized trigger within the indexer using this code.

<pre><code><strong># 0xe7a050aa is refering to the depositIntoStrategy
</strong>0x858646372CC42E1A627fcE94aa7A7033e7CF075A
(EigenLayer: Strategy Manager)
<strong>if transaction.to_address == "" and transaction.method_id == "0xe7a050aa":
</strong><strong>    # call update_daily_wallet_token_staking
</strong><strong>    update_daily_wallet_token_staking(transaction, logs, traces)
</strong>
</code></pre>

The trigger can be a method in transactions,  topics from logs, or even an action from the trace.

#### Write customize code

Now we can add our code and update our data model when an event is triggered. The event will pass transaction data/logs/traces to you.

You can write your customized code and update the data model you design.

```python
def update_daily_wallet_token_staking(
    transaction: Transaction, logs: Log[], traces: Trace[]
    ):
    # Get balance change from logs
    
    # Update model
    
    
```

Learn more about User Defined Functions: [building-user-defined-functions-udf](https://docs.thehemera.com/udfs-user-defined-functions/building-user-defined-functions-udf "mention")
