@@ -3,17 +3,17 @@ pragma solidity ^0.8.13;
33
44import "./interfaces/IExecutorQuoter.sol " ;
55
6- string constant executorQuoterVersion = "Executor-Quoter-0.0.1 " ;
6+ string constant EXECUTOR_QUOTER_VERSION_STR = "Executor-Quoter-0.0.1 " ;
77
88contract ExecutorQuoter is IExecutorQuoter {
9- string public constant EXECUTOR_QUOTER_VERSION = executorQuoterVersion ;
9+ string public constant EXECUTOR_QUOTER_VERSION = EXECUTOR_QUOTER_VERSION_STR ;
1010 uint8 private constant QUOTE_DECIMALS = 10 ;
1111 uint8 private constant DECIMAL_RESOLUTION = 18 ;
1212
13- address public immutable quoterAddress ;
14- address public immutable updaterAddress ;
15- uint8 public immutable srcTokenDecimals ;
16- bytes32 public immutable payeeAddress ;
13+ address public immutable QUOTER_ADDRESS ;
14+ address public immutable UPDATER_ADDRESS ;
15+ uint8 public immutable SRC_TOKEN_DECIMALS ;
16+ bytes32 public immutable PAYEE_ADDRESS ;
1717
1818 /// This is the same as an EQ01 quote body
1919 /// It fits into a single bytes32 storage slot
@@ -52,17 +52,17 @@ contract ExecutorQuoter is IExecutorQuoter {
5252 error MoreThanOneDropOff ();
5353
5454 modifier onlyUpdater () {
55- if (msg .sender != updaterAddress ) {
56- revert InvalidUpdater (msg .sender , updaterAddress );
55+ if (msg .sender != UPDATER_ADDRESS ) {
56+ revert InvalidUpdater (msg .sender , UPDATER_ADDRESS );
5757 }
5858 _;
5959 }
6060
6161 constructor (address _quoterAddress , address _updaterAddress , uint8 _srcTokenDecimals , bytes32 _payeeAddress ) {
62- quoterAddress = _quoterAddress;
63- updaterAddress = _updaterAddress;
64- srcTokenDecimals = _srcTokenDecimals;
65- payeeAddress = _payeeAddress;
62+ QUOTER_ADDRESS = _quoterAddress;
63+ UPDATER_ADDRESS = _updaterAddress;
64+ SRC_TOKEN_DECIMALS = _srcTokenDecimals;
65+ PAYEE_ADDRESS = _payeeAddress;
6666 }
6767
6868 function _batchUpdate (Update[] calldata updates , uint256 mappingSlot ) private {
@@ -170,7 +170,7 @@ contract ExecutorQuoter is IExecutorQuoter {
170170 uint256 gasLimit ,
171171 uint256 msgValue
172172 ) private view returns (uint256 ) {
173- uint256 srcChainValueForBaseFee = normalize (quote.baseFee, QUOTE_DECIMALS, srcTokenDecimals );
173+ uint256 srcChainValueForBaseFee = normalize (quote.baseFee, QUOTE_DECIMALS, SRC_TOKEN_DECIMALS );
174174
175175 uint256 nSrcPrice = normalize (quote.srcPrice, QUOTE_DECIMALS, DECIMAL_RESOLUTION);
176176 uint256 nDstPrice = normalize (quote.dstPrice, QUOTE_DECIMALS, DECIMAL_RESOLUTION);
@@ -179,11 +179,11 @@ contract ExecutorQuoter is IExecutorQuoter {
179179 uint256 nGasLimitCost =
180180 normalize (gasLimit * quote.dstGasPrice, dstChainInfo.gasPriceDecimals, DECIMAL_RESOLUTION);
181181 uint256 srcChainValueForGasLimit =
182- normalize (mul (nGasLimitCost, scaledConversion, DECIMAL_RESOLUTION), DECIMAL_RESOLUTION, srcTokenDecimals );
182+ normalize (mul (nGasLimitCost, scaledConversion, DECIMAL_RESOLUTION), DECIMAL_RESOLUTION, SRC_TOKEN_DECIMALS );
183183
184184 uint256 nMsgValue = normalize (msgValue, dstChainInfo.nativeDecimals, DECIMAL_RESOLUTION);
185185 uint256 srcChainValueForMsgValue =
186- normalize (mul (nMsgValue, scaledConversion, DECIMAL_RESOLUTION), DECIMAL_RESOLUTION, srcTokenDecimals );
186+ normalize (mul (nMsgValue, scaledConversion, DECIMAL_RESOLUTION), DECIMAL_RESOLUTION, SRC_TOKEN_DECIMALS );
187187 return srcChainValueForBaseFee + srcChainValueForGasLimit + srcChainValueForMsgValue;
188188 }
189189
@@ -203,6 +203,6 @@ contract ExecutorQuoter is IExecutorQuoter {
203203 // NOTE: this does not include any maxGasLimit or maxMsgValue checks
204204 uint256 requiredPayment = estimateQuote (quote, dstChainInfo, gasLimit, msgValue);
205205
206- return (payeeAddress , requiredPayment);
206+ return (PAYEE_ADDRESS , requiredPayment);
207207 }
208208}
0 commit comments