Goal
Support Filecoin and seven selected external EVM networks as input chains for Filecoin payment funding, using any exact Squid-supported token that produces a valid route to the FIL and/or USDFC needed by the command.
The selected source networks are:
| CLI name |
Chain ID |
filecoin |
314 |
arbitrum (arb remains accepted) |
42161 |
ethereum |
1 |
base |
8453 |
optimism |
10 |
polygon |
137 |
avalanche |
43114 |
bnb |
56 |
Done means payments fund and payments setup --auto can safely resolve an explicitly selected source token on one of these networks, quote and execute a valid Squid route, verify Filecoin wallet arrival, and continue through the existing Filecoin Pay flow.
Why This Exists
The current implementation supports only native USDC on Arbitrum One. Chain ID 42161, the USDC address and six decimals, the source client, Squid router, native-gas ceiling, status requests, retry text, fixtures, and documentation are all Arbitrum-specific.
Squid exposes a broader EVM chain/token catalog and valid routes from the selected networks. Filecoin Pin should use that catalog as a dynamic token allowlist while retaining a deliberately small, reviewable set of input networks.
Product Contract
- The user explicitly supplies one
--from-chain and one --from-token.
--from-token accepts an exact contract address or a unique symbol on the selected chain.
- Ambiguous symbols fail before signing and list the matching addresses; they are never guessed.
- Native tokens have an explicit, documented selector.
- Squid catalog membership is required, but catalog membership alone does not authorize spending.
- A current route must satisfy all chain, token, owner, amount, destination, target/spender, expiry, slippage, and user-cap checks.
- The existing Filecoin Pin/Synapse funding planners remain authoritative for required FIL and USDFC.
--max-source-amount remains an invocation-wide cap across all acquisition legs and is parsed in the resolved token's decimals.
- One invocation spends one selected source token only.
- The same EVM address controls the source and Filecoin wallets.
- Direct Filecoin funding paths remain direct and make no Squid or source-RPC call.
- Calibration and devnet acquisition continue to fail closed.
Issue Graph And Gate Ownership
| Issue |
Role |
Depends on |
Blocks |
Authoritative gate |
| Resolve Squid-supported EVM source assets safely |
source contract / decision gate |
none |
execution substrate |
The fixed chain set, dynamic token resolution, native-token handling, and trusted target/spender policy are unambiguous and covered by sanitized fixtures. |
| Generalize Squid execution across selected EVM source chains |
reusable execution substrate |
source contract |
both CLI integrations |
No Arbitrum/token-decimal/router assumption remains in planning, execution, status, recovery, or Filecoin same-chain handling. |
| Support selected EVM sources in payments fund |
first user-facing integration |
execution substrate |
setup parity, final validation |
payments fund uses one explicit resolved source safely while preserving direct funding, estimator, cap, recovery, and exit-code behavior. |
| Reuse selected EVM sources in payments setup --auto |
entry-point parity |
payments fund integration |
final validation |
Automatic setup reuses the same resolved source and execution layer without changing its target, deposit, approval, or ready-summary semantics. |
| Document and verify multi-chain EVM payment funding |
documentation and final validation |
both CLI integrations; existing #6 for the first-route mainnet gate |
parent closure |
Deterministic, live read-only, and representative funded checks prove the supported behavior without claiming every catalog token was funded. |
source contract
↓
EVM execution substrate
↓
payments fund
↓
payments setup --auto
↓
documentation and production validation
↓
parent complete
Existing-Issue Disposition
Scope
- Filecoin plus the seven named external EVM source networks.
- Runtime Squid chain/token catalog validation inside the fixed network boundary.
- Unique-symbol and exact-address token selection.
- Native and ERC-20 source tokens.
- Dynamic token decimals, chain-aware RPC verification, route targets/spenders, source native gas, and status requests.
- Filecoin same-chain routes that preserve enough FIL for transaction gas and subsequent Filecoin Pay work.
- Recovery state bound to the exact source chain and token.
- Both
payments fund and payments setup --auto.
- Deterministic tests, live read-only route probes, representative funded validation, and user documentation.
Non-Goals
--suggest-sources, wallet balance scanning, portfolio discovery, or route recommendations.
- Automatic source choice or automatic spending.
- Combining balances from multiple tokens or networks.
- Arbitrary ERC-20 addresses absent from Squid's current catalog.
- Cosmos, Sui, Solana, or other non-EVM sources.
- EVM networks outside the selected eight.
- A static whitelist of token symbols such as USDC/USDT/DAI.
- Fiat/card funding, custody, gas sponsorship, or contract changes.
- Changes to Filecoin Pin/Synapse funding estimates.
- Enabling acquisition on Calibration or devnet.
Completion Phases
Code complete
Code-complete PRs may merge before funded validation when the broader routes remain experimental and the remaining production checks are explicitly owned by the final child.
Production ready
Funded execution is not required for every token in Squid's mutable catalog.
Test-First And Performance Classification
| Child |
First behavior or invariant |
Test-first mode |
Performance class |
Required evidence |
| source contract |
Selected-chain catalog entries resolve deterministically; ambiguous/unsupported inputs fail closed |
Fixture/contract red-green-refactor, with an exploratory exception for live API inspection |
Possibly performance-relevant |
Bounded catalog calls, timeouts, sanitized fixtures, no call on direct paths |
| execution substrate |
A non-Arbitrum ERC-20 and Filecoin native source execute through the same safe state machine without fixed decimals/router/chain assumptions |
Red-green-refactor plus recovery fault injection |
Possibly performance-relevant |
Provider/RPC call-count guardrails and operational stage timing |
payments fund |
Explicit resolved source funds only authoritative wallet shortfalls and preserves direct behavior |
Red-green-refactor |
Not performance-relevant |
Focused CLI/integration tests and terminal output |
payments setup --auto |
Existing setup target flows through the shared source and reaches the unchanged ready summary |
Red-green-refactor |
Not performance-relevant |
Focused CLI/integration tests and terminal output |
| documentation/validation |
Current-head matrix proves the claimed network/token policy without overclaiming exhaustive funded coverage |
Environment-smoke exception with deterministic regression tests |
Not performance-relevant |
Exact commands, current head, sanitized transaction IDs/output, rerun result |
Provider latency and route duration are observational. Material new calls on the direct path or unbounded calls on the acquisition path are blocking regressions.
Branch And PR Policy
Completion Criteria
Goal
Support Filecoin and seven selected external EVM networks as input chains for Filecoin payment funding, using any exact Squid-supported token that produces a valid route to the FIL and/or USDFC needed by the command.
The selected source networks are:
filecoinarbitrum(arbremains accepted)ethereumbaseoptimismpolygonavalanchebnbDone means
payments fundandpayments setup --autocan safely resolve an explicitly selected source token on one of these networks, quote and execute a valid Squid route, verify Filecoin wallet arrival, and continue through the existing Filecoin Pay flow.Why This Exists
The current implementation supports only native USDC on Arbitrum One. Chain ID
42161, the USDC address and six decimals, the source client, Squid router, native-gas ceiling, status requests, retry text, fixtures, and documentation are all Arbitrum-specific.Squid exposes a broader EVM chain/token catalog and valid routes from the selected networks. Filecoin Pin should use that catalog as a dynamic token allowlist while retaining a deliberately small, reviewable set of input networks.
Product Contract
--from-chainand one--from-token.--from-tokenaccepts an exact contract address or a unique symbol on the selected chain.--max-source-amountremains an invocation-wide cap across all acquisition legs and is parsed in the resolved token's decimals.Issue Graph And Gate Ownership
payments funduses one explicit resolved source safely while preserving direct funding, estimator, cap, recovery, and exit-code behavior.payments fundintegrationExisting-Issue Disposition
Scope
payments fundandpayments setup --auto.Non-Goals
--suggest-sources, wallet balance scanning, portfolio discovery, or route recommendations.Completion Phases
Code complete
payments fundintegration complete.payments setup --autointegration complete.Code-complete PRs may merge before funded validation when the broader routes remain experimental and the remaining production checks are explicitly owned by the final child.
Production ready
Funded execution is not required for every token in Squid's mutable catalog.
Test-First And Performance Classification
payments fundpayments setup --autoProvider latency and route duration are observational. Material new calls on the direct path or unbounded calls on the acquisition path are blocking regressions.
Branch And PR Policy
AGENTS.mdandCONTRIBUTING.md.masteronly with explicit user authorization.Completion Criteria