Open
Conversation
8ball030
requested changes
Jan 19, 2025
| ## 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) |
Owner
There was a problem hiding this comment.
Lets add a reference to validation.station.codes?
| ```bash | ||
| adev scaffold repo some_agent | ||
| ``` | ||
|
|
Owner
There was a problem hiding this comment.
missing steps to enter into the new repo youve created!
| ### 4. Eject the Metrics Skill | ||
|
|
||
| ```bash | ||
| aea -s eject skill eightballer/metrics |
|
|
||
| ### 5. Create the FSM Configuration | ||
|
|
||
| Create a file named `your_fsm.yaml` with the following content: |
Owner
There was a problem hiding this comment.
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 |
Owner
There was a problem hiding this comment.
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 |
Owner
There was a problem hiding this comment.
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: |
Owner
There was a problem hiding this comment.
no need to do any of this parsing
|
|
||
| def decode_transfer_log(self, log): | ||
| """Decode ERC20 transfer event log.""" | ||
| try: |
| self.context.logger.info(f"\n{alert_content['message']}") | ||
|
|
||
| # Create proper Message object | ||
| alert_msg = Message( |
Owner
There was a problem hiding this comment.
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 |
Owner
There was a problem hiding this comment.
sure as env var, but we then pass that to the agent config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: add instructions on installation commands
as workflows get simpler add more to the guides page