Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Feb 7, 2025
1 parent 6c0d9e9 commit 2ba291b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ bytes32 constant CERTIFIER = keccak256("CERTIFIER");
/// @dev Rolename for certifier admins.
bytes32 constant CERTIFIER_ADMIN = keccak256("CERTIFIER_ADMIN");

/// @dev Configuration for the OffchainAssetReceiptVaultAuthorizorV1.
/// @param initialAdmin The initial admin of the contract.
struct OffchainAssetReceiptVaultAuthorizorV1Config {
address initialAdmin;
}

/// @title OffchainAssetReceiptVaultAuthorizorV1
/// Implements the IAuthorizeV1 interface and provides a simple role based
/// access control for the OffchainAssetReceiptVault.
contract OffchainAssetReceiptVaultAuthorizorV1 is IAuthorizeV1, ICloneableV2, AccessControl {
constructor() {
_disableInitializers();
Expand Down Expand Up @@ -49,6 +54,10 @@ contract OffchainAssetReceiptVaultAuthorizorV1 is IAuthorizeV1, ICloneableV2, Ac
return ICLONEABLE_V2_SUCCESS;
}

/// Permissions are treated as roles in this implementation. This makes the
/// implementation roughly equivalent overall to the `onlyRole` modifier in
/// OpenZeppelin's AccessControl.
/// @inheritdoc IAuthorizeV1
function authorize(address user, bytes32 permission, bytes calldata data) external view override {
if (hasRole(permission, user)) {
return;
Expand Down

0 comments on commit 2ba291b

Please sign in to comment.