<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gabriel Rossi Lopes</title>
    <description>The latest articles on DEV Community by Gabriel Rossi Lopes (@grossiwm).</description>
    <link>https://dev.to/grossiwm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2203318%2F3519c0b8-f156-4240-9093-9f5d548374fe.png</url>
      <title>DEV Community: Gabriel Rossi Lopes</title>
      <link>https://dev.to/grossiwm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/grossiwm"/>
    <language>en</language>
    <item>
      <title>Effortless Smart Contract Deployments</title>
      <dc:creator>Gabriel Rossi Lopes</dc:creator>
      <pubDate>Wed, 16 Oct 2024 21:25:56 +0000</pubDate>
      <link>https://dev.to/grossiwm/effortless-smart-contract-deployments-2lj8</link>
      <guid>https://dev.to/grossiwm/effortless-smart-contract-deployments-2lj8</guid>
      <description>&lt;p&gt;In the rapidly evolving world of blockchain technology, automating the deployment of smart contracts has become essential for developers striving to optimize their workflows. In this article, I’ll guide you through the step-by-step process of creating a GitHub Action that simplifies deploying smart contracts to the Sepolia test network. By harnessing the power of GitHub Actions, you can achieve a deployment process that is not only efficient but also secure.&lt;/p&gt;

&lt;p&gt;Throughout this tutorial, you will learn how to set up a seamless workflow for your smart contract deployments. We’ll cover everything from obtaining Sepolia ETH using faucets to acquiring an Infura API key for accessing the RPC URL. Additionally, I’ll show you how to configure Etherscan API keys to display deployment data directly in your job logs. To ensure the security of your sensitive information, we’ll utilize GitHub Actions secrets to safely store your keys and URLs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p8yf137utlw53ra7zr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p8yf137utlw53ra7zr2.png" alt="CI context diagram" width="720" height="127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By the end of this article, you’ll have a comprehensive understanding of how to automate smart contract deployments, ultimately making your development process faster, more reliable, and easier to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Fueling Our Wallet: Acquiring Sepolia ETH&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzq21p5paihpf00xrsnd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzq21p5paihpf00xrsnd.png" alt="GETBLOCK faucet claim form" width="720" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GETBLOCK faucet claim form&lt;/p&gt;

&lt;p&gt;First, we need to obtain some Sepolia ETH to cover the gas fees for our deployments. To do this, I used two reliable faucets: Google Cloud and &lt;a href="https://getblock.io/faucet/eth-sepolia/" rel="noopener noreferrer"&gt;GetBlock&lt;/a&gt;. It’s important to note that most faucets require you to have a small amount of Ether in your mainnet wallet at the address from which you are requesting Sepolia ETH. This is to verify that you are a legitimate user and to prevent abuse of the faucet service.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Connecting to the Network: Acquiring an Infura API Key&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When deploying smart contracts on the blockchain, establishing a reliable connection to the network is crucial. One of the most straightforward and effective ways to achieve this is by using Infura’s RPC (Remote Procedure Call) URL. Here’s why Infura stands out as an excellent choice:&lt;/p&gt;

&lt;p&gt;Simplicity: Infura offers a user-friendly interface that enables developers to easily obtain an RPC URL. This eliminates the need to set up and maintain your own Ethereum node, a process that can be both complex and time-consuming. Instead, you can focus on writing and deploying your smart contracts without the added overhead.&lt;/p&gt;

&lt;p&gt;Reliability: As a trusted service, Infura provides high availability and uptime. You can connect to the Ethereum network without worrying about node downtime or maintenance issues, ensuring that your deployments run smoothly and consistently.&lt;/p&gt;

&lt;p&gt;Scalability: Whether you’re deploying a single contract or managing multiple projects, Infura can accommodate varying loads. Its robust infrastructure is designed to handle numerous requests, allowing your applications to grow without encountering bottlenecks.&lt;/p&gt;

&lt;p&gt;Quick Setup: After creating an Infura account and generating your API key, you’ll receive an RPC URL that can be easily integrated into your deployment scripts. This quick setup process saves valuable time and lets you dive straight into development.&lt;/p&gt;

&lt;p&gt;Comprehensive Documentation: Infura provides detailed documentation and support, making it easier for developers of all experience levels to get started. This resource is invaluable, especially when you encounter challenges along the way.&lt;/p&gt;

&lt;p&gt;At this point, navigate to the &lt;a href="https://www.infura.io/" rel="noopener noreferrer"&gt;Infura&lt;/a&gt; dashboard to grab your API key in preparation for the next phase. Next, it’s time to securely store our essential and confidential information.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Working with secrets&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Create secrets for the following: ETHERSCAN_API_KEY, PRIVATE_KEY, and TESTNET_RPC_URL. The RPC URL should be treated as a secret, formatted as &lt;a href="https://sepolia.infura.io/v3/YOUR_API_KEY" rel="noopener noreferrer"&gt;https://sepolia.infura.io/v3/YOUR_API_KEY&lt;/a&gt;. If you’re unfamiliar with using secrets in GitHub Actions, be sure to check out the &lt;a href="https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Foundry Deploy Action: Automating Smart Contract Deployment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This custom GitHub Action, is designed to automate the process of deploying smart contracts using the Foundry framework. Here’s a breakdown of how it works and the key steps involved:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checkout the Codebase:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first step uses the actions/checkout@v4 to clone the repository and its submodules into the GitHub Actions runner. This ensures that all relevant files, including any submodules, are available for the deployment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Foundry:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Foundry, a powerful development toolkit for Ethereum smart contracts, is installed using the foundry-rs/foundry-toolchain@v1 action. The version: nightly parameter ensures that the latest nightly version of Foundry is used, providing access to the latest features and updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Up Environment Variables:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this step, environment variables needed for deployment are set up. This includes:&lt;br&gt;&lt;br&gt;
FOUNDRY_ETH_RPC_URL: The RPC URL for interacting with the blockchain.&lt;br&gt;&lt;br&gt;
PRIVATE_KEY: The private key of the deployer account.&lt;br&gt;&lt;br&gt;
CHAIN_ID: The ID of the blockchain network (e.g., Sepolia or Ethereum Mainnet).&lt;br&gt;&lt;br&gt;
ETHERSCAN_API_KEY: The API key used to verify the contract on Etherscan.&lt;br&gt;&lt;br&gt;
These values are securely passed from the workflow’s input parameters and stored as environment variables for the remainder of the job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compile Smart Contracts:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The forge build command is executed to compile the smart contracts. This is done within the working directory specified by the user (project_dir), which defaults to the root directory if not provided. Compilation ensures that all smart contracts are properly prepared before deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy Smart Contracts:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this final step, the forge script command is used to deploy the smart contracts to the specified network. The deployment is broadcasted and verified using:&lt;br&gt;&lt;br&gt;
— broadcast: To send the deployment transaction to the blockchain.&lt;br&gt;&lt;br&gt;
— verify: To verify the contract on Etherscan using the provided API key.&lt;br&gt;&lt;br&gt;
This step also uses the environment variables for the RPC URL, private key, chain ID, and Etherscan API key to ensure secure and accurate deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Parameters:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This action requires several input parameters to function correctly:&lt;/p&gt;

&lt;p&gt;rpc-url: The RPC URL for connecting to the blockchain network (e.g., Infura).&lt;br&gt;&lt;br&gt;
private-key: The private key for the deployer’s wallet, used to sign transactions.&lt;br&gt;&lt;br&gt;
chain-id: The ID of the target blockchain network (e.g., 1 for Ethereum Mainnet or 11155111 for Sepolia).&lt;br&gt;&lt;br&gt;
etherscan-api-key: API key for Etherscan, enabling contract verification after deployment.&lt;br&gt;&lt;br&gt;
deploy-script: The path to the deployment script, which contains the logic for deploying the contract.&lt;br&gt;&lt;br&gt;
project_dir (optional): The directory containing the Foundry project. It defaults to the root directory (“.”) if not provided.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Foundry&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Deploy&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Action"&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;custom&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;deploy&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;smart&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;contracts&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;using&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Foundry"&lt;/span&gt;
&lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Gabriel&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Rossi&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Lopes"&lt;/span&gt;
&lt;span class="na"&gt;runs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;using&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;composite"&lt;/span&gt; 
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;submodules&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;recursive&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Foundry&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;foundry-rs/foundry-toolchain@v1&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nightly&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set up Environment Variables&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;echo "FOUNDRY_ETH_RPC_URL=$RPC_URL" &amp;gt;&amp;gt; $GITHUB_ENV&lt;/span&gt;
        &lt;span class="s"&gt;echo "PRIVATE_KEY=$PRIVATE_KEY" &amp;gt;&amp;gt; $GITHUB_ENV&lt;/span&gt;
        &lt;span class="s"&gt;echo "CHAIN_ID=$CHAIN_ID" &amp;gt;&amp;gt; $GITHUB_ENV&lt;/span&gt;
        &lt;span class="s"&gt;echo "ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY" &amp;gt;&amp;gt; $GITHUB_ENV&lt;/span&gt;
      &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;RPC_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.rpc-url }}&lt;/span&gt;
        &lt;span class="na"&gt;PRIVATE_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.private-key }}&lt;/span&gt;
        &lt;span class="na"&gt;CHAIN_ID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.chain-id }}&lt;/span&gt;
        &lt;span class="na"&gt;ETHERSCAN_API_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.etherscan-api-key }}&lt;/span&gt;
      &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Compile contracts&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;forge build&lt;/span&gt;
      &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
      &lt;span class="na"&gt;working-directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.project_dir }}&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy contracts&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;forge script ${{ inputs.deploy-script }} --broadcast --verify --rpc-url $FOUNDRY_ETH_RPC_URL --private-key $PRIVATE_KEY --chain-id $CHAIN_ID --etherscan-api-key $ETHERSCAN_API_KEY&lt;/span&gt;
      &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
      &lt;span class="na"&gt;working-directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ inputs.project_dir }}&lt;/span&gt;

&lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;rpc-url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;RPC&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;URL&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;net"&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;private-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;private&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;key&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;deployer&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;account"&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;chain-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Chain&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;ID&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;network"&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;etherscan-api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;API&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;key&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;etherscan"&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;deploy-script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;path&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;deploy&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;script"&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;project_dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;directory&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;containing&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Foundry&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;project&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;(defaults&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;root&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;directory&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;if&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;not&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;provided)."&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Foundry Deploy Action&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grossiwm/foundry-deploy-action@latest&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;rpc-url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.RPC_URL }}&lt;/span&gt;
          &lt;span class="na"&gt;private-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.PRIVATE_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;chain-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="c1"&gt;# Replace with your desired chain ID&lt;/span&gt;
          &lt;span class="na"&gt;etherscan-api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.ETHERSCAN_API_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;deploy-script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;path/to/your/deploy_script.sol"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example demonstrates how to pass the necessary secrets and configuration options to the action for a secure and streamlined deployment process.&lt;/p&gt;

&lt;p&gt;For a clearer understanding of the concepts discussed in this article, I encourage you to check out my &lt;a href="https://github.com/grossiwm/foundry-deploy-action" rel="noopener noreferrer"&gt;GitHub Action repository&lt;/a&gt;, also the same action published in the &lt;a href="https://github.com/marketplace/actions/foundry-deploy-action" rel="noopener noreferrer"&gt;marketplace&lt;/a&gt;. Additionally, you can find an example project that demonstrates the deployment process in action &lt;a href="https://github.com/grossiwm/foundry-deploy-action-example" rel="noopener noreferrer"&gt;here&lt;/a&gt;. These resources will provide valuable insights and help solidify your understanding.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>ethereum</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
