l2-deployment

Deploy Solidity contracts to Base, Optimism, and Arbitrum using Foundry scripts.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill l2-deployment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: l2-deployment
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/l2-deployment
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill l2-deployment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides guidance and tooling for deploying Solidity contracts to Layer 2 networks (Base, Optimism, Arbitrum), addressing L2-specific considerations, gas economics, bridge integration, and deployment scripts.

Core Features & Use Cases

  • L2 gas economics and cost awareness for Base, Optimism, and Arbitrum.
  • PUSH0 compatibility guidance and EVM version considerations to ensure smooth deployments.
  • Bridge integration patterns and cross-chain messaging for L2-to-L1 workflows.
  • Foundry-based deployment scripts and forked-test workflows for safe, repeatable deployments.
  • Deployment checklists and best practices to reduce risk in production environments.

Quick Start

Run the Foundry deployment script to deploy your contracts to the target L2 networks.

Frequently Asked Questions about l2-deployment

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

FAQPage Schema
How do I deploy Solidity smart contracts to Layer 2 networks like Base, Arbitrum, and Optimism?

To deploy smart contracts to L2 networks, you use Foundry-based deployment scripts with L2-specific patterns. This approach handles EVM version selection, estimates L1 data costs, and integrates bridges for safe, repeatable contract deployments on Base, Optimism, and Arbitrum.

What is the best way to estimate L1 data costs and gas when deploying to an L2?

Estimating L2 deployment gas involves using specialized scripts that calculate L1 data costs alongside execution costs. Foundry deployment scripts provide gas estimation checks to account for the unique gas economics of networks like Arbitrum and Optimism.

Does deploying contracts to Optimism or Base require PUSH0 opcode compatibility?

Deploying to L2 networks like Optimism and Base requires checking PUSH0 opcode compatibility and configuring the correct EVM version. Guidance and checks are provided to ensure your Solidity contracts avoid compatibility issues during deployment.

How can I test L2 deployments and bridge integration using Foundry?

You can test L2 deployments and bridge integration using Foundry forked-test workflows. These workflows simulate the target L2 environment locally, allowing you to validate cross-chain messaging patterns and contract behavior before executing production deployments.

Why do my L2 smart contract deployments fail during production, and how can I reduce risk?

L2 deployments often fail due to missed EVM version checks or incorrect gas estimation. Using deployment checklists, best practices, and Foundry scripts reduces production risk by ensuring all L2-specific considerations are validated before execution.