smartcontractkit / smartcontractkit/chainlink
[FEAT] allow memory bytes in upKeep registeration
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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