solidity-development
Original:🇺🇸 English
Translated
Solidity smart contract development workflow. Use when modifying smart contracts in apps/eth-contracts/contracts/.
1installs
Added on
NPX Install
npx skill4agent add hiromaily/go-crypto-wallet solidity-developmentTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Solidity Development Workflow
Workflow for Solidity smart contract changes in the Foundry project.
apps/eth-contracts/Prerequisites
Use Skill for branch management, commit conventions, and PR creation.
git-workflowApplicable Directories
| Path | Description |
|---|---|
| Smart contract source files |
| Foundry deployment scripts |
| Foundry test files ( |
Toolchain
| Tool | Version | Role |
|---|---|---|
Foundry ( | 1.6.0-nightly | Compile, test, deploy |
| Solidity | | Smart contract language |
| OpenZeppelin Contracts | | ERC-20 / standard base contracts |
| bun | primary | npm package manager |
| solhint | | Solidity linter |
| dprint | | JS/TS formatter |
Note:is installed atforge(may not be in PATH). Run with full path or add~/.foundry/bin/forgeto~/.foundry/bin.PATH
Setup (first time)
bash
cd apps/eth-contracts
# 1. Install forge-std (Foundry testing/scripting library)
forge install foundry-rs/forge-std
# 2. Install npm dependencies (@openzeppelin/contracts, solhint, dprint)
bun installVerification Commands
bash
cd apps/eth-contracts
forge build # Compile all contracts (artifacts → out/)
forge test -v # Run Foundry unit tests
bun run lint # Solidity lint via solhint (must exit 0, zero errors)
bun run fmt # Format JS/TS files via dprint (must exit 0)Deployment (local)
bash
cd apps/eth-contracts
export PRIVATE_KEY=0x<deployer-private-key>
forge script script/DeployHYC.s.sol --rpc-url http://localhost:8545 --broadcast
# → outputs contract address, tx hash, gas usageCompatible with both and nodes at .
anvilgethhttp://localhost:8545Self-Review Checklist
Code Quality
- Named imports used () — no global imports
import {Foo} from "..." - NatSpec tags present (,
@title,@author,@notice) on contracts and public functions@param - Explicit visibility on all functions (constructors exempt in Solidity ≥0.8)
- Gas optimization considered
- Events emitted for state changes
Security
- No reentrancy vulnerabilities
- No hardcoded private keys or sensitive values — use env vars
- added to
.env.gitignore - Access control properly implemented
- Integer overflow protection (Solidity ≥0.8 has built-in checks)
Testing
- Foundry test file () covers all acceptance criteria
test/*.t.sol - passes with zero failures
forge test - exits 0 with zero solhint errors
bun run lint
ABI / Go Bindings
After contract changes, if Go bindings are needed:
bash
# 1. Compile
cd apps/eth-contracts
forge build
# 2. Regenerate Go bindings (if target ABI changed)
make gen-abiRelated Chain Context
- ETH (Ethereum)
- ERC-20 token standard
- Local nodes: ,
anvilatgethhttp://localhost:8545
Related Skills
- - Branch, commit, PR workflow
git-workflow - - Task classification
github-issue-creation