foundry-scripting-and-deploy

Deploy Foundry forge scripts across chains with environment-driven configuration.

16|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/idchain-world/id-agents --skill foundry-scripting-and-deploy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundry-scripting-and-deploy
Source: https://github.com/idchain-world/id-agents/tree/main/configs/agents/foundry-dev/skills/foundry-scripting-and-deploy
Command: npx skills add https://github.com/idchain-world/id-agents --skill foundry-scripting-and-deploy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and deploying Foundry forge scripts across multiple chains is error-prone and requires safe, repeatable practices; this Skill codifies governance, environment-driven config, and robust deployment workflows to prevent secrets leakage and misconfigurations.

Core Features & Use Cases

  • Environment-driven configuration: read from vm.env... to avoid hardcoding keys.
  • Multi-chain guardrails: configure assets and oracles per chain with explicit reverts for unsupported chains.
  • Deterministic deploys: supports CREATE2 and deterministic deployment patterns with cross-chain predictability.
  • Post-deploy verification and JSON output: provides verifiable results for tooling and audits.

Quick Start

Run a dry-run Forge script against your target chain to inspect traces before deployment.

Frequently Asked Questions about foundry-scripting-and-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Foundry forge scripts for multi-chain deploys?

Automate Foundry forge scripts by using environment-driven configuration and multi-chain guardrails to deploy safely across mainnet, testnets, and local forks. This prevents secrets leakage and ensures repeatable deployment workflows.

What is the best way to prevent secrets leakage when running forge scripts?

Prevent secrets leakage in forge scripts by reading environment variables directly through vm.env instead of hardcoding keys. This security-conscious scripting practice ensures safe configuration management across multiple chains.

How do I configure chain guards for unsupported networks in a Foundry deployment?

Configure multi-chain guardrails in a Foundry deployment by applying explicit reverts for unsupported chains. This validates assets and oracles per chain during pre-deployment validation to prevent misconfigurations.

Can I use CREATE2 for deterministic deployments across multiple Foundry chains?

Yes, you can use CREATE2 for deterministic deployments across multiple Foundry chains. This approach supports cross-chain predictability and deterministic deployment patterns for consistent contract addresses.

Does Foundry support JSON-formatted output for post-deploy verification?

Foundry supports JSON-formatted output for post-deploy verification by providing verifiable results for tooling and audits. This output format satisfies requirements for robust deployment workflows and security audits.

Why should I run a dry-run Forge script before executing a mainnet deployment?

Run a dry-run Forge script before mainnet deployment to inspect traces and validate configurations safely. This pre-deployment validation step applies chain guards and prevents misconfigurations before broadcasting transactions.