Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonedaddy/go-defi
a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains
https://github.com/bonedaddy/go-defi
1inch defi ethereum go-ethereum golang oneinch sdk smart-contracts solidity sushiswap uniswap uniswap-v2 uniswap-v3
Last synced: about 2 months ago
JSON representation
a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains
- Host: GitHub
- URL: https://github.com/bonedaddy/go-defi
- Owner: bonedaddy
- License: apache-2.0
- Created: 2021-03-19T00:56:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-17T03:51:22.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T11:38:26.938Z (2 months ago)
- Topics: 1inch, defi, ethereum, go-ethereum, golang, oneinch, sdk, smart-contracts, solidity, sushiswap, uniswap, uniswap-v2, uniswap-v3
- Language: Go
- Homepage:
- Size: 672 KB
- Stars: 86
- Watchers: 7
- Forks: 23
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A golang sdk for working with DeFi protocols and general utilities for working with ethereum-compatible blockchains.
# packages
* bclient
* bindings
* cli
* config
* database
* sushiswap
* uniswap
* testenv
* utils## bclient
Provides a wrapper around the `ethclient` package
## bindings
Provides code generated by abigen for working with smart contracts:
* `bindings/erc20` provides generated code for working with ERC20 contracts
* `bindings/oneinch/v2` provides generated code for working with OneInch V2 router contracts
* `bindings/oneinch/v3` provides generated code for working with OneInch V3 router contracts
* `unicrypt/presalefactory` provides generated code for working with UniCrypt presale factories
* `uniswap/*` provides generated code for working with Uniswap V2 contracts (note these can also be used for working with the corresponding sushiswap contracts)## cli
cli package
## config
configuration management package
## database
database management packlage
## sushiswap
Wrapper around go-ethereum's `ethclient` package for using sushiswap v2.
## uniswap
Wrapper around go-ethereum's `ethclient` package for using uniswap v2.
## testenv
Provides a wrapper around the SimulatedBackend allowing for an in-memory blockchain. It is particularly useful for local smart contract development, or developing backend dApps.
## utils
Provides utility functions including all [goethereum book utils](https://goethereumbook.org/en/util-go/), a helper to make `bind.TransactOpts` safe for concurrent use, as well as a general `Blockchain` interface that satisfies all functions provided by simulated backend, as well as `ethclient` which is useful for drop-in replacement of actual RPC clients, and test environments.
# examples
## transaction matching
```shell
$> /go-defi txm --methods transfer --methods transferFrom --methods buy --contract.address 0x5ade7aE8660293F2ebfcEfaba91d141d72d221e8
```