npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

punkkit-sdk

v1.0.17

Published

In [Uniswap V4 core](https://github.com/Uniswap/v4-core) repo:

Downloads

1,724

Readme

Uniswap V4 Hook Deployment & Use cases

1. Run Uniswap V4 built-in tests

In Uniswap V4 core repo:

npx hardhat test

2. Compile pool and hook contracts

In Our Uniswap v4 periphery repo:

npx hardhat compile

Move the required ABI files from artifacts/contracts to SDK repo scripts/frontend/abi.

3. Deploy pool and hook contracts

In Our Uniswap V4 SDK repo:

  1. Start a local blockchain node

    npx hardhat node
  2. Deploy Uniswap V4 core contracts

  3. Configure blockchain networks, wallet, and contract addresses in:
    scripts/config.ts

  4. Run the hook deployment script:

    npx hardhat run scripts/depoly/depoly.ts
    • Limit Order Hook: contracts/LimitOrder.sol
    • Dynamic Fee Hook: contracts/DynamicFee.sol

4. Initialize the PoolManager contract

Run the initialization script:

npx hardhat run scripts/frontend/init/init.ts

5. Contract interactions

5.1 Trading at Market Price

  • Add liquidity:

    npx hardhat run scripts/frontend/marketprice/addLiquidity.ts
  • Swap:

    npx hardhat run scripts/frontend/marketprice/swap.ts
  • Remove liquidity:

    npx hardhat run scripts/frontend/marketprice/removeLiquidity.ts

5.2 Trading of Limit Order

(Requires addLiquidity operation first, otherwise order placement will fail)

  • Place order:

    npx hardhat run scripts/frontend/limitorder/place.ts
  • [Todo] Cancel order:

    npx hardhat run scripts/frontend/limitorder/kill.ts
  • [Todo] Withdraw liquidity:

    npx hardhat run scripts/frontend/limitorder/withdraw.ts

5.3 Dynamic fee

  • Adjust fee:

    npx hardhat test scripts/feehook/testfeehook.ts

UniswapV4及hook部署使用

  1. 运行uniswapv4自带测试: 命令行输入npx hardhat test

  2. 合约编译:npx hardhat compile 将必要的abi文件从artifacts/contracts移至scripts/frontend/abi

  3. 部署uniswapv4合约以及hook合约:

    1. 运行本地区块链节点网络:npx hardhat node
    2. 配置文件,配置区块链网络、钱包以及合约地址:scripts/frontend/lib/address.ts
    3. hook合约部署脚本:npx hardhat run scripts/frontend/depoly/depoly.ts
      • 限价交易hook:contracts/LimitOrder.sol
      • 动态手续费hook:contracts/DynamicFee.sol
  4. 初始化poolmanager合约: 运行初始化脚本:npx hardhat run scripts/frontend/init/init.ts

  5. 合约调用:

    1. 市价交易:
      • 添加流动性:npx hardhat run scripts/frontend/marketprice/addLiquidity.ts
      • 交易:npx hardhat run scripts/frontend/marketprice/swap.ts
      • 撤销流动性:npx hardhat run scripts/frontend/marketprice/removeLiquidity.ts
    2. 限价交易:(接添加流动性操作,否则无法正常挂单)
      • 挂单:npx hardhat run scripts/frontend/limitorder/place.ts
      • [失败]撤单:npx hardhat run scripts/frontend/limitorder/kill.ts
      • [失败]提取流动性:npx hardhat run scripts/frontend/limitorder/withdraw.ts
    3. 动态手续费:
      • [存疑]调整手续费:npx hardhat test scripts/feehook/testfeehook.ts

待完成事项

  • 类似挖矿的流动性激励hook合约

lq documents

部署

| 依赖 | 版本 | | ---- | ---- | | nvm | 0.39.7 | | npm | v20.19.5 |

运行命令:

npm install

npx hardhat node # 单独使用命令行执行

npx hardhat run scripts/deploy/deploy.ts
npx hardhat run scripts/deploy/inits.ts

测试

voucher测试通过

 npx hardhat test test/voucher.ts