gitcoinco / web

Grow Open Source
https://gitcoin.co
Other
1.78k stars 771 forks source link

Expose Grant information via API endpoints for Rotki and other api consumers #6493

Closed LefterisJP closed 4 years ago

LefterisJP commented 4 years ago

User Story

We at Rotki plan to create a premium component that would allow grantees to manage their grant earnings as income and take it into account in their income and Profit/loss report. The issue in our repo is here: https://github.com/rotki/rotki/issues/692

We planned to take all data from the chain but after discussion with @owocki if Gitcoin already has the data and can expose it via an endpoint our task will be easier. And this is probably something other Gitcoin users or applications who want to integrate with Gitcoin may appreciate.

We may still add on-chain verification for people who have their own node connected, but that's not relevant to this issue.

Note: We could probably do the same for grant donors, and count donations as expenses which depending on jurisdiction may also be tax-deductible.

Required data

As a Grantee

Given any ethereum address, return the following if it's a grant receiver:

The above should also contain the CLR matching payouts.

With all the above Rotki should have a complete picture of what the user's grant got and when. If possible the endpoint should be filtered by timestamp. Two arguments from_timestamp and to_timestamp. Default from would be 0 and default to would be current time. Time should be UTC.

As a Grant donor

We can do the same for grant donors.

Given an address ask for all my gitcoin contributions. This would returns a list with each entry containing:

Jack-Works commented 4 years ago

https://github.com/gitcoinco/web/issues/6493#issuecomment-631218558

This problem is not resolved yet. The API is not opened for CORS so it won't be accessible on other web-based services.

owocki commented 4 years ago

(note: the API was just deployed)

recommend creating a seperate issue for the CORS thing. it was not part of the original scope

sebastiantf commented 4 years ago

@owocki Would you mind paying out for this bounty? This has been completed: #6633 #6830

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.5 ETH (111.83 USD @ $223.65/ETH) attached to this issue has been approved & issued to @sebastiantf.