Skip to content

Commit 6ec08f2

Browse files
committed
Test chain ID in events
1 parent 6b0e09c commit 6ec08f2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

internal/ethereum/event_enricher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ func (ee *eventEnricher) filterEnrichEthLog(ctx context.Context, f *eventFilter,
5555
data, decoded := ee.decodeLogData(ctx, f.Event, ethLog.Topics, ethLog.Data)
5656

5757
info := eventInfo{
58-
logJSONRPC: *ethLog,
58+
logJSONRPC: *ethLog,
59+
ChainIdentifier: fftypes.JSONAnyPtr("asd"),
5960
}
6061

6162
var timestamp *fftypes.FFTime

internal/ethereum/event_stream.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ type eventFilter struct {
4545
// eventInfo is the top-level structure we pass to applications for each event (through the FFCAPI framework)
4646
type eventInfo struct {
4747
logJSONRPC
48-
InputMethod string `json:"inputMethod,omitempty"` // the method invoked, if it matched one of the signatures in the listener definition
49-
InputArgs *fftypes.JSONAny `json:"inputArgs,omitempty"` // the method parameters, if the method matched one of the signatures in the listener definition
50-
InputSigner *ethtypes.Address0xHex `json:"inputSigner,omitempty"` // the signing `from` address of the transaction
48+
InputMethod string `json:"inputMethod,omitempty"` // the method invoked, if it matched one of the signatures in the listener definition
49+
InputArgs *fftypes.JSONAny `json:"inputArgs,omitempty"` // the method parameters, if the method matched one of the signatures in the listener definition
50+
InputSigner *ethtypes.Address0xHex `json:"inputSigner,omitempty"` // the signing `from` address of the transaction
51+
ChainIdentifier *fftypes.JSONAny `json:"chainIdentifier,omitempty"` // an identifier for the chain this event relates to
5152
}
5253

5354
// eventStream is the state we hold in memory for each eventStream

0 commit comments

Comments
 (0)