Uniswap V3 - Single Hop Swap | DeFi
Channel: Smart Contract Programmer
Date: 2022-06-21

Solidity code example of swapping WETH to DAI on Uniswap V3

0:00 - Intro and setup
3:04 - Code swapExactInputSingle - use all input tokens, single hop
6:42 - Write test for swapExactInputSingle
13:05 - Execute test for swapExactInputSingle
13:25 - Code swapExactOutputSingle - buy exact amount of token, single hop
15:25 - Write test for swapExactOutputSingle
18:12 - Execute test for swapExactOutputSIngle

Code
https://github.com/t4sk/defi-by-example/tree/main/uni-v3

Unisvap V3 Doc
https://docs.uniswap.org/protocol/guides/swaps/single-swaps

Alchemy
https://www.alchemy.com/

#Solidity #SmartContract #Ethereum  #スマートコントラクト

Take a course
https://www.smartcontract.engineer/

Follow 
https://odysee.com/@SmartContractProgrammer:8
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com