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

@cfxdevkit/contracts

v1.0.16

Published

Generated ABI, bytecode, and deployed addresses for Conflux DevKit contracts

Readme

@cfxdevkit/contracts

Auto-generated, type-safe ABI and deployment artifacts for the Conflux DevKit on-chain contracts, plus canonical standard token ABIs and a bootstrap library of production-ready deployable contracts.

What's included

DevKit contracts (AutomationManager · SwappiPriceAdapter · PermitHandler)

| Export | Description | |---|---| | automationManagerAbi / AUTOMATION_MANAGER_ABI | Type-safe ABI for AutomationManager | | automationManagerAddress | Deployed addresses keyed by chain ID (1030 mainnet, 71 testnet) | | automationManagerBytecode | Deployment bytecode | | automationManagerConfig | Combined { abi, address } config for wagmi/viem | | permitHandlerAbi / PERMIT_HANDLER_ABI | ABI for PermitHandler | | permitHandlerAddress | Deployed addresses keyed by chain ID | | permitHandlerBytecode | Deployment bytecode | | swappiPriceAdapterAbi / SWAPPI_PRICE_ADAPTER_ABI | ABI for SwappiPriceAdapter | | swappiPriceAdapterAddress | Deployed addresses keyed by chain ID | | swappiPriceAdapterBytecode | Deployment bytecode |

Each contract is exported both as camelCase (wagmi/viem idiomatic) and UPPER_CASE (legacy compatibility).

Standard token ABIs

Canonical interface ABIs safe to use against any compliant token. Two tiers — base (EIP spec only) and extended (OpenZeppelin 5.x additions):

| Export | Standard | Description | |---|---|---| | erc20Abi / ERC20_ABI | ERC-20 | Base ERC-20 interface | | erc20ExtendedAbi / ERC20_EXTENDED_ABI | ERC-20 | Base + mint, burn, pause, permit | | erc721Abi / ERC721_ABI | ERC-721 | Base ERC-721 interface | | erc721ExtendedAbi / ERC721_EXTENDED_ABI | ERC-721 | Base + mint, burn, pause, royalties | | erc1155Abi / ERC1155_ABI | ERC-1155 | Base ERC-1155 interface | | erc2612Abi / ERC2612_ABI | EIP-2612 | Permit extension for ERC-20 | | erc4626Abi / ERC4626_ABI | ERC-4626 | Tokenised vault standard |

Bootstrap library (deployable templates)

Production-ready contracts with ABI + bytecode, deployable via conflux-devkit or directly:

| Contract | Category | Description | |---|---|---| | erc20BaseAbi / erc20BaseBytecode | tokens | Full-featured ERC-20: capped, burnable, pausable, ERC-2612 permit, role-based minter/pauser | | erc721BaseAbi / erc721BaseBytecode | tokens | Full-featured ERC-721 NFT: enumerable, URI storage, burnable, ERC-2981 royalties | | erc1155BaseAbi / erc1155BaseBytecode | tokens | Full-featured ERC-1155 multi-token: per-token supply caps, ERC-2981 royalties | | wrappedCfxAbi / wrappedCfxBytecode | tokens | Canonical WCFX — WETH9-identical native CFX wrapper | | stakingRewardsAbi / stakingRewardsBytecode | defi | Synthetix-style single-sided staking with configurable reward streaming | | vestingScheduleAbi / vestingScheduleBytecode | defi | Multi-beneficiary cliff + linear vesting with revocation | | merkleAirdropAbi / merkleAirdropBytecode | defi | Pull-based Merkle proof airdrop with bitmap claim tracking | | multiSigWalletAbi / multiSigWalletBytecode | governance | Enhanced M-of-N multisig with expiry, cancellation, self-managed owners | | paymentSplitterAbi / paymentSplitterBytecode | utils | Immutable proportional revenue splitter (native CFX + ERC-20) | | mockPriceOracleAbi / mockPriceOracleBytecode | mocks | Chainlink AggregatorV3Interface mock for testing |


Installation

pnpm add @cfxdevkit/contracts
# or
npm install @cfxdevkit/contracts

Peer dependencies

{
  "viem": ">=2.0.0"
}

Usage

DevKit contracts with viem

import { createPublicClient, http } from 'viem';
import { confluxESpace } from 'viem/chains';
import { automationManagerAbi, automationManagerAddress } from '@cfxdevkit/contracts';

const client = createPublicClient({
  chain: confluxESpace,
  transport: http(),
});

const jobCount = await client.readContract({
  address: automationManagerAddress[1030],
  abi: automationManagerAbi,
  functionName: 'jobCount',
});

DevKit contracts with wagmi

import { useReadContract } from 'wagmi';
import { automationManagerConfig } from '@cfxdevkit/contracts';

const { data: jobCount } = useReadContract({
  ...automationManagerConfig,
  functionName: 'jobCount',
  chainId: 1030,
});

Standard ABIs

import { erc20Abi, erc721Abi, erc1155Abi, erc2612Abi, erc4626Abi } from '@cfxdevkit/contracts';

// Read ERC-20 balance
const balance = await client.readContract({
  address: tokenAddress,
  abi: erc20Abi,
  functionName: 'balanceOf',
  args: ['0xYourAddress'],
});

// ERC-4626 vault shares
const shares = await client.readContract({
  address: vaultAddress,
  abi: erc4626Abi,
  functionName: 'convertToShares',
  args: [amountIn],
});

Bootstrap library — deploy ERC-20Base

import { erc20BaseAbi, erc20BaseBytecode } from '@cfxdevkit/contracts';
import { parseEther } from 'viem';

const hash = await walletClient.deployContract({
  abi: erc20BaseAbi,
  bytecode: erc20BaseBytecode,
  args: [
    'My Token',             // name
    'MTK',                  // symbol
    parseEther('1000000'),  // cap (1 M tokens)
    '0xAdminAddress',       // admin
  ],
});

Regenerating DevKit artifacts

Artifacts for AutomationManager, SwappiPriceAdapter, and PermitHandler are generated from the Hardhat workspace. Never edit src/generated.ts by hand:

# 1. Compile Solidity + run wagmi codegen → writes packages/contracts/src/generated.ts
pnpm --filter @cfxdevkit/contracts-dev codegen

# 2. Build the published package
pnpm --filter @cfxdevkit/contracts build

Bootstrap contract artifacts (src/bootstrap-abis.ts) are similarly generated from devtools/contracts. Run the same codegen step after modifying any bootstrap contract.


Conflux compatibility

| Network | Chain ID | Support | |---|---|---| | Conflux eSpace Mainnet | 1030 | ✅ | | Conflux eSpace Testnet | 71 | ✅ (when deployed) |

Solidity note: all bootstrap contracts compile to EVM version paris. Do not override to shanghai or later — Conflux eSpace does not support the PUSH0 opcode.


License

Apache-2.0 — see LICENSE.