Content pfp
Content
@
https://opensea.io/collection/evm-6
0 reply
0 recast
2 reactions

nicholas 🧨 pfp
nicholas 🧨
@nicholas
Does anyone have a good receive() snippet for autoswapping all received ERC20s to USDC via a popular AMM router? It's receive() so it will be called without offchain data arguments like quote estimate.
1 reply
0 recast
0 reaction

Omar pfp
Omar
@omarperacha.eth
You could in theory have a method that: - checks IUniswapV3Factory to find a liquidity pool between InputToken and USDC - if found, approve the UniSwapRouter to spend your InputToken - call UniSwapRouter to swap all held InputToken to USDC using the found pool, with no min amount out (since you don't have a quote)
1 reply
0 recast
1 reaction