Skip to content

Commit 8822410

Browse files
Update usecontractread.mdx
thirdweb-dev#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>
1 parent 9dbc287 commit 8822410

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/react/hooks/core/usecontractread.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ function App() {
119119

120120
If you provide an additional argument to the hook, it will be used as the `CallOverrides` object send with your request.
121121

122+
123+
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.
124+
122125
```jsx
123126
import { useContractRead, useContract, Web3Button } from "@thirdweb-dev/react";
124127

0 commit comments

Comments
 (0)