@@ -30,7 +30,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
3030
3131 mapping (address holder = > euint64) private _balances;
3232 mapping (address holder = > mapping (address spender = > uint48 )) private _operators;
33- mapping (uint256 requestId = > euint64 encryptedValue ) private _requestHandles;
33+ mapping (uint256 requestId = > euint64 encryptedAmount ) private _requestHandles;
3434 euint64 private _totalSupply;
3535 string private _name;
3636 string private _symbol;
@@ -49,11 +49,11 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
4949 error ConfidentialFungibleTokenZeroBalance (address holder );
5050
5151 /**
52- * @dev The caller `user` does not have access to the encrypted value `amount`.
52+ * @dev The caller `user` does not have access to the encrypted amount `amount`.
5353 *
5454 * NOTE: Try using the equivalent transfer function with an input proof.
5555 */
56- error ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (euint64 amount , address user );
56+ error ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (euint64 amount , address user );
5757
5858 /// @dev The given caller `caller` is not authorized for the current operation.
5959 error ConfidentialFungibleTokenUnauthorizedCaller (address caller );
@@ -129,7 +129,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
129129 function confidentialTransfer (address to , euint64 amount ) public virtual returns (euint64 transferred ) {
130130 require (
131131 amount.isAllowed (msg .sender ),
132- ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (amount, msg .sender )
132+ ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (amount, msg .sender )
133133 );
134134 transferred = _transfer (msg .sender , to, amount);
135135 transferred.allowTransient (msg .sender );
@@ -155,7 +155,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
155155 ) public virtual returns (euint64 transferred ) {
156156 require (
157157 amount.isAllowed (msg .sender ),
158- ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (amount, msg .sender )
158+ ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (amount, msg .sender )
159159 );
160160 require (isOperator (from, msg .sender ), ConfidentialFungibleTokenUnauthorizedSpender (from, msg .sender ));
161161 transferred = _transfer (from, to, amount);
@@ -181,7 +181,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
181181 ) public virtual returns (euint64 transferred ) {
182182 require (
183183 amount.isAllowed (msg .sender ),
184- ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (amount, msg .sender )
184+ ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (amount, msg .sender )
185185 );
186186 transferred = _transferAndCall (msg .sender , to, amount, data);
187187 transferred.allowTransient (msg .sender );
@@ -209,7 +209,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
209209 ) public virtual returns (euint64 transferred ) {
210210 require (
211211 amount.isAllowed (msg .sender ),
212- ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (amount, msg .sender )
212+ ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (amount, msg .sender )
213213 );
214214 require (isOperator (from, msg .sender ), ConfidentialFungibleTokenUnauthorizedSpender (from, msg .sender ));
215215 transferred = _transferAndCall (from, to, amount, data);
@@ -226,7 +226,7 @@ abstract contract ConfidentialFungibleToken is IConfidentialFungibleToken {
226226 function discloseEncryptedAmount (euint64 encryptedAmount ) public virtual {
227227 require (
228228 encryptedAmount.isAllowed (msg .sender ) && encryptedAmount.isAllowed (address (this )),
229- ConfidentialFungibleTokenUnauthorizedUseOfEncryptedValue (encryptedAmount, msg .sender )
229+ ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount (encryptedAmount, msg .sender )
230230 );
231231
232232 uint256 [] memory cts = new uint256 [](1 );
0 commit comments