smartcontractkit / chainlink

node of the decentralized oracle network, bridging on and off-chain computation
https://chain.link
Other
7.03k stars 1.72k forks source link

[FEAT] allow memory bytes in upKeep registeration #8127

Open noyyyy opened 1 year ago

noyyyy commented 1 year ago

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

rgottleber commented 1 year ago

Thanks for opening this request. We are taking a look.