@@ -20,6 +20,16 @@ import {ERC7984Restricted} from "./ERC7984Restricted.sol";
2020 * This interface provides compliance checks, transfer controls and enforcement actions.
2121 */
2222abstract contract ERC7984Rwa is IERC7984Rwa , ERC7984Freezable , ERC7984Restricted , Pausable , Multicall , AccessControl {
23+ /**
24+ * @dev Accounts granted the agent role have the following permissioned abilities:
25+ *
26+ * - Mint/Burn to/from a given address (does not require permission)
27+ * - Force transfer from a given address (does not require permission)
28+ * - Bypasses pause and restriction checks (not frozen)
29+ * - Pause/Unpause the contract
30+ * - Block/Unblock a given account
31+ * - Set frozen amount of tokens for a given account.
32+ */
2333 bytes32 public constant AGENT_ROLE = keccak256 ("AGENT_ROLE " );
2434
2535 /// @dev Checks if the sender is an admin.
@@ -85,7 +95,7 @@ abstract contract ERC7984Rwa is IERC7984Rwa, ERC7984Freezable, ERC7984Restricted
8595 _resetUser (account);
8696 }
8797
88- /// @dev Sets confidential frozen for an account.
98+ /// @dev Sets confidential frozen for an account with proof .
8999 function setConfidentialFrozen (
90100 address account ,
91101 externalEuint64 encryptedAmount ,
@@ -94,7 +104,7 @@ abstract contract ERC7984Rwa is IERC7984Rwa, ERC7984Freezable, ERC7984Restricted
94104 _setConfidentialFrozen (account, FHE.fromExternal (encryptedAmount, inputProof));
95105 }
96106
97- /// @dev Sets confidential frozen for an account with proof .
107+ /// @dev Sets confidential frozen for an account.
98108 function setConfidentialFrozen (address account , euint64 encryptedAmount ) public virtual onlyAgent {
99109 require (
100110 FHE.isAllowed (encryptedAmount, msg .sender ),
@@ -147,7 +157,7 @@ abstract contract ERC7984Rwa is IERC7984Rwa, ERC7984Freezable, ERC7984Restricted
147157 return burntAmount;
148158 }
149159
150- /// @dev Forces transfer of confidential amount of tokens from account to account with proof by skipping compliance checks .
160+ /// @dev Variant of {forceConfidentialTransferFrom-address-address-euint64} with an amount input proof .
151161 function forceConfidentialTransferFrom (
152162 address from ,
153163 address to ,
@@ -157,7 +167,11 @@ abstract contract ERC7984Rwa is IERC7984Rwa, ERC7984Freezable, ERC7984Restricted
157167 return _forceUpdate (from, to, FHE.fromExternal (encryptedAmount, inputProof));
158168 }
159169
160- /// @dev Forces transfer of confidential amount of tokens from account to account by skipping compliance checks.
170+ /**
171+ * @dev Force transfer callable by the role {AGENT_ROLE} which transfers tokens from `from` to `to` and
172+ * bypasses the {ERC7984Restricted} and https://docs.openzeppelin.com/contracts/api/utils#pausable[`++Pausable++`]
173+ * checks. Frozen tokens are not transferred and must be unfrozen first.
174+ */
161175 function forceConfidentialTransferFrom (
162176 address from ,
163177 address to ,
0 commit comments