service

package
v0.0.0-...-6f77497 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEthClientBalanceService

func NewEthClientBalanceService(ethClient EthereumClient, contractTokensMap map[string]string) (*ethClientBalanceService, error)

func NewEthClientStub

func NewEthClientStub() *ethClientStub

func NewEthereumBalanceService

func NewEthereumBalanceService(ethBalanceService EthBalanceService) *defaultEthereumBalanceService

func NewEthplorerBalanceService

func NewEthplorerBalanceService(smartContractTokensMap map[string]string) *ethplorerBalanceService

Types

type BigInt

type BigInt struct {
	BigIntValue *big.Int
}

func (BigInt) MarshalJSON

func (b BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) UnmarshalJSON

func (b *BigInt) UnmarshalJSON(p []byte) error

type EthBalanceService

type EthBalanceService interface {
	GetBalancesForAddress(ctx context.Context, address string) (*sync.Map, error)
}

type EthereumBalanceService

type EthereumBalanceService interface {
	GetBalances(ctx context.Context, ethAddress string) (map[string]*big.Float, error)
}

type EthereumClient

type EthereumClient interface {
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
	FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL