Curate Injected UIs
Service and database for handling Generalized TCR contract events.
- Clone this repo.
- Duplicate
.env.example
, rename it to.env
and fill in the environment variables. - Run
yarn
to install dependencies and thenyarn start
to run the UI in development mode.
Remeber to provide dispute data on the URL. It should be a JSON object containing the arbitrator and arbitrable addresses, the disputeID, RPC endpoint and chainID as follows:
?{"arbitrableContractAddress":"0xdeadbeef...","arbitratorContractAddress":"0xdeadbeef...","disputeID":"111","jsonRpcUrl":"http://localhost:8545","chainId":"1"}
This codebase has two different iframes: one for classic curate (iframes/item-details) and one for light curate (iframes/light-item-details). You must pick one to build your evidence display.
You can do so by changing the component inside bootstrap/app.jss
Keep in mind that the hardcoded, fallback provider has a specific chainId. Remember to update it if you are building for a specific chain.
This interface is meant to be deployed to IPFS. To do so, you should:
- Copy the
.env.example
file to.env
:cp .env.example .env
- Set the appropriate environment variables.
- Bundle the app for production:
yarn build
- Zip the
dist/
directory. - Send the zip file to Kleros IPFS host server through SSH (ask a team member if you are not sure how).
- Unzip the file and jump to the folder.
- Add the contents of the folder to IPFS:
ipfs add -w -r .
- The
evidenceDisplayURI
will be/ipfs/<root_hash>
yarn format
- Lint, fix and prettify all the project. .js files with styled components and .js files.yarn run cz
- Run commitizen.