From 88224104b58c02ebbc62ee37e8d0dd105a0cb17f Mon Sep 17 00:00:00 2001 From: sandeep reddy <46469596+Sandeepreddyr12@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:12:20 +0530 Subject: [PATCH] Update usecontractread.mdx #864 This pull request aims to enhance the documentation by providing clarity on retrieving the sender's address using msg.sender in view functions within a smart contract. The proposed addition emphasizes the significance of including the specifier {from: 0X123} to access the relevant address information. Signed-off-by: sandeep reddy <46469596+Sandeepreddyr12@users.noreply.github.com> --- docs/react/hooks/core/usecontractread.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/react/hooks/core/usecontractread.mdx b/docs/react/hooks/core/usecontractread.mdx index a165d98ae..611f4cd73 100644 --- a/docs/react/hooks/core/usecontractread.mdx +++ b/docs/react/hooks/core/usecontractread.mdx @@ -119,6 +119,9 @@ function App() { If you provide an additional argument to the hook, it will be used as the `CallOverrides` object send with your request. + +To retrieve the sender's address using msg.sender in view functions within your smart contract, it is essential to include the property {from: 0X123} in order to access the relevant address information. + ```jsx import { useContractRead, useContract, Web3Button } from "@thirdweb-dev/react";