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

@skate-org/amm-evm-v2

v2.0.0-beta.23

Published

Skate AMM v2 SDK — EVM clients, kernel/periphery readers, uniswap-v3 math, submitters

Readme

@skate-org/amm-evm-v2

EVM clients for the Skate AMM v2 SDK: viem chain definitions, kernel + periphery readers, action submitters, and the event-decoding framework.

Uniswap-v3 math (getSqrtRatioAtTick, getTickAtSqrtRatio, MIN_TICK/MAX_TICK, mulDiv, getAmount0Delta, computePositionAmounts, …) lives in @skate-org/amm-core-v2 since 2.0.0-alpha.0 — SVM/Sui peripheries needed it too. Function names are unchanged; import from core (or via the umbrella).

Surface

  • getKernelPublicClient(mode, transport?) / getSourcePublicClient(chain, mode, transport?) — viem PublicClient factories with Skate's RPC defaults baked in.
  • createDevConfig({...}) — produces the DEV { mode, config } tuple.
  • Readers (object-param, mode field required): readPool({ kernelPool, mode, client? }), readPeripheryPool({ chain, kernelPool, mode, client? })PeripheryPoolState, readUserPoolBalances({ user, poolKey, chain, mode, client? })UserPoolBalances, readPosition, readTick, readTickBitmap.
  • Calldata builders → Promise<CalldataCall> ({ target, calldata }): buildSwap, buildMint, buildBurn, buildIncreaseLiquidity, buildDecreaseLiquidity. All accept a single object param including mode. No RPC call.
  • Kernel simulators (object-param): simulateSwap, simulateMint, simulateBurn, simulateDecreaseLiquidity.
  • Events: parseKernelEventLog, parsePeripheryEventLog, watchKernelEvents, watchPeripheryEvents.
  • Submitters: submitAction, submitApproval, submitSwap.
  • Errors: EvmReadError, EvmWriteError (both extend SdkError).

SkateAmm class (headline entry point)

One object that composes AmmCore (pool catalog), AmmApi (quotes + actions), and AmmEvm (build/submit/read). Expose escape hatches via .core, .api, .vm.

const amm = new SkateAmm("PRODUCTION");

// Quotes
const quote  = await amm.quote.swap({ poolKey: "USDC_USDT", ... });
const ranges = await amm.quote.boostedRange();

// Actions
const action = await amm.actions.get({ srcChain: CHAIN.ARBITRUM, srcHash: "0x..." });
await amm.actions.waitForExecuted({ srcChain: CHAIN.ARBITRUM, srcHash: "0x..." });

// Build + submit
const call   = await amm.buildSwap({ poolKey: "USDC_USDT", chain: CHAIN.ARBITRUM, ... });
const hash   = await amm.submitSwap(walletClient, { ... });

// Pool catalog
const keys   = amm.pools.keys();
const info   = amm.pools.byKey("USDC_USDT");

// EVM extras
const pool   = await amm.readPool({ kernelPool: "0x2c23..." });
const sim    = await amm.simulateSwap({ params: { ... } });

AmmEvm class (env-bound)

Construct once; all methods take object params without the mode field:

const evm = new AmmEvm("PRODUCTION");
const pool   = await evm.readPool({ kernelPool: "0x2c23..." });
const pPool  = await evm.readPeripheryPool({ chain: CHAIN.ARBITRUM, kernelPool: "0x2c23..." });
const bals   = await evm.readUserPoolBalances({ user: "0x...", poolKey: "USDC_USDT", chain: CHAIN.ARBITRUM });
const call   = await evm.buildSwap({ poolKey: "USDC_USDT", chain: CHAIN.ARBITRUM, ... });
// call → { target: "0x...", calldata: "0x..." }

Install

pnpm add @skate-org/amm-evm-v2

Peer deps: @skate-org/amm-core-v2, @skate-org/amm-bindings, viem.

DEV defaults

  • MegaETH RPC: https://mainnet.megaeth.com/rpc
  • Kernel manager: 0x17B7207837e8884f7f687f1f4057751BDAf70a01
  • USDC/USDT kernel pool: 0x2c23334eE3b030e6bacEDEDf7C511eEA08Cf7E7e

STAGING + PRODUCTION on-chain addresses alias DEV as of 2.0.0-beta.10.

See CHANGELOG.md for version history.