setup-solidity-contracts▌
openzeppelin/openzeppelin-skills · updated Apr 8, 2026
For existing projects, detect the framework by looking for hardhat.config.* (Hardhat) or foundry.toml (Foundry). For new projects, ask the user which framework they prefer.
Solidity Setup
For existing projects, detect the framework by looking for hardhat.config.* (Hardhat) or foundry.toml (Foundry). For new projects, ask the user which framework they prefer.
Hardhat Setup
- Initialize project (only if starting a new project)
npx hardhat init # Hardhat v2
npx hardhat --init # Hardhat v3
- Install OpenZeppelin Contracts:
npm install @openzeppelin/contracts
- If using upgradeable contracts, also install the upgradeable variant:
npm install @openzeppelin/contracts-upgradeable
Foundry Setup
- Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Initialize project (only if starting a new project)
forge init my-project
cd my-project
- Add OpenZeppelin Contracts:
forge install OpenZeppelin/openzeppelin-contracts@v<VERSION>
- If using upgradeable contracts, also add the upgradeable variant:
forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v<VERSION>
Look up the current version from https://github.com/OpenZeppelin/openzeppelin-contracts/releases. Pin to a release tag — without one,
forge installpulls the default branch, which may be unstable.
remappings.txt(if not using upgradeable contracts)
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
remappings.txt(if using upgradeable contracts)
@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
Note The above remappings mean that both
@openzeppelin/contracts/(including proxy contracts) and@openzeppelin/contracts-upgradeable/come from theopenzeppelin-contracts-upgradeablesubmodule and its subdirectories, which includes its own transitive copy ofopenzeppelin-contractsof the same release version number. This format is needed for Etherscan verification to work. Particularly, any copies ofopenzeppelin-contractsthat are installed separately are NOT used.
Import Conventions
- Standard:
@openzeppelin/contracts/token/ERC20/ERC20.sol - Upgradeable:
@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol - Use upgradeable variants only when deploying behind proxies; otherwise use standard contracts.
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.8★★★★★35 reviews- ★★★★★Kaira Sethi· Dec 28, 2024
We added setup-solidity-contracts from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Charlotte Ndlovu· Dec 24, 2024
I recommend setup-solidity-contracts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Diego Jain· Dec 4, 2024
Useful defaults in setup-solidity-contracts — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kiara Khanna· Nov 23, 2024
setup-solidity-contracts is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Sakura Desai· Nov 19, 2024
setup-solidity-contracts fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Rahul Santra· Nov 11, 2024
Solid pick for teams standardizing on skills: setup-solidity-contracts is focused, and the summary matches what you get after install.
- ★★★★★Camila Anderson· Oct 14, 2024
setup-solidity-contracts reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Kabir White· Oct 10, 2024
setup-solidity-contracts has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Pratham Ware· Oct 2, 2024
I recommend setup-solidity-contracts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Alexander Perez· Sep 25, 2024
I recommend setup-solidity-contracts for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 35