Add MT_FLOWRATE type family and MoneyEvent#2065
Add MT_FLOWRATE type family and MoneyEvent#2065divyaranjan1905 wants to merge 7 commits intosuperfluid-org:devfrom
MT_FLOWRATE type family and MoneyEvent#2065Conversation
did you run test yet? Just need to add an Abitrary instance to the flow rate. Also, I wouldn't use floating number for it, since it will introduce the testing technique of dealing with imprecise numbers |
Apologies, I hadn't. The |
Oh, which part are you referring to? |
It was from the CI report. Now it passes: https://github.com/superfluid-org/protocol-monorepo/actions/runs/14755380283/job/41422904441?pr=2065 |
|
I will close this one for now to do some refactoring first. Meanwhile, https://github.com/yolc-dev/yolc-semantic-money is being built to integrate semantic money with Yolc. |
This PR adds a FlowRate type family to
MonetaryTypes, which had been mentioned as a FIXME previously.Moreover, this PR also adds a new type of
MoneyEventthat is able to take a snapshot of change whenever a change occurs. There's also a new representation of an account withAccountState. This one might be unnecessary, but it's mostly for exemplification purposes.deltaEventsis the crucial function that provides the delta of twoAccountStateas aMoneyEventbut I've also added two other functions:validateTimelineandsettleSnapshotswhich would be useful later on as we do more operations withMoneyEvent.