Firewall - Venn
This page describes how to integrate Venn.
Last updated
npm i -g @vennbuild/clivenn fw integ -r -d contractshardhat run scripts/deploy.js # your deployment script{
"networks": {
"holesky": {
"firewall": "0x123...",
"contracts": {
"MyContract1": "0x11111...",
"MyContract2": "0x22222..."
}
}
}
}npm run firewall:setup -- --networknpm i @vennbuild/venn-dapp-sdkimport { VennClient } from '@vennbuild/venn-dapp-sdk';
const vennURL = "https://dc7sea.venn.build/sign";
const vennPolicyAddress = YOUR FIREWALL ADDRESS;
const vennClient = new VennClient(
{
vennURL,
vennPolicyAddress
});
//You probably have something like this:
const tx = { to, from, data, value };
const receipt = await
wallet.sendTransaction(approvedTransaction);
//But now you need this:
const tx = { to, from, data, value };
const approvedTransaction = await
vennClient.approve(tx);
const receipt = await
wallet.sendTransaction(approvedTransaction);npm run firewall:remove -- --network <network>