I don't think we should do a parseEther in useScaffoldContractWrite for the value #516
Closed
austintgriffith
started this conversation in
General
Replies: 3 comments
-
Maybe we can allow string or BigNumber for value there... |
Beta Was this translation helpful? Give feedback.
0 replies
-
Initially, we opted for parsing ETH internally since we thought it'd improve DX. But in terms of having a good mental model, maybe it's better for newcomers to understand that a value will always need to be expressed in wei. So passing bigints could be a good option. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fixed on #548 |
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 don't think we should do parseEther here https://github.com/scaffold-eth/scaffold-eth-2/blob/main/packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts#L44C20-L44C30
I think people should pass in bigints or whatever is coming back from useScaffoldContractRead for uint256s
Beta Was this translation helpful? Give feedback.
All reactions