Judge has assessed an item in Issue #246 as 2 risk. The relevant finding follows:
[L-01] Use the factory constant address of the testnet
Description
import {UNISWAP_V3_FACTORY, GOERLI_UNISWAP_V3_FACTORY} from '@script/Registry.s.sol';
import {CAMELOT_V3_FACTORY, GOERLI_CAMELOT_V3_FACTORY} from '@script/Registry.s.sol';
contract CamelotRelayer is IBaseOracle, ICamelotRelayer {
// --- Registry ---
address internal constant _CAMELOT_FACTORY = GOERLI_CAMELOT_V3_FACTORY;
}
CamelotRelayer and UniV3Relayer use the testnet’s factory constant address, which should be used for testing purposes.
But considering that the contract will be deployed to the production environment, I mark this here.
Recommendations
Pass in the addresses of different environments through parameters instead of using hard-coded addresses.
Judge has assessed an item in Issue #246 as 2 risk. The relevant finding follows:
[L-01] Use the factory constant address of the testnet Description import {UNISWAP_V3_FACTORY, GOERLI_UNISWAP_V3_FACTORY} from '@script/Registry.s.sol';
contract UniV3Relayer is IBaseOracle, IUniV3Relayer { // --- Registry --- address internal constant _UNI_V3_FACTORY = GOERLI_UNISWAP_V3_FACTORY; }
import {CAMELOT_V3_FACTORY, GOERLI_CAMELOT_V3_FACTORY} from '@script/Registry.s.sol';
contract CamelotRelayer is IBaseOracle, ICamelotRelayer { // --- Registry --- address internal constant _CAMELOT_FACTORY = GOERLI_CAMELOT_V3_FACTORY; } CamelotRelayer and UniV3Relayer use the testnet’s factory constant address, which should be used for testing purposes. But considering that the contract will be deployed to the production environment, I mark this here.
Recommendations Pass in the addresses of different environments through parameters instead of using hard-coded addresses.