From 7b611f3ad80f9894f932e1ae634314a37ffd1959 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:16:51 -0300 Subject: [PATCH 1/3] M-11: fix `ERC7984Rwa` docs --- contracts/token/ERC7984/extensions/ERC7984Rwa.sol | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol index 13825119..3dbb4963 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol @@ -95,7 +95,7 @@ abstract contract ERC7984Rwa is _resetUser(account); } - /// @dev Sets confidential frozen for an account. + /// @dev Sets confidential frozen for an account with proof. function setConfidentialFrozen( address account, externalEuint64 encryptedAmount, @@ -104,7 +104,7 @@ abstract contract ERC7984Rwa is _setConfidentialFrozen(account, FHE.fromExternal(encryptedAmount, inputProof)); } - /// @dev Sets confidential frozen for an account with proof. + /// @dev Sets confidential frozen for an account. function setConfidentialFrozen(address account, euint64 encryptedAmount) public virtual onlyAgent { require( FHE.isAllowed(encryptedAmount, msg.sender), @@ -149,7 +149,7 @@ abstract contract ERC7984Rwa is return _burn(account, encryptedAmount); } - /// @dev Forces transfer of confidential amount of tokens from account to account with proof by skipping compliance checks. + /// @dev Variant of {forceConfidentialTransferFrom-address-address-euint64} with an amount input proof. function forceConfidentialTransferFrom( address from, address to, @@ -159,7 +159,11 @@ abstract contract ERC7984Rwa is return _forceUpdate(from, to, FHE.fromExternal(encryptedAmount, inputProof)); } - /// @dev Forces transfer of confidential amount of tokens from account to account by skipping compliance checks. + /** + * @dev Force transfer callable by the role {AGENT_ROLE} which transfers tokens from `from` to `to` and + * bypasses the {ERC7984Restricted} and https://docs.openzeppelin.com/contracts/api/utils#pausable[`++Pausable++`] + * checks. Frozen tokens are not transferred and must be unfrozen first. + */ function forceConfidentialTransferFrom( address from, address to, From 96bea7f5ffb0c5ba5da9e9d3f9ecc685e1dca2eb Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 11 Nov 2025 16:27:43 -0300 Subject: [PATCH 2/3] add docs --- contracts/token/ERC7984/extensions/ERC7984Rwa.sol | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol index 3dbb4963..bd519b34 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol @@ -27,6 +27,16 @@ abstract contract ERC7984Rwa is ERC165, AccessControl { + /** + * @dev Accounts granted the agent role have the following permissioned abilities: + * + * - Mint/Burn to/from a given address (does not require any permission) + * - Force transfer from a given address (does not require permission) + * - Bypasses pause and restriction checks (not frozen) + * - Pause/Unpause the contract + * - Block/Unblock a given account + * - Set frozen amount of tokens for a given account. + */ bytes32 public constant AGENT_ROLE = keccak256("AGENT_ROLE"); /// @dev Checks if the sender is an admin. From f54171b3052170bf51907595fa446ee942691810 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:52:10 -0300 Subject: [PATCH 3/3] Update contracts/token/ERC7984/extensions/ERC7984Rwa.sol --- contracts/token/ERC7984/extensions/ERC7984Rwa.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol index bd519b34..a1e3b667 100644 --- a/contracts/token/ERC7984/extensions/ERC7984Rwa.sol +++ b/contracts/token/ERC7984/extensions/ERC7984Rwa.sol @@ -30,7 +30,7 @@ abstract contract ERC7984Rwa is /** * @dev Accounts granted the agent role have the following permissioned abilities: * - * - Mint/Burn to/from a given address (does not require any permission) + * - Mint/Burn to/from a given address (does not require permission) * - Force transfer from a given address (does not require permission) * - Bypasses pause and restriction checks (not frozen) * - Pause/Unpause the contract