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
Description For the Automation registeration function
registerUpkeep
, passbytes memory checkData
rather thanbytes 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