Skip to content

Update Trigger.s.sol#1

Merged
evanorti merged 1 commit into0.3from
trigger-script
Apr 30, 2025
Merged

Update Trigger.s.sol#1
evanorti merged 1 commit into0.3from
trigger-script

Conversation

@evanorti
Copy link
Contributor

@evanorti evanorti commented Apr 29, 2025

Update trigger script to work with components.

The updated eth-price-oracle for Claude needs to be passed abi-encoded data, not abi.encodePacked:

https://github.com/Lay3rLabs/WAVS-Claude-Template/blob/0.3/components/eth-price-oracle/src/lib.rs#L50C1-L72C59

@evanorti evanorti requested a review from reecepbcups April 29, 2025 22:33
);

trigger.addTrigger(abi.encodePacked(coinMarketCapID));
trigger.addTrigger(abi.encode(coinMarketCapID));
Copy link
Member

Choose a reason for hiding this comment

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

L20 here? is this example specific or what we should have upstream in the template too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the claude template has a few modifications to 0.3 to get Claude to be more reliable.

  • an added makefile command for validation tests
  • COIN_MARKET_CAP_ID becomes TRIGGER_DATA_INPUT
  • TRIGGER_DATA_INPUT is an abi-encoded string for standardization
  • eth-price-oracle component is modified to use abi-encoded string as input and trigger.rs is merged into lib.rs

These changes make it easier for claude. So if we want to standardize this, then we should put them in 0.4 and make this change as well.

Copy link
Member

Choose a reason for hiding this comment

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

yes it is something I want to standardize, will make these changes for 0.4 in my working PR for beta

@evanorti evanorti merged commit 876244e into 0.3 Apr 30, 2025
5 of 6 checks passed
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.

2 participants