Versions in this module Expand all Collapse all v0 v0.7.0 Dec 17, 2018 Changes in this version + var ETHToken = Token + func NewCliFlags() []cli.Flag + type CachedClient struct + func NewCachedClient(client *Client) *CachedClient + func (cc *CachedClient) FromWei(address common.Address, amount *big.Int) (float64, error) + func (cc *CachedClient) ToWei(address common.Address, amount float64) (*big.Int, error) + func (cc *CachedClient) Tokens() ([]Token, error) + type Client struct + func NewClient(sugar *zap.SugaredLogger, url, signingKey string) (*Client, error) + func NewClientFromContext(sugar *zap.SugaredLogger, c *cli.Context) (*Client, error) + func (c *Client) FromWei(address common.Address, amount *big.Int) (float64, error) + func (c *Client) GetActiveTokens() ([]Token, error) + func (c *Client) GetInternalTokens() ([]Token, error) + func (c *Client) ToWei(address common.Address, amount float64) (*big.Int, error) + func (c *Client) Tokens() ([]Token, error) + type Interface interface + FromWei func(common.Address, *big.Int) (float64, error) + ToWei func(common.Address, float64) (*big.Int, error) + Tokens func() ([]Token, error) + type MockClient struct + func NewMockClient() *MockClient + func (mc *MockClient) FromWei(_ common.Address, _ *big.Int) (float64, error) + func (mc *MockClient) GetActiveTokens() ([]Token, error) + func (mc *MockClient) GetInternalTokens() ([]Token, error) + func (mc *MockClient) ToWei(_ common.Address, _ float64) (*big.Int, error) + func (mc *MockClient) Tokens() ([]Token, error) + type Token struct + Address string + Decimals int64 + ID string + Name string + func LookupToken(client Interface, ID string) (Token, error) + func (t *Token) FromWei(amount *big.Int) float64 + func (t *Token) ToWei(amount float64) *big.Int