Skip to content

Commit

Permalink
Update usecontractread.mdx
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Sandeepreddyr12 authored Dec 4, 2023
1 parent 9dbc287 commit 8822410
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/react/hooks/core/usecontractread.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 8822410

Please sign in to comment.