PoolFactory contract can be deployed with weth address as 0x0
. so, all the TSwapPool's will be created with zero address hence failing the protocol.
Additionally have a similar check for PoolFactory()::CreatePool()
function to have a zero check.
Place below code in PoolFactoryTest.t.sol
and run - forge test --mt testZeroWethAddress
Since, i_wethToken
is immutable, the address can't be overwritten at later point and all the contracts must be deployed again for protocol to function.
Foundry
Make below code changes in PoolFactory.sol
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.