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

@trifle/stop-feeding-the-cat

v1.0.3

Published

Stop Feeding The Cat - A blockchain game where players compete to be the last one to feed the cat

Readme

codecov Build Status

Stop Feeding The Cat

A blockchain-based game where players compete to be the last one to feed the cat and win the prize pool.

Game Mechanics

  • 13 different items can be fed to the cat (priced $1-$13 in USDC)
  • When you feed the cat, a 24-hour timer starts
  • If the timer reaches 0, you win the entire prize pool
  • Other players can feed the cat to reset the timer and become the new potential winner
  • If the same player feeds multiple items, the timer is reduced (max 23 hours reduction)

Contract Features

  • EIP-1967 upgradeable smart contract
  • ERC-1155 NFT items that are minted and burned when fed
  • Configurable admin fee percentage
  • Pausable for emergency situations
  • Automatic round management

Setup

  1. Install dependencies:
npm install
  1. Copy .env.example to .env and fill in your values:
cp .env.example .env
  1. Compile contracts:
npm run compile

Deployment

Local Network

# Start local node
npm run chain

# Deploy in another terminal
npm run deploy:local

Base Sepolia

npm run deploy:baseSepolia
npm run verify:baseSepolia

Base Mainnet

npm run deploy:base
npm run verify:base

Testing

Run the test suite:

npm test

Test Coverage

Generate coverage reports:

# Full coverage report
npm run coverage

# V1 contract only
npm run coverage:v1

# V2 contract only
npm run coverage:v2

Coverage reports are generated in multiple formats:

  • HTML: Open coverage/index.html in your browser
  • LCOV: For CI/CD integration (coverage/lcov.info)
  • JSON: Machine-readable format (coverage.json)

Current coverage:

  • Statements: 96.81%
  • Branches: 69.57%
  • Functions: 100%
  • Lines: 96.06%

Upgrading to V2

The contract supports safe upgrades using OpenZeppelin's UUPS pattern.

V2 Features

  • Emergency Pause: Additional pause mechanism independent of regular pause/unpause
  • Enhanced Safety: Owner can immediately halt all game operations if needed
  • State Preservation: Emergency pause doesn't affect ongoing rounds, just blocks new actions

Upgrade Process

  1. Prepare the upgrade (validates compatibility):
# Check upgrade compatibility
npm run prepare-upgrade:baseSepolia 2
  1. Perform the upgrade:
# Upgrade to V2
npm run upgrade:baseSepolia 2
  1. Verify the upgrade:
npm run verify:baseSepolia

Future Versions

To add new versions, follow the pattern in scripts/upgrade.ts and create new contracts like StopFeedingTheCatV3.sol. The upgrade system is designed to handle multiple versions automatically.

Using as NPM Package

After deployment, build the package:

npm run build

Then in another project:

import { StopFeedingTheCat } from '@trifle/stop-feeding-the-cat';

const contractAddress = StopFeedingTheCat.networks[chainId].address;
const abi = StopFeedingTheCat.abi;

Network Information

  • Base Sepolia: Chain ID 84532
  • Base Mainnet: Chain ID 8453

USDC Addresses

  • Base Sepolia: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
  • Base Mainnet: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913