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

@superchain/js

v0.0.16

Published

A library for deploying and managing contracts across multiple EVM chains

Downloads

55

Readme

superchain-js

A TypeScript library for deploying and managing smart contracts across multiple EVM chains, with support for deterministic deployments using CREATE2.

Features

  • 🔄 Deploy contracts to multiple chains with one interface
  • 🎯 Use CREATE2 for deterministic addresses across chains
  • 🔒 Type-safe contract interactions with TypeScript
  • 🌐 Works in Node.js and browsers (ESM)
  • ⚡ Built on viem for reliable blockchain interactions
  • 🔑 Basic wallet support with private keys
    • 🔑 Passkeys support TODO

Installation

NPM

npm install @superchain/js

Browser (CDN)

<script type="module">
  import { StandardSuperConfig, Wallet, getSuperContract } from 'https://cdn.jsdelivr.net/npm/@superchain/js/dist/index.mjs'
</script>

Quick Start

import { StandardSuperConfig, Wallet, getSuperContract } from '@superchain/js'

// Configure chains
const config = new StandardSuperConfig({
  901: 'http://localhost:9545',
  902: 'http://localhost:9546'
})

// Create wallet with Anvil's default private key
const wallet = new Wallet('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')

// Deploy and interact
const contract = getSuperContract(
  config,
  wallet,
  CONTRACT_ABI,
  CONTRACT_BYTECODE,
  [constructor_args],
  '0xoptional_salt'
)

await contract.deploy(901)
const result = await contract.call(901, 'view_method')
await contract.sendTx(901, 'write_method', [arg1, arg2])

Development

# Install dependencies
npm install

# Run tests (requires supersim)
npm test

API Reference

SuperConfig

interface SuperConfig {
  getChainIds(): number[]              // Get all configured chain IDs
  getRpcUrl(chainId: number): string   // Get RPC URL for chain ID
}

// Initialize with RPC URLs for each chain
const config = new StandardSuperConfig({
  901: 'http://localhost:9545',
  902: 'http://localhost:9546'
})

Wallet

class Wallet {
  constructor(privateKey: string)
  getAccount(): Account     // Returns viem Account
}

// Use with Anvil's default private key
const wallet = new Wallet('0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80')

getSuperContract

function getSuperContract(
  config: SuperConfig,       // Chain configurations
  wallet: Wallet,           // Wallet instance
  abi: any[],              // Contract ABI
  bytecode: string,        // Contract bytecode
  constructorArgs?: any[], // Constructor arguments
  salt?: string,          // Optional CREATE2 salt
  address?: Address       // Optional address to interact with existing contract
): SuperContract

// Example: Create new contract with deterministic address
const contract = getSuperContract(
  config,
  wallet,
  CONTRACT_ABI,
  CONTRACT_BYTECODE,
  [constructor_args],
  '0xoptional_salt'
)

// Example: Interact with existing contract
const existingContract = getSuperContract(
  config,
  wallet,
  CONTRACT_ABI,
  '0x', // Empty bytecode for existing contracts
  [], // No constructor args needed
  undefined, // No salt needed
  '0xYourContractAddress'
)

SuperContract

class SuperContract {
  readonly address: Address  // Deterministic CREATE2 address

  // Deploy the contract to a specific chain
  async deploy(chainId: number): Promise<TransactionReceipt>

  // Check if contract is deployed on a chain
  async isDeployed(chainId: number): Promise<boolean>

  // Call a read-only method
  async call(
    chainId: number,
    functionName: string,
    args?: any[]
  ): Promise<any>

  // Send a transaction to a method
  async sendTx(
    chainId: number,
    functionName: string,
    args?: any[]
  ): Promise<TransactionReceipt>

  // Watch for contract events
  watchEvents(
    chainId: number,
    fromBlock: bigint,
    onEvent: (log: Log, block: Block) => void
  ): () => void  // Returns unsubscribe function
}