Skip to content

Add multi-asset funding imbalance tests #348

Description

@edehvictor

Summary

Add contract tests for payroll batches funded with multiple assets where one asset is overfunded and another is underfunded.

Why This Matters

Multi-asset payroll can appear funded overall while still missing the exact asset needed for some employees.

Suggested Files

  • contracts/src/treasury.rs
  • contracts/src/payroll.rs
  • contracts/tests/multi_asset_imbalance.rs

Tasks

  • Build fixtures with two or more payroll assets.
  • Assert execution fails when any required asset is underfunded.
  • Assert surplus in another asset does not hide a deficit.
  • Document asset-specific readiness checks.

Acceptance Criteria

  • Each asset balance is validated independently.
  • Overfunding one asset cannot offset underfunding another.
  • Failure messages identify the deficient asset.
  • Tests cover balanced, underfunded, and surplus cases.

Coordination

Join the Telegram channel for proper coordination: https://t.me/zkpayroll

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions