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

@everclear-org/contracts

v0.0.1-alpha.0

Published

Smart contracts for Everclear

Readme

Chimera Smart Contracts Package

Prerequisites

Install foundry or update with foundryup.

Run:

  • yarn workspace @chimera-monorepo/contracts forge clean
  • yarn workspace @chimera-monorepo/contracts forge install
  • yarn workspace @chimera-monorepo/contracts forge build

Scripts configuration

Protocol variables

The protocol variables for contracts deployment and configuration are fetched from the environment files located at script/<environment> (e.g. TestnetStaging.sol).

The TestnetStaging.sol environment file defines the following contracts:

  • DefaultValues for the default protocol variables (e.g. epoch length, expiry time buffer, etc)
  • TestnetAssets for the staging assets addresses
  • TestnetStagingDomains for the environment domains and their details and addresses
  • TestnetStagingEnvironment for defining the EverclearHub initialization parameters

Domains

The domains to be used must be configured in:

  • script/<environment>.sol (the domains for a specific environment)
  • cli/config/domains.json (all the domains for all environments)

In domains.json, the declared domains follow the following interface:

interface Domain {
  name: string;
  id: number;
  rpc: string;
  verifierUrl?: string;
  verifierAPIKey?: string;
  maxBlockGasLimit: number;
  environment: Environment;
  realm: Realm;
  owner?: Address; // viem address type
}

enum Environment {
  TESTNET_STAGING = 'TestnetStaging',
  MAINNET_STAGING = 'MainnetStaging',
  TESTNET_PRODUCTION = 'TestnetProduction',
  MAINNET_PRODUCTION = 'MainnetProduction',
}

enum Realm {
  HUB = 'hub',
  SPOKE = 'spoke',
}

Deployments

To be able to interact with deployed contracts these must be declared in:

  • cli/config/hub.json for the EverclearHub contracts
  • cli/config/spoke.json for the EverclearSpoke contracts

Both follow the following interface:

interface Contract {
  address: Address; // viem address type
  domainName: string;
  domainId: number;
}

Assets

To whitelist and update asset configurations these must be declared in:

  • cli/config/assets/<environment>.json for listing all the assets for an environment
  • script/assets/<environment>/<asset_symbol>.sol for the actual adopted and fees configuration

In cli/config/assets/<environment>.json the assets follow the interface:

interface Asset {
  symbol: string;
  contractName: string;
}

Using the script CLI

For each task, the CLI will ask the user to select options or input values. In order for it to work properly, the necessary domains, contracts and protocol arguments must be previously configured in the files explained ut supra.

Before running each script, the user will be asked to choose the account to broadcast from. All private keys defined in .env will be fetched no matter their variable name (without exposing any value) and shown as options to choose from.

To start the CLI tool run:

$ yarn cli

This will show the user the following options:

  • deploy Hub or Spoke contracts
  • setup domains and gateways
  • update protocol variables
  • set / update asset configuration

Deploy Contracts

Steps:

  • choose between Hub or Spoke contracts
  • choose environment
  • choose domain to deploy to (if there is only one domain, that one will be used)
  • choose the private key to broadcast from
  • choose if the run must be broadcasted or dry ran
  • after deployment, update the deployments/<environment>/<domain>/<contract>.json file with the new address, startBlock, and abi (usually in out/<contract>.sol)

Note: if deployments fail, it may be due to an out of gas error. This can be resolved by running the forge script command with the --gas-estimate-multiplier set higher (e.g. 300 for 3x the estimate, default is 130).

Setup hub domains and gateways

Steps:

  • Deploy the hub contracts
  • Update the environment file in script/<environment>.sol

Update protocol variable

Steps:

  • choose between Hub or Spoke contracts
  • choose environment
  • choose domain
  • choose the variable to update and input the required arguments
  • choose the private key to broadcast from
  • choose if the run must be broadcasted or dry ran

Set / update asset configuration

Steps:

  • choose environment
  • choose the asset to setup or update (fetched from cli/config/assets/<environment>.json)
  • choose the private key to broadcast from
  • choose if the run must be broadcasted or dry ran