> For the complete documentation index, see [llms.txt](https://docs.pivotalchain.io/pivotal-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pivotalchain.io/pivotal-docs/pivotalchain-tools/toolchains/foundry.md).

# 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
```
