ethernaut icon indicating copy to clipboard operation
ethernaut copied to clipboard

A Ownable compile error

Open live9369 opened this issue 3 months ago • 2 comments

When I run the command yarn compile:contracts to compile these contracts, the terminal appeard this error:

error: modifier-style base constructor call without arguments
   --> /Users/live/Desktop/learning/ethernaut/contracts/src/levels/BetHouse.sol:112:83
    |
112 |     constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) Ownable() {
    |                                                                                   ^^^^^^^^^
    |

what can I do?

live9369 avatar Oct 14 '25 14:10 live9369

No need to explicitly call Ownable(); Solidity will automatically call it.

anandsingh07 avatar Oct 18 '25 18:10 anandsingh07

No need to explicitly call Ownable(); Solidity will automatically call it.

So, once I remove it, the contract will compile successfully?

live9369 avatar Oct 19 '25 05:10 live9369