a Golang sdk for working with DeFi protocols, and ethereum compatible blockchains


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, 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

$> /go-defi txm --methods transfer --methods transferFrom --methods buy --contract.address 0x5ade7aE8660293F2ebfcEfaba91d141d72d221e8
Owner
bonedaddy
you're always in somebody's school
bonedaddy
Similar Resources

A naive and simple implementation of blockchains.

naivechain A naive and simple implementation of blockchains. Build And Run Download and compile go get -v github.com/kofj/naivechain Start First Node

Dec 5, 2022

Dijetsnetgo: a blockchains platform with high throughput, and blazing fast transactions

Dijetsnetgo: a blockchains platform with high throughput, and blazing fast transactions

Node implementation for the Avalanche network - a blockchains platform with high

Jan 18, 2022

Avalanche: a network composed of multiple blockchains

Coreth and the C-Chain Avalanche is a network composed of multiple blockchains.

Dec 14, 2022

A Verifyable Chain Relay for Proof of Stake Blockchains

A Verifyable Chain Relay for Proof of Stake Blockchains This repository contains

Nov 11, 2022

A collection about awesome blockchains

A collection about awesome blockchains

A collection about awesome blockchains - open distributed public databases w/ crypto hashes incl. git ;-). Blockchains are the new tulips :tulip::tulip::tulip:. Distributed is the new centralized.

Jan 2, 2023

Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated builds are available for stable releases and the unstable master branch

Nov 24, 2021

Ethconvert: Ethereum unit converter written in golang

ethconvert Ethereum unit converter written in go. Install go get github.com/jon4

Jul 24, 2022
Comments
  • add errors.Wrap to have better error tracing

    add errors.Wrap to have better error tracing

    I like your package but saw that sometimes you just return the err directly instead of wrapping it. This makes it harder to see where the error is coming from. This is why I created this pull request to have this improved.

  • Transaction Matching

    Transaction Matching

    Adds the ability to filter transactions to particular contract addresses and ABIs. This can be used to filter out all addresses that interacted with a particular contract using particular ABI methods. For example given an ERC20 contract and a range of blocks, you can find all addresses that invoked transfer, transferFrom, and approval methods within the specified block range.

    This also fixes a bug with incorrectly loading configuration file from disk.

  • Refactor To Use Blockchain Interface And Configuration Changes

    Refactor To Use Blockchain Interface And Configuration Changes

    Refactors code to use utils.Blockchain instead of ethclient.Client, also updates the configuration to enable specifying simulated blockchain (in-memory), as well as include account configuration.

  • Uniswap V3 Integration (WIP)

    Uniswap V3 Integration (WIP)

    Changes

    • Breakup uniswap functionality into two packages a uniswap/v2 and univswap/v3 package.
    • Enable deploying complete uniswap v3 to simulated backend for testing

    TODO

    More robust copying of uniswap core abis and bins

    Right now to get it done quickly im copying the bytecode manually but it would be better to do it more automatically

    https://github.com/wighawag/hardhat-deploy#access-to-artifacts-non-deployed-contract-code-and-abi

    Delete uniswap v3 submodules

    Remove uniswap v3 submodules

Ethereum go-ethereum - Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated b

Feb 17, 2022
Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains

Signing, Keystore and RLP encoding utilities for EVM / Ethereum / secp256k1 based blockchains. Written in Go with an enterprise friendly Apache 2.0 license, and a runtime JSON/RPC proxy server. Part of the Hyperledger FireFly project

Aug 9, 2022
Jan 7, 2023
Go-ethereum - Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated b

Jan 4, 2022
Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum.

Evmos Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and interoperable with Ethereum. It's built using the Co

Dec 31, 2022
LEO (Low Ethereum Orbit) is an Ethereum Portal Network client.

LEO LEO (Low Ethereum Orbit) is an Ethereum Portal Network client. What makes LEO different from other Portal Network clients is that it uses libp2p f

Apr 19, 2022
Ethereum-vanity-wallet - A fork of https://github.com/meehow/ethereum-vanity-wallet but the key can be exported to a JSON keystore file

ethereum-vanity-wallet See https://github.com/meehow/ethereum-vanity-wallet This version: doesn't display the private key let's you interactively expo

Jan 2, 2022
This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.
Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK.

Ethermint Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on to

Jan 3, 2023
A blockchains platform with high throughput, and blazing fast transactions
A blockchains platform with high throughput, and blazing fast transactions

Node implementation for the Avalanche network - a blockchains platform with high throughput, and blazing fast transactions. Installation Avalanche is

Oct 31, 2021