Replies: 1 comment
-
Yes, that'd be great if it could be like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am looking to create a wrapper around
readContracts
andreadContract
that accepts an extra parse parameter to take the data returned from the contract and create a more sophisticated type such as typeToken
orUniswapV2Pair
.What is the best way to go about this given the pretty sophisticated types used in
readContracts
?readContract
was somewhat straightforward and great to learn more about typescript types https://github.com/kyscott18/fReed/blob/master/src/readContract.ts but struggling withreadContracts
Ideally I could add a new property to
contracts
inReadContractsConfig
that takes the type returned by the contract read and returns a new typeTResponse
. The return type of the function would be an array ofTResponse
. Any hints on how to get this to work?Beta Was this translation helpful? Give feedback.
All reactions