Dedicated msg.sender
For security reasons, during task creation, you will see an address which will be the msg.sender
for your task executions.
If you are the owner of the target contract in question, it’s recommended to implement a msg.sender restriction within your smart contract. This involves whitelisting a dedicated msg.sender address. Such a measure ensures that only tasks you have created can call your function, significantly elevating the security posture of your operations. For a hands-on guide and to manage your dedicated msg.sender settings, please connect to the app and visit your own Settings page.
Remember that your dedicated msg.sender can vary across different blockchain networks. You can view the dedicated msg.sender for each network through the provided settings link.
msg.sender
restrictions should be added to the function that Gelato will call during execution, not the checker function. Learn more about it here: Writing Solidity Functions
You can have this restriction by inheriting AutomateReady.
AutomateReady
exposes a modifier onlyDedicatedMsgSender
which restricts msg.sender
to only task executions created by taskCreator
defined in the constructor.
If you would like to have additional callers for your function. You can implement a whitelist like so.