feat: add transfer-assets-into-polkadot polkadot-docs test harness#288
Conversation
Adds a test harness verifying the Transfer Assets from Ethereum into Polkadot guide. Tests cover getSupportedAssets for Ethereum→AssetHubPolkadot and Ethereum→Hydration routes, the EXTERNAL_CHAINS constant, and EvmBuilder construction; live bridge submission is guarded by it.skipIf(!ETH_PRIVATE_KEY).
brunopgalvao
left a comment
There was a problem hiding this comment.
A few things before this is good to merge:
-
CI uses
npm install. Should benpm ci— the harness README tells usersnpm ci, most siblingpolkadot-docs-*.ymlworkflows do too, andnpm installcan mutate the lockfile mid-run. One-line fix. -
Test 4's Hydration branch silently passes. If WETH isn't supported on Hydration, the test bails with a bare
returnand zero assertions, so it stays green even if the builder breaks. Flip it toit.skipIf(!weth)or assert something before returning. -
Live test calls
.build()but the README says "sign + submit". In most paraspell builders.build()returns the constructed tx without broadcasting. Either the test needs the actual submit method or the README needs to say "build" — please confirm against the SDK and pick one. Right now they're out of sync. -
@polkadot/apideclared but never imported. Drop it fromdependenciesif it's only there transitively via@paraspell/sdk-pjs, otherwise add the code that uses it. Dead deps just add lockfile noise.
Style nit (not blocking): await import("ethers") is unnecessary since ethers is a top-level dep — just import it statically at the top of the file. Dynamic imports are for the PAPI-style "load only if used" cases.
Also worth ticking off the test-plan boxes in the PR description as items are verified — per CLAUDE.md they shouldn't ship unchecked.
Happy to approve once 1–4 are sorted.
brunopgalvao
left a comment
There was a problem hiding this comment.
All 4 + the style nit addressed cleanly — , on Hydration, README/code aligned on what .build() does, and the unused @polkadot/api drop. CI green. Quick reminder to tick the test-plan boxes in the PR body before merge (CLAUDE.md). Nice work.
Duplicate — body got mangled by shell quoting; superseded by the next approval review with the intended text.
Summary
Adds a test harness verifying the Transfer Assets from Ethereum into Polkadot guide. Tests cover getSupportedAssets for Ethereum→AssetHubPolkadot and Ethereum→Hydration routes, the EXTERNAL_CHAINS constant, and EvmBuilder construction; live bridge submission is guarded by it.skipIf(!ETH_PRIVATE_KEY).
Test plan
cargo fmt --check --package sdkcargo clippy --package sdk --locked -- -D warningscargo build --workspace --lockedcd <harness> && npm ci && npm test/check-internal-docspasses (if touching versions, docs, badges)/brandingre-run (if touching.github/brand/tokens.ymlor generated assets)Checklist
masterfeat:,fix:,chore:, …).envfiles committed.github/brand/tokens.yml(seeDESIGN.md)--draft)