Skip to Content
Packages@cfxdevkit/contracts

@cfxdevkit/contracts

Auto-generated, type-safe ABIs and deployment artifacts for Conflux DevKit on-chain contracts, plus canonical token ABIs and a bootstrap library of deployable contract templates.

pnpm add @cfxdevkit/contracts

DevKit contracts

ExportDescription
automationManagerAbiABI for AutomationManager
automationManagerAddressDeployed addresses by chain ID (1030, 71)
automationManagerConfigCombined { abi, address } for wagmi/viem
permitHandlerAbiABI for PermitHandler
permitHandlerAddressDeployed addresses by chain ID
swappiPriceAdapterAbiABI for SwappiPriceAdapter
swappiPriceAdapterAddressDeployed addresses by chain ID

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


Standard token ABIs

ExportStandardDescription
erc20AbiERC-20Base ERC-20 interface
erc20ExtendedAbiERC-20Base + mint, burn, pause, permit
erc721AbiERC-721Base ERC-721 interface
erc721ExtendedAbiERC-721Base + mint, burn, royalties
erc1155AbiERC-1155Base ERC-1155 interface
erc2612AbiEIP-2612Permit extension
erc4626AbiERC-4626Tokenised vault

Bootstrap library

Production-ready contracts with ABI + bytecode:

ContractCategoryDescription
erc20BaseAbi / erc20BaseBytecodeTokensCapped, burnable, pausable ERC-20 with ERC-2612 permit
erc721BaseAbi / erc721BaseBytecodeTokensFull-featured ERC-721 with ERC-2981 royalties
erc1155BaseAbi / erc1155BaseBytecodeTokensFull-featured ERC-1155 multi-token
wrappedCfxAbi / wrappedCfxBytecodeTokensCanonical WCFX — WETH9-identical native wrapper
stakingRewardsAbi / stakingRewardsBytecodeDeFiSynthetix-style staking with reward streaming
vestingScheduleAbi / vestingScheduleBytecodeDeFiMulti-beneficiary cliff + linear vesting
merkleAirdropAbi / merkleAirdropBytecodeDeFiPull-based Merkle proof airdrop
multiSigWalletAbi / multiSigWalletBytecodeGovernanceEnhanced M-of-N multisig with expiry
paymentSplitterAbi / paymentSplitterBytecodeUtilsProportional revenue splitter
mockPriceOracleAbi / mockPriceOracleBytecodeMocksChainlink AggregatorV3 mock

Deploy a bootstrap contract

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'), // initial supply ownerAddress, // owner ], })

Use with wagmi

import { automationManagerConfig } from '@cfxdevkit/contracts' import { useReadContract } from 'wagmi' const { data } = useReadContract({ ...automationManagerConfig, functionName: 'getActiveJobs', })
Last updated on