utils
import "command-line-arguments"
Index
- Constants
- Variables
- func ChecksumAddressString(address string) string
- func EnsureDir(dir string)
- func EtherToWei(eth *big.Float) *big.Int
- func EtherToWeiFloatToUint64(eth float64) uint64
- func HexStringArrayToBytesArray(strArray []string) [][]byte
- func LogErrorWhileRetrying(msg string, err error, retrying *bool, logger *zap.Logger)
- func Min(a, b int) int
- func RecoverSigAddress(sigHex string, msg []byte) (address string, err error)
- func SplitAddressList(addressList string, separator string) []common.Address
- func VerifySig(from string, sigHex string, msg []byte) (bool, string, error)
Constants
RetryAttempts is how many attempts are made to reconnect to an Ethereum client before failing.
const RetryAttempts = 60 * 60
RetryDelay is the delay between reconnects to an Ethereum client.
const RetryDelay = 1 * time.Second
Variables
var ServiceDelayType = retry.DelayType(func(n uint, err error, config *retry.Config) time.Duration {
return retry.FixedDelay(n, err, config)
})
var ServiceRetryAttempts = retry.Attempts(RetryAttempts)
var ServiceRetryDelay = retry.Delay(RetryDelay)
func ChecksumAddressString (opens in a new tab)
func ChecksumAddressString(address string) string
func EnsureDir (opens in a new tab)
func EnsureDir(dir string)
EnsureDir creates a given dir directory in case it does not already exist.
func EtherToWei (opens in a new tab)
func EtherToWei(eth *big.Float) *big.Int
func EtherToWeiFloatToUint64 (opens in a new tab)
func EtherToWeiFloatToUint64(eth float64) uint64
func HexStringArrayToBytesArray (opens in a new tab)
func HexStringArrayToBytesArray(strArray []string) [][]byte
func LogErrorWhileRetrying (opens in a new tab)
func LogErrorWhileRetrying(msg string, err error, retrying *bool, logger *zap.Logger)
LogErrorWhileRetrying is a wrapper for less verbose logging when retrying some actions, for instance, reconnecting to an Ethereum client.
func Min (opens in a new tab)
func Min(a, b int) int
func RecoverSigAddress (opens in a new tab)
func RecoverSigAddress(sigHex string, msg []byte) (address string, err error)
func SplitAddressList (opens in a new tab)
func SplitAddressList(addressList string, separator string) []common.Address
SplitAddressList splits a list of addresses initially given as a string addressList along with a separator to use to split the string.
func VerifySig (opens in a new tab)
func VerifySig(from string, sigHex string, msg []byte) (bool, string, error)
Generated by gomarkdoc (opens in a new tab)