Skip to content

Conversation

@kevoconnell
Copy link
Collaborator

@kevoconnell kevoconnell commented Jan 19, 2025

  • adds a starter guide to the docs

TODO: add instructions on installation commands

as workflows get simpler add more to the guides page

@kevoconnell kevoconnell changed the title starter guide whale watcher guide Jan 19, 2025
@kevoconnell kevoconnell requested a review from 8ball030 January 19, 2025 02:13
## Prerequisites

- Ensure you have `auto_dev` installed and set up
- Access to an Ethereum RPC endpoint (you'll need to set this in your environment variables)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add a reference to validation.station.codes?

```bash
adev scaffold repo some_agent
```

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing steps to enter into the new repo youve created!

### 4. Eject the Metrics Skill

```bash
aea -s eject skill eightballer/metrics
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt this be adev?


### 5. Create the FSM Configuration

Create a file named `your_fsm.yaml` with the following content:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create this file !

in our case we can reference the fsm from the data file.

# Store Web3 instance in shared state
self.context.shared_state["w3"] = self.w3

self.threshold = float(os.getenv('WHALE_THRESHOLD', '1000')) # Default 1000 ETH
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should set this as part of the settings for the component.

self.context.logger.info("Successfully connected to Web3")

# Store Web3 instance in shared state
self.context.shared_state["w3"] = self.w3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaffold the contract and you can just use the helper functions

def act(self) -> None:
"""Wait for new blocks and get block data via RPC."""
self.context.logger.info("IdleRound.act() called")
try:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to do any of this parsing


def decode_transfer_log(self, log):
"""Decode ERC20 transfer event log."""
try:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

self.context.logger.info(f"\n{alert_content['message']}")

# Create proper Message object
alert_msg = Message(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo again can improve a lot this


```env
RPC_URL=your_ethereum_rpc_endpoint
WHALE_THRESHOLD=1000 # Threshold in ETH to consider an address a whale
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure as env var, but we then pass that to the agent config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants