Loading...
Loading...
[AUTO-INVOKE] MUST be invoked BEFORE deploying contracts or writing deployment scripts (*.s.sol). Covers pre-flight checks, forge script commands, post-deployment validation, and verification. Trigger: any task involving forge script, contract deployment, or block explorer verification.
npx skill4agent add 0xlayerghost/solidity-agent-kit solidity-deploy| Step | Command / Action |
|---|---|
| Format code | |
| Run all tests | |
| Check gas report | |
| Verify config | Manually check |
| Dry-run | |
| Check balance | |
| Gas limit set | Deployment command must include |
| Situation | Rule |
|---|---|
| Default deployment | No |
| User requests verification | Add |
| Post-deploy verification | Use |
| Multi-chain deploy | Separate scripts per chain, never batch multiple chains in one script |
| Proxy deployment | Deploy implementation first, then proxy — verify both separately |
config/*.jsondeployments/latest.envcast calldocs/CHANGELOG.mdforge verify-contractcast wallet import--broadcast# Dry-run (simulation only, no on-chain execution)
forge script script/Deploy.s.sol:DeployScript \
--rpc-url <RPC_URL> \
--gas-limit 5000000 \
-vvvv
# When user is ready to deploy, instruct them to add:
# --account <KEYSTORE_NAME> --broadcast
# Verify existing contract separately
forge verify-contract <ADDRESS> <CONTRACT> \
--chain-id <CHAIN_ID> \
--etherscan-api-key <API_KEY> \
--constructor-args $(cast abi-encode "constructor(address)" <ARG>)
# Quick on-chain read test after deployment
cast call <CONTRACT_ADDRESS> "functionName()" --rpc-url <RPC_URL>