This project demonstrates the integration of a simple storage DApp with the Venn Network firewall protection system. It includes a smart contract that can store and retrieve values, with additional security features provided by the Venn Network.
The documentation provides an example of running the project using Docker Compose. If you wish to run the project without Docker Compose, please familiarize yourself with the project structure and select an appropriate method accordingly
- Simple key-value storage smart contract
- Venn Network firewall protection
- Owner-only value removal
- Docker-based development environment
- Easy-to-use CLI interface for contract interaction
- Docker and Docker Compose
- Access to Holesky testnet
- Venn Network testnet access
.
├── contracts/ # Smart contract source files
│ └── SimpleStorage.sol # Main storage contract
│ └── SimpleStorageABI.json # Main storage contract ABI
├── scripts/ # JavaScript scripts
│ └── dapp-execute.js # Contract interaction script
│ └── deploy.js # Deploy contract script
├── docker-compose.yml # Docker services configuration
├── Dockerfile # Development environment setup
├── hardhat.config.js # Hardhat configuration
├── venn.config.json # Venn Network configuration
├── venn-dapp.sh # CLI interface script
├── venn-register.sh # Contract registration script
└── deploy.sh # Contract deployment script
The SimpleStorage contract provides the following functionality:
setValue(key, value): Store a value with a key (firewall protected)getValue(key): Retrieve a value by keyremoveValue(key): Remove a value (owner only, firewall protected)hasKey(key): Check if a key exists
- Clone the repository:
git clone <repository-url>
cd venn-galxe-firewall- Build project
docker compose build- Copy the environment file and configure it:
cp .env.example .env- Edit
.envwith your configuration:
HOLESKY_RPC_URL=your_holesky_rpc_url
PRIVATE_KEY=your_private_key
VENN_NODE_URL=https://signer2.testnet.venn.build/api/17000/sign
- To execute any commands:
docker compose run --rm venn-dev <command>./venn-deploy.sh./venn-register.sh <contract_address>./venn-dapp.sh <policy_address>Available commands:
set <key> <value>- Set a valueget <key>- Get a valueremove <key>- Remove a valuehas <key>- Check if key existsexit- Exit the script