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

@protokoll-eth/abi

v0.4.0

Published

ABIs and deployment addresses for the protokoll EC-VRF contracts on Monad

Readme

@protokoll-eth/abi

ABIs and deployment addresses for the protokoll EC-VRF contracts on Monad.

npm install @protokoll-eth/abi

No runtime dependencies. ABIs are exported as as const literals so viem and wagmi infer argument and return types automatically.

Usage

Request randomness from a consumer (viem)

import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { monadVrfAdapterAbi, activeDeployment } from '@protokoll-eth/abi'

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
const client = createWalletClient({
  account,
  transport: http('https://testnet-rpc.monad.xyz'),
})

const fee = 80_000_000_000_000_000n // 0.08 MON

await client.writeContract({
  address: activeDeployment.adapter,
  abi: monadVrfAdapterAbi,
  functionName: 'requestRandomness',
  args: ['0x...32-byte-roundId...'],
  value: fee,
  chain: undefined,
})

Watch fulfillment events

import { createPublicClient, http, parseAbiItem } from 'viem'
import { monadVrfAdapterAbi, activeDeployment } from '@protokoll-eth/abi'

const client = createPublicClient({
  transport: http('https://testnet-rpc.monad.xyz'),
})

const unwatch = client.watchContractEvent({
  address: activeDeployment.adapter,
  abi: monadVrfAdapterAbi,
  eventName: 'RandomnessFulfilled',
  onLogs: (logs) => {
    for (const log of logs) {
      console.log(log.args.roundId, log.args.beta, log.args.callbackOk)
    }
  },
})

Implementing the consumer side

iRandomnessAdapterAbi is the minimal callback ABI (fulfillRandomness(bytes32, bytes32)) that any contract receiving randomness implements. Use it to encode/decode the callback if you need to mock it in tests or call it from off-chain.

How the ABIs are generated

src/abis.ts is generated by @wagmi/cli from the forge build artifacts under packages/protokoll/out/. To refresh after a contract change:

cd packages/protokoll && forge build
cd ../abi && pnpm generate

The CI publish workflow does both steps automatically before publishing, so the published ABIs always match what was last compiled.

Exports

| Export | What it is | |--------------------------|------------------------------------------------------------------------------------------| | monadVrfAdapterAbi | Full ABI of MonadVRFAdapter (request/fulfill, views, events, errors). | | monadVrfVerifierAbi | ABI of MonadVRFVerifier.verifyProof - useful for off-chain proof checks against RPC. | | iRandomnessAdapterAbi | Consumer-side fulfillRandomness(bytes32, bytes32) interface. | | monadTestnet | Chain metadata: chainId, rpc, explorer, requestFee, requestFeeWei (bigint). | | deployments | Versioned deployment list (newest first). active: true marks the live one. | | activeDeployment | Shortcut for the entry with active: true. Currently v0.4.0. | | getDeployment(version) | Look up a specific historical deployment by version string. |

Deployments

| Version | Status | Adapter | |---------|------------|----------------------------------------------| | v0.4.0 | active | 0xa327402C4eED5862adC123b9b1b93acA475C4668 | | v0.3.0 | deprecated | 0x9c46878D6736eDC7eAF135DB6B3B2A9Dab2A756F | | v0.2.0 | deprecated | 0x7782a54741dd9Dac95a8a79F181EFB97Bac2Dd19 | | v0.1.x | deprecated | 0xe7f01914d7547d08d155ba47ee9616ee7d504b21 |

See docs.protokoll.dev/guide/deployments for verifier addresses, deploy transactions, and the rationale behind each version.

Versioning

This package's version tracks the active contract version. 0.4.0 exports the v0.4.0 contracts as the default. Older deployments stay reachable through getDeployment('v0.3.0') etc. so existing integrators can pin to a historical address without forking the package.

License

MIT