Skip to content

Commit

Permalink
chore: documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Aug 18, 2022
1 parent 79e9659 commit 3aee2de
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/contracts/contracts/registry/AbstractGuardRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ abstract contract AbstractGuardRegistry {
using Report for bytes29;
using TypedMemView for bytes29;

/**
* @notice Checks all following statements are true:
* - `_report` is a formatted Report payload
* - `_report` contains a signature
* - such signature belongs to an authorized Guard
* @param _report Report on a Attestation of Origin merkle root
* @return _guard Notary that signed the Attestation
* @return _view Memory view on report
*/
function _checkGuardAuth(bytes memory _report)
internal
view
Expand All @@ -21,5 +30,11 @@ abstract contract AbstractGuardRegistry {
require(_isGuard(_guard), "Signer is not a guard");
}

function _isGuard(address _guard) internal view virtual returns (bool);
/**
* @notice Checks whether a given account in an authorized Guard.
* @dev Child contracts should implement this depending on how Guards are stored.
* @param _account Address to check for being a Guard
* @return TRUE if the account is an authorized Guard.
*/
function _isGuard(address _account) internal view virtual returns (bool);
}

0 comments on commit 3aee2de

Please sign in to comment.