Skip to content

feat(arbitrum): add Arbitrum Sepolia as a destination chain#282

Merged
gianalarcon merged 10 commits into
developfrom
feat/arbitrum-support
Jun 8, 2026
Merged

feat(arbitrum): add Arbitrum Sepolia as a destination chain#282
gianalarcon merged 10 commits into
developfrom
feat/arbitrum-support

Conversation

@Huygon764

@Huygon764 Huygon764 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Arbitrum Sepolia (421614) as a third destination chain alongside Horizen and Base. Testnet only.

What users can do

  • Pick Arbitrum Sepolia in the network chooser when creating an account — account auto-deploys, no setup needed
  • Deposit / withdraw ETH and USDC into the multisig
  • Propose / approve / execute single transfers and batch transfers, same flow as the other chains
  • Network shows up in the sidebar with its own accounts list

Known limitations

  • Add / remove signer is currently broken on Arbitrum (use Horizen or Base if you need to change the signer set) — root cause documented in packages/stylus/NOTES.md
  • MetaMask Blockaid may block plain ETH transfers into the account proxy; workaround documented in docs/arbitrum-stylus.md

Note: ZK aggregation on Arbitrum Sepolia now finalizes in ~2 minutes (on par with Horizen) — the earlier ~6h cadence has been resolved by zkVerify, so it is no longer a limitation.

Docs

  • New page: docs/arbitrum-stylus.md — user-facing guide with flows, caveats, and on-chain addresses

Test plan

  • Create account on Arbitrum Sepolia
  • Execute single transfer
  • Execute batch transfer

Screenshot Transfer and Batch successfully

image

@Huygon764 Huygon764 force-pushed the feat/arbitrum-support branch from 212281e to 489441e Compare June 2, 2026 01:37
@Huygon764 Huygon764 changed the title Feat/arbitrum support feat(arbitrum): add Arbitrum Sepolia as a destination chain Jun 3, 2026
@Huygon764 Huygon764 marked this pull request as ready for review June 3, 2026 10:35
Comment thread packages/hardhat/contracts/MetaMultiSigWalletStylusFactory.sol
Comment thread packages/stylus/NOTES.md Outdated
Huygon764 and others added 7 commits June 5, 2026 11:44
Allows deploying any branch to testnet staging via the Actions UI or
`gh workflow run`, without first merging it to develop. Useful for
hackathon/demo branches that aren't ready for develop yet.

After this lands on main, dispatch the staging workflows on a feature
branch with:
  gh workflow run backend-staging.yaml  --ref <branch>
  gh workflow run frontend-staging.yaml --ref <branch>

Path filters still gate the auto-deploy on `push` to develop; manual
dispatch ignores them and always redeploys.
* docs: add llms.txt intro page for AI agents (#256)

Add a GitBook-friendly page introducing PolyPay's llms.txt support so
non-technical readers can discover the feature and link AI agents to
the live playbook.

- New page docs/llms-txt-for-agents.md covering what llms.txt is, the
  live endpoint, the five integration flows it documents, two ways to
  wire an agent up, and compatibility notes.
- Add the page to docs/SUMMARY.md between x402 and Architecture.
- Fix stale api.polypay.xyz references in docs/x402-deposits.md to the
  real api.polypay.pro host.

* feat(x402): add Coinbase CDP bazaar deposit route for agentic.market listing (#260)

Adds a second x402 deposit endpoint /x402/bazaar/deposit/:multisig that
routes through Coinbase CDP facilitator instead of PayAI, so the resource
gets indexed in CDP discovery and surfaces on agentic.market.

The default /x402/deposit/:multisig path keeps using PayAI (better rate
limits, simpler auth) — no UI change. CDP path activates implicitly when
CDP_API_KEY_ID is set; otherwise it returns a clear config error.

CDP requires Ed25519 JWT signed per-request (2-min TTL), so the service
now lazy-imports @coinbase/x402 createAuthHeader to produce the
Authorization header. Payment requirements for the CDP path also embed a
declareDiscoveryExtension-shaped extensions.bazaar block (strict JSON
Schema), without which CDP would settle but not index.

Includes scripts/bazaar-bootstrap.ts to produce the first real settlement
that triggers CDP indexing — bootstrap must run against a deployed
backend (the resource URL ends up in the catalog).

Refs #259

---------

Co-authored-by: BoHsuu <115441679+Huygon764@users.noreply.github.com>
…ring

Add a Rust/WASM (Arbitrum Stylus) port of MetaMultiSigWallet and wire
Arbitrum Sepolia (421614) through shared, frontend and backend. The
contract is deployed and validated on-chain (Poseidon parity proven vs
the deployed PoseidonT3 library).

Per-account auto-deploy from the relayer is still open: the full contract
is ~29KB compressed, over the 24KB EVM limit, so cargo-stylus fragments
it and the single-bytecode StylusDeployer path can't be used. Options to
resume (proxy factory / CLI shell-out / manual) are documented in
packages/stylus/NOTES.md.
Wire Arbitrum Sepolia (421614) as a third destination chain alongside
Horizen and Base. Testnet only — zkVerify has no Arbitrum One verifier yet.

- Per-account multisig wallets via EIP-1167 proxy + shared Stylus impl,
  created on-chain by MetaMultiSigWalletStylusFactory.
- Stylus impl adds init() for the proxy pattern, plus an internal
  self-call dispatcher to work around the Stylus delegatecall + CALL
  msg.sender issue (see packages/stylus/NOTES.md).
- Custom 52-byte proxy variant of EIP-1167 that accepts plain ETH
  transfers (empty-calldata STOP) so cargo-stylus's fragmented loader
  doesn't revert deposits.
- Backend relayer routes Stylus-chain deploys through the factory;
  zkVerify aggregation domain 4 wired for chain 421614.
- Frontend network picker + sidebar surface Arbitrum Sepolia on testnet.
- Shared config carries impl/factory addresses + Circle USDC for 421614.
- Fix prisma findUnique by address_chainId in add/remove signer handlers
  (existing bug surfaced by the new chain).
- New docs/arbitrum-stylus.md user guide covering flows, limitations
  (add/remove signer broken, 6h aggregation cadence, MetaMask Blockaid
  warning) and on-chain addresses.
Reduces flaky "Invalid proof" reverts on execute() when Kurier marks a
proof aggregated but the receipt hasn't been published to the destination
chain yet. The 40s heuristic was occasionally too tight for Horizen
testnet under load.
Add packages/stylus-factory — a Rust/Stylus port of the Solidity
MetaMultiSigWalletStylusFactory. Emits byte-identical 62-byte proxy
bytecode (unit test in src/lib.rs guards against drift), so accounts
created by either factory are indistinguishable on-chain. The new
factory is the one wired into shared/contracts-config.ts; the Solidity
factory is no longer referenced from app code.

The accompanying NOTES.md update explains why Poseidon hashing inside
the Stylus impl is not feasible without breaking the Noir circuit
(only Stylus-native Poseidon library — OpenZeppelin — is Poseidon2,
incompatible) and stays as a STATICCALL to the on-chain PoseidonT3
Solidity library.
gianalarcon and others added 3 commits June 8, 2026 09:34
The log line hardcoded "40s" but CROSS_CHAIN_FINALIZATION_WAIT is now
120s, so the message was misleading. Interpolate the constant so the
logged duration stays in sync with the actual wait.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Revert the global bump to 2min — 40s is the value develop runs in
production and works reliably for Horizen and Base. zkVerify reduced
Arbitrum Sepolia aggregation time, so the existing 40s post-aggregation
wait is sufficient there too; no need to slow every chain to 2min.

The finalization log still derives its duration from the constant, so it
now correctly reports 40s.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zkVerify reduced Arbitrum Sepolia aggregation from ~6h to ~2 min, so the
"can sit pending for hours / prefer Horizen for fast demos" caveat no
longer applies. Reframe the section as a normal note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gianalarcon gianalarcon merged commit c5d8d4e into develop Jun 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants