CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
29 stars 43 forks source link

feat: backend for discussion #88

Closed Gift-Naomi closed 2 months ago

Gift-Naomi commented 4 months ago

@tensojka please take a look at what I've done so far. I haven't tested it yet though. I still need to implement the function that resolves starknet address to starknet.id and setup pinata to test it

tensojka commented 4 months ago

Whenever you want another review, re-request review from me please. Thanks

Gift-Naomi commented 4 months ago

@tensojka I've made some changes to the code based on your review. The only thing not working yet is the resolution of starknet.id from address so I commented out the logic for that in ipfs.ts. Please check through and let me know what improvements can be made.

Gift-Naomi commented 3 months ago

Have you tested it? Does Helia give the same hash as IPFS? Is it really async and does it throw an error if it fails?

@tensojka I have tested it out locally and can confirm that all functionalities are operating as expected. However, please note that Pinata requires a premium subscription for pinning by hash. As such, I was unable to fully verify this specific feature. The attached screenshot provides additional context on this matter. image

tensojka commented 3 months ago

You can't use pinning by hash – pinning by hash works by Pinata fetching the file according to the hash from IPFS, but we don't want to operate a IPFS node that would serve the file to Pinata. Therefore, you must send the file to Pinata and have them generate the hash. (And check that their hash is the same as the one sent to the client)

Gift-Naomi commented 3 months ago

You can't use pinning by hash – pinning by hash works by Pinata fetching the file according to the hash from IPFS, but we don't want to operate a IPFS node that would serve the file to Pinata. Therefore, you must send the file to Pinata and have them generate the hash. (And check that their hash is the same as the one sent to the client)

Oh okay. Got it!

Gift-Naomi commented 3 months ago

@tensojka I effected the changes you requested. The screenshot below shows that result I got from testing.

image

tensojka commented 3 months ago

I will get it working tomorrow 👌

tensojka commented 3 months ago

deployed at https://konoha.vote/discussion-api/api/submit