https://github.com/kleros/court-functions
Court lambda functions
https://github.com/kleros/court-functions
backend court kleros-v1
Last synced: 3 months ago
JSON representation
Court lambda functions
- Host: GitHub
- URL: https://github.com/kleros/court-functions
- Owner: kleros
- Created: 2023-08-06T17:23:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-16T07:26:01.000Z (5 months ago)
- Last Synced: 2025-03-22T16:51:04.757Z (4 months ago)
- Topics: backend, court, kleros-v1
- Language: TypeScript
- Homepage:
- Size: 537 KB
- Stars: 0
- Watchers: 8
- 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`