-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Feat: Better complex struct inputs #702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Magic! 🪄 Noticed that I can't send array with 0 entries, there's at least one and I can't remove it. |
Ohh yeah, I completely forgot that you could pass in empty array fixed at df3fd3e, by default it shows 0th element (I think its nice UX to show it at default, but we could keep empty by default) but you can remove 0th element and empty array will passed
Yeah lol again forgot about read ! fixed at 1394397 also updated test contract Thanks Rinat 🙌 |
rin-st
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just GREAT!! Awesome job implementing it @technophile-04 🔥🔥
I like UI a lot! The only thing I felt that could be a bit confusing to some users was the visual representation for each tuple item (0, 1, 2..). Maybe we could add a bit more descriptive text like Item[0], or TupleItem[0] or something similar.
Yup, completely get it, updated at cc89cfe
Love this idea !!!! It kind of makes it visually easy to digest, we can think maybe changing the color a bit for an alternate zebra strip, not adding this changes in PR but should probably handle this in separate PR 🙌 Tysm Pablo for the great feedback !! |
|
Tysm all for testing !! Just locked dasiyUI version at f9c4a0f since they seem to have broken Accordian in their latest version and when you deploy to prod we use their version and its broken there eg: The accordian arrow does not show up here https://se2-structs.vercel.app/ After locking daisyUI version here is prod version : https://se2strcut-prod.vercel.app/ TODO:
Merging this 🙌 |
* Add Optimism Sepolia config (#711) * Use arbitrumSepolia instead of Goerli (#716) * up rainbowkit version to 1.3.5 (#719) * removing lock file * use next-themes to handle theme and update usehooks-ts (#707) * Feat: Better complex struct inputs (#702) * improve debug struct UI (#726) * add basic example to show connected address (#721) --------- Co-authored-by: winnsterx <[email protected]> Co-authored-by: Shiv Bhonde | shivbhonde.eth <[email protected]> Co-authored-by: Carlos Sánchez <[email protected]>
* Add Optimism Sepolia config (scaffold-eth#711) * Use arbitrumSepolia instead of Goerli (scaffold-eth#716) * up rainbowkit version to 1.3.5 (scaffold-eth#719) * removing lock file * use next-themes to handle theme and update usehooks-ts (scaffold-eth#707) * Feat: Better complex struct inputs (scaffold-eth#702) * improve debug struct UI (scaffold-eth#726) * add basic example to show connected address (scaffold-eth#721) --------- Co-authored-by: winnsterx <[email protected]> Co-authored-by: Shiv Bhonde | shivbhonde.eth <[email protected]> Co-authored-by: Carlos Sánchez <[email protected]>



Description
Screen.Recording.2024-02-06.at.3.28.11.AM.mov
Tried handling better structs inputs and complex structs array, lol not the best optimized approach but in my testing seems to work nicely
For testing I have updated
YourContract.solwith a nested struct along with a multidimensional struct array but please feel free to play around / test different cases.You could also try putting Opensea contract in externalContract on mainnet to see how UI looks for testing.
Didn't go too much on visual UI part but maybe we could handle it more better just wanted to get functionality inplace.
Also note, this PR only handles structs array and not primitive types array maybe we could it another PR since it should be alot easier and didn't wanted to clutter this PR 🙌
OG Idea: https://twitter.com/_jxom/status/1748068858047668227