1Hive / radspec-registry

A public mapping between deployed contracts, function signatures, and radspec docstrings
0 stars 0 forks source link

Create standard dispute metadata #9

Open onbjerg opened 4 years ago

onbjerg commented 4 years ago

Since all disputes are the same (except for evidence), and since we cannot construct JSON objects or upload IPFS files from the smart contract, we should have some standard dispute metadata that we can refer to in the contract.

The current metadata format is described here.

Example

The following is encoded and passed to createDispute on the registry arbitrator contract.

// Metadata JSON object
{
  description: "Some short dispute description",
  metadata: "<IPFS_CID>/metadata.json"
}

The following is hosted on IPFS and linked to in the above encoded JSON object

// `metadata.json` on IPFS
{
  agreementText: "<IPFS_CID>/some_long_description.md"
}

Alternatives

If the metadata passed is not a JSON object then it will be assumed to be the dispute description. Doing this will give us the ability to have dynamic dispute descriptions, but at the cost of not integrating well with the dashboard (i.e. we can't have a long form description of the dispute).