datahaven/test/cli/handlers/contracts
undercover-cactus 6d323385d8
refactor: rename rewardsInitiator to snowbridgeInitiator (#476)
## 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)
2026-03-24 12:41:36 +01:00
..
.env.example Fix: command cli deploy contracts (#319) 2025-11-27 15:06:04 +01:00
beefy-checkpoint.ts feat: Add DH-AVS stagenet/testnet Hoodi deployment support (#422) 2026-02-02 16:41:15 +01:00
checks.ts feat: contracts upgrade command (#463) 2026-03-02 21:50:10 +01:00
deploy.ts feat: contracts upgrade command (#463) 2026-03-02 21:50:10 +01:00
index.ts feat: contracts upgrade command (#463) 2026-03-02 21:50:10 +01:00
README.md misc: remove slasher middleware solidity contracts (#366) 2025-12-29 14:55:21 +01:00
rewards-origin.ts fix: Register the snowbridge agent in the Dathaven Service instead of the operator node (#428) 2026-03-09 14:33:43 +01:00
status.ts refactor: rename rewardsInitiator to snowbridgeInitiator (#476) 2026-03-24 12:41:36 +01:00
update-metadata.ts feat(contracts): deploy stagenet-hoodi AVS contracts, fix verification and update-metadata CLI (#439) 2026-02-12 09:22:37 +01:00
upgrade.ts fix: contracts upgrade environment support and deploy fixes (#473) 2026-03-16 10:55:47 +01:00
verify.ts fix: contracts upgrade environment support and deploy fixes (#473) 2026-03-16 10:55:47 +01:00

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

  1. Account Setup: Create or import an account in Metamask (you'll need the private key)
  2. Funding: Get native tokens for deployment fees:
  3. API Key (optional): Generate API token from block explorer for contract verification:

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