Skip to content

vincentserpoul/goethx

Repository files navigation

Transaction listener for ethereum

Documentation Go Report Card Coverage Status CircleCI Maintainability

Usage

txm, err := goethx.NewTxMgr(&logger.Log, ethClient, 6, 15* time.Minute, 1 * time.Second)
if err != nil {
    log.Fatalf("goethx.NewTxMgr: %v", err)
}
chTx := make(chan goethx.TxMsg)
go txm.MonitorTx(common.HexToHash("0x123"), chTx)
msg := <- chTx
if msg.Err != nil {
    log.Fatalf("goethx.MonitorTx(%s): %v", common.HexToHash("0x123").String(), msg.Err)
}