Skip to content

feat(sdk): explorer URL builder helpers and unit tests - #227

Open
emarc99 wants to merge 3 commits into
karagozemin:masterfrom
emarc99:feat/73-explorer-URL-builder-tests
Open

feat(sdk): explorer URL builder helpers and unit tests#227
emarc99 wants to merge 3 commits into
karagozemin:masterfrom
emarc99:feat/73-explorer-URL-builder-tests

Conversation

@emarc99

@emarc99 emarc99 commented Jul 30, 2026

Copy link
Copy Markdown

What & Why

Centralized block explorer URL builders in @oversync/sdk under src/explorers/index.ts and added comprehensive unit test coverage for Sepolia Etherscan and StellarExpert Testnet URLs, as well as placeholder handling for mainnet/public networks.

Adds the missing stellarAccountUrl helper alongside ethereumTxUrl, ethereumAddressUrl, stellarTxUrl, and stellarContractUrl. Includes robust isValidInput validation so empty, whitespace, null, or undefined inputs safely return null instead of generating malformed links.

Touched surface

  • frontend/ — React + Vite bridge UI
  • packages/sdk/ — shared TypeScript SDK
  • coordinator/ — order book + REST/WS service
  • resolver/ — community resolver runner
  • relayer/ — legacy v1 listener / watchdog (changes here need extra scrutiny)
  • contracts/ — Solidity v2 (HTLCEscrow, ResolverRegistry)
  • soroban/ — Stellar Soroban contracts (oversync-htlc, oversync-resolver-registry)
  • docs/ — documentation only
  • CI / config (.github/workflows/, docker, env.example)

Settlement & refund semantics

  • Bridge settlement semantics changed (claim path, timelock ordering, preimage handling, hashlock type, asset routing)
  • Refund semantics changed (who can refund, who receives refunds, timelock values, refund-address pinning)
  • Settlement-critical invariant changed (e.g. non-custodial guarantee, no-admin-escape-hatch, permissionless refund)
  • None of the above — this PR cannot move, hold, or release user funds

Tests run

  • pnpm --filter @oversync/sdk build && pnpm --filter @oversync/sdk exec tsc --noEmit
  • pnpm --filter @oversync/sdk test
  • pnpm --filter @oversync/coordinator exec tsc --noEmit && pnpm --filter @oversync/coordinator test
  • pnpm --filter @oversync/resolver exec tsc --noEmit && pnpm --filter @oversync/resolver test
  • pnpm --filter @oversync/frontend exec tsc --noEmit && pnpm --filter @oversync/frontend test
  • pnpm --filter @oversync/contracts compile && pnpm --filter @oversync/contracts exec hardhat test test/v2/HTLCEscrow.test.ts test/v2/ResolverRegistry.test.ts
  • cd soroban && stellar contract build && cargo test --release
  • (cd contracts && forge test --match-path "test/foundry/*" -v) (Solidity fuzz / invariant)
  • pnpm test:e2e (cross-chain differential harness)
  • node scripts/verify-addresses.mjs — required if addresses, configs, or env.example change
  • node scripts/check-evidence-links.mjs — advisory; required if docs links change

Free-form outcome:

npx vitest run packages/sdk/test/explorers.test.ts

image

UI / evidence artefacts

  • Frontend visible change → screenshot or short clip attached (swap flow, refund dialog, history banner, wallet confirm)
  • Coordinator API changecurl snippet + JSON response sample pasted below
  • Metrics / KPI change → updated snapshot in docs/examples/metrics-snapshot.example.json (or new JSON in PR)
  • Status table / README change → updated row(s) pasted below with the source link
  • None of the above — no UI-observable artefact

Secrets, logging, and PII risk

  • No secrets, private keys, RPC credentials, .env content, wallet mnemonics, or preimages added to the repo
  • No new console.* / logger.* line that prints secrets, preimages, signed payloads, or PII
  • No new Vite/build flag that exposes devtools output in production (the VITE_* and esbuild.drop policy still holds)
  • None of the above — pure string helper functions and unit tests only.

Public proof links (SCF / investor evidence)

n/a

Breaking change & rollback

  • Breaking change? No — fully backwards-compatible additions to pure SDK helpers.
  • Migration or feature flag required? No.

Reviewer checklist (for the PR author to self-verify)

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@emarc99 is attempting to deploy a commit to the karagoz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@emarc99
emarc99 marked this pull request as draft July 30, 2026 12:53
@emarc99

emarc99 commented Jul 30, 2026

Copy link
Copy Markdown
Author

@karagozemin kindly review whenever possible.

@emarc99
emarc99 marked this pull request as ready for review July 30, 2026 12:55
@emarc99
emarc99 marked this pull request as draft July 30, 2026 12:55
@drips-wave

drips-wave Bot commented Aug 1, 2026

Copy link
Copy Markdown

@emarc99 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@emarc99
emarc99 marked this pull request as ready for review August 1, 2026 16:17
@emarc99 emarc99 changed the title feat(sdk): add explorer URL builders for Sepolia and Stellar testnet feat(sdk): explorer URL builder helpers and unit tests Aug 1, 2026
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.

[Wave 7 4/10] Explorer URL builder tests for Sepolia and Stellar testnet

1 participant