mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Summary Renames the rewardsInitiator state variable, modifier, internal check function, setRewardsInitiator function, and RewardsInitiatorSet event in DataHavenServiceManager to their snowbridgeInitiator-prefixed equivalents, to better reflect the role of this address. ## Motivation The previous rewardsInitiator naming was misleading — the address filling this role is specifically the Snowbridge relayer/gateway. Renaming it end-to-end clarifies intent and aligns the codebase with the actual architecture. ## Changes * DataHavenServiceManager.sol: renamed state variable, modifier, internal check, setRewardsInitiator → -> setSnowbridgeInitiator, RewardsInitiatorSet -> SnowbridgeInitiatorSet * IDataHavenServiceManager.sol: updated event, function signature, and NatSpec * Deploy scripts & configs: updated field names across all environments (anvil, testnet, stagenet, mainnet) |
||
|---|---|---|
| .. | ||
| .env.example | ||
| beefy-checkpoint.ts | ||
| checks.ts | ||
| deploy.ts | ||
| index.ts | ||
| README.md | ||
| rewards-origin.ts | ||
| status.ts | ||
| update-metadata.ts | ||
| upgrade.ts | ||
| verify.ts | ||
DataHaven Contracts Deployment
Deploy DataHaven AVS contracts to supported chains (Hoodi, Mainnet).
What Gets Deployed
- DataHaven: ServiceManager, RewardsRegistry
- Snowbridge: BeefyClient, AgentExecutor, Gateway, RewardsAgent
- EigenLayer: References existing contracts (not deployed)
Prerequisites
- Account Setup: Create or import an account in Metamask (you'll need the private key)
- Funding: Get native tokens for deployment fees:
- Hoodi: Use PoW Faucet at https://hoodi-faucet.pk910.de/#/mine/cc7df92c-9629-4ad8-aaa4-53b1e1c294e8
- Mainnet: Purchase ETH
- API Key (optional): Generate API token from block explorer for contract verification:
- Hoodi: Etherscan-compatible endpoint
- Mainnet: https://etherscan.io/apis
Setup
cd test && cp cli/handlers/contracts/.env.example .env
Edit .env with your values:
# Required: Private key with deployment funds
DEPLOYER_PRIVATE_KEY=0x...
# Required: AVS owner private key (can be same as DEPLOYER_PRIVATE_KEY)
AVS_OWNER_PRIVATE_KEY=0x...
# Optional: For contract verification
ETHERSCAN_API_KEY=your_api_key_here
Deployment Commands
Deploy to Hoodi
bun cli contracts deploy --chain hoodi
Deploy to Mainnet
bun cli contracts deploy --chain mainnet
Custom RPC URL
bun cli contracts deploy --chain hoodi --rpc-url https://your-rpc-url.com
Check Deployment Status
bun cli contracts status --chain hoodi
Deployment Files
Successful deployments create:
../contracts/deployments/{chain}.json- Contract addresses../contracts/deployments/{chain}-rewards-info.json- Rewards configuration