Skip to content

Commit eac694b

Browse files
committed
Add changedSinceSlot arg for gPA
1 parent 4370b70 commit eac694b

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

rpc/getProgramAccounts.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func (cl *Client) GetProgramAccountsWithOpts(
5959
"length": opts.DataSlice.Length,
6060
}
6161
}
62+
if opts.ChangedSinceSlot != nil {
63+
obj["changedSinceSlot"] = *opts.ChangedSinceSlot
64+
}
6265
}
6366

6467
params := []any{publicKey, obj}

rpc/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ type GetProgramAccountsOpts struct {
406406
// Filter results using various filter objects;
407407
// account must meet all filter criteria to be included in results.
408408
Filters []RPCFilter `json:"filters,omitempty"`
409+
410+
// Return only the accounts that have changed since this slot
411+
ChangedSinceSlot *uint64 `json:"changedSinceSlot,omitempty"`
409412
}
410413

411414
type GetProgramAccountsResult []*KeyedAccount

0 commit comments

Comments
 (0)