Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kleros/court-functions
Court lambda functions
https://github.com/kleros/court-functions
backend court kleros-v1
Last synced: 18 days ago
JSON representation
Court lambda functions
- Host: GitHub
- URL: https://github.com/kleros/court-functions
- Owner: kleros
- Created: 2023-08-06T17:23:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-18T14:43:05.000Z (about 1 year ago)
- Last Synced: 2023-12-18T16:26:56.422Z (about 1 year ago)
- Topics: backend, court, kleros-v1
- Language: TypeScript
- Homepage:
- Size: 273 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kleros Court Functions
### `put-justification`
- Checks the justification signature for validity and adds the justification to the database
- Address recovered from signature must be valid and the corresponding votes must not have been casted.
- If it receives `derivedSignature` it adds it to the derived account database### `get-justification`
- Returns justifications for corresponding dispute round
### `get-dispute-metaevidence`
- Fetches metaevidence uri from subgraph or database
- Often the metaevidence uri is emitted before any interaction with KlerosLiquid. Thus the subgraph will not be able to index it
- When this is the case, metaevidence uri from database is fetched. This is because `getLogs` calls take long (too long for a simple serverless function to handle) and are not very reliable so we cache the uris on Supabase.
- When a new uri is fetched but not found in the database (because it has not been yet introduced), we call the `notice-metaevidence-background` bg function### `notice-metaevidence-background`
- fetches the metaevidence uri via `getLogs` and introduces it into the database
- uses multiple batches for faster concurrent fetching### `upload-to-ipfs`
- uploads a files to ipfs and returns the cids.
- returned cid has the scheme : `/ipfs/cid`