Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

EVM validation: integrate new Evaluate code#151

Merged
webpiratt merged 6 commits into
mainfrom
54-evaluate-refactoring
Aug 5, 2025
Merged

EVM validation: integrate new Evaluate code#151
webpiratt merged 6 commits into
mainfrom
54-evaluate-refactoring

Conversation

@webpiratt

@webpiratt webpiratt commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Ref: vultisig/recipes#54

Summary by CodeRabbit

  • Bug Fixes

    • Improved transaction handling and validation for payroll and fee plugins, ensuring more reliable processing and error reporting.
    • Updated logic for extracting and handling token IDs in payroll transactions to better support native and non-native tokens.
  • Refactor

    • Streamlined and unified the handling of chain and Ethereum types across plugins for better consistency.
    • Simplified recipe specification structures for DCA, fee, and payroll plugins, removing unnecessary or redundant fields.
  • Chores

    • Updated a dependency to the latest version for improved stability and compatibility.

@coderabbitai

coderabbitai Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

This set of changes updates the github.com/vultisig/recipes dependency version and refactors several plugin files. The updates simplify or modify the recipe schema specifications, adjust transaction handling logic by removing explicit chain retrieval and transaction parsing, unify type usage across chain and Ethereum packages, improve error handling and token extraction logic in payroll and fee plugins, and remove handling of the "token" parameter in fee-related code.

Changes

Cohort / File(s) Change Summary
Dependency Update
go.mod
Updated github.com/vultisig/recipes dependency to a newer version.
DCA Plugin Recipe Schema Simplification
plugin/dca/dca.go
GetRecipeSpecification now returns an empty schema, removing all previous detailed specification fields.
Fee Plugin Schema and Parameter Refactor
plugin/fees/policy.go
Removed ScheduleVersion, updated formatting, added Target field, removed "token" parameter, and simplified parameter types in GetRecipeSpecification.
Fee Plugin Transaction Handling Update
plugin/fees/transaction.go
Removed "token" parameter handling, simplified transaction decoding, updated evaluation logic, and refactored imports.
Payroll Plugin Refactor and Type Unification
plugin/payroll/transaction.go
Unified chain/Ethereum types, improved error handling, removed getTokenID, adjusted token extraction logic, updated transaction encoding, and simplified GetRecipeSpecification.
Payroll Plugin Transaction Validation Update
plugin/payroll/policy.go
Removed explicit chain retrieval and transaction parsing, simplified evaluation call to use decoded bytes and chain type, updated error handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Plugin
    participant RecipesLib

    User->>Plugin: Call GetRecipeSpecification()
    Plugin->>RecipesLib: (Previously) Return detailed RecipeSchema
    Plugin-->>User: (Now) Return empty or simplified RecipeSchema
Loading
sequenceDiagram
    participant Policy
    participant Plugin
    participant Util
    participant Chain

    Policy->>Plugin: ProposeTransactions()
    Plugin->>Util: ParseResource(rule)
    Util-->>Plugin: ResourceInfo
    Plugin->>Chain: Get native symbol
    Plugin->>Plugin: Determine tokenID based on protocol/native symbol
    Plugin->>Chain: Generate unsigned transaction
    Chain-->>Plugin: UnsignedTxBytes
    Plugin-->>Policy: PluginKeysignRequest
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

In the warren where plugins hop and play,
Recipes slimmed down, some fields swept away.
Chains and tokens now unified and neat,
Errors wrapped snugly, no bugs to defeat.
With every refactor, the system feels light—
A rabbit’s delight, coding through the night! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f34c5c6 and 4aaaa84.

📒 Files selected for processing (1)
  • plugin/payroll/transaction.go (10 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 54-evaluate-refactoring

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Comment thread plugin/dca/dca.go
SupportedChains: []string{"ethereum"},
},
}, nil
return &rtypes.RecipeSchema{}, nil

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

doesn't make sense to apply new changes in DCA, it will be completely reworked

Comment thread go.mod Outdated
github.com/vultisig/commondata v0.0.0-20250710214228-61d9ed8f7778
github.com/vultisig/mobile-tss-lib v0.0.0-20250316003201-2e7e570a4a74
github.com/vultisig/recipes v0.0.0-20250729120802-9b1d07f8262a
github.com/vultisig/recipes v0.0.0-20250804215735-744a9a61f45c

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update it once vultisig/recipes#58 get merged

RaghavSood
RaghavSood previously approved these changes Aug 5, 2025

@RaghavSood RaghavSood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, pending go mod bump

@webpiratt
webpiratt enabled auto-merge August 5, 2025 09:50

@RaghavSood RaghavSood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm

@webpiratt
webpiratt merged commit 9eafcad into main Aug 5, 2025
2 of 3 checks passed
@webpiratt
webpiratt deleted the 54-evaluate-refactoring branch August 5, 2025 09:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants