@kayenfi/v3-periphery
v0.0.5
Published
🎚 Peripheral smart contracts for interacting with Kayenfi V3
Readme
Kayenfi V3 Periphery Contracts
This repository contains the periphery smart contracts for the KayenFi V3 Protocol. For the lower level core contracts, see the kayenfi-v3-core repository.
Deployed Contracts & Configuration
CHILIZ Testnet (Chain ID: 88882)
Contract Addresses
| Contract | Address | Transaction Hash |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| NonfungibleTokenPositionDescriptor | 0x2eB036cf156ae02457517009F95e15237d9c9162 | 0x2f2c9f8926db2c3f32e3a74f93c8a77287684f27947a23caa69a7e60f09197f0 |
| SwapRouter | 0xE6b0a6322e7e125D23C567C99bc1216aA6C59370 | 0x814c7cc4acb57f2fcdc22656a7d7bf7a19d051c03612e7492604e52a733b8527 |
| NonfungiblePositionManager | 0x3D0F51936810FdF31Da0B34bd0452372c3fF81a4 | 0xb9d387ae394b88a52ca178d039e8b1ce733da0c1d7f68571845c4287a8b49a94 |
Deployment Date: 2026-01-05 Block Number: 31323908 (last deployment)
Dependencies
| Variable | Address | Description |
| ------------------- | -------------------------------------------- | ------------------------------- |
| Factory | 0xcF82734905f611258926ef5617d0b87640cC99F9 | KayenfiV3Factory address |
| WETH9 | 0x678c34581db0a7808d0aC669d7025f1408C9a3C6 | Wrapped ETH address |
| TokenDescriptor | 0x2eB036cf156ae02457517009F95e15237d9c9162 | NFT Position Descriptor address |
Deployment Order
NonfungibleTokenPositionDescriptor (deployed first)
- Requires: WETH9 address
- Deploys: NFTDescriptor library, NonfungibleTokenPositionDescriptor
SwapRouter (deployed second)
- Requires: Factory address, WETH9 address
NonfungiblePositionManager (deployed last)
- Requires: Factory address, WETH9 address, NonfungibleTokenPositionDescriptor address
CHILIZ Mainnet
Contract Addresses
| Contract | Address | | -------------------------------------- | ------- | | NonfungibleTokenPositionDescriptor | TBD | | SwapRouter | TBD | | NonfungiblePositionManager | TBD |
Dependencies
| Variable | Address | Description | | ------------------- | ------- | ------------------------------- | | Factory | TBD | KayenfiV3Factory address | | WETH9 | TBD | Wrapped ETH address | | TokenDescriptor | TBD | NFT Position Descriptor address |
Deploy
Secrets Setup
Create a secrets.json file in the package root directory with the following structure:
{
"privateKey": "your_private_key_with_0x_prefix"
}Environment Variables
For deployment, set the following environment variables:
export WETH9_ADDRESS=0x678c34581db0a7808d0aC669d7025f1408C9a3C6
export V3_FACTORY_ADDRESS=0xcF82734905f611258926ef5617d0b87640cC99F9 # Optional, defaults to deployed factory addressNote:
- The
secrets.jsonfile is already in.gitignoreand will not be committed to the repository.WETH9_ADDRESSis required.V3_FACTORY_ADDRESSis optional and defaults to the deployed factory address if not set.
Deployment Scripts
Deploy scripts run in order automatically due to dependencies:
# Deploy all periphery contracts
yarn deploy:spicy
# Or deploy individually (in order)
yarn hardhat deploy --network chiliz_spicy --tags NonfungibleTokenPositionDescriptor
yarn hardhat deploy --network chiliz_spicy --tags SwapRouter
yarn hardhat deploy --network chiliz_spicy --tags NonfungiblePositionManagerUsing Solidity Interfaces
The KayenFi v3 periphery interfaces are available for import into solidity smart contracts
via the npm artifact @kayenfi/v3-periphery, e.g.:
import '@kayenfi/v3-periphery/contracts/interfaces/ISwapRouter.sol';
contract MyContract {
ISwapRouter router;
function doSomethingWithSwapRouter() {
// router.exactInput(...);
}
}
Local Deployment
In order to deploy this code to a local testnet, you should install the npm package
@kayenfi/v3-periphery
and import bytecode imported from artifacts located at
@kayenfi/v3-periphery/artifacts/contracts/*/*.json.
For example:
import {
abi as SWAP_ROUTER_ABI,
bytecode as SWAP_ROUTER_BYTECODE,
} from '@kayenfi/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json'
// deploy the bytecodeThis will ensure that you are testing against the same bytecode that is deployed to mainnet and public testnets, and all KayenFi code will correctly interoperate with your local deployment.
