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

@fortefoundation/forte-rules-engine

v0.9.2

Published

Forte Rules Engine

Readme

Forte Rules Engine

Project Version

This repository contains an EVM-based protocol called the Forte Rules Engine. This protocol lets you easily define powerful, flexible, composable on-chain policies without hardcoding rules into your smart contracts.

Check out our docs and quickstart guide here!

Contributing

Please visit our Contributor Guide.

Getting Started

Environment dependencies

This guide assumes the following tools are installed and configured correctly. Please see each tool's installation instructions for more details:

Building

To build and install dependencies, run the following commands:

npm install
forge soldeer install
forge build

Testing

In order to run the full test suite, there are some other requirements. First, a python virtual environment is needed to install the python requirements. We'll also set the env source now.

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt
source .env

Once everything is ready to go, we'll run the test suite:

 forge test -vv --ffi

Deployment

The following section will run through the deployment process of the Forte Rules Engine, as well as how to utilize a local deployment of the FRE. The main deployment script is located at script/deployment/DeployRulesDiamond.s.sol.

Environment Configuration

Before deploying, configure your environment variables in the .env file:

# Deployment Configuration
DEPLOYER_PRIVATE_KEY=0x1234567890abcdef...  # Private key of the deploying account
DESIRED_DEPLOYMENT_ADDRESS=0x742d35Cc6634C0532925a3b8D400414004C07f5F  # Target deployment address
ETH_RPC_URL=https://mainnet.infura.io/v3/your-project-id  # RPC URL for target chain
GAS_NUMBER=20000000000  # Gas price in wei (optional)

Important:

  • Set DEPLOYER_PRIVATE_KEY to the private key of the account that will deploy the contracts
  • Set DESIRED_DEPLOYMENT_ADDRESS to your preferred deployment address
  • Set ETH_RPC_URL to the RPC endpoint of your target blockchain network
  • Ensure the deployer account has sufficient funds for gas fees

Local Development with Anvil

For local development and testing, you can use Anvil to create a persistent state:

Method 1: Manual Anvil State Creation

# Start Anvil with state dumping
anvil --dump-state diamondDeployedAnvilState.json

Method 2: Automated State Generation

# Use the automated script to deploy and save Anvil state
./script/deployment/generateAnvilSavedDiamondState.sh

This will:

  1. Start Anvil in the background with --dump-state diamondDeployedAnvilState.json
  2. Deploy the Rules Engine Diamond to the local network
  3. Save the deployment state to diamondDeployedAnvilState.json
  4. Clean up the Anvil process

Loading Saved State

The saved state file contains the complete blockchain state after deployment, allowing you to resume development with pre-deployed contracts.

Deployment Methods

# Source environment variables
source .env

Direct Forge Deployment Using the bash script

bash script/deployment/SimpleDeploy.sh

Or using forge script directly

forge script script/deployment/DeployRulesDiamond.s.sol \
  --ffi \
  --broadcast \
  -vvv \
  --non-interactive \
  --rpc-url=$ETH_RPC_URL \
  --gas-price $GAS_NUMBER \
  --legacy

Licensing

The primary license for Forte Protocol Rules Engine is the Business Source License 1.1 (BUSL-1.1), see LICENSE. However, some files are dual licensed under GPL-2.0-or-later:

  • All files in src/example/ may also be licensed under GPL-2.0-or-later (as indicated in their SPDX headers), see src/example/LICENSE

Other Exceptions

  • All files in lib/ are licensed under MIT (as indicated in its SPDX header), see lib/LICENSE_MIT
  • All files in src/example/ may also be licensed under GPL-2.0-or-later (as indicated in their SPDX headers), see src/example/LICENSE Other Exceptions