> For the complete documentation index, see [llms.txt](https://docs.venn.build/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.venn.build/venn-network/getting-started/safe-guard/installation.md).

# Installation

***

{% hint style="success" %}
**Early Access Support:** We currently handle the deployment and integration of Venn Safe Guard for you. You can start protecting your Safe immediately while we take care of the setup for you – contact us to get started.
{% endhint %}

## Overview

To protect your Gnosis Safe with Venn, you will need to:

1. **Download** Venn's smart contracts and install their dependencies
2. **Deploy** a new instance of the Venn Safe Guard smart contract
3. **Add** Venn Safe Guard to your Gnosis Safe
4. **Use** your Safe with the Venn Guard available interfaces (API or UI)

{% hint style="info" %}
**Note:** During this installation process, you will need to sign and execute the `setGuard()` method on your Gnosis Safe. Depending on your Gnosis Safe's signing threshold, additional signers may be required to sign the transaction before you can execute it to complete the installation.
{% endhint %}

***

## Step 1 - Download Venn's smart contracts

### Clone the Venn's Smart Contracts GitHub repo

Start by cloning our smart contracts, which will allow you to build and deploy a new instance of the Venn Safe Guard.

```sh
git clone https://github.com/ironblocks/onchain-firewall-v2
```

*This command clone Venn's Smart Contracts to the a new folder named \`onchain-firewall-v2\`*

### Install dependencies

Run the following command to install the project's dependencies:

```sh
cd onchain-firewall-v2
npm install
```

*This command will install all the required to complete this installation guide*

## Step 2 - Deploy a new instance of the Venn Safe Guard

### Create a configuration file

First, you'll need to create a `.env` file based on the existing `.env.example`, and modify it's configuration to fit your setup.

```sh
cp .env.example .env
```

*This command creates a new copy of the configuration file at \`.env\`. In the steps below we'll update some of the configurations to your needs.*

### Configuring the guard

Open the newly created `.env` file, and find the `Venn Safe Guard` section which looks like this:

```sh
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Venn Safe Guard                                                               #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Bypass Transactions Timelock (in seconds)
#
BYPASS_GUARD_WAIT_TIME = 

# Safe Address
# The Safe address that the Guard is protecting
#
SAFE_ADDRESS = 
```

* Paste the address of your `Gnosis Safe` in the `SAFE_ADDRESS` field
* Set the desired timelock period for [Bypass Transactions](https://docs.venn.build/venn-network/getting-started/venn-safe-guard/bypass-mechanism) in the `BYPASS_GUARD_WAIT_TIME` field

{% hint style="warning" %}
For **Production** deployments, the recommended timelock duration is one day, which is `86400` seconds
{% endhint %}

{% hint style="warning" %}
For security reasons, these configuration **cannot** be changed once the Venn Safe Guard is deployed.\
Any needed changes will require a new deployment of the Venn Safe Guard.
{% endhint %}

*These configurations create a one-to-one relationship between the Venn Safe Guard and your Gnosis Safe - so that the guard cannot be used by any other Gnosis Safe.*

### Configuring your Private Key

Open the newly created `.env` file, and find the `General Configs` section which looks like this:

```sh
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# General Configs                                                               #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Private Key (i.e. deployer)
#
# Anvil Test Account 1 = ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
#
PRIVATE_KEY = 
```

* Paste your private key onto the `PRIVATE_KEY` field

{% hint style="info" %}
This Private Key will be used by Hardhat to deploy a new instance of the Venn Safe Guard, and will be given the `ADMIN_ROLE` on the newly deployed Venn Safe Guard contract.
{% endhint %}

### Configuring EtherScan

{% hint style="info" %}
**Note**: This step is optional
{% endhint %}

We use hardhat-verify under the hood to verify newly deployed smart contracts, which uses Etherscan's API. To enable verification, add your Etherscan API as shown below:

```sh
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# General Configs                                                               #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

...

# Etherscan API Key
# Used by Hardhat for verifying contracts
#
ETHERSCAN_KEY = 
```

* Paste your Etherscan API key into the `ETHERSCAN_KEY` field

### Deploy the Venn Safe Guard

Run the following command to deploy a new instance of the Venn Safe Guard smart contract:

{% hint style="warning" %}
**Note:** If you want to skip contract verification or if you have not configured an `ETHERSCAN_KEY` above, omit the `--verify` flag
{% endhint %}

```sh
npx hardhat migrate --namespace "venn/Guard" --network holesky --verify --only 1
```

Once completed, you should see the address of the newly deployed Venn Safe Guard shown as follows:

<figure><img src="/files/GXNf91gxgyd001vltmm8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** You can update the `--network` flag to other networks. See the file `hardhat.config.ts` for more info.
{% endhint %}

*This command deploys a new instance of the Venn Safe Guard.*

***

## Step 3 - Add Venn Safe Guard to your Gnosis Safe

### Call the setGuard() method

To add the newly deployed guard to your Gnosis Safe, you'll need to call the `setGuard()` method, passing in the address of the Venn Safe Guard from the previous step.

{% hint style="info" %}
**Note:** As the Gnosis Safe{Wallet} UI may update from time to time, refer to the official Safe documentation here on using the UI to add a Guard to your Safe:

<https://help.safe.global/en/articles/40804-add-a-transaction-guard>
{% endhint %}

{% hint style="warning" %}
**Note:** The `to` address of this transaction should be the address of your Gnosis Safe, as this transactions calls its `setGuard()` method to add the Venn Safe Guard to it
{% endhint %}

<figure><img src="/files/b7e60BHeFHcqpSZIBhUe" alt=""><figcaption></figcaption></figure>

***

## Step 4 - Use your Safe with the Venn Guard available interfaces (API or UI).

With Venn Safe Guard now deployed, you can continue to build, sign, and execute Safe transactions exactly as before - now every Safe transaction will pass through Venn’s Guard security validation.&#x20;

### Choose the interface that fits your Safe workflow:

#### A. **Venn Safe API (for local/programmatic Safe interactions)**&#x20;

The Venn Guard Transaction Validation API enables automatic transaction validation through Venn’s decentralized security network. It accepts standard transactions and returns a JSON response that includes Venn's security validation signature, which is ready to be uploaded to any Safe UI or used in local flows.

{% hint style="info" %}
Start using the Venn Guard API using this [API Reference](/venn-network/getting-started/safe-guard/transaction-validation-api.md)
{% endhint %}

#### **B. Venn Safe Guard UI**

The Venn Guard web interface enables you to build, validate, upload, download, sign, and submit your Safe transactions with the familiar Safe UI experience, closely mirroring the native Gnosis Safe platform. Additionally, you can perform administrative operations such as adding, removing, or editing signers, adjusting thresholds, and more.

{% hint style="info" %}
Load your Safe account and start using the [Venn Guard platform](https://explorer.venn.build/toolkit/venn-safe-guard)
{% endhint %}

***

## Supported Networks

<table data-header-hidden><thead><tr><th width="45.421875" data-type="number"></th><th width="149.9375">Chain</th><th>Mainnet</th><th>Testnet</th></tr></thead><tbody><tr><td>1</td><td>Ethereum</td><td>Mainnet (1)</td><td></td></tr><tr><td>2</td><td>Base</td><td>Base Mainnet (8453)</td><td>Base Sepolia (84532)</td></tr><tr><td>3</td><td>Arbitrum</td><td>Arbitrum One (42161)</td><td></td></tr><tr><td>4</td><td>BSC</td><td>BSC (56)</td><td></td></tr><tr><td>5</td><td>Polygon</td><td>Polygon (137)</td><td></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.venn.build/venn-network/getting-started/safe-guard/installation.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.
