Skip to content
Brandon Brooks edited this page Jan 22, 2026 · 1 revision

FAQ

Frequently asked questions about ContractKit.

General

What is ContractKit?

ContractKit is an open-source Claude Code plugin that helps you build, test, and deploy Solidity smart contracts using Foundry. It provides production-ready templates and streamlined commands for the complete development workflow.

Is ContractKit free?

Yes, ContractKit is completely free and open source under the MIT license.

What are the prerequisites?

Does ContractKit work with Hardhat?

ContractKit is built specifically for Foundry. While the generated contracts are standard Solidity and could be used with Hardhat, the commands and project structure are Foundry-specific.


Templates

Which template should I use?

Use Case Template
Fungible token (currency, points) erc20
Non-fungible token (collectibles, art) erc721
Secure payments between parties escrow
ETH storage with access control vault

Can I customize the templates?

Absolutely! Templates are starting points. After scaffolding, you own the code and can modify it however you need.

Are the templates audited?

No. Templates use audited OpenZeppelin contracts, but the specific implementations have not been independently audited. Always get a professional audit before mainnet deployment.

Why OpenZeppelin?

OpenZeppelin provides the most battle-tested, widely-used smart contract libraries in the ecosystem. Their contracts are thoroughly audited and used by major protocols.


Development

How do I add a new function to my contract?

  1. Edit the contract in src/
  2. Add tests in test/
  3. Run /contractkit:test to verify
  4. Update deployment scripts if needed

How do I install additional dependencies?

forge install <github-org>/<repo>

Example:

forge install Uniswap/v3-core

Then add the remapping to foundry.toml:

remappings = [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@uniswap/=lib/v3-core/"
]

Tests are failing. What should I check?

  1. Ensure Foundry is up to date: foundryup
  2. Install dependencies: forge install
  3. Check compiler version matches foundry.toml
  4. Run with verbosity: /contractkit:test --verbose

How do I debug a failing transaction?

Use Foundry's trace:

forge test --match-test testMyFunction -vvvv

The -vvvv flag shows full stack traces.


Deployment

How much ETH do I need for deployment?

  • Local (Anvil): Free, uses pre-funded test accounts
  • Sepolia: Small amount (~0.01 ETH) from faucets
  • Mainnet: Varies by contract size and gas prices

Where do I get testnet ETH?

How do I verify my contract on Etherscan?

Add --verify to your deploy command:

forge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY

Can I deploy to other networks?

Yes! Add the network to foundry.toml:

[rpc_endpoints]
polygon = "https://polygon-rpc.com"
arbitrum = "https://arb1.arbitrum.io/rpc"

Then deploy:

forge script script/Deploy.s.sol --rpc-url polygon --broadcast --private-key $PRIVATE_KEY

Security

Is /contractkit:audit-lite a real audit?

No. It's an automated security review that catches common issues, but it is not a substitute for a professional security audit. Before mainnet deployment:

  1. Get an independent audit from a reputable firm
  2. Consider a bug bounty program
  3. Start with limited funds and scale gradually

What security features do templates include?

  • AccessControl: Role-based permissions (OpenZeppelin)
  • ReentrancyGuard: Protection against reentrancy attacks
  • Safe math: Built into Solidity 0.8+
  • Input validation: Checks on function parameters

How do I report a security issue?

See SECURITY.md in the repository.


Troubleshooting

"forge: command not found"

Install Foundry:

curl -L https://foundry.paradigm.xyz | bash
foundryup

"failed to resolve import"

Install dependencies:

forge install

"compiler version mismatch"

Update foundry.toml:

solc = "0.8.24"

"stack too deep"

Reduce local variables or use structs to group parameters.

Plugin not loading in Claude Code

  1. Verify installation: check ~/.claude/plugins/
  2. Restart Claude Code
  3. Check plugin.json is valid JSON

Contributing

How can I contribute?

See CONTRIBUTING.md for guidelines. We welcome:

  • Bug fixes
  • New templates
  • Documentation improvements
  • Feature suggestions

Where do I report bugs?

Open an issue on GitHub Issues.

Can I request new templates?

Yes! Open a feature request on GitHub Issues describing:

  • The use case
  • What the template should include
  • Any reference implementations

More Questions?

Clone this wiki locally