Description: Provides a user interface for the administrators to approve a claim, distribute the award and initation distribution of the award.
- Ceramic ComposeDB
- Ceramic JS HTTP Client
- Next.js
- web3.storage
- Bacalhau
- Ether.js
- Solidity
Detailed instructions on how to install, configure, and get Impact Evaluator Console up and running can be found here: INSTALL
A list of claims to be evaluated are retrieved from the source system and presented to the administrator/approver. The list of Tasks/Claims retrieved from the source system based on a set of criteria. In this use case, the source component retrieves any task that is in a "Ready" state. (In this POC implementation the source system is Taiga). Once approved, the Approved Claims are created in ComposeDB. As they are persisted to ComposeDB the status in the source system is updated to "in progress".
[As we consider reuse of the console, the source system would become pluggable and the status values will be configurable].
http://localhost:3000/approve/Approve
A list of "Approved" claims are retrieved from the source system and presented to the administrator/approver. The list of Tasks/Claims retrieved from the source system is based on a set of criteria. In this use case, the source component retrieves any task that is in a "Closed" state. (In this POC implementation the source system is Taiga). The administrator has the opportunity to distribute the full amount of the approved claim to one or more users up to the its full approved value. Once submitted, the Earned Claims are created in ComposeDB. As they are persisted to ComposeDB the status in the source system is updated to "complete".
[As we consider reuse of the console, the source system would become pluggable and the status values will be configurable].
http://localhost:3000/distribute/Distribute
All claims for this "round" are queried from ComposeDB. They are then pinned to web3.storage. The web3.storage CID is then passed Bacalhau Compute to initiate the computation of the impact evaluator. Bacalhau Compute returns a Merkle tree of the rewards.
The response from the Baclahau Calc is then submitted to the Wrapper Contract.
http://localhost:3000/calculate/Calculate.js
Once a Task has been persisted to CeramicDB, you can retrieve the CID for that claim using the Stream ID.
http://localhost:3000/cid/Cid
Launch the graphiQL URL in the browser and run the mutation below:
mutation {
createClaim
(input: { content: { by: "Steve", claim: "My second Claim", round: "round one", credit: 1 } }) {
document {
by
}
}
}
Launch the graphiQL URL in the browser and run the query below:
query {
ClaimIndex(first: 10) {
edges {
node {
by
}
}
}
}
To check the details of the GraphQL schema built from your runtime composite representation, you can use the graphql:schema CLI command:
composedb graphql:schema runtime-composite.json