Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/chains/solana/proto_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ func ConvertLPFilterQueryFromProto(p *LPFilterQuery) (*typesolana.LPFilterQuery,
EventName: p.EventName,
EventSig: eventSig,
StartingBlock: p.StartingBlock,
EventIdlJSON: p.EventIdlJson,
ContractIdlJSON: p.ContractIdlJson,
SubkeyPaths: ConvertSubkeyPathsFromProto(p.SubkeyPaths),
Retention: time.Duration(p.Retention),
MaxLogsKept: p.MaxLogsKept,
Expand Down Expand Up @@ -1592,7 +1592,7 @@ func ConvertLPFilterQueryToProto(f *typesolana.LPFilterQuery) *LPFilterQuery {
EventName: f.EventName,
EventSig: f.EventSig[:],
StartingBlock: f.StartingBlock,
EventIdlJson: f.EventIdlJSON,
ContractIdlJson: f.ContractIdlJSON,
SubkeyPaths: ConvertSubkeyPathsToProto(f.SubkeyPaths),
Retention: int64(f.Retention),
MaxLogsKept: f.MaxLogsKept,
Expand Down
2 changes: 1 addition & 1 deletion pkg/chains/solana/proto_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func TestLPFilterAndSubkeysConverters(t *testing.T) {
EventName: "Evt",
EventSig: mkBytes(typesolana.EventSignatureLength, 0xBB),
StartingBlock: 10,
EventIdlJson: []byte(`{"idl":1}`),
ContractIdlJson: []byte(`{"idl":1}`),
SubkeyPaths: []*conv.Subkeys{{Subkeys: []string{"a", "b"}}, {Subkeys: []string{"c"}}},
Retention: int64(time.Hour),
MaxLogsKept: 100,
Expand Down
41 changes: 26 additions & 15 deletions pkg/chains/solana/solana.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/chains/solana/solana.proto
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,12 @@ message LPFilterQuery {
string event_name = 3; // optional label
bytes event_sig = 4; // 8-byte event discriminator
int64 starting_block = 5; // start slot
bytes event_idl_json = 6; // IDL JSON bytes
bytes event_idl_json = 6 [deprecated = true]; // event IDL JSON bytes
repeated Subkeys subkey_paths = 7; // subkey selectors
int64 retention = 8; // seconds to keep logs
int64 max_logs_kept = 9; // 0 = unlimited
bool include_reverted = 10; // include rolled-back
bytes contract_idl_json = 11; // contract IDL JSON bytes
}

// Canonical log shape for tracked events.
Expand Down
12 changes: 7 additions & 5 deletions pkg/types/chains/solana/lp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ type SubKeyPaths [][]string
// this filter defines what logs should be cached
// cached logs can be retrieved with [types.SolanaService.QueryTrackedLogs]
type LPFilterQuery struct {
Name string
Address PublicKey
EventName string
EventSig EventSignature
StartingBlock int64
Name string
Address PublicKey
EventName string
EventSig EventSignature
StartingBlock int64
// Deprecated: Use ContractIdlJSON instead
EventIdlJSON []byte
ContractIdlJSON []byte
SubkeyPaths SubKeyPaths
Retention time.Duration
MaxLogsKept int64
Expand Down
Loading