Documentation ¶
Index ¶
- func GetAuth() (*bind.TransactOpts, error)
- type EthService
- func (ethSrv *EthService) Account() *accounts.Account
- func (ethSrv *EthService) Client() *ethclient.Client
- func (ethSrv *EthService) ConnectWeb3() *ethclient.Client
- func (ethSrv *EthService) DeployTokenContract() error
- func (ethSrv *EthService) GetBalance(address common.Address) (*big.Float, error)
- func (ethSrv *EthService) LoadTokenContract(contractAddr common.Address)
- func (ethSrv *EthService) SavePointLoad() (lastBlock uint64, lastTxIndex uint, err error)
- func (ethSrv *EthService) SavePointSave(lastBlock uint64, lastTxIndex uint) error
- func (ethSrv *EthService) SignBytes(b []byte) (*SignatureEthMsg, error)
- type EventHandlerFunc
- type ReceiptDownloader
- func (r *ReceiptDownloader) Forget(txid common.Hash)
- func (r *ReceiptDownloader) Get(txid common.Hash) (*types.Receipt, error)
- func (r *ReceiptDownloader) Join()
- func (r *ReceiptDownloader) Request(txid common.Hash)
- func (r *ReceiptDownloader) Start()
- func (r *ReceiptDownloader) Stats() (queuelen, pendinglen int)
- func (r *ReceiptDownloader) Stop()
- type ReceiptTask
- type SavePoint
- type ScanEventDispatcher
- type SignatureEthMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuth ¶
func GetAuth() (*bind.TransactOpts, error)
Types ¶
type EthService ¶
type EthService struct { Token *token.Token Scanner *ScanEventDispatcher // contains filtered or unexported fields }
func NewEthService ¶
func (*EthService) Account ¶
func (ethSrv *EthService) Account() *accounts.Account
func (*EthService) Client ¶
func (ethSrv *EthService) Client() *ethclient.Client
func (*EthService) ConnectWeb3 ¶
func (ethSrv *EthService) ConnectWeb3() *ethclient.Client
func (*EthService) DeployTokenContract ¶
func (ethSrv *EthService) DeployTokenContract() error
DeployTokenContract deploys the Token contract to eth network
func (*EthService) GetBalance ¶
func (*EthService) LoadTokenContract ¶
func (ethSrv *EthService) LoadTokenContract(contractAddr common.Address)
LoadTokenContract loads already deployed Token contract
func (*EthService) SavePointLoad ¶
func (ethSrv *EthService) SavePointLoad() (lastBlock uint64, lastTxIndex uint, err error)
func (*EthService) SavePointSave ¶
func (ethSrv *EthService) SavePointSave(lastBlock uint64, lastTxIndex uint) error
func (*EthService) SignBytes ¶
func (ethSrv *EthService) SignBytes(b []byte) (*SignatureEthMsg, error)
SignBytes performs a keccak256 hash over the bytes and signs it
type EventHandlerFunc ¶
type ReceiptDownloader ¶
receiptDownloader allows to download multiple receipts at the same time.
func NewReceiptDownloader ¶
func NewReceiptDownloader(client *ethclient.Client, concurrency int) *ReceiptDownloader
func (*ReceiptDownloader) Forget ¶
func (r *ReceiptDownloader) Forget(txid common.Hash)
Forget (deletes) an already downloaded transaction.
func (*ReceiptDownloader) Join ¶
func (r *ReceiptDownloader) Join()
Join waits until all background jobs stopped
func (*ReceiptDownloader) Request ¶
func (r *ReceiptDownloader) Request(txid common.Hash)
Request to download a transaction.
func (*ReceiptDownloader) Stats ¶
func (r *ReceiptDownloader) Stats() (queuelen, pendinglen int)
Stats retrieves the status.
type ReceiptTask ¶
type ReceiptTask struct { Tx common.Hash Err error Receipt *types.Receipt // contains filtered or unexported fields }
receiptTask is a single receipt download task.
type ScanEventDispatcher ¶
func NewScanEventDispatcher ¶
func NewScanEventDispatcher(client *ethclient.Client, handler EventHandlerFunc, savepoint SavePoint) *ScanEventDispatcher
func (*ScanEventDispatcher) Join ¶
func (e *ScanEventDispatcher) Join()
Join waits all background jobs finished
func (*ScanEventDispatcher) Start ¶
func (e *ScanEventDispatcher) Start()
Start scanning the blockchain for events
func (*ScanEventDispatcher) Stop ¶
func (e *ScanEventDispatcher) Stop()
Stop scanning the blockchain for events
type SignatureEthMsg ¶
type SignatureEthMsg [65]byte
Click to show internal directories.
Click to hide internal directories.