Skip to content

Commit

Permalink
feat(t2cr): add interface function isPermitted
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricexit committed Nov 19, 2018
1 parent e3a6758 commit eafd197
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/standard/permission/ArbitrableTokenList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,14 @@ contract ArbitrableTokenList is PermissionInterface, Arbitrable {
arbitrationFeesWaitingTime = _arbitrationFeesWaitingTime;
}

/* Public Views */

/** @dev Return true if the item is allowed. We consider the item to be in the list if its status is contested and it has not won a dispute previously.
* @param _tokenID The tokenID of the item to check.
* @return allowed True if the item is allowed, false otherwise.
*/
function isPermitted(bytes32 _tokenID) public view returns (bool allowed) {
Item storage item = items[_tokenID];
return item.status == ItemStatus.Registered || item.status == ItemStatus.ClearingRequested;
}
}

0 comments on commit eafd197

Please sign in to comment.