smartcontractkit / smartcontractkit/chainlink

[FEAT] allow memory bytes in upKeep registeration

Open
#8,127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
8.2k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
202

Description

Description
For the Automation registeration function registerUpkeep, pass bytes memory checkData rather than bytes calldata checkData

Motivation

There is a factory contract to create contracts which need keepUp. When contract is created, it's better to register keepUp in the same txs. For integrating with the current keeper registrar, I have to pass a useless 0x calldata bytes as encryptedEmail and can't set checkData according to the logic of the factory contract.

Justification
Marking bytes as calldata is a good way to save gas. However, it prevent deeper contract call as the txs sender have to pass the data at first.

For backward compatibility, create a new function to accept memory bytes rather than change the current function

Additional Information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Automation registrar's registerUpkeep entry point and the current registrar interface. Confirm how the existing calldata-based function is used, then determine the backward-compatible addition needed to accept bytes memory for factory-created contracts; done means callers can register with memory checkData without breaking the existing function.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.