# Foundry

## What is Foundry? <a href="#what-is-foundry" id="what-is-foundry"></a>

[Foundry](https://book.getfoundry.sh/) is a a smart contract development toolset that assists developers in managing dependencies, compiling projects, running tests, deploying contracts, and interacting with blockchains through the command line interface.

## Prerequisites

Before we start, make sure you have met the following conditions:

1. Have some BNB on Matchain Networks. You can follow our guide on [Bridges](/utilities/bridges.md) and [Network Faucets](/network-faucets.md).
2. Foundry must be installed on your computer. If it’s not, [follow this guide](https://book.getfoundry.sh/getting-started/installation).

## &#x20;<a href="#getting-started" id="getting-started"></a>

## Getting started on Mainnet <a href="#getting-started" id="getting-started"></a>

### **Deploying a smart contract**

```
forge create ... --rpc-url=https://rpc.matchain.io/
```

### Verifying a smart contract <a href="#verifying-a-smart-contract" id="verifying-a-smart-contract"></a>

```
forge verify-contract ... --chain-id 698
```

### <br>

## Getting started on Testnet <a href="#getting-started" id="getting-started"></a>

### **Deploying a smart contract**

```
forge create ... --rpc-url=https://testnet-rpc.matchain.io
```

### Verifying a smart contract <a href="#verifying-a-smart-contract" id="verifying-a-smart-contract"></a>

```
forge verify-contract ... --chain-id 699
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.matchain.io/development/toolchains/foundry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
