Skip to content

Commit

Permalink
add maxSupportedTransactionVersion to blockSubscribe (#181)
Browse files Browse the repository at this point in the history
Co-authored-by: Quentin Davillé <quentin.daville@kaiko.com>
  • Loading branch information
D-Quentin and Quentin Davillé authored Mar 28, 2024
1 parent 454e39f commit 818b323
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rpc/ws/blockSubscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ type BlockSubscribeOpts struct {

// Whether to populate the rewards array. If parameter not provided, the default includes rewards.
Rewards *bool

// Max transaction version to return in responses.
// If the requested block contains a transaction with a higher version, an error will be returned.
MaxSupportedTransactionVersion *uint64
}

// NOTE: Unstable, disabled by default
Expand Down Expand Up @@ -114,6 +118,9 @@ func (cl *Client) BlockSubscribe(
if opts.Rewards != nil {
obj["rewards"] = opts.Rewards
}
if opts.MaxSupportedTransactionVersion != nil {
obj["maxSupportedTransactionVersion"] = *opts.MaxSupportedTransactionVersion
}
if len(obj) > 0 {
params = append(params, obj)
}
Expand Down

0 comments on commit 818b323

Please sign in to comment.