Skip to content

Add AutomationReceiver to compilation scripts and generated wrappers#489

Draft
bitrider23 wants to merge 11 commits into
developfrom
add-cre-automation-contracts
Draft

Add AutomationReceiver to compilation scripts and generated wrappers#489
bitrider23 wants to merge 11 commits into
developfrom
add-cre-automation-contracts

Conversation

@bitrider23

@bitrider23 bitrider23 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This changes where made in order to deploy AutomationReceiver contract on CLD.

Summary

  • Add AutomationReceiver.sol and its base contract ReceiverTemplate.sol to contracts/src/v0.8/automation/ — a generic bridge that executes Automation-style upkeeps delivered by a CRE workflow
  • Add IReceiver.sol interface defining the onReport callback
  • Register AutomationReceiver in the compilation script (native_solc_compile_all_automation) using the automation-compile-23 profile (solc 0.8.19)
  • Add go:generate directive in gethwrappers/go_generate_automation.go and commit the generated Go binding at gethwrappers/generated/automation_receiver/automation_receiver.go

Contract design

AutomationReceiver has two independent authorization layers:

  1. Inbound (inherited from ReceiverTemplate) — validates the CRE Forwarder address plus optional workflowId / workflowName / workflowOwner checks
  2. Outbound — a closed-by-default allowlist of (target, selector) pairs that the owner must explicitly enable before the contract can execute any call

Additional fixes

go-ethereum version alignment (gethwrappers/go.mod)

gethwrappers/go.mod had go-ethereum v1.17.0 while the root go.mod already had v1.17.3. The CI builds abigen from scratch on a clean runner and the version mismatch caused it to skip the build entirely, resulting in:
Error: go-ethereum version (v1.17.0) does not match root package go-ethereum version (v1.17.3)
no such file or directory: tools/bin/abigen
Fixed by aligning gethwrappers/go.mod to v1.17.3.

CVE fix — go.opentelemetry.io/otel

Upgrading go-ethereum pulled in go.opentelemetry.io/otel v1.40.0, which was flagged as high severity (remote DoS via multi-value baggage header parsing). Bumped to v1.44.0 to resolve it.

GETH_VERSION in wrapper dependency files

All generated-wrapper-dependency-versions-do-not-edit.txt files across the repo still tracked GETH_VERSION: 1.17.0. After rebuilding abigen with v1.17.3, the CI regenerated all wrappers and detected the mismatch via git diff, causing the Check if GO solidity wrappers are updated check to fail. Updated all files to reflect GETH_VERSION: 1.17.3. This was a pre-existing inconsistency in the repo exposed by this PR running on a clean CI runner without cached artifacts.

- Updated the native_solc_compile_all_automation script to include AutomationReceiver.
- Modified go_generate_automation.go to generate wrapper for AutomationReceiver.
- Updated generated-wrapper-dependency-versions-do-not-edit.txt to include AutomationReceiver dependencies.
- Added a comment to disable the solhint rule for low-level calls in AutomationReceiver.sol to clarify intent and improve code safety.
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

✅ API Diff Results - github.com/smartcontractkit/chainlink-evm/gethwrappers

✅ Compatible Changes (1)

package github (1)
  • com/smartcontractkit/chainlink-evm/gethwrappers/generated/automation_receiver — ➕ Added

📄 View full apidiff report

- Bump go-ethereum from v1.17.0 to v1.17.3
- Update go-eth-kzg from v1.4.0 to v1.5.0
- Upgrade opentelemetry packages from v1.39.0 to v1.40.0
- Adjust blst version to v0.3.16
@bitrider23 bitrider23 requested review from a team as code owners June 25, 2026 18:04
…d ReceiverTemplate for improved readability

- Updated constructor and function signatures to use multi-line formatting for better clarity.
- No functional changes were made, only formatting adjustments to enhance code maintainability.
- Bump go-ethereum from v1.17.0 to v1.17.3
- Update go-eth-kzg from v1.4.0 to v1.5.0
- Upgrade opentelemetry packages from v1.39.0 to v1.40.0
- Adjust blst version to v0.3.16
- Bump Go version from 1.24.5 to 1.25.0
- Upgrade go-ethereum from v1.17.0 to v1.17.3
- Update go-eth-kzg from v1.4.0 to v1.5.0
- Upgrade c-kzg-4844 from v2.1.5 to v2.1.6
- Upgrade opentelemetry packages from v1.39.0 to v1.44.0
- Update golang.org/x/sync from v0.18.0 to v0.19.0
- Update golang.org/x/tools from v0.38.0 to v0.40.0
- Adjust blst version to v0.3.16
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings

View full report

@bitrider23 bitrider23 requested review from a team as code owners June 25, 2026 19:10
@bitrider23 bitrider23 marked this pull request as draft June 25, 2026 20:23
…lidity 0.8.24

- Updated Solidity version in AutomationReceiver and ReceiverTemplate to 0.8.24.
- Refactored AutomationReceiver to implement ITypeAndVersion interface.
- Added new compilation profile for automation-compile-24 in foundry.toml.
- Updated compilation script to reference automation-compile-24 for AutomationReceiver.
- Adjusted generated wrapper dependency versions for AutomationReceiver.
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.

1 participant