> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gelato.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Dedicated msg.sender

For security reasons, during task creation, you will see an address which will be the `msg.sender` for your task executions.

<img src="https://mintcdn.com/gelato-6540eeb1/8BeiyOhSgNF7mtMT/images/security_considerations.png?fit=max&auto=format&n=8BeiyOhSgNF7mtMT&q=85&s=aed3baabf94c612351bd41903c9198ed" alt="Web3 Security Considerations" width="1388" height="554" data-path="images/security_considerations.png" />

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.

<Note>
  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.
</Note>

<img src="https://mintcdn.com/gelato-6540eeb1/8BeiyOhSgNF7mtMT/images/web3_security_considerations.png?fit=max&auto=format&n=8BeiyOhSgNF7mtMT&q=85&s=b67af0688e713a12794edd3ea2403ca1" alt="Security Considerations" width="1218" height="598" data-path="images/web3_security_considerations.png" />

<Warning>
  `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](/web3-functions/how-to-guides/write-solidity-functions#1-understand-the-role-of-a-checker)
</Warning>

You can have this restriction by inheriting [AutomateReady](https://github.com/gelatodigital/automate/blob/master/contracts/integrations/AutomateReady.sol).

`AutomateReady` exposes a modifier `onlyDedicatedMsgSender` which restricts `msg.sender` to only task executions created by `taskCreator` defined in the constructor.

```solidity theme={null}
modifier onlyDedicatedMsgSender() {
    require(msg.sender == dedicatedMsgSender, "Only dedicated msg.sender");
    _;
}
```

If you would like to have additional callers for your function. You can implement a whitelist like so.

```solidity theme={null}
mapping(address => bool) public whitelisted;

modifier onlyWhitelisted() {
    require(
        whitelisted[msg.sender] || msg.sender == dedicatedMsgSender,
        "Only whitelisted"
    );
    _;
}
```
