-
Notifications
You must be signed in to change notification settings - Fork 0
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
Design tables #1
Comments
here is the first draft, |
Thanks @Prometheo, are you able to give me edit access? Either this GH account or my email lachlan@banyan.gg if possible |
Unfortunately no, the tool is a free version, doesn't allow collabs. what we could probably do is you make the change in the widget? |
so, do you think some of the config fields in the |
Ok no worries, here are some notes:
We do want to add some totals, similarly to how you have noted e.g. totals raised for an account, but have to think about how we will handle non-native tokens. An amalgamated total of all $NEAR and $NEKO isn't very useful, for instance. We might want to store as a JSON-stringified object of FT -> total for each token. Additionally, we need to think about USD totals. I heard that it's not possible to make fetch requests inside QueryAPI, which is kind of annoying, but just emailed the PM to verify that this is actually the case as it seems crazy. We would probably want to store an optional USD amount on each Donation and a |
Possibly, some might be better stored in a JSON string/blob but others we will probably want to keep at the top level so they can be queried on, e.g. timestamps Yes, a project (aka Account) can be in more than one pot |
Additional tables we will need:
|
Also will need |
Since donations entry exist for each donation, and the table has a amount_in_usd field, total raised for an account would just be a summation of all the amount_in_usd fields in all it's donations, something like |
i don't quite get the social data thing, plus it's going to be hard to index, since it's not coming with any of the interaction to potlock contracts, except we'll make request to social data api, which i think can be done like on demand pn the front end, since we would have thew user id.. |
also is there a reason why, events weren't really used in the contract? |
I think the second option is a better idea, the first would get very expensive and potentially slow it down a lot |
Ok, let's postpone this and discuss again after the MVP is out |
yeah unfortunately that was overlooked. there is a This isn't great but unfortunately we have to live with it for now and use method calls & results instead for activities that aren't covered by events. I'm sorry :( I understand this sucks quite a lot. We can definitely add more events to the contracts. But we will also have to handle the data up until that point by checking method calls. |
Man I'm really kicking myself about not adding more events. That was a stupid oversight. |
@Prometheo I did a second draft of the schema here: https://dbdiagram.io/d/Copy-of-Potlock-Schema-65f08e68b1f3d4062cbf9b09 Check it out and lmk if you have any thoughts. Indexes aren't included but we should add those. |
Hey @lachlanglen , so maybe i don't get it yet, but should list_applications not be tied to the list, instead of a user/registrant? |
Yes it was definitely missing
Is this what you're saying? Or perhaps I'm not understanding, in which case feel free to clarify further |
essentially, yes. But since the table now carries the |
I don't understand. Otherwise, how would we know the account that is registered for this An account can be related to a list in several different ways, as the owner, or an admin, or a registrant on the list. Maybe I'm missing something. |
This explains it, so it's possible that a list owner is not the registrant? |
Yes exactly, the list registrants are the accounts that are on the list.On Mar 15, 2024, at 5:23 PM, Prometheus ***@***.***> wrote:
An account can be related to a list in several different ways, as the owner, or an admin, or a registrant on the list.
This explains it, so it's possible that a list owner is not the registrant?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@Prometheo will also need |
How did i even miss that! 🤦 |
The text was updated successfully, but these errors were encountered: