nicolasgarcia214 / damn-vulnerable-defi-foundry

Damn Vulnerable DeFi - Foundry Version
MIT License
494 stars 189 forks source link

Fix Puppet challenge (stateMutability issue) #36

Open typicalHuman opened 10 months ago

typicalHuman commented 10 months ago

Fix Uniswapv1 ABIs for newer versions of Foundry (stateMutability bug)

Type of change

brightredchilli commented 9 months ago

Thanks for posting this. I wasn't able to get this challenge to work unless similar changes are also made to the V1UniswapFactory. Did you forget to commit those, or is there some other diff in our set ups?

These are my changes:

https://github.com/brightredchilli/damn-vulnerable-defi-foundry/commit/e2ec3e54514182094c7721e36277b8188f576b80#diff-5ad4d30aa03a6ff4eadafa155f9ea2c3bbbd1e1cbd4362bbaa619a498c886f20

Edit: sorry, I missed the change to second file.

typicalHuman commented 9 months ago

Thanks for posting this. I wasn't able to get this challenge to work unless similar changes are also made to the V1UniswapFactory. Did you forget to commit those, or is there some other diff in our set ups?

These are my changes:

brightredchilli@e2ec3e5#diff-5ad4d30aa03a6ff4eadafa155f9ea2c3bbbd1e1cbd4362bbaa619a498c886f20

Hi, could you please explain what you mean? I think it should work with these changes, at least it's working on my side - so I decided to create a PR, maybe this would be helpful for the others struggling with this problem.

Feel free to check my solutions if you are confused: https://github.com/typicalHuman/damn-vulnerable-defi-foundry-solutions

brightredchilli commented 9 months ago

My bad - your pr has the diff to both the files. I missed the changes to UniswapV1Factory.json.