Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.16k stars 1.08k forks source link

Quoter contract with view methods #332

Closed 134dd3v closed 1 year ago

134dd3v commented 1 year ago

Summary

This is a proposal to add a Quoter contract with interface similar to the existing Quoter contract just that the quote functions are view.

The contract in this PR was created simply by duplicating the existing quoter contract and replacing the try catch pool.swap logic with the simulate swap. Simulate library in v3-core repo which makes it feasible to have quotes under a staticcall / view function. This contract is tentatively named as QuoterV3 and it passes all the tests written for Quoter contract.

Rationale

Please lmk if any changes are required to be done in this PR.

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.