[VAULT] EthBalMon migration into CLD#22361
Conversation
|
✅ No conflicts with other open PRs targeting |
gustavogama-cll
left a comment
There was a problem hiding this comment.
Approving but I must say I miss the tests for setKeeperRegistryAddress, setWatchList and withdraw changesets.
There was a problem hiding this comment.
Pull request overview
This PR migrates the EthBalanceMonitor (EthBalMon) tooling into the CLD vault changeset package, providing a full lifecycle of CLDF ChangeSetV2 changesets (deploy + accept-ownership flow, set keeper registry address, set watch list, withdraw, transfer ownership), each backed by sequences/operations and producing MCMS timelock proposals. It also replaces a legacy evmstate.LoadAddressesFromDataStore call with the in-tree state.GetAddressTypeVersionByQualifier.
Risk Rating: MEDIUM — this is a new feature surface area scoped to the deployment/vault/changeset package. The deploy flow has reasonable test coverage, but the four mutation changesets (set keeper registry, set watchlist, withdraw, transfer ownership) and their validators ship without tests, and there are several minor API/spelling/error-message issues to address.
Targeted Review Areas for Human Review:
ethbalmon_deploy.goApplypartial-failure semantics: contracts may be deployed on-chain before datastore add or proposal build fails, leaving orphan deployments without recovery.- The
[]big.Intwatch list types and the pointer-aliasing produced by&input.MinBalancesWei[i]inethbalmon_set_watchlist.go. - The non-deterministic
primaryChainselection from map iteration repeated in 5 changesets. - The intentionally retained "payeer" misspelling in
EthBalMonWithdrawChainConfig(BC for JSON tag) — confirm the Go-side rename is acceptable.
Changes:
- Add EthBalMon deploy + accept-ownership changeset and four mutation changesets (set keeper registry, set watch list, withdraw, transfer ownership) using the operations framework and producing MCMS timelock proposals.
- Add validators (
ValidateDeployEthBalMonConfig, etc.) and shared MCMS contract-type/timelock-config helpers; replace legacyevmstate.LoadAddressesFromDataStorewithstate.GetAddressTypeVersionByQualifier. - Add types for the new changeset inputs and a comprehensive test file covering the deploy changeset and accept-ownership proposal builder.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/vault/changeset/validation.go | Replaces legacy datastore loader; adds validators for the 5 new changesets and a shared validateEthAddress helper. |
| deployment/vault/changeset/types/types.go | Adds input types and chain-config structs for deploy/set-keeper/set-watchlist/withdraw/transfer-ownership flows. |
| deployment/vault/changeset/ethbalmon_deploy.go | New deploy changeset: deploys contract, transfers ownership to timelock, emits accept-ownership timelock proposal. |
| deployment/vault/changeset/ethbalmon_set_keeper_registry_address.go | New changeset to update EthBalMon keeper registry address via MCMS proposal. |
| deployment/vault/changeset/ethbalmon_set_watchlist.go | New changeset to set the EthBalMon watch list via MCMS proposal. |
| deployment/vault/changeset/ethbalmon_withdraw.go | New changeset to withdraw native tokens from EthBalMon via MCMS proposal. |
| deployment/vault/changeset/ethbalmon_transfer_ownership.go | New changeset to transfer EthBalMon ownership via MCMS proposal. |
| deployment/vault/changeset/ethbalmon_mcms.go | Shared helpers selecting MCMS contract type and timelock config based on configured action. |
| deployment/vault/changeset/ethbalmon_deploy_test.go | Tests for the deploy changeset, validation, runtime task wiring, and accept-ownership proposal builder. |
|




Ethereum Balance Monitor
This PR introduces a new set of changesets required to support running the Ethereum Balance Monitor in the CLD environment.
Added Changesets
deployDeploys a new Ethereum Balance Monitor contract.
set_watchlistUpdates the contract watchlist configuration.
set_keeper_registry_addressSets the Keeper Registry address used by the contract.
withdrawWithdraws funds from the contract.
transfer_ownershipTransfers contract ownership out of MCMS.
Requires
Supports