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

@kayenfi/v2-core

v0.0.3

Published

KayenFi V2 Smart Contracts (Foundry)

Readme

KayenFi V2 Contracts

KayenFi V2 smart contracts project built with Foundry.

Deployed Contracts & Configuration

CHILIZ Testnet (Chain ID: 88882)

Contract Addresses

| Contract | Address | Transaction Hash | | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | KayenfiFactory | 0x1438de6d684ae273c9a7c38cfacadc62564409e4 | 0x142c8cd2cb1f9b59815d4231c9fdff8c3f1766c4c166795e6a65e73f7be8d959 | | KayenfiRouter02 | 0x3393cbcc331615c8d4ba915eb67a462ba59e0a6a | 0xa53b398ae1482a6869a1c47924669c82d8b9d1526f020bed7bbae47ddc8181b4 | | ChilizWrapperFactory | 0xe81671f425fd1d84127255270642CCD36E86EE7C | N/A (Existing contract, not deployed) | | KayenfiMasterRouter | 0xbf2ce7f2757ecbd7d889ac375e8646c3b47b04e2 | 0xe46fc4fd314711bbcd417734a30ebdb6f6c76849c59aceca208be24f438bf0fe | | KayenfiMasterRouterV2 | 0xdeae24ea3f8e44339fb8281fefe1cf9b82e72ded | 0xc701c2389fb0cc6470ef17a2fdd13e531cbacf7c55acaec5768fe9bbd55c1c34 |

Deployment Date: 2025-12-19
Block Number: 30839883

Contract ABIs & Bytecode (v1.0.0)

| Contract | Artifact File | | ------------------------- | ------------------------------------------------------------------------------------ | | KayenfiFactory | abis/v1.0.0/KayenfiFactory.json | | KayenfiPair | abis/v1.0.0/KayenfiPair.json | | KayenfiRouter02 | abis/v1.0.0/KayenfiRouter02.json | | ChilizWrapperFactory | abis/v1.0.0/ChilizWrapperFactory.json | | KayenfiMasterRouter | abis/v1.0.0/KayenfiMasterRouter.json | | KayenfiMasterRouterV2 | abis/v1.0.0/KayenfiMasterRouterV2.json |

Admin Variables

| Variable | Contract | Address | Description | | ------------- | -------------- | -------------------------------------------- | ------------------------------------------------------------------------- | | feeSetter | KayenfiFactory | 0x6954a3aA9343aeA582D40331BcD52c38e95a3283 | Admin address that can set feeTo and transfer feeSetter role | | feeTo | KayenfiFactory | 0x6954a3aA9343aeA582D40331BcD52c38e95a3283 | Address that receives protocol fees (automatically set during deployment) |

Note: feeTo is automatically set during deployment via Deployments.s.sol. For existing deployments, use setFeeTo.s.sol to update it.

Chain Configuration

| Variable | Address | Description | | ------------- | -------------------------------------------- | ------------------------------ | | WETH | 0x678c34581db0a7808d0aC669d7025f1408C9a3C6 | Wrapped ETH address | | feeSetter | 0x6954a3aA9343aeA582D40331BcD52c38e95a3283 | Admin address | | feeTo | 0x6954a3aA9343aeA582D40331BcD52c38e95a3283 | Protocol fee recipient address |

CHILIZ Mainnet

Contract Addresses

| Contract | Address | | ------------------------- | ------- | | KayenfiFactory | TBD | | KayenfiRouter02 | TBD | | ChilizWrapperFactory | TBD | | KayenfiMasterRouter | TBD | | KayenfiMasterRouterV2 | TBD |

Admin Variables

| Variable | Contract | Address | Description | | ------------- | -------------- | ------- | ------------------------------------------------------------------------- | | feeSetter | KayenfiFactory | TBD | Admin address that can set feeTo and transfer feeSetter role | | feeTo | KayenfiFactory | TBD | Address that receives protocol fees (automatically set during deployment) |

Chain Configuration

| Variable | Address | Description | | ------------- | ------- | ------------------------------ | | WETH | TBD | Wrapped ETH address | | feeSetter | TBD | Admin address | | feeTo | TBD | Protocol fee recipient address |

Post-Deployment Admin Configuration

After deployment, the admin (feeToSetter) needs to configure the following settings on KayenfiFactory:

Required Settings

  1. Set FeeTo AddressAUTOMATIC
    • Function: setFeeTo(address _feeTo)
    • Purpose: Sets the address that will receive protocol fees from liquidity pools
    • Current State: Automatically set during deployment via Deployments.s.sol
    • Action: No action required for new deployments. For existing deployments, use script/setFeeTo.s.sol
    • Script (for existing deployments only): Use script/setFeeTo.s.sol
    export CHAIN=CHILIZ_TESTNET
    forge script script/setFeeTo.s.sol:setFeeTo \
      --rpc-url $SPICY_TESTNET_RPC_URL \
      --broadcast \
      --legacy

Optional Settings

  1. Set FeeToSetter (Optional)

    • Function: setFeeToSetter(address _feeToSetter)
    • Purpose: Transfer admin privileges to a new address (e.g., multisig wallet)
    • Current State: Set to 0x6954a3aA9343aeA582D40331BcD52c38e95a3283 during deployment
    • Recommendation: Transfer to a multisig wallet for better security
  2. Enable Flash Loans (Optional)

    • Function: setFlashOn(bool _flashOn)
    • Purpose: Enable/disable flash loan functionality
    • Current State: false (disabled)
    • Note: If enabled, also set flashFee
  3. Set Flash Loan Fee (Optional)

    • Function: setFlashFee(uint _flashFee)
    • Purpose: Set the fee percentage for flash loans (in basis points, max 10000 = 100%)
    • Current State: Not set
    • Note: Only required if flashOn is set to true

Deploy

Environment Variables Setup

Create a .env file and set the following variables:

PRIVATE_KEY=your_private_key_without_0x_prefix
CHAIN=CHILIZ_TESTNET  # or CHILIZ_MAINNET
SPICY_TESTNET_RPC_URL=https://spicy-rpc.chiliz.com
CHILIZ_MAINNET_RPC_URL=https://rpc.ankr.com/chiliz

Deployment Scripts

# Full deployment (Factory, Router02, WrapperFactory, MasterRouter)
export CHAIN=CHILIZ_TESTNET
forge script script/Deployments.s.sol:Deployments \
  --rpc-url $SPICY_TESTNET_RPC_URL \
  --broadcast \
  --legacy

## Main Contracts

- `KayenfiFactory.sol` - Factory contract
- `KayenfiPair.sol` - Pair contract
- `KayenfiRouter02.sol` - Router contract
- `KayenfiMasterRouter.sol` - Master router
- `KayenfiMasterRouterV2.sol` - Master router V2

## Configuration

Chain-specific configurations are managed in `script/Config.sol`. You can select a chain using the `CHAIN` environment variable:

- `CHILIZ_TESTNET` - Testnet configuration
- `CHILIZ_MAINNET` - Mainnet configuration

> **Note**: The addresses in `Config.sol` may differ from the deployed contract addresses. Always refer to the "Deployed Contracts" section above for the actual deployed addresses.