giveth / devouch-be Goto Github PK
View Code? Open in Web Editor NEWDeVouch - Decentralized Vouching via Attestations
License: GNU General Public License v3.0
DeVouch - Decentralized Vouching via Attestations
License: GNU General Public License v3.0
When querying for user's attestations we should be able to filter the response to only look for attestations they made to projects listed on a specific source platform.
Each attestation made by the given user address, filtered by source platform, we need to meet these requirements/information:
When fetching attestations done by a user address we should be able to sort the responses according to the date the attestation was created in both ascending and descending order.
attestation data contains:
There will be a keyword search function available, we should be able to take in a keyword search in our query and return a sorted list of results that are closes to the keyword match.
This should also be able to handle any filters that have been applied in the query as well such as attester group or source platform
each project returned in the response has the following data:
From the query response of all projects for the list view - we will need to be able to know the count from each registered/tracked attester groups that have FLAGGED a project and show the count in order from group that has made the MOST flags down the group that has made the lowest (descending order)
endpoint: https://backend.devouch.xyz/graphql
It will be used on this card component to give you a visual example:
in the query response should fulfill the following requirements:
We will need to be able to sort the response given by the list of all projects should be the total count of vouches made by all tracked attester groups in ascending/descending order.
If a filter is applied to look for only certain attester groups this should be reflected as well.
If a filter is applied to look for only projects from a certain platform this should be reflected.
vouches received
vouches received
vouches received
So the order of responses should be given in descending order as projects B, A, C
Alternatively, the user will be able to sort by ASCENDING order - so we should be able to handle this as well.
response also contains information about each project listed:
When fetching attestations related to a single project we should be able to sort the responses according to the date the attestation was created in both ascending and descending order.
attestation data contains:
We will need to provide a unified list of projects to the front-end. Projects will come from three different sources but more could be added in the future.
The three sources in order of importance for MVP are:
We'll need to provide the following information for each project:
If an address is provided (user is connected to website) we will need to know for each project if the user has previously vouched/flagged a project in the list, which should be queried from #7
Including this we will also need information from #7 to know in the unified list of projects some certain information about each project.
From each project we will need to get the list of pre-defined attester groups in #9 and query for each project for each attestor group:
The unified list should be able to be FILTERED to show only projects that have been vouched for by a single attestor group, either pre-defined from #9 or a custom user-defined attestor group (by schemaID & issuing authority address). This list can be SORTED by ascending or descending order based on the count of vouches OR flags it has received from the given attestor group. By default the unified list is SORTED by highest -> lowest count of vouches made by all tracked attestor groups
Lastly, the unified list should be able to be filtered additionally with a keyword search of title provided by the user.
We'll need to determine how often we fetch the project information from API
I believe we should do this at least once a day - this will be a devOps issue in the configuration
@aminlatifi could you provide more details on this? Once we setup the back-end logic for retrieving project information there needs to be some sort of cronJob that call its periodically and updates our DB?
We'll need the following information about a specific project from a platform
querying this endpoint ____ for we should get the result:
We should be able to query the backend service and know for a single given project how many vouches and flags have been given to this project from all of the tracked attestor groups
https://backend.devouch.xyz/graphql
when querying the response should be able to give us
response contains
An API will be needed to fetch information regarding a specific address. It will need to provide the following:
The should be able to FILTER this data by:
they should be able to SORT the list with or without filter by ascending/descending of date attestation was made
Filter the response to ONLY show Vouches made by address
OR
Filter the response to ONLY show Flags made by address
https://backend.devouch.xyz/graphql
we should be able to query the endpoint above, for a specific user address, filtered by only vouches or flags, the response should be able to include:
For Vouches
For Flags
We will need to be able to know the count of flags and vouches made to a specific project from each tracked attester group when querying the list of all projects.
https://backend.devouch.xyz/graphql
for visual reference this is where it gets used:
the following information should be included in the response:
The CI/CD solution must be able to deploy a subsquid project automatically and set configurations (e.g. RPC node) in .env file
We will need an endpoint to fetch the details of a single project including:
If an address is provided (user is connected to website) we will need to know if the user has previously vouched/flagged the project previously, which should be queried from #7
Including this we will also need information from #7 to know certain information about each project.
From the list of pre-defined attester groups in #9 and query for the given project for the pre-defined attestor groups combined AND by individual attestor group:
We will need to filter attestation details by the following:
The filters as well as the default responses should be able to be sorted by date, ascending/descending
We will need to be able to sort the response given by the list of all projects should be the total count of FLAGS made by all tracked attester groups in ascending/descending order.
If a filter is applied to look for only certain attester groups this should be reflected as well.
If a filter is applied to look for only projects from a certain platform this should be reflected.
flags received
flags received
flags received
So the order of responses should be given in descending order as projects B, A, C
Following up on the DeVouch call April 30 we should ensure that we cover the following case:
1.User makes attestation to project as attestor group A
2. next day or 1 month later they make an attestation to the same project as attestor group B
We should:
@aminlatifi - just to make sure we cover these cases as a result of our discussions.
https://grants-stack-indexer-v2.gitcoin.co/graphiql
We'll need to provide the following information for each project:
From unified API endpoint _____ we can fetch the following details from a single Gitcoin grant project:
From the project details endpoint ______ we can fetch the following details from a single Gitcoin grant project:
https://mainnet.serve.giveth.io/graphql
We'll need to provide the following information for each project:
From unified API endpoint _____ we can fetch the following details from a single Giveth project:
From the project details endpoint ______ we can fetch the following details from a single single Giveth project:
We should be able to query the backend service and know for a single given project how many vouches and flags have been given to this project from ONE specific attester group
https://backend.devouch.xyz/graphql
the response should be able to give us
From the query response of all projects for the list view - we will need to be able to know the count from each registered/tracked attester groups that have VOUCHED a project and show the count in order from group that has made the MOST flags down the group that has made the lowest (descending order)
It will be used on this card component to give you a visual example:
in the query response should fulfill the following requirements:
I've fixed the length, but to show the styled version, we need to convert it to the html on BE, I'll do it after the MVP.
Originally posted by @MohammadPCh in Giveth/DeVouch-FE#65 (comment)
In order to properly handle markdown formatted responses received in the project description we'll need to convert it to HTML in the back-end. This will allow us to show properly formatted project descriptions
When getting the unified list of projects we should be able to filter for only projects that are from a particular source such as Giveth, Gitcoin or RPGF.
The response should only show projects from the filtered platform, along with any other applicable filtering or sorting applied.
each project returned in the response has the following data:
When a user creates an attestation using our schema id #6 it should be indexed by the subsquid service. The related attestation data should be able to tell us the following information:
There should be a queryable endpoint and the following information can be retrieved for attestations made with our schema from #6
can be tested with this link https://backend.devouch.xyz/graphql
Here is the sample attestation that can be used:
https://sepolia.easscan.org/schema/view/0x97b0c9911936fad57e77857fac6eef6771f8d0bf025be9549214e32bf9e2415a
Here is the schema ID for Giveth Verification Team
https://sepolia.easscan.org/schema/view/0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404
You can find the attestation made with this schema ID to your address and use the UID in the reference field when making a test attestaion (using a giveth project on production)
We'll need to develop a subquid service to serve as the main back-end service, providing information to not only the DeVouch front-end but also external organizations who wish to integrate our attestations data layer.
Technical Design of this service has been started by @aminlatifi in https://www.notion.so/giveth/Project-Verification-Attestation-Support-Design-a991597acd0e4220b23131fa434e2339
These are groups of web3 users who belong to an organization or team that have some sort of notable reputation. In DeVouch we identify Attestor Groups by two parameters:
Index on-chain attestation events as they occur
Query project related information
Query user related information
When we fetch the details of a single project we should be able to filter the attestation data made to this specific project to only look for attestations made from a specific attester group.
querying for a single project with attestations from a specific attester group we should get the following information:
pre-defined attestor groups will be arbitrarily added by DeVouch at launch and expanded as more external teams wish to integrate with DeVouch.
An attestor group is defined by 3 fields:
These attestor groups are used by #8 and other services to pass to the FE, showing vouches/flag details and counts.
This list should be structured in a way that external teams can make PRs requesting to update or add new attestor groups.
The attestation service runs on the Sepolia network. Our indexer (Subsquid) needs an archive node of Sepolia chain (11155111) for staging env.
We can use personal alchemy nodes for development purpose, but it's safer to have a separate one on the server.
This schema will need to contain fields for the following information
Can successfully create on-chain attestation using generated schema on EAS website with the following fields:
link to schema:
https://sepolia.easscan.org/schema/view/0x97b0c9911936fad57e77857fac6eef6771f8d0bf025be9549214e32bf9e2415a
Filtering to show ONLY VOUCHES or ONLY FLAGS to a specific project from all tracked attestor groups
When we query for a specific project defined by source + id using the graphql API AND filter to look for a specific attester organization we get the following information related to attestations made to it
When fetching attestations done by a user address we should be able to sort the responses according to the alphabetical order by project title in both ascending and descending order.
attestation data contains:
The default sorting given by the unified API response of the projects should be projects that have the highest count of attestations (vouch AND Flags together) from all tracked attester groups.
If a filter has been applied to look only for a certain attester group then the default sorting should filter by this as well. Similarly if we filter for a specific platform.
We should be able to know from a list of projects if a given address has attested for it before and how many times from different attestor groups for the same address to the given project.
This will be for the list view of projects so users can know at a glance which projects they have attested for.
querying https://backend.devouch.xyz/graphql endpoint for unified API we should be able to get the following information for each project provided in the response:
We should be able to know if a given address has attested for a project before, including the following information related to any relevant attestations. The difference between this one and #10 is this is meant for the single project page
https://backend.devouch.xyz/graphql
Should see results that shows:
When querying for attestations made by a specific user, we should be able to search by title of a project name and get some results of the required project info and attestation data related to it.
Attestation info contains:
we should be able to filter the data of all attestations made by a specific user to only show attestations they have made from a specific attester organization/group
when querying https://backend.devouch.xyz/graphql we should be able to look for user attestations and filter by a specific attester group, the response should include:
We'll need a simple swagger page where we have can have our documentation written on how to use your graphql endpoint to fetch information
https://nordicapis.com/how-to-autogenerate-graphql-api-documentation/
In the list of projects provided by the unified API we should be able to apply a filter for a certain attestor group, this will filter the returned response to only show projects that have received at least 1 attestation from a given attestor group.
We should be able to filter this list by on or multiple pre-defined attestor groups in the UI.
When we query for all projects using the graphql API, filtering to look only for projects that have received an attestation from a specific group we receive:
Pre-alpha API: https://vote.optimism.io/api_v1
We'll need to provide the following information for each project:
From unified API endpoint _____ we can fetch the following details from a single project from the Optimism RF Applicants:
From the project details endpoint ______ we can fetch the following details from a single project from the Optimism RF Applicants:
can change EAS contract, schema contract etc. are all in the environment variables.
here is our attestation schema on optimism
https://optimism.easscan.org/schema/view/0x97b0c9911936fad57e77857fac6eef6771f8d0bf025be9549214e32bf9e2415a
EAS contract:
https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000021
for each unique address that attested to this project we should retrieve the following information about the relevant attestation:
We can query to this service https://backend.devouch.xyz/graphql for a specific project identified by source and project ID and get the following information for each entry of an attestation made:
For each attestation made by the given user address we need to make available the following information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.