Skip to content

Add contract storage usage estimator #233

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

Creators with many invoices may want to estimate their share of contract storage rent burden, useful for cost forecasting before creating large batches.

Technical Context

New src/storageUsageEstimator.ts. Estimates per-invoice storage footprint (core + ext + ext2 entries) based on known field sizes from src/types.ts, multiplied by invoice count.

Acceptance Criteria

  • estimateStorageFootprint(invoiceCount, optionsUsed) returns an estimated byte count and rough rent-cost estimate
  • Accounts for optional features increasing footprint (tranches, co-signers, split rules) via a documented per-feature byte estimate
  • Pure function, no network calls
  • Tests: baseline estimate; estimate increases correctly when optional features are toggled on

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions