Greg
@greg
Playing around with an idea for a React library that makes building frontends for smart contracts a lot easier, inspired by Radix Primitives (https://www.radix-ui.com/) Not sure if it's even feasible (sooo many potential use cases to think through) but at least an interesting challenge https://i.imgur.com/5mXdRph.png
12 replies
0 recast
0 reaction
Boris
@boris-backedby
Very cool idea! I think Contract.Input and Contract.Button need to be wrapped in Contract.Function which would validate the number and types of inputs as you’re working. Packaging the wagmi usePrepareContractWrite>useContractWrite>useWaitForTransaction stack into Contract.Function would be so much easier for new de
2 replies
0 recast
0 reaction
Greg
@greg
Good call on the extra Contract.Function wrapper, I think you're right I will need something like that. Abstracting the usePrepareContractWrite/useContractWrite/useWaitForTransaction and other stuff (wallet connect, wrong chain, disabling inputs, nice counters for number inputs, etc) is exactly the idea :)
0 reply
0 recast
0 reaction