Skip to content

Integrate squid-evm-funding with Filecoin payment commands #29

Description

@snissn

Parent: #28

Depends on: FilOzone/squid-evm-funding#4

Goal

Use squid-evm-funding to acquire only Filecoin Pin's existing FIL/USDFC wallet shortfalls in both payments fund and payments setup --auto.

Required Behavior

  • Start from current upstream master, not fork master or PR feat(payments): support selected EVM funding sources filecoin-project/filecoin-pin#630.
  • Preserve existing Filecoin Pay funding plans and automatic-setup targets as the only target authority.
  • Add one thin adapter from Filecoin requirements/policy to the library.
  • Reuse the same adapter from both commands.
  • Preserve direct funding and zero-shortfall behavior with zero Squid/source-RPC calls.
  • Keep chain allowlists, native-fee ceilings, Filecoin reserves, environment resolution, checkpoint paths, prompts, and CLI output in Filecoin Pin.
  • Pin an immutable library revision for the draft; npm publication is not required to open it.
  • Fail acquisition closed outside Filecoin mainnet.

Ponytail Boundary

Do not copy the old acquisition directory. Do not add a provider interface, wallet adapter, route/status parser, fee engine, or recovery state machine to Filecoin Pin. Reuse existing command helpers and add the fewest files needed for the adapter.

Test-First

Start with focused command-level regressions:

  1. zero shortfall produces no library/provider/source-RPC call;
  2. payments fund passes exact shortfalls and resumes existing Filecoin Pay deposit behavior;
  3. payments setup --auto uses its existing target and completes deposit/approval/readiness;
  4. Calibration/devnet acquisition fails before provider activity;
  5. interrupted acquisition reruns through library recovery without duplicate spending.

Performance Classification

Possibly performance-relevant. Use mock call counts as the guardrail. No benchmark is required.

Exit Gate

  • One adapter serves both commands.
  • No Squid implementation logic is duplicated locally.
  • Focused and broader affected tests pass.
  • Cross-platform build/typecheck/lint/browser gates pass.
  • Latest-head CI and mature review pass before squash merge into the integration branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions