Skip to content

feat: add Uniswap V3 Periphery with Hardhat CI harness#286

Merged
nhussein11 merged 2 commits into
polkadot-developers:masterfrom
sekisamu:feat/uniswap-v3-periphery-hardhat
Apr 28, 2026
Merged

feat: add Uniswap V3 Periphery with Hardhat CI harness#286
nhussein11 merged 2 commits into
polkadot-developers:masterfrom
sekisamu:feat/uniswap-v3-periphery-hardhat

Conversation

@sekisamu

Copy link
Copy Markdown
Collaborator

Adds the polkadot-cookbook test harness for the Uniswap V3 Periphery with EVM on Polkadot Hub tutorial. The harness clones revm-hardhat-examples at pinned commit 96696ad15c3cf01b9168a71ad5114f27c34a8726, installs dependencies (resolving the local @uniswap/v3-core file reference automatically), compiles the SwapRouter and NonfungiblePositionManager contracts, runs the full 39-test Hardhat suite on the local Hardhat network, and optionally deploys via Hardhat Ignition to polkadotTestnet.

feat(smart-contracts): add uniswap-v3-periphery-hardhat test harness

Companion PR

polkadot-developers/polkadot-docs#1659

Summary

  • Adds CI harness for the Uniswap V3 Periphery with EVM on Polkadot Hub tutorial
  • Clones revm-hardhat-examples at pinned commit 96696ad, compiles SwapRouter and NonfungiblePositionManager, runs 39 Hardhat tests on
    the local Hardhat network, and optionally deploys via Ignition to polkadotTestnet
  • Adds Uniswap V3 Periphery with Hardhat row to polkadot-docs/README.md

Why

Companion harness to the existing V3 Core harness — keeps the new Periphery tutorial verified in CI on every push to master.

Test plan

  • cargo fmt --check --package sdk
  • cargo clippy --package sdk --locked -- -D warnings
  • cargo build --workspace --locked
  • Harness tests pass locally (if touched): cd polkadot-docs/smart-contracts/uniswap-v3-periphery-hardhat && npm ci && npm test
  • /check-internal-docs passes (if touching versions, docs, badges)
  • /branding re-run (if touching .github/brand/tokens.yml or generated assets)
  • CI is green on this PR

Checklist

  • Branch is NOT master
  • Commits follow Conventional Commits (feat:, fix:, chore:, …)
  • No secrets, credentials, or .env files committed
  • No hardcoded hex colors outside .github/brand/tokens.yml (see DESIGN.md)
  • Draft PR if generated by a skill (--draft)

@nhussein11 nhussein11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things worth a look before merge:

  • npm install vs npm ci (tests/docs.test.ts:1796)
    The wrapper uses npm ci, but the harness runs npm install against the upstream project. npm ci respects the lock file and still resolves local file references
    (like the @uniswap/v3-core file: path), so reproducibility would be better. Was npm install explicitly required here, or was it a convenience choice?
  • Deploy failure silently passes (describe 7)
    After exhausting retries, the test catches the error, logs a console.warn, and returns — so the Vitest assertion never fails. This means a broken Ignition config
    wouldn't block CI either. Consider keeping the soft-fail for genuine testnet unavailability (network errors, IGN403) but re-throwing for anything else, so infra
    issues don't go unnoticed.

Adds the polkadot-cookbook test harness for the Uniswap V3 Periphery
with EVM on Polkadot Hub tutorial. The harness clones revm-hardhat-examples
at pinned commit 96696ad15c3cf01b9168a71ad5114f27c34a8726, installs
dependencies (resolving the local @uniswap/v3-core file reference
automatically), compiles the SwapRouter and NonfungiblePositionManager
contracts, runs the full 39-test Hardhat suite on the local Hardhat
network, and optionally deploys via Hardhat Ignition to polkadotTestnet.
@sekisamu sekisamu force-pushed the feat/uniswap-v3-periphery-hardhat branch from 79d73fd to ba5c28e Compare April 28, 2026 13:46
@sekisamu

Copy link
Copy Markdown
Collaborator Author

@nhussein11
Both patterns (npm install and the soft-fail deploy) are identical to the already-merged uniswap-v3-core-hardhat harness (merged in #272).
Keeping them consistent to avoid divergence between the two harnesses. If you'd like to change both patterns, that would be a separate follow-up PR covering all Uniswap harnesses.

@nhussein11

nhussein11 commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

@nhussein11 Both patterns (npm install and the soft-fail deploy) are identical to the already-merged uniswap-v3-core-hardhat harness (merged in #272). Keeping them consistent to avoid divergence between the two harnesses. If you'd like to change both patterns, that would be a separate follow-up PR covering all Uniswap harnesses.

ok makes sense, please create an issue or jira ticket to address that since in the rest of the tutorials with bruno we are using the pattern I described. Thanks @sekisamu

@nhussein11 nhussein11 self-requested a review April 28, 2026 14:26
@nhussein11 nhussein11 merged commit d3dc2ba into polkadot-developers:master Apr 28, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request May 4, 2026
3 tasks
@github-actions github-actions Bot mentioned this pull request May 11, 2026
3 tasks
@github-actions github-actions Bot mentioned this pull request May 18, 2026
3 tasks
@brunopgalvao brunopgalvao mentioned this pull request May 21, 2026
9 tasks
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