Skip to content

fix(swap): route EVM batch-swap fee to SOPA × COINMASTERSGUILD split + harden Blockscout - #283

Merged
sktbrd merged 1 commit into
mainfrom
fix/sopa-swap-fee-recipient
Aug 21, 2026
Merged

fix(swap): route EVM batch-swap fee to SOPA × COINMASTERSGUILD split + harden Blockscout#283
sktbrd merged 1 commit into
mainfrom
fix/sopa-swap-fee-recipient

Conversation

@sktbrd

@sktbrd sktbrd commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What changed

  • EVM batch-swap fee recipient now points at the SOPA × COINMASTERSGUILD
    split contract (0xa642b91ff941fb68919d1877e9937f3e369dfd68) instead of the
    old multichain custody wallet. Non-Base (EVM batch) 0x swap fees are now
    divided on-chain between the two parties. Constant renamed
    SWAP_FEE_RECIPIENT_MULTICHAINSWAP_FEE_SPLIT_RECIPIENT.
  • Blockscout hardening: the Base instance is 500ing with a plain-text
    "Internal server error" body. Added a crash-safe blockscoutGet helper and
    wired it into stake-graph, use-vault-total, and use-vault-rewards so
    a Blockscout outage degrades to "no data" instead of crashing the UI.

Verification

  • New regression test src/services/blockscout.test.ts (3 tests) pins the 500
    • non-JSON body → null.
  • Full unit suite: 19 files, 152 tests, all passing.
  • Lint clean (0 errors).

Co-authored-by: Claude noreply@anthropic.com

…lit + harden Blockscout

Two fixes for the live site:

- Fee recipient: replace the old multichain custody wallet
  (0x96C373…c0eEA2) with the SOPA × COINMASTERSGUILD split contract
  (0xa642b91f…dfd68) so non-Base / EVM-batch 0x swap fees are divided
  on-chain between SOPA and COINMASTERSGUILD. Renamed the constant to
  SWAP_FEE_SPLIT_RECIPIENT to reflect that it's a split contract, not a
  plain wallet.

- Blockscout: the Base instance is returning HTTP 500 with a plain-text
  "Internal server error" body on /addresses/{addr}/tokens?type=ERC-20
  (and /transfers, /logs). The swap token discovery called res.json() on
  that text body and crashed the picker. New crash-safe helper
  (src/services/blockscout.ts) only parses JSON on 2xx and returns null on
  any failure; wired into stake-graph, use-vault-total and use-vault-rewards
  so a Blockscout outage degrades to "no data" instead of a UI error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
gnars-shadcn Ignored Ignored Aug 21, 2026 1:14am
hackertestdao Ignored Ignored Aug 21, 2026 1:14am

@sktbrd
sktbrd merged commit c71fde6 into main Aug 21, 2026
4 checks passed
@sktbrd
sktbrd deleted the fix/sopa-swap-fee-recipient branch August 21, 2026 01:17
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