Skip to content

Commit

Permalink
chore: rename Evidence to Post
Browse files Browse the repository at this point in the history
since Evidence in ArbitratorV2 is to be
handled at arbitrator anyway, the threads
meant for internal consumption in stake
curate will be known as Posts to avoid confusion
  • Loading branch information
greenlucid committed Jan 28, 2023
1 parent 553106a commit f53cc02
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
14 changes: 7 additions & 7 deletions contracts/contracts/StakeCurate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pragma solidity ^0.8;
import "./interfaces/IArbitrable.sol";
import "./interfaces/IArbitrator.sol";
import "./interfaces/IMetaEvidence.sol";
import "./interfaces/ISimpleEvidence.sol";
import "./interfaces/IPost.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./Cint32.sol";

Expand All @@ -22,7 +22,7 @@ import "./Cint32.sol";
* @dev The stakes of the items are handled here. Handling arbitrary on-chain data is
* possible, but many curation needs can be solved by keeping off-chain state availability.
*/
contract StakeCurate is IArbitrable, IMetaEvidence, ISimpleEvidence {
contract StakeCurate is IArbitrable, IMetaEvidence, IPost {

enum Party { Staker, Challenger }
enum DisputeState { Free, Used }
Expand Down Expand Up @@ -887,16 +887,16 @@ contract StakeCurate is IArbitrable, IMetaEvidence, ISimpleEvidence {
}

/**
* @dev Submits evidence to an item. Evidence can be emitted at any time.
* @dev Submits post on an item. Posts can be emitted at any time.
* Item existence is not checked, since quality filtering would be done externally.
* For example, if the item did not exist at the time the Evidence was emitted, then
* For example, if the item did not exist at the time the Post was emitted, then
* it could be hidden.
* Assume this function will be the subject of spam and flood.
* @param _itemId Id of the item to submit evidence to.
* @param _evidence IPFS uri linking to the evidence.
* @param _post IPFS uri linking to the post.
*/
function submitEvidence(uint56 _itemId, string calldata _evidence) external {
emit Evidence(_itemId, _evidence);
function submitPost(uint56 _itemId, string calldata _post) external {
emit Post(_itemId, _post);
}

/**
Expand Down
17 changes: 17 additions & 0 deletions contracts/contracts/interfaces/IPost.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IArbitrator.sol";

/** @title IPost
* Inspired in ERC-1497: Evidence Standard
*/
interface IPost {
/**
* @dev To be raised when post is submitted. Should point to the resource.
* @param _threadId Unique identifier of the thread the post belongs to.
* @param _post IPFS path to post, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'
*/
event Post(uint256 indexed _threadId, string _post);
}
18 changes: 0 additions & 18 deletions contracts/contracts/interfaces/ISimpleEvidence.sol

This file was deleted.

0 comments on commit f53cc02

Please sign in to comment.