-
Notifications
You must be signed in to change notification settings - Fork 84
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
Multi VRGDA via Libraries & Structs #13
Conversation
really appreciate the PR! agree there needs to be some changes on the devex of hooking up to multiple VRGDAs. i'm not sure a stateful solution like this is the way to go about it tho, i was more thinking of just abstracting things out into a lib (effectively like how we did it in Monaco) |
i see -- will stare at the code a bit more and play around to see how multiple VRGDAs could interact with a lib |
Libraried VRGDA + Support Multi VRGDA
Lib + Struct = OOP
* ✨ LogisticToLinearVRGDA * 📝 Typo * merge in master, remove base files as originally intended * example implementation of a composite VRGDA * conversion of logisticToLinear NFT to use library * contract based logisticToLinear replaced with composite VRGDA in examples * convert mock contract to use library; add fixes to log2lin lib * add 1 wad for log2lin to follow the logistic behavior * snapshot Co-authored-by: t11s <greenfeatherhelp@gmail.com>
Letting this marinate a bit, my fork feels a little too opinionated. Gonna close the PR and will likely just maintain a repo for multi VRGDAs |
Closes #12
Creation & usage of multiple VRGDAs occur via structs and libraries.
This offers wonderful ergonomics because the structs and libraries hide all of parameters & math that power the VRGDAs:
Yep! We can have two independent VRGDAs, that rely on different function families, all in the same contract 🤓
MultiNFT.sol
)Tangentially relevant gif