datahaven/contracts/deployments
Steve Degosserie eaeb06dbbb
feat(contracts): deploy stagenet-hoodi AVS contracts, fix verification and update-metadata CLI (#439)
## Summary
- Add stagenet-hoodi deployment artifacts (contract addresses, rewards
info) and update Snowbridge config with latest validator set
- Fix the `bun cli contracts verify` command to correctly verify all
deployed contracts, including proxy contracts and Snowbridge
dependencies
- Fix the `bun cli contracts update-metadata` command to use the correct
config file when `--environment` is specified

## Contract verification fixes
The verification CLI hardcoded all contract source paths as
`src/<Name>.sol`, which failed for:
- **Snowbridge contracts** (Gateway, BeefyClient, AgentExecutor) — these
live in `lib/snowbridge/contracts/src/`
- **Gateway proxy** — the `Gateway` deployment address is actually a
`GatewayProxy`, not the Gateway implementation. The implementation
address needs to be resolved from the ERC1967 storage slot
- **ServiceManager proxy** — was not being verified at all

Changes:
- Added `contractPath` field to `ContractToVerify` so each contract
specifies its source location relative to the contracts directory
- Added `guessConstructorArgs` option for proxy contracts with complex
encoded init data (uses forge's `--guess-constructor-args`)
- Gateway is now verified as two separate contracts: Gateway
Implementation (address resolved from ERC1967 proxy slot) and
GatewayProxy
- ServiceManager proxy is now verified as `TransparentUpgradeableProxy`

## Update-metadata fix
The `update-metadata` command was ignoring the `--environment` flag when
selecting the deployments file:
1. The handler received a pre-built networkId (`"stagenet-hoodi"`) as
the chain parameter, which `getChainDeploymentParams` couldn't resolve
(falling back to anvil). Now chain and environment are passed
separately.
2. Commander.js routed `--environment` to the parent contracts command,
leaving `options.environment` undefined on the subcommand. Added the
same parent-fallback logic already used for `--chain`.

## Test plan
- [x] `bun typecheck` passes
- [x] Ran `bun cli contracts verify --chain hoodi --environment
stagenet` — all contracts verified successfully on Etherscan
- [x] `bun cli contracts update-metadata --chain hoodi --environment
stagenet` now reads the correct `stagenet-hoodi.json` deployments file

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 09:22:37 +01:00
..
anvil-rewards-info.json refactor: cleanup old rewards model (#383) 2026-01-09 15:25:49 +01:00
anvil.json refactor: Remove eigenlayer-middleware and flatten ServiceManagerBase (#389) 2026-01-13 15:03:10 +01:00
datahaven-logo.jpg feat: support updating the AVS dashboard metadata (#136) 2025-09-02 15:54:47 +02:00
datahaven-logo.png feat: support updating the AVS dashboard metadata (#136) 2025-09-02 15:54:47 +02:00
hoodi.json feat: Datahaven contracts deployment on public testnet (#123) 2025-08-21 10:02:31 +00:00
metadata.json refactor(contracts): Harden DataHavenServiceManager with input validation and code cleanup (#395) 2026-01-20 10:32:32 +00:00
stagenet-hoodi-rewards-info.json feat(contracts): deploy stagenet-hoodi AVS contracts, fix verification and update-metadata CLI (#439) 2026-02-12 09:22:37 +01:00
stagenet-hoodi.json feat(contracts): deploy stagenet-hoodi AVS contracts, fix verification and update-metadata CLI (#439) 2026-02-12 09:22:37 +01:00
state-diff.checksum refactor(rewards): Optimize reward calculation (#408) 2026-01-22 18:40:12 -03:00
state-diff.json refactor(rewards): Optimize reward calculation (#408) 2026-01-22 18:40:12 -03:00