Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update usecontractread.mdx (#1111)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update docs/react/hooks/core/usecontractread.mdx

Co-authored-by: Joaquim Verges <[email protected]>
Signed-off-by: samina <[email protected]>

---------

Signed-off-by: sandeep reddy <[email protected]>
Signed-off-by: samina <[email protected]>
Co-authored-by: samina <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
  • Loading branch information
3 people authored Dec 8, 2023
1 parent d8d4788 commit 43787f4
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 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";

Expand Down

1 comment on commit 43787f4

@vercel
Copy link

@vercel vercel bot commented on 43787f4 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.