@@ -2,10 +2,11 @@ package handler
2
2
3
3
import (
4
4
"context"
5
- "github.com/spf13/cast"
6
5
"math/big"
7
6
"strings"
8
7
8
+ "github.com/spf13/cast"
9
+
9
10
"github.com/ethereum/go-ethereum"
10
11
"github.com/ethereum/go-ethereum/common"
11
12
"github.com/ethereum/go-ethereum/core/types"
@@ -46,7 +47,7 @@ func LogFilter(ctx *svc.ServiceContext, block schema.SyncBlock, addresses []comm
46
47
return LogsToEvents (ctx , logs , block .ID )
47
48
}
48
49
49
- func LogsToEvents (ctx * svc.ServiceContext , logs []types.Log , syncBlockId int64 ) ([]* schema.SyncEvent , error ) {
50
+ func LogsToEvents (ctx * svc.ServiceContext , logs []types.Log , syncBlockID int64 ) ([]* schema.SyncEvent , error ) {
50
51
var events []* schema.SyncEvent
51
52
blockTimes := make (map [int64 ]int64 )
52
53
sendMessageEvent := & event.SendMessage {}
@@ -78,7 +79,7 @@ func LogsToEvents(ctx *svc.ServiceContext, logs []types.Log, syncBlockId int64)
78
79
payloadMsgBytes := payloadBytes (& vlog )
79
80
evt := & schema.SyncEvent {
80
81
Blockchain : ctx .Config .Blockchain ,
81
- SyncBlockID : syncBlockId ,
82
+ SyncBlockID : syncBlockID ,
82
83
BlockTime : blockTime ,
83
84
BlockNumber : cast .ToInt64 (vlog .BlockNumber ),
84
85
BlockHash : vlog .BlockHash .Hex (),
0 commit comments