From 634710d7950728c6b696fa5b4522ac02a74a8617 Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Sat, 5 Nov 2022 14:13:49 -0400 Subject: [PATCH] Remove outdated note about hooks from documentation (#3789) Co-authored-by: Francisco Co-authored-by: Hadrien Croubois --- docs/modules/ROOT/pages/extending-contracts.adoc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/modules/ROOT/pages/extending-contracts.adoc b/docs/modules/ROOT/pages/extending-contracts.adoc index 022dfc95751..6ae68a858f9 100644 --- a/docs/modules/ROOT/pages/extending-contracts.adoc +++ b/docs/modules/ROOT/pages/extending-contracts.adoc @@ -103,13 +103,6 @@ contract ERC20WithSafeTransfer is ERC20 { Using hooks this way leads to cleaner and safer code, without having to rely on a deep understanding of the parent's internals. -[NOTE] -==== -Hooks are a new feature of OpenZeppelin Contracts v3.0.0, and we're eager to learn how you plan to use them! - -So far, the only available hook is `_beforeTransferHook`, in all of xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`ERC20`], xref:api:token/ERC721.adoc#ERC721-_beforeTokenTransfer-address-address-uint256-[`ERC721`], xref:api:token/ERC777.adoc#ERC777-_beforeTokenTransfer-address-address-address-uint256-[`ERC777`] and xref:api:token/ERC1155.adoc#ERC1155-_beforeTokenTransfer-address-address-address-uint256---uint256---bytes-[`ERC1155`]. If you have ideas for new hooks, let us know! -==== - === Rules of Hooks There's a few guidelines you should follow when writing code that uses hooks in order to prevent issues. They are very simple, but do make sure you follow them: