Uniswap / universal-router

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

Fixed broadcast() bug #260

Closed marktoda closed 1 year ago

marktoda commented 1 year ago

248

marktoda commented 1 year ago

When using runAndDeployPermit2() in the deployment script,

permit2 is first deployed and the address written into params. (uses vm.startBroadcast() and does not end it) run() function is called and UniversalRouter deployed. (starts a new vm.startBroadcast()) This will cause the UniversalRouter deployment to fail.

Very simple fix, but figured I should do a pull request in case other people experience the same issue when integrating the deploy scripts into their build environment.

marktoda commented 1 year ago

When using runAndDeployPermit2() in the deployment script,

permit2 is first deployed and the address written into params. (uses vm.startBroadcast() and does not end it) run() function is called and UniversalRouter deployed. (starts a new vm.startBroadcast()) This will cause the UniversalRouter deployment to fail.

Very simple fix, but figured I should do a pull request in case other people experience the same issue when integrating the deploy scripts into their build environment.