@@ -83,7 +83,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
8383 uint256 private constant PATCH_VERSION = 0 ;
8484
8585 /// @notice FHEVMExecutor address.
86- address private constant fhevmExecutorAddress = fhevmExecutorAdd;
86+ address private constant FHEVM_EXECUTOR_ADDRESS = fhevmExecutorAdd;
8787
8888 /// @custom:storage-location erc7201:fhevm.storage.HCULimit
8989 /// @dev All five uint48 fields pack into a single 256-bit slot (5 × 48 = 240 bits).
@@ -107,12 +107,12 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
107107 uint64 private constant REINITIALIZER_VERSION = 3 ;
108108
109109 /// keccak256(abi.encode(uint256(keccak256("fhevm.storage.HCULimit")) - 1)) & ~bytes32(uint256(0xff))
110- bytes32 private constant HCULimitStorageLocation =
110+ bytes32 private constant HCU_LIMIT_STORAGE_LOCATION =
111111 0xc13af6c514bff8997f30c90003baa82bd02aad978179d1ce58d85c4319ad6500 ;
112112
113113 function _getHCULimitStorage () internal pure virtual returns (HCULimitStorage storage $) {
114114 assembly {
115- $.slot := HCULimitStorageLocation
115+ $.slot := HCU_LIMIT_STORAGE_LOCATION
116116 }
117117 }
118118
@@ -173,7 +173,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
173173 bytes32 result ,
174174 address caller
175175 ) external virtual {
176- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
176+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
177177 uint256 opHCU;
178178 if (scalarByte == 0x01 ) {
179179 if (resultType == FheType.Uint8) {
@@ -227,7 +227,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
227227 bytes32 result ,
228228 address caller
229229 ) external virtual {
230- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
230+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
231231 uint256 opHCU;
232232 if (scalarByte == 0x01 ) {
233233 if (resultType == FheType.Uint8) {
@@ -281,7 +281,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
281281 bytes32 result ,
282282 address caller
283283 ) external virtual {
284- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
284+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
285285 uint256 opHCU;
286286 if (scalarByte == 0x01 ) {
287287 if (resultType == FheType.Uint8) {
@@ -334,7 +334,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
334334 bytes32 result ,
335335 address caller
336336 ) external virtual {
337- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
337+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
338338 uint256 opHCU;
339339 if (scalarByte != 0x01 ) revert OnlyScalarOperationsAreSupported ();
340340 if (resultType == FheType.Uint8) {
@@ -370,7 +370,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
370370 bytes32 result ,
371371 address caller
372372 ) external virtual {
373- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
373+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
374374 uint256 opHCU;
375375 if (scalarByte != 0x01 ) revert OnlyScalarOperationsAreSupported ();
376376 if (resultType == FheType.Uint8) {
@@ -407,7 +407,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
407407 bytes32 result ,
408408 address caller
409409 ) external virtual {
410- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
410+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
411411 uint256 opHCU;
412412 if (scalarByte == 0x01 ) {
413413 if (resultType == FheType.Bool) {
@@ -469,7 +469,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
469469 bytes32 result ,
470470 address caller
471471 ) external virtual {
472- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
472+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
473473 uint256 opHCU;
474474 if (scalarByte == 0x01 ) {
475475 if (resultType == FheType.Bool) {
@@ -531,7 +531,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
531531 bytes32 result ,
532532 address caller
533533 ) external virtual {
534- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
534+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
535535 uint256 opHCU;
536536 if (scalarByte == 0x01 ) {
537537 if (resultType == FheType.Bool) {
@@ -593,7 +593,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
593593 bytes32 result ,
594594 address caller
595595 ) external virtual {
596- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
596+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
597597 uint256 opHCU;
598598 if (scalarByte == 0x01 ) {
599599 if (resultType == FheType.Uint8) {
@@ -651,7 +651,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
651651 bytes32 result ,
652652 address caller
653653 ) external virtual {
654- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
654+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
655655 uint256 opHCU;
656656 if (scalarByte == 0x01 ) {
657657 if (resultType == FheType.Uint8) {
@@ -709,7 +709,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
709709 bytes32 result ,
710710 address caller
711711 ) external virtual {
712- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
712+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
713713 uint256 opHCU;
714714 if (scalarByte == 0x01 ) {
715715 if (resultType == FheType.Uint8) {
@@ -767,7 +767,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
767767 bytes32 result ,
768768 address caller
769769 ) external virtual {
770- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
770+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
771771 uint256 opHCU;
772772 if (scalarByte == 0x01 ) {
773773 if (resultType == FheType.Uint8) {
@@ -825,7 +825,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
825825 bytes32 result ,
826826 address caller
827827 ) external virtual {
828- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
828+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
829829 uint256 opHCU;
830830 if (scalarByte == 0x01 ) {
831831 if (resultType == FheType.Bool) {
@@ -891,7 +891,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
891891 bytes32 result ,
892892 address caller
893893 ) external virtual {
894- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
894+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
895895 uint256 opHCU;
896896 if (scalarByte == 0x01 ) {
897897 if (resultType == FheType.Bool) {
@@ -957,7 +957,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
957957 bytes32 result ,
958958 address caller
959959 ) external virtual {
960- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
960+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
961961 uint256 opHCU;
962962 if (scalarByte == 0x01 ) {
963963 if (resultType == FheType.Uint8) {
@@ -1011,7 +1011,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
10111011 bytes32 result ,
10121012 address caller
10131013 ) external virtual {
1014- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1014+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
10151015 uint256 opHCU;
10161016 if (scalarByte == 0x01 ) {
10171017 if (resultType == FheType.Uint8) {
@@ -1065,7 +1065,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
10651065 bytes32 result ,
10661066 address caller
10671067 ) external virtual {
1068- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1068+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
10691069 uint256 opHCU;
10701070 if (scalarByte == 0x01 ) {
10711071 if (resultType == FheType.Uint8) {
@@ -1119,7 +1119,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
11191119 bytes32 result ,
11201120 address caller
11211121 ) external virtual {
1122- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1122+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
11231123 uint256 opHCU;
11241124 if (scalarByte == 0x01 ) {
11251125 if (resultType == FheType.Uint8) {
@@ -1173,7 +1173,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
11731173 bytes32 result ,
11741174 address caller
11751175 ) external virtual {
1176- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1176+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
11771177 uint256 opHCU;
11781178 if (scalarByte == 0x01 ) {
11791179 if (resultType == FheType.Uint8) {
@@ -1227,7 +1227,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
12271227 bytes32 result ,
12281228 address caller
12291229 ) external virtual {
1230- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1230+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
12311231 uint256 opHCU;
12321232 if (scalarByte == 0x01 ) {
12331233 if (resultType == FheType.Uint8) {
@@ -1271,7 +1271,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
12711271 * @param caller Original caller address from FHEVMExecutor.
12721272 */
12731273 function checkHCUForFheNeg (FheType resultType , bytes32 ct , bytes32 result , address caller ) external virtual {
1274- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1274+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
12751275 uint256 opHCU;
12761276 if (resultType == FheType.Uint8) {
12771277 opHCU = 79000 ;
@@ -1298,7 +1298,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
12981298 * @param caller Original caller address from FHEVMExecutor.
12991299 */
13001300 function checkHCUForFheNot (FheType resultType , bytes32 ct , bytes32 result , address caller ) external virtual {
1301- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1301+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
13021302 uint256 opHCU;
13031303 if (resultType == FheType.Bool) {
13041304 opHCU = 2 ;
@@ -1327,7 +1327,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
13271327 * @param caller Original caller address from FHEVMExecutor.
13281328 */
13291329 function checkHCUForCast (FheType resultType , bytes32 ct , bytes32 result , address caller ) external virtual {
1330- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1330+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
13311331 uint256 opHCU;
13321332 if (resultType == FheType.Bool) {
13331333 opHCU = 32 ;
@@ -1356,7 +1356,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
13561356 * @param caller Original dapp caller address from FHEVMExecutor.
13571357 */
13581358 function checkHCUForTrivialEncrypt (FheType resultType , bytes32 result , address caller ) external virtual {
1359- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1359+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
13601360 uint256 opHCU;
13611361 if (resultType == FheType.Bool) {
13621362 opHCU = 32 ;
@@ -1397,7 +1397,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
13971397 bytes32 result ,
13981398 address caller
13991399 ) external virtual {
1400- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1400+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
14011401 uint256 opHCU;
14021402 if (resultType == FheType.Bool) {
14031403 opHCU = 55000 ;
@@ -1428,7 +1428,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
14281428 * @param caller Original dapp caller address from FHEVMExecutor.
14291429 */
14301430 function checkHCUForFheRand (FheType resultType , bytes32 result , address caller ) external virtual {
1431- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1431+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
14321432 uint256 opHCU;
14331433 if (resultType == FheType.Bool) {
14341434 opHCU = 19000 ;
@@ -1458,7 +1458,7 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
14581458 * @param caller Original dapp caller address from FHEVMExecutor.
14591459 */
14601460 function checkHCUForFheRandBounded (FheType resultType , bytes32 result , address caller ) external virtual {
1461- if (msg .sender != fhevmExecutorAddress ) revert CallerMustBeFHEVMExecutorContract ();
1461+ if (msg .sender != FHEVM_EXECUTOR_ADDRESS ) revert CallerMustBeFHEVMExecutorContract ();
14621462 uint256 opHCU;
14631463 if (resultType == FheType.Uint8) {
14641464 opHCU = 23000 ;
@@ -1728,10 +1728,10 @@ contract HCULimit is UUPSUpgradeableEmptyProxy, ACLOwnable {
17281728
17291729 /**
17301730 * @notice Getter function for the FHEVMExecutor contract address.
1731- * @return fhevmExecutorAddress Address of the FHEVMExecutor.
1731+ * @return FHEVM_EXECUTOR_ADDRESS Address of the FHEVMExecutor.
17321732 */
17331733 function getFHEVMExecutorAddress () public view virtual returns (address ) {
1734- return fhevmExecutorAddress ;
1734+ return FHEVM_EXECUTOR_ADDRESS ;
17351735 }
17361736
17371737 /**
0 commit comments