`useContract`
See original GitHub issueDescription
Original written down in #36:
This is what I’m thinking of:
The hook will accept a contract’s address and its ABI. It will then parse that ABI and return all the available methods with type definitions. I think this is quite ambitious but is doable and has been done before.
For the sake of simplicity, I suggest starting off with two basic methods that the hook will return for all contracts: readContract
and writeContract
. These methods won’t contain type defs for now but will let you interact with the contract directly.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
useContract - wagmi
Hook for declaratively creating a type-safe Contract instance. ... If needing to invoke a read or write method from a contract, it is...
Read more >useContract() function | thirdweb developer portal
useContract () function. Use this resolve a contract address to a smart contract instance. Example. const { contract, isLoading, error } ...
Read more >useContract returning Contract, useContractRead ... - GitHub
I am having trouble figuring out what is wrong with my useContractRead hook as I mimicked the setup in my useContract hook that...
Read more >Use Contract Definition | Law Insider
Define Use Contract. - means a lease, management contract or other similar contract between the Public Entity and any other entity that involves...
Read more >Web3-UI Working Note #02: Write to Contract using ...
Web3-UI provide a React hook useContract to wrap these functionality. Let's give it a try. Components and Hooks we used in Note #01...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @Dhaiwat10, can I be assigned to this one? Working on a rough draft now. Thanks!
@Dhaiwat10 got it. Thanks for the reply!