Uniswap / universal-router

Uniswap's Universal Router for NFT and ERC20 swapping
GNU General Public License v3.0
396 stars 204 forks source link

Pass tests with alternative FORK_URL #301

Closed restlessronin closed 11 months ago

restlessronin commented 1 year ago

@hensha256 I had trouble getting the tests working, apparently because my Infura account doesn't support archive nodes. I had to use the FORK_URL environment variable to set an alchemy url.

This worked for forge test but not hardhat test. I had to change a couple of places in the code where an Infura url was hardcoded as the fork url.

After these changes, all the tests work perfectly, both forge and hardhat.

restlessronin commented 1 year ago

I realized that I also needed to pass the FORK_URL in the test.yml for the CI to work. the change is straightforward, but untested.

restlessronin commented 1 year ago

@hensha256 also added the FORK_URL to the sample .env file so new users know it's there