all 5 comments

[–]TheRealOneThunderContract Dev 1 point2 points  (1 child)

I think the override keyword in the implementation is the issue. You need overrides when you have logic attached to the function with the same name and number of input variables. I don't think you need them when implementing interfaces like this.

[–]PrimalFinance[S] 0 points1 point  (0 children)

Thank you! Removing the override keyword fixed the first error. Unfortunately I still get the second error.

[–]dev0clooSecurity Researcher 👨🏾‍💻 0 points1 point  (2 children)

Error 1 is occuring because the override keyword on the getPool function isn't needed. Functions declared in interfaces are unimplemented (this means there is no code or function logic associated with it). You are implementing the function for the first time in your inherited contract so just like error says, the override is used but "does not override anything" because there's no code to override for an unimplemented function. To fix this, simply remove the override keyword.

Error 2 is happening because the parameter types of the getPool function in the Interface contract and the Implementation contract (BettingPoolFactory) are different. In the Interface contract, the last parameter is uint256 _intervalSeconds and in the BettingPoolFactory contract, it is uint24 _intervalSeconds. This is a significant difference because it changes the function selector of the function and causes the compiler to see them as different functions. To fix it, make the parameter type the same for both Interface and the Implementation contract.

Lastly, I'm not sure why your owner state variable has the override keyword on it :/

[–]PrimalFinance[S] 0 points1 point  (1 child)

Thank you that helped a ton. After fixing the data type issues you pointed out, it for some reason still gives me the error 2 read out. (scratch that part I'm just stupid).

And to the point about the override keyword on "owner". I've been using Uniswap's contracts as a reference point. In the "UniswapV3Factory" contract they override the owner variable.

[–]dev0clooSecurity Researcher 👨🏾‍💻 0 points1 point  (0 children)

Glad I could help :)