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

@cowprotocol/sdk-weiroll

v0.1.28

Published

CowProtocol Weiroll package

Readme

SDK Weiroll

This package provides adapter-agnostic Weiroll functionality for the CoW Protocol SDK. Weiroll is a powerful scripting language for executing complex multi-step transactions on Ethereum.

Package Origin

This package represents a refactored version of the original weiroll.js library. The original library was tightly coupled to ethers.js v5, but this version has been completely refactored to:

  • Remove ethers v5 dependency - Works with any supported blockchain library
  • Support multiple adapters - Compatible with ethers v5, ethers v6, and viem
  • Maintain API compatibility - 100% compatible with original weiroll.js API
  • Enable SDK integration - Seamlessly integrate with the CoW Protocol SDK ecosystem

Installation

npm install @cowprotocol/sdk-weiroll
or
pnpm add @cowprotocol/sdk-weiroll
or
yarn add @cowprotocol/sdk-weiroll

Usage

Individual package usage

import {
  WeirollPlanner,
  createWeirollContract,
  createWeirollDelegateCall,
  WeirollCommandFlags,
} from '@cowprotocol/sdk-weiroll'
import { EthersV6Adapter } from '@cowprotocol/sdk-ethers-v6-adapter'
import { JsonRpcProvider, Wallet } from 'ethers'

// Configure the adapter
const provider = new JsonRpcProvider('YOUR_RPC_URL')
const wallet = new Wallet('YOUR_PRIVATE_KEY', provider)
const adapter = new EthersV6Adapter({ provider, signer: wallet })

// Create weiroll contract wrapper
const contract = adapter.getContract(contractAddress, abi)
const weirollContract = createWeirollContract(contract, WeirollCommandFlags.CALL)

// Plan weiroll transaction
const planner = new WeirollPlanner()
planner.add(weirollContract.someFunction(param1, param2))

// Generate delegate call
const evmCall = createWeirollDelegateCall((planner) => {
  planner.add(weirollContract.someFunction(param1, param2))
})

Features

  • Multi-step transactions - Plan and execute complex transaction sequences
  • Gas optimization - Efficient execution through delegate calls
  • Return value chaining - Use outputs from one call as inputs to another
  • Adapter agnostic - Works with ethers v5, v6, and viem
  • Type safety - Full TypeScript support

Note: This package maintains 100% API compatibility with the original weiroll.js library while adding support for multiple blockchain adapters.