# Foundry

## Foundry

Foundry is a smart contract development toolchain.

With Foundry you can manage your dependencies, compile your project, run tests, deploy smart contracts, and interact with the chain from the command-line and via Solidity scripts.

Check out the [Foundry Book](https://book.getfoundry.sh/) to get started with using Foundry with Pivotal.

***

## Using Foundry with Pivotal

Foundry supports Pivotal out-of-the-box.

Just provide the Pivotal RPC URL and Chain ID when deploying and verifying your contracts.

### Mainnet[​](https://docs.base.org/docs/tools/foundry#mainnet) <a href="#mainnet" id="mainnet"></a>

#### Deploying a smart contract[​](https://docs.base.org/docs/tools/foundry#deploying-a-smart-contract) <a href="#deploying-a-smart-contract" id="deploying-a-smart-contract"></a>

```
forge create ... --rpc-url=https://mainnet.thepivotal.xyz/
```

#### Verifying a smart contract[​](https://docs.base.org/docs/tools/foundry#verifying-a-smart-contract) <a href="#verifying-a-smart-contract" id="verifying-a-smart-contract"></a>

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

### Testnet[​](https://docs.base.org/docs/tools/foundry#testnet) <a href="#testnet" id="testnet"></a>

#### Deploying a smart contract[​](https://docs.base.org/docs/tools/foundry#deploying-a-smart-contract-1) <a href="#deploying-a-smart-contract-1" id="deploying-a-smart-contract-1"></a>

```
forge create ... --rpc-url=https://sepolia.thepivotal.xyz/
```

#### Verifying a smart contract[​](https://docs.base.org/docs/tools/foundry#verifying-a-smart-contract-1) <a href="#verifying-a-smart-contract-1" id="verifying-a-smart-contract-1"></a>

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


---

# 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.pivotalchain.io/pivotal-docs/pivotalchain-tools/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.
