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

@mooncatrescue/contracts

v4.1.0

Published

Smart Contract interfaces for MoonCatRescue ecosystem contracts

Downloads

53

Readme

A collection of smart contract templates, for working with existing infrastructure contracts in the MoonCatRescue ecosystem.

Usage

To add this module to an existing Node.js application:

npm install --save @mooncatrescue/contracts

Then within a Solidity contract, you can import an interface by referencing it like this:

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.9;

import { IMoonCatRescue } from "@mooncatrescue/contracts/IMoonCatRescue.sol";

Within a JavaScript or TypeScript file, the moonCatUtils helper library has a contracts mapping that can be used by Ethereum interface libraries like viem or wagmi to assemble transactions to interact with those smart contracts.

import { publicClient } from './client'
import { contracts } from '@mooncatrescue/contracts/moonCatUtils';

const data = await publicClient.readContract({
  address: contracts.rescue.address,
  abi: contracts.rescue.abi,
  functionName: 'name'
})

Contracts

MoonCat​Rescue

  • Address: 0x60cd862c9C687A9dE49aecdC3A99b74A4fc54aB6
  • Deployed: 0x79d48c41b99f0ac8f735dbf4d048165542576862df2b05a80be9a4dbe233a623
  • Functions: acceptAdoptionOffer, acceptAdoptionRequest, activate, activateInTestMode, addGenesisCatGroup, adoptionOffers, adoptionRequests, balanceOf, cancelAdoptionOffer, cancelAdoptionRequest, catNames, catOwners, decimals, disableBeforeActivation, getCatDetails, getCatIds, getCatNames, getCatOfferPrices, getCatOwners, getCatRequestPrices, giveCat, imageGenerationCodeMD5, makeAdoptionOffer, makeAdoptionOfferToAddress, makeAdoptionRequest, mode, name, nameCat, pendingWithdrawals, remainingCats, remainingGenesisCats, rescueCat, rescueIndex, rescueOrder, searchSeed, symbol, totalSupply, and withdraw
  • Events: AdoptionOfferCancelled, AdoptionOffered, AdoptionRequestCancelled, AdoptionRequested, CatAdopted, CatNamed, CatRescued, GenesisCatsAdded, and Transfer

The original contract that started this project off! It is an ERC20-like contract that creates the possibility of a collection of 25,600 MoonCat tokens, each with a unique five-byte hexadecimal identifier to be "rescued" into the blockchain. It was created before the ERC721 standard existed, so the function names are different than that standard. Some of the Genesis MoonCats did not get released as originally planned, and the community opted to have them remain on the moon, so the total collection size is 25,440 MoonCats.

This contract has a built-in marketplace where those who already own a MoonCat can create AdoptionOffers to list their MoonCat as adoptable (either by anyone or only by a specific address), and those who want to adopt a MoonCat can create an AdoptionRequest for a specific MoonCat.

Each MoonCat's hexadecimal identifier defines the MoonCat's pose, facial expression, fur pattern, and color. This identifier was permanently stored in this contract when that MoonCat was rescued, and cannot be changed. Each MoonCat can have a name given to them by their owner, but can only be named once. Once a MoonCat is named, the name is permanently stored in this contract, and cannot be changed.

Old MoonCat Wrapper

A "wrapping" contract that was created in the flurry that happened after the March 2021 "rediscovery". It converts MoonCats from the original contract into ERC721 tokens, but does not preserve other metadata about the MoonCats. This contract enables MoonCats to be seen by modern wallet and portfolio tools, but is considered deprecated in favor of the Acclimator wrapper contract.

MoonCat​Acclimator

  • Address: 0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69
  • Deployed: 0x5585c88321058bde24b5ed025b51323731e2186836d3d5bdf66e7aed7ab63461
  • Functions: approve, balanceOf, batchReWrap, batchUnwrap, batchWrap, buyAndWrap, childContractByIndex, childTokenByIndex, getApproved, getChild, isApprovedForAll, name, onERC721Received, ownerOf, ownerOfChild, pause, rootOwnerOf, rootOwnerOfChild, safeTransferChild, safeTransferFrom, setApprovalForAll, setBaseURI, supportsInterface, symbol, tokenByIndex, tokenOfOwnerByIndex, tokensIdsByOwner, tokenURI, totalChildContracts, totalChildTokens, totalSupply, transferChild, transferChildToParent, transferFrom, unpause, unwrap, and wrap
  • Events: Approval, ApprovalForAll, MoonCatAcclimated, MoonCatDeacclimated, ReceivedChild, Transfer, and TransferChild

A "wrapping" contract that takes a MoonCat from the original contract, and converts it to an ERC721- and ERC998-compatible token. The web interface for interacting with this contract is The Acclimator.

The ERC998 functionality is a "top down, ERC721" implementation, which enables individual MoonCats to own other ERC721 tokens. Other ERC721 tokens that get sent to this smart contract using the safeTransferFrom function should specify in the data parameter the Rescue Order of the MoonCat that should receive the token.

MoonCat​Accessories

  • Address: 0x8d33303023723dE93b213da4EB53bE890e747C63
  • Deployed: 0x21b831be284a48d6f2d72b84e94cfdd8123ec4b28779b098e8bc8caa7f02755a
  • Functions: AccessoriesByMoonCat, accessoryEligibleList, accessoryHashes, accessoryImageData, accessoryInfo, accessoryPalette, accessoryPaletteCount, addAccessoryPalette, alterAccessories, alterAccessory, balanceOf, batchAndMetaByte, batchOrMetaByte, buyAccessories, buyAccessory, clearEligibleList, createAccessory, discontinueAccessory, doesMoonCatOwnAccessory, editEligibleMoonCats, feeDenominator, freeze, frozen, isAccessoryUnique, isEligible, managedAccessoryByIndex, managerApplyAccessory, managerOf, ownedAccessoryByIndex, owner, ownerCreateAccessory, referralDenonminator, setAccessoryPrice, setEligibleList, setFee, setMetaByte, setReferralFee, toggleEligibleList, totalAccessories, transferAccessoryManagement, transferOwnership, unfreeze, withdrawForeignERC20, and withdrawForeignERC721
  • Events: AccessoryApplied, AccessoryCreated, AccessoryDiscontinued, AccessoryManagementTransferred, AccessoryPriceChanged, AccessoryPurchased, EligibleListCleared, and EligibleListSet

On-chain visual modifications for MoonCats that can be purchased by their owners. The web interface for interacting with this contract is The Boutique.

Purchasing an accessory (buyAccessory or buyAccessories functions) is like "unlocking a skin" for your MoonCat. Once purchased, the accessory becomes available to that MoonCat forever ("part of their wardrobe"). The owner of a MoonCat can choose which of the MoonCat's accessories are visible via the alterAccessory or alterAccessories functions.

The data for an accessory's visual is stored as a PNG-8 image, though split up into multiple pieces to make it easier to swap in different palettes. This allows each accessory to have multiple color variants without needing to store the image data multiple times, and allows for accessories to have colors that adapt to the MoonCat that wears them.

MoonCatNameService (MCNS)

  • Address: 0x2eCcDA7C84837Da55ce34A36a5AD2B936479E76e
  • Deployed: 0x21b831be284a48d6f2d72b84e94cfdd8123ec4b28779b098e8bc8caa7f02755a
  • Functions: addr, announceMoonCat, avatarBaseURI, contenthash, defaultTTL, ENSDomain, getRescueOrderFromNodeId, getSubdomainNameHash, giveControl, mapMoonCat, mapMoonCats, multicall, needsAnnouncing, owner, rootHash, setAddr, setAvatarBaseUrl, setContenthash, setDefaultTTL, setText, setTTL, supportsInterface, text, transferOwnership, withdrawForeignERC20, and withdrawForeignERC721
  • Events: AddrChanged, AddressChanged, ContenthashChanged, and TextChanged

A contract that adheres to the Ethereum Name Service (ENS) Resolver interface, but has custom logic to allow all MoonCat owners to claim subdomains that matches their MoonCat's hexadecimal identifier and rescue order. The web interface for interacting with this contract is the MoonCatNameService (MCNS).

MoonCat​Moments

  • Address: 0x367721b332F4697d440EBBe6780262411Fd03409
  • Deployed: 0xe13e6e711af7ea6a2ea61c23f4b03be5c8957d05ef19fd190eb9ca65456503b0
  • Functions: acclimatorBalance, approve, balanceOf, batchClaim, claim, contractOwner, getApproved, getMomentId, isApprovedForAll, isClaimable, listClaimableMoments, mint, mintClaimable, Moments, moonCatAcclimatorContract, name, ownerOf, paused, paws, safeTransferFrom, setApprovalForAll, setMomentURI, supportsInterface, symbol, tokenByIndex, tokenExists, tokenOfOwnerByIndex, tokenURI, tokenURIByMomentId, totalMoments, totalSupply, transferFrom, transferOwnership, unpaws, withdrawForeignERC20, and withdrawForeignERC721
  • Events: Approval, ApprovalForAll, and Transfer

An ERC721 token collection that represents moments in time for the MoonCat​Rescue community. They are photographic souvenirs for the MoonCats that participated in each Moment. The web interface for interacting with this contract is on ChainStation.

Each token in this collection shares a visual with many others (all tokens from the same Moment have the same visual). However this is done not with different "classes" (like an ERC1155 collection), but rather sequential ranges of token IDs are used for each Moment. This collection is expected to grow as additional Moments are created.

lootprints (for MoonCats)

An ERC721 token collection that represents plans for building MoonCat-styled space ships. The visuals for these tokens come in all the colors that the original MoonCat collection does, so they're not just "blueprints", but are instead "lootprints".

Inspired by the Loot project, these tokens show their stats in a simplified way as SVGs, output directly by the smart contract.

The JumpPort

  • Address: 0xF4d150F3D03Fa1912aad168050694f0fA0e44532
  • Deployed: 0x591059774a676071a188fd8805e066b9f53c95c1cdeb76f1a4347c011b35f9b4
  • Functions: ADMIN_ROLE, adminPong, adminWithdrawPing, balanceOf, blockExecution, deposit, depositedSince, depositPaused, doc, DocumentationRepository, executeAction, executionBlocked, getApproved, hasRole, isApprovedForAll, isDeposited, isLocked, isValidSignature, lockedBy, lockOverride, lockToken, markMessageSigned, onERC721Received, ownedTokens, ownerOf, ownerPong, ownersOf, PORTAL_ROLE, safeWithdraw, setAdmin, setAdminExecutionBlocked, setAdminLockOverride, setCopilot, setCopilotForAll, setPaused, setPortalValidation, setReverseResolver, tokenPingRequestBlock, tokenPingRequestBlocks, unlockAllTokens, unlockToken, withdraw, withdrawForeignERC20, and withdrawForeignERC721
  • Events: ActionExecuted, Approval, ApprovalForAll, Deposit, Lock, RoleChange, Unlock, and Withdraw
  • Errors: , and MissingRole

A universal staking contract, designed to be a programmable hub for MoonCats to participate in other projects that require them be held in place for specific times. But this contract is universal; any ERC721 collection can use the JumpPort as well!

The JumpPort is different than other "bridge" contracts in that it is designed for tokens to interact with multiple things at once. In lore this is described as "projecting" them into other blockchains, rather than moving/bridging them there. Therefore, if a project wishes to integrate with the JumpPort, it is vital that tokens that are "projected" to other chains are not sold to a new owner while there (it should not be treated as "real" while on the other chain).

The JumpPort operates by having additional smart contracts that are designated as "Portals", which implement logic to allow tokens to be removed from the JumpPort or not. A single token in the JumpPort can interact with multiple portals, but to withdraw the token from the JumpPort, it must be unlocked by all the portals it has interacted with.

MoonCat​Traits

Part of the suite of on-chain metadata contracts for MoonCats. A smart-contract implementation of the original JavaScript parser. This contract can take any MoonCat's hexadecimal ID (its "DNA") and parse out the trait information for it. It's useful for other smart contracts that wish to be able to parse MoonCat identifiers, and turn them into human-friendly labels.

MoonCat​Colors

Part of the suite of on-chain metadata contracts. This contract parses a MoonCat's hexadecimal ID and returns the calculated color palette for that MoonCat. This is useful for other smart contracts that wish to be able to parse MoonCat identifiers, and determine what colors should be used to render them. The canonical parser for MoonCat data was created in JavaScript, and due to the differences in how floating point numbers are represented between JavaScript and Solidity, this contract has baked in a static list of which MoonCats have different outcomes between JavaScript and Solidity, and does output the original JavaScript values for those MoonCats.

MoonCat​SVGs

Part of the suite of on-chain metadata contracts. This contract parses a MoonCat's hexadecimal ID and returns a visual of that MoonCat in SVG format. It relies on the MoonCat​Colors contract to determine the colors used in the SVG.

MoonCat​AccessoryImages

Part of the suite of on-chain metadata contracts. This contract parses a MoonCat's hexadecimal ID and returns a visual of that MoonCat in SVG format with accessories that MoonCat owns. This contract uses the MoonCat​SVGs contract to determine the base visual of the MoonCat, and then uses the MoonCat​Accessories contract to determine the accessories that the MoonCat owns and overlays them.

The MoonCat is drawn with native SVG shapes (rects and polygons), and the accessories are embedded into this as PNG images in the SVG file.

MoonCat​Reference

A contract for storing on-chain documentation in a human-friendly way. It provides on-chain links between the MoonCat​Rescue-related contracts, and links to longer descriptions of each of those smart contracts.