Uniswap-v2-puzzles by RareSkills
-
Git clone the Repo
-
Install dependencies
$ forge install
-
Start hacking.
The test forks mainnet so as to interact with contracts on a real network and also give a more realistic experience. Go to Alchemy or infura
to get your_mainnet_rpc_url
.
$ forge test --fork-url <your_mainnet_rpc_url> --match-path test/<test_filename>
Run the following command:
$ forge test --fork-url <your_mainnet_rpc_url> --match-path test/HelloWorld.t.sol
If the test passes, RPC is working, else, it might have exceeded its rate limit or typo in the url.