# How to had a hook before the transferFrom function ERC20

**URL:** <https://forum.openzeppelin.com/t/how-to-had-a-hook-before-the-transferfrom-function-erc20/40587>\
**Category:** Smart Contracts\
**Created:** [May 21, 2024, 1:09am UTC](https://forum.openzeppelin.com/t/how-to-had-a-hook-before-the-transferfrom-function-erc20/40587 "2024-05-21T01:09:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggballa](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@ggballa](https://forum.openzeppelin.com/u/ggballa)\
**Post date:** [May 21, 2024, 1:09am UTC](https://forum.openzeppelin.com/t/how-to-had-a-hook-before-the-transferfrom-function-erc20/40587/1 "2024-05-21T01:09:33Z")

</div>

Hello I was wondering if it was possible to add some sort of hook so that when tokens are being sold on uniswap a hook can be implemented before the transferFrom function is called ? So when uniswap goes to call the transferFrom function in the oppen zeplin erc20 template it first calls beforeTokenTransfer or something like that ?
