Installation
Welcome to the Venn Network installation guide for protocols and developers. This guide details the steps needed to secure your protocols with Venn.
Last updated
Was this helpful?
Welcome to the Venn Network installation guide for protocols and developers. This guide details the steps needed to secure your protocols with Venn.
Last updated
Was this helpful?
Integrate the Firewall SDK into your smart contracts.
Register your smart contracts on-chain with Venn.
Install the dApp SDK on your frontend.
Start by installing the Venn CLI. This will allow you to add the Firewall SDK to your smart contracts and register them on the chain.
This command installs the CLI globally, making the venn command available in your terminal.
This command scans all smart contracts in the contracts folder and automatically adds the required import VennFirewallConsumer to the external functions.
Before Integration:
After Integration:
Now that your smart contracts include the Firewall SDK, deploy them as you normally would on any network - this will enable you to register them on-chain to Venn, in the next step.
Complete step 1: Firewall SDK integration on your smart contracts.
Ensure your smart contracts are deployed on-chain.
Have your deployment private key ready (this must be the same key used for deployment).
Create a configuration file named venn.config.json
in your project’s root directory.
Update the file with your deployed contract addresses. Example:
Each key in the contracts
object is the Name of the contract
Each value in the contracts
object is the Address of the contract
Create an environment variable called VENN_PRIVATE_KEY with the private key that deployed your smart contracts.
IMPORTANT: This key must be the same key that deployed the smart contracts
Run this command to register your Firewall-protected smart contracts with Venn:
After a successful connection to Venn, a new Venn Security Policy is created for you. The policy address is automatically saved in your venn.config.json file, for example:
Now that your smart contracts are secured, only approved transactions will be executed on-chain. To also approve transactions that go through your dApp frontend, you will need to install Venn-SDK in your dApp.
In your dApp frontend project, open a new terminal and install the SDK.
Import the VennClient and create a new instance by providing the Venn node URL and your Venn policy address from step 2:
vennURL, a URL pointing to a Venn node operator:
vennPolicyAddress: the policyAddress You got from "Register With Venn" in step 2.
Use the SDK to validate transactions before sending them on-chain:
The Firewall SDK adds the to your smart contracts. Run this command from the root folder of your project to integrate the SDK:
That's it! Welcome to Venn. You can now view your activity on Venn in the .