### Summary Removes the obsolete `operator/test` folder that was no longer being used and contained outdated test scripts. ### Changes - ✅ Deleted `operator/test/` directory and all contents - ✅ Moved `test_message_encoding.sh` script to `operator/scripts/` for proper organization - ✅ Updated comment reference in `contracts/test/MessageEncoding.t.sol` to point to new script location ### Impact - **No breaking changes** - All legitimate test files remain properly organized within their respective pallets - **Cleaner codebase** - Removes unused/obsolete code |
||
|---|---|---|
| .. | ||
| config | ||
| deployments | ||
| lib | ||
| resources | ||
| script | ||
| src | ||
| test | ||
| .gitignore | ||
| foundry.toml | ||
| README.md | ||
DataHaven AVS Smart Contracts 📜
This directory contains the smart contracts for the DataHaven Actively Validated Service (AVS) built on EigenLayer.
Overview
DataHaven is an AVS that provides secure and decentralised data storage services. The contracts in this repository implement the Service Manager, middleware, and associated utilities required for the DataHaven protocol.
Project Structure
src/: Smart contract source codeDataHavenServiceManager.sol: Main service manager contractinterfaces/: Contract interfaceslibraries/: Utility librariesmiddleware/: Middleware contracts (similar to EigenLayer's middleware contracts)
script/: Deployment scriptstest/: Test casesfoundry.toml: Foundry configuration
Prerequisites
Build
To build the contracts:
cd contracts
forge build
This will compile all contracts and generate artifacts in the out directory.
Test
Run the test suite with:
forge test
For more verbose output including logs:
forge test -vv
For maximum verbosity including stack traces:
forge test -vvvv
Run specific test suites:
forge test --match-contract RewardsRegistry --no-match-contract SnowbridgeIntegration
Run specific tests:
forge test --match-test test_getRewardstest_newRewardsMessage --no-match-test test_newRewardsMessage_OnlyRewardsAgent
Deployment
Local Deployment
- In a separate terminal, start a local Anvil instance:
anvil
- Deploy to local Anvil:
forge script script/deploy/DeployLocal.s.sol --rpc-url anvil --broadcast
Network Deployment
To deploy to a network configured in foundry.toml:
forge script script/deploy/DeployLocal.s.sol --rpc-url $NETWORK_RPC_URL --private-key $PRIVATE_KEY --broadcast
Replace $NETWORK_RPC_URL with the RPC endpoint and $PRIVATE_KEY with your deployer's private key.
Or using a network from foundry.toml:
forge script script/deploy/DeployLocal.s.sol --rpc-url mainnet --private-key $PRIVATE_KEY --broadcast
Configuration
The deployment configuration can be modified in:
script/deploy/Config.sol: Environment-specific configurationscript/deploy/DeployParams.s.sol: Deployment parameters