Skip to content

[Do Not Merge - To be Merged Later] Migrate EthBalMon to CRE#22981

Open
bitrider23 wants to merge 3 commits into
developfrom
migrate_ethbalmon_CRE
Open

[Do Not Merge - To be Merged Later] Migrate EthBalMon to CRE#22981
bitrider23 wants to merge 3 commits into
developfrom
migrate_ethbalmon_CRE

Conversation

@bitrider23

@bitrider23 bitrider23 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Add AutomationReceiver deployment changesets and refactor EthBalMon deploy

Summary

This PR introduces new changesets for deploying and configuring AutomationReceiver — the CRE bridge contract that routes workflow reports to Chainlink Automation upkeeps. It also refactors the existing EthBalMon deploy changeset to be standalone, and adds a combined changeset that deploys and wires both contracts together.


Changes

New changesets

DeployAutomationReceiverChangeSet (automation_receiver_deploy.go)
Deploys AutomationReceiver with a given CRE forwarder address, calls setCallAllowed to authorize a target contract and function selector, and transfers ownership to the Timelock. Uses DeployAutomationReceiverSequence internally.

DeployEthBalMonWithReceiverChangeSet (ethbalmon_automation_receiver_deploy.go)
Combined changeset that deploys both contracts and fully wires them together in a single operation:

  1. Deploy AutomationReceiver with the CRE forwarder address
  2. Deploy EthBalanceMonitor with the AR address as keeper registry
  3. Call setCallAllowed on AR → EthBalMon.performUpkeep
  4. Transfer AR ownership to Timelock (OZ Ownable — single-step, immediate)
  5. Transfer EthBalMon ownership to Timelock (ConfirmedOwner — two-step)
  6. Build MCMS proposal for EthBalMon acceptOwnership

Uses DeployEthBalMonWithReceiverSequence internally.

SetCallAllowedChangeSet (automation_receiver_set_call_allowed.go)
Standalone changeset for calling setCallAllowed on an already-deployed AutomationReceiver. Useful for authorizing additional (target, selector) pairs post-deploy. Uses SetCallAllowedSequence internally.

New operations

Three new operations added to ethbalmon_deploy.go, shared across changesets:

  • DeployAutomationReceiverOperation — deploys the contract and confirms the tx
  • SetCallAllowedOperation — calls setCallAllowed(target, selector, allowed) on AR
  • TransferAutomationReceiverOwnershipOperation — transfers AR ownership via OZ Ownable.transferOwnership

Refactored changesets

DeployEthBalMonChangeSet — decoupled from AutomationReceiver. The ForwarderAddress field in DeployEthBalMonChainConfig has been renamed to KeeperRegistryAddress, reflecting that the caller provides whatever address should be authorized to call performUpkeep (which in the CRE flow is a previously deployed AR, but is not constrained to it).


Changeset overview

Changeset Use case
DeployEthBalMonChangeSet Deploy EthBalMon only, keeper registry address provided by caller
DeployAutomationReceiverChangeSet Deploy AR only, with setCallAllowed + ownership transfer
DeployEthBalMonWithReceiverChangeSet Deploy both contracts fully wired, single operation
SetCallAllowedChangeSet Authorize additional (target, selector) pairs on an existing AR

Notes

  • All changesets follow the same structural pattern: Apply delegates to ExecuteSequence, which calls individual operations. This keeps the Apply layer thin and makes each step independently replayable.
  • AutomationReceiver uses OZ Ownable (single-step transfer), so no acceptOwnership MCMS proposal is needed for it — only for EthBalanceMonitor which uses Chainlink's ConfirmedOwner.

Dependency note

The AutomationReceiver contract is currently under audit and has not been merged to main in chainlink-evm yet. For that reason, deployment/go.mod imports the chainlink-evm/gethwrappers module pinned to the feature branch where the contract and its generated Go binding live:
github.com/smartcontractkit/chainlink-evm/gethwrappers => github.com/smartcontractkit/chainlink-evm/gethwrappers <branch-commit-hash>

This PR is not intended to be merged until the audit is complete and the AutomationReceiver contract + gethwrapper are merged to main in chainlink-evm. At that point, the go.mod pin will be updated to the released version and this PR can be merged normally.

…perRegistryAddress; bump OpenTelemetry dependencies to v1.44.0; adjust related tests and validation logic accordingly.
…and adding SetCallAllowed operation. Introduce AutomationReceiver configuration types for improved deployment management.
…rwarderAddress with KeeperRegistryAddress in deployment configurations. Update validation logic and tests to reflect this change, ensuring proper handling of keeper registry addresses across the codebase.
@bitrider23 bitrider23 changed the title Migrate ethbalmon cre [Do Not Merge - To be Merged Later] Migrate EthBalMon to CRE Jun 29, 2026
@bitrider23 bitrider23 marked this pull request as ready for review June 29, 2026 19:10
@bitrider23 bitrider23 requested review from a team as code owners June 29, 2026 19:10

@graham-chainlink graham-chainlink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving on behalf of CLD team due to the changes in go.mod and go.sum, however someone from vault will need to review those code changes.

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.

2 participants