question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Description

Original written down in #36:

This is what I’m thinking of: image

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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
swellandercommented, Dec 2, 2021

Hey @Dhaiwat10, can I be assigned to this one? Working on a rough draft now. Thanks!

1reaction
swellandercommented, Dec 11, 2021

@Dhaiwat10 got it. Thanks for the reply!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found