/synapsecommon-go

Common packages and utilities used by synapsecns Go libraries

Primary LanguageGoMIT LicenseMIT

synapsecommon-go

Tests Coverags

Utility functions, ABI wrappers, and more, most or all of which are used in various synapsecns Go codebases.

Made public for the greater good of all Go developers.

Installation

Supported Go versions:

  • 1.16.x
  • 1.17.x
  • Likely 1.18, once it hits RC

Install (Go 1.16.x): go get -u github.com/synapsecns/synapsecommon-go

Install (Go 1.17.x and higher): go get -d -u github.com/synapsecns/synapsecommon-go

Contents

  • abis/erc20 - Output of abigen for the IERC20 interface. Should be wrapped.
  • addrutils - Utilities for dealing with go-ethereum's common.Address type.
  • bigfloat - Wrapper functions around common tasks when dealing with big.Float objects
  • bigint - Wrapper functions around common tasks when dealing with big.Int objects
  • env - Easily fetch values set in the local environment, with a fallback.
  • unitconv - Convert arbitrary units of Ethereum currency units of Wei or Ether.