Skip to content

Add token approval / spending limits to wallet contract #77

@Miracle656

Description

@Miracle656

Summary

Right now any signed assertion authorizes any operation. Add per-key spending limits or daily caps as an extra safety layer.

Files

  • contracts/invisible_wallet/src/lib.rs
  • contracts/invisible_wallet/src/storage.rs

Acceptance criteria

  • New storage entry: (asset, daily_limit, used_today, last_reset)
  • __check_auth() reads the limit and rejects if exceeded
  • Daily reset logic
  • Tests covering: under limit, at limit, over limit, day boundary

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions