# Evidence Refactors previous mention : ### [Evidence submission format](https://docs.kleros.io/developer/arbitration-development/erc-1497-evidence-standard#evidence) - move to a stringified object in the Evidence event? - move to event parameters: cheaper but harder to extend? - hybrid: parameters + extra param stringified object ```sol /// @title IEvidence interface IEvidence { /// @dev To be raised when evidence is submitted. /// @param _externalDisputeID Unique identifier for this dispute outside Kleros. It's the submitter responsability to submit the right external dispute ID. /// @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party. /// @param _evidenceTitle Title of the evidence. /// @param _evidenceBody Body of the evidence, in markdown format. /// @param _attachmentURI IPFS path to evidence, example: '/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz.pdf' /// @param _attachmentContentType Content type of the attachment, example: 'application/pdf' /// @param _extraData Extra data stringified JSON encoded, reserved for future use. event Evidence( uint256 indexed _externalDisputeID, address indexed _party, string _evidenceTitle, string _evidenceBody, string _attachmentURI, string _attachmentContentType, string _extraData ); } ``` >:warning: The above is only from discussion about the refactors, no event changes will be made, only the evidence will be uploaded as stringified object now. Against IPFS: - easier to index - easier/faster to fetch - no upload needed (unless there's an attachment) TBD: content type... should this be an input or can it be obtained from Filebase or derived https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type > We now have a FileViewer that can infer the types itself, if however we ever need to infer type, we can use this library [file-type](https://www.npmjs.com/package/file-type) ## Changes to do - Hopefully no major changes in contracts apart from updating natspecs - Evidence would be passed as stringified object, the same way we pass dispute templates and item data in curate v2. ``` { "fileURI": "/ipfs/QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc", "fileHash": "QmWQV5ZFFhEJiW8Lm7ay2zLxC2XS4wx1b2W7FfdrLMyQQc", "fileTypeExtension": "pdf", "name": "Email clarifying the terms of the contract.", "description": "This is an email sent to Alice from Bob that clarifies that the recommendation page that was expected", "selfHash": "QmUQMJbfiQYX7k6SWt8xMpR7g4vwtAYY1BTeJ8UY8JWRs9" } ``` > we will need to bring back self-hash since we wont have the ipfs hash to proove the integrity anymore. >:warning: self hash not included yet in the PR. Dapps affected : - Court v2 : upload and fetch (updated in PR) :- https://github.com/kleros/kleros-v2/pull/1634 - curate v2 : upload and fetch (justification display) - escrow v2 : upload only - the natspec has been updated in contracts but not redeployed. - once the contracts are redeployed, subgraphs will need to be redeployed. - with the current contracts, nothing should crash, only the older evidences will not be fetched from ipfs like before