solidity-deploy
0
总安装量
3
周安装量
安装命令
npx skills add https://github.com/0xlayerghost/solidity-agent-kit --skill solidity-deploy
Agent 安装分布
claude-code
3
windsurf
1
trae
1
cursor
1
codex
1
Skill 文档
Deployment Workflow
Language Rule
- Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.
Pre-deployment Checklist (all must pass)
| Step | Command / Action |
|---|---|
| Format code | forge fmt |
| Run all tests | forge test â zero failures required |
| Check gas report | forge test --gas-report â review critical functions |
| Verify config | Manually check config/*.json parameters |
| Dry-run | forge script <Script> --fork-url $RPC_URL -vvvv (no --broadcast) |
| Check balance | cast balance $DEPLOYER --rpc-url $RPC_URL â sufficient gas? |
| Gas limit set | Deployment command must include --gas-limit |
Deployment Decision Rules
| Situation | Rule |
|---|---|
| Default deployment | No --verify â contracts are not verified on block explorers by default |
| User requests verification | Add --verify and --etherscan-api-key to the command |
| Post-deploy verification | Use forge verify-contract as a separate step |
| Multi-chain deploy | Separate scripts per chain, never batch multiple chains in one script |
| Proxy deployment | Deploy implementation first, then proxy â verify both separately |
Post-deployment Operations (all required)
- Update addresses in
config/*.jsonanddeployments/latest.env - Test critical functions:
cast call/cast sendto verify on-chain behavior - Record changes in
docs/CHANGELOG.md - Submit PR with deployment transaction hash link
- If verification needed, run
forge verify-contractseparately
Command Templates
# Load environment
source .env
# Standard deployment (no verification by default)
forge script script/Deploy.s.sol:DeployScript \
--rpc-url $RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast \
--gas-limit 5000000 \
-vvvv
# Deployment with verification (only when explicitly requested)
forge script script/Deploy.s.sol:DeployScript \
--rpc-url $RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--etherscan-api-key $ETHERSCAN_API_KEY \
--gas-limit 5000000 \
-vvvv
# Verify existing contract separately
forge verify-contract <ADDRESS> <CONTRACT> \
--chain-id <CHAIN_ID> \
--etherscan-api-key $ETHERSCAN_API_KEY \
--constructor-args $(cast abi-encode "constructor(address)" <ARG>)
# Quick on-chain function test after deployment
cast call <CONTRACT_ADDRESS> "functionName()" --rpc-url $RPC_URL
cast send <CONTRACT_ADDRESS> "functionName(uint256)" 100 \
--rpc-url $RPC_URL --private-key $PRIVATE_KEY