Skip to content

goodylili/go-uniswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-uniswap

Dummy Uniswap v3 template with Go. Nothing too serious here

It's a template, not a package!

Check out this blog I wrote on how to use Templates with Go via go generate.

Currently busy with other projects, so I won't be able to document this indepth.

You'll need abigen to generate the Uniswap v3 router and factory ABIs.

Install it via:

go install github.com/ethereum/go-ethereum/cmd/abigen@latest

I've included the Factory, ERC20 and Router ABIs in the contract folder.

Then generate the ABIs:

abigen --abi=contract/FactoryABI.json --pkg=uniswap --out=internal/uniswap/factory.go

Check the README.md in configurations for customizing the networks and adding more on Uniswap v3.

You'll find swap functionality in the internal/uniswap/model.go file. That's pretty much what this repo is about (easy to understand v3 swap functionality).

Feel free to fork and modify it to your needs.

Reach out to me on Contacts & Socials if you have any questions.

Have fun, run wild!

About

Simplified Uniswap v3 Swap bot with Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published