From 43787f464c6d912b3831f429f1beae21bc1e32d3 Mon Sep 17 00:00:00 2001 From: sandeep reddy <46469596+Sandeepreddyr12@users.noreply.github.com> Date: Fri, 8 Dec 2023 06:24:39 +0530 Subject: [PATCH] Update usecontractread.mdx (#1111) * 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> * Update docs/react/hooks/core/usecontractread.mdx Co-authored-by: Joaquim Verges Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com> --------- Signed-off-by: sandeep reddy <46469596+Sandeepreddyr12@users.noreply.github.com> Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com> Co-authored-by: samina <57885104+saminacodes@users.noreply.github.com> Co-authored-by: Joaquim Verges --- 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..0cb40123c 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 include the sender's address (msg.sender) when calling view functions within your smart contract, include the property {from: 0X123} passing the relevant address. + ```jsx import { useContractRead, useContract, Web3Button } from "@thirdweb-dev/react";