Skip to content

Transfers record: every provable transfer, not only the last week - #311

Open
ezedike-evan wants to merge 1 commit into
devfrom
transfers-record-full
Open

ezedike-evan wants to merge 1 commit into
devfrom
transfers-record-full

Conversation

@ezedike-evan

Copy link
Copy Markdown
Contributor

The /transfers page only showed what the Stellar RPC still kept (7 days), never read the retired v1 Stellar contract, and didn't count deliveries our relayers finished. GitHub also skipped scheduled runs. Result: the page undercounted badly.

What changes

  • scripts/transfers-backfill.mjs + scripts/data/transfers-backfill.json: a one-time backfill of older transfers, merged into the record (scripts/lib/record-merge.mjs, tested).
  • chain-readers.mjs: reads Stellar v1 and v2, relayed deliveries into Stellar, Aptos fees; counts per contract.
  • transfers-record.mjs: falls back to the known fee addresses (with a warning) when the repo variables are unset.
  • /transfers leads with the totals: 31 transfers, 381.61 USDC, 6 chains, 7 routes.
  • Workflow runs at :07, :27, :47 and on push to main, so a skipped cron costs 20 minutes, not hours.
  • Docs: mainnet-transfers page links to /transfers.

After merge, set the repo variables XEBRA_FEE_ADDRESS_EVM, _SOLANA, _SUI, _APTOS so the fallback warnings go away.

🤖 Generated with Claude Code

The public /transfers page listed 6 transfers because Stellar RPC keeps
seven days of events and the fee-address readers were skipped (repo
variables unset). Now:

- One-time backfill (scripts/transfers-backfill.mjs ->
  scripts/data/transfers-backfill.json): every transfer through both
  Stellar contracts from Xebra's accounts and the accounts they created
  (Horizon finds the transactions, the archive RPC reads each
  bridge_initiated event), plus early burns checked against Circle.
- Live reader for mints Xebra's relayer signed into Stellar, joined to
  the Sui burn; Stellar reader covers the retired v1 contract too.
- Fee addresses fall back to the live site's public ones with a loud
  run warning; Aptos fee reader added; Arc fee withdrawals not counted.
- Rows from several sources are merged by burn/mint tx, strongest proof
  kept; totals add chains and routes; contract get_seq/seq counts are
  compared with listed rows and any gap is shown.
- Page leads with "N transfers across M chains", shows the mint link and
  the two new proof kinds.
- Workflow: cron three times an hour, runs on push to main for record
  code, skips commits that only change updatedAt.
@vercel

vercel Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
xebra Error Error Nov 28, 2026 12:45pm UTC
xebra-docs Ready Ready Preview Nov 28, 2026 12:45pm UTC

This branch had an error being deployed

1 failed deployment
Preview – xebra — 71a2f528 Deployed Nov 28, 2026 by vercel[bot]
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.

1 participant