-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Frequently asked questions about 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.
Yes, ContractKit is completely free and open source under the MIT license.
- Claude Code installed
- Foundry installed
- Basic knowledge of Solidity and smart contracts
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.
| 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 |
Absolutely! Templates are starting points. After scaffolding, you own the code and can modify it however you need.
No. Templates use audited OpenZeppelin contracts, but the specific implementations have not been independently audited. Always get a professional audit before mainnet deployment.
OpenZeppelin provides the most battle-tested, widely-used smart contract libraries in the ecosystem. Their contracts are thoroughly audited and used by major protocols.
- Edit the contract in
src/ - Add tests in
test/ - Run
/contractkit:testto verify - Update deployment scripts if needed
forge install <github-org>/<repo>Example:
forge install Uniswap/v3-coreThen add the remapping to foundry.toml:
remappings = [
"@openzeppelin/=lib/openzeppelin-contracts/",
"@uniswap/=lib/v3-core/"
]- Ensure Foundry is up to date:
foundryup - Install dependencies:
forge install - Check compiler version matches
foundry.toml - Run with verbosity:
/contractkit:test --verbose
Use Foundry's trace:
forge test --match-test testMyFunction -vvvvThe -vvvv flag shows full stack traces.
- Local (Anvil): Free, uses pre-funded test accounts
- Sepolia: Small amount (~0.01 ETH) from faucets
- Mainnet: Varies by contract size and gas prices
Add --verify to your deploy command:
forge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEYYes! 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_KEYNo. It's an automated security review that catches common issues, but it is not a substitute for a professional security audit. Before mainnet deployment:
- Get an independent audit from a reputable firm
- Consider a bug bounty program
- Start with limited funds and scale gradually
- AccessControl: Role-based permissions (OpenZeppelin)
- ReentrancyGuard: Protection against reentrancy attacks
- Safe math: Built into Solidity 0.8+
- Input validation: Checks on function parameters
See SECURITY.md in the repository.
Install Foundry:
curl -L https://foundry.paradigm.xyz | bash
foundryupInstall dependencies:
forge installUpdate foundry.toml:
solc = "0.8.24"Reduce local variables or use structs to group parameters.
- Verify installation: check
~/.claude/plugins/ - Restart Claude Code
- Check plugin.json is valid JSON
See CONTRIBUTING.md for guidelines. We welcome:
- Bug fixes
- New templates
- Documentation improvements
- Feature suggestions
Open an issue on GitHub Issues.
Yes! Open a feature request on GitHub Issues describing:
- The use case
- What the template should include
- Any reference implementations
- Check the GitHub Discussions
- Open an issue for bugs or feature requests
- Review the Foundry Book for Foundry-specific questions
ContractKit
Reference
Help