Skip to content

[VAULT] EthBalMon migration into CLD#22361

Open
bitrider23 wants to merge 37 commits into
developfrom
feat/deploy_ethbalmon
Open

[VAULT] EthBalMon migration into CLD#22361
bitrider23 wants to merge 37 commits into
developfrom
feat/deploy_ethbalmon

Conversation

@bitrider23
Copy link
Copy Markdown

@bitrider23 bitrider23 commented May 8, 2026

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

  • deploy
    Deploys a new Ethereum Balance Monitor contract.
  • set_watchlist
    Updates the contract watchlist configuration.
  • set_keeper_registry_address
    Sets the Keeper Registry address used by the contract.
  • withdraw
    Withdraws funds from the contract.
  • transfer_ownership
    Transfers contract ownership out of MCMS.

Requires

Supports

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 8, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@bitrider23 bitrider23 changed the title Feat/deploy ethbalmon EthBalMon migration into CLD May 8, 2026
@bitrider23 bitrider23 changed the title EthBalMon migration into CLD [VAULT] EthBalMon migration into CLD May 8, 2026
Comment thread deployment/vault/changeset/ethbalmon_deploy.go Outdated
Comment thread deployment/vault/changeset/ethbalmon_deploy.go Outdated
Comment thread deployment/vault/changeset/ethbalmon_set_keeper_registry_address.go
Comment thread deployment/vault/changeset/ethbalmon_set_keeper_registry_address.go Outdated
Comment thread deployment/vault/changeset/ethbalmon_transfer_ownership.go
Copy link
Copy Markdown
Contributor

@gustavogama-cll gustavogama-cll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but I must say I miss the tests for setKeeperRegistryAddress, setWatchList and withdraw changesets.

Comment thread deployment/vault/changeset/validation.go Outdated
ChrisAmora
ChrisAmora previously approved these changes May 13, 2026
Comment thread deployment/vault/changeset/validation.go
Comment thread deployment/vault/changeset/validation.go
ChrisAmora
ChrisAmora previously approved these changes May 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.go Apply partial-failure semantics: contracts may be deployed on-chain before datastore add or proposal build fails, leaving orphan deployments without recovery.
  • The []big.Int watch list types and the pointer-aliasing produced by &input.MinBalancesWei[i] in ethbalmon_set_watchlist.go.
  • The non-deterministic primaryChain selection 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 legacy evmstate.LoadAddressesFromDataStore with state.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.

Comment thread deployment/vault/changeset/types/types.go Outdated
Comment thread deployment/vault/changeset/validation.go Outdated
Comment thread deployment/vault/changeset/types/types.go Outdated
Comment thread deployment/vault/changeset/types/types.go Outdated
Comment thread deployment/vault/changeset/ethbalmon_deploy.go Outdated
Comment thread deployment/vault/changeset/ethbalmon_withdraw.go Outdated
Comment thread deployment/vault/changeset/validation.go
Comment thread deployment/vault/changeset/ethbalmon_deploy_test.go
@cl-sonarqube-production
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants