uniswap / swap-router-contracts Goto Github PK
View Code? Open in Web Editor NEWSmart contracts for swapping on Uniswap V2 and V3. Superseded by https://github.com/Uniswap/universal-router
License: GNU General Public License v2.0
Smart contracts for swapping on Uniswap V2 and V3. Superseded by https://github.com/Uniswap/universal-router
License: GNU General Public License v2.0
Did SwapRouter02 deploy in Optimism goerli testnet?
contracts/swap-router-contracts/contracts/base/PeripheryPaymentsExtended.sol:12:9: DeclarationError: Undeclared identifier. "unwrapWETH9" is not (or not yet) visible at this point.
unwrapWETH9(amountMinimum, msg.sender);
^---------^
contracts/swap-router-contracts/contracts/base/PeripheryPaymentsExtended.sol:22:9: DeclarationError: Undeclared identifier. "sweepToken" is not (or not yet) visible at this point.
sweepToken(token, amountMinimum, msg.sender);
^--------^
Can anyone help?
Thank you!
The repository is not compatible to integrate with newer versions of the solidity.
for instance, swap-router-contracts/contracts/interfaces/ISwapRouter02.sol
interface includes interface IApproveAndCall has locked compiler version to =0.7.6
.
A third party contract with new solidity compiler that wants to integrate ISwapRouter interface will give compile error.
Error (5333): Source file requires different compiler version
closing, as we're not going to consider supporting this
#ethBribe
method [a la SwapBriber]--
--
delegatecall
for the above workflowsnot a bug or feature request, just a question, namely: what is the problem that swap-router-contracts is solving compared to uniswap's already existing routers?
is it to provide a more convenient and possibly unified API?
is it to provide a more concise API, that is only concerned with swapping (and not liquidity providing)?
is it to safe gas, or solve some other technical issues with pure routers?
thanks in advance for any infos!
support flashbots via additional #ethBribe method [a la SwapBriber] no longer 'riskless' due to eip 1559 (https://github.com/ScopeLift/zeneth/blob/main/contracts/contracts/SwapBriber.sol)
p1
ApproveAndCall
for tokens that require ApprovalType.MAX_MINUS_ONE-style approvesPeripheryPaymentsExtended
PeripheryPaymentsWithFeeExtended
since they're closely related to swapping, we should probably make this repo the official source for the quoter contracts
makes calldata more portable
We could consider allowing splitting/merging of trades (examples below). tagging as wontfix
until a compelling design for this feature is proposed.
merging:
50% ETH → WBTC ↘
50% ETH → USDC → DAI → USDT
splitting:
100% ETH → USDC → DAI → USDT (.3%)
↘ USDT (.05%)
recipient
, hasAlreadyPaid
, sqrtPriceLimitX96
, and path
vs tokenIn
/fee
/tokenOut
are all prime candidates for optional overloads, but the number of permutations is fairly overwhelming
this way calls we always want to succeed (like the first add liquidity for a pool) don't need to fail or can fail fast
also removes duplicate deadline checks
swap-router-contracts/contracts/V2SwapRouter.sol
Lines 51 to 62 in c3da49a
this is only on exact input but not exact output
i think it's because it's for split/merge and that doesn't work with this pattern for exact output but would be good to document the thoughts there
Is the MixedRouteQuoter deployed? If so, what are the deployment addresses? I couldn't find anything on it.
we should probably start at 1 for our dummy values, to avoid overloading the default value case
What is the address of SwapRouter02 on avax?
Hello
Implement token ERC223 for swap and liquidity pools please
Bounty : 5000 SaTT
Thanks
The following contracts require the relevant functions to be marked public
instead of external
so that we can inherit from/extend the periphery contracts rather than re-implement
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.