sherlock-audit / 2024-02-jala-swap-judging

6 stars 4 forks source link

miaowu - `ChilizWrapperFactory.sol` is missing the constructor and its parameters and cannot be compiled #210

Closed sherlock-admin closed 6 months ago

sherlock-admin commented 6 months ago

miaowu

medium

ChilizWrapperFactory.sol is missing the constructor and its parameters and cannot be compiled

Summary

ChilizWrapperFactory.sol is missing the constructor and its parameters and cannot be compiled

Vulnerability Detail

ChilizWrapperFactory.sol inherits from Ownable.sol, but lacks the constructor and its parameters of the parent class Ownable.sol, resulting in failure to compile

Impact

ChilizWrapperFactory.sol contract cannot be compiled

Code Snippet

https://github.com/sherlock-audit/2024-02-jala-swap/blob/main/jalaswap-dex-contract/contracts/utils/ChilizWrapperFactory.sol#L11

contract ChilizWrapperFactory is IChilizWrapperFactory, Ownable {
    mapping(address => address) public underlyingToWrapped;
    mapping(address => address) public wrappedToUnderlying;

    //here!!!

    function wrap(address account, address underlyingToken, uint256 amount) public returns (address wrappedToken) {
        ......
    }

Tool used

Manual Review

Recommendation

--- a/jalaswap-dex-contract/contracts/utils/ChilizWrapperFactory.sol +++ b/jalaswap-dex-contract/contracts/utils/ChilizWrapperFactory.sol @@ -12,6 +12,8 @@ contract ChilizWrapperFactory is IChilizWrapperFactory, Ownable { mapping(address => address) public underlyingToWrapped; mapping(address => address) public wrappedToUnderlying;

Duplicate of #251