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

rankify-contracts

v0.17.1

Published

Contracts for rankify.it

Downloads

172

Readme

Rankify Contracts

Smart contract infrastructure for rankify.it - A platform for building bottom-up self-organized organizations with use of autonomous competence identification and continuous voting proposing protocols .

Architecture

Core Components

  1. Distribution System

  2. Token System

  3. Diamond Pattern Implementation

    • Core Facets:
      • EIP712InspectorFacet: EIP-712 message signing and verification
      • RankifyInstanceMainFacet: Tournament core logic
      • RankifyInstanceGameMastersFacet: Voting and proposal mechanics
      • RankifyInstanceRequirementsFacet: Participation requirements
      • DiamondLoupeFacet: Facet introspection
      • OwnershipFacet: Contract ownership management
  4. Universal basic income support

    • Uses Multipass as registry
    • Allows deployment without any prior tokens by deploying ACID entry
    • Every qualified user can claim 16 tokens daily and allocate support of up to 16 tokens in quadratic voting system across other claimer posted claims

Available Distributions

1. Meritocratic Autonomous Organization (MAO)

The MAO distribution (MAODistribution.sol) creates a complete infrastructure for a Meritocratic Autonomous Organization, including:

  • Rank and governance tokens
  • Autonomous Competence Identification Distribution

2. ACID Distribution

The Autonomous Competence Identification Distribution (ArguableVotingTournament.sol) implements:

  • Turn-based game mechanics
  • Voting and proposal systems
  • EIP-712 compliant message signing
  • Modular architecture

Development Setup

Prerequisites

  • Node.js (LTS version)
  • pnpm package manager
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/rankify-it/contracts.git
    cd contracts
  2. Install dependencies:

    pnpm install
  3. Setup environment variables:

    mkdir .secrets
    cp dev.env.sample .secrets/dev.env
    vi .secrets/dev.env
    # ...
    . ./.secrets/dev.env

Build and Test

  1. Compile contracts:

    pnpm build
  2. Run tests:

    pnpm test
    # or run tests in parallel
    pnpm test:parallel
  3. Run linting:

    pnpm lint
    # fix linting issues
    pnpm lint:fix
  4. Clean build:

pnpm clean

Deployment

  1. Deployment:
    pnpm hardhat deploy --network <network> --tags ERC7744,multipass,MAO
    # or
    pnpm anvil:deploy
    # or :
    ./playbook/utils/deploy-to-local-anvil.sh

Interacting with Contracts

We provide helper tools in form of playbooks - small hardhat runtime scripts that can be used to set contract state for sake of testing and verification.

  1. Running local playbooks:

    pnpm hardhat --network $NETWORK addDistribution
    pnpm hardhat --network $NETWORK createSubject --token-name xxx
    pnpm hardhat --network $NETWORK createGame --rankify-instance-address $INSTANCE_ADDRESS

    Interactive playbook:

    pnpm hardhat --network $NETWORK interactive
  2. Using viem to interact with contracts:

In (abi)[./abi] directory you can find generated abi files for all contracts, including .ts files to give viem/wagmi a better experience.

Copy these files to your working project and import them using import { ... } from './abi/...';

We provide this packaged within our sdk: @peeramid-labs/sdk

  1. Get all interfaces and signatures:

You can get all of the function signatures to debug your application from ./all-signatures.json

Verifying contracts

pnpm hardhat --network arbsepolia etherscan-verify --api-url https://api.etherscan.io/v2/api --api-key $ETHERSCAN_V2_KEY

NB: As of the date of writing, requires this hack applied to work with dynamic libraries: https://github.com/wighawag/hardhat-deploy/issues/253#issuecomment-2353070545

Project Structure

contracts/
├── src/                    # Smart contract source files
│   ├── abstracts/         # Abstract contracts
│   ├── distributions/     # Distribution implementations
│   ├── facets/           # Diamond pattern facets
│   ├── interfaces/       # Contract interfaces
│   ├── libraries/        # Shared libraries
│   └── tokens/           # Token implementations
├── test/                  # Test files
├── scripts/              # Deployment and utility scripts
└── deployments/          # Deployment artifacts

Documentation

Documentation is generated via docgen and is available at docs.rankify.it

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Add your changes, add changeset: pnpm changeset
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Create a Pull Request

License

This project is licensed under the MIT License.

Security

For security concerns, please email [email protected]