Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add maxSupportedTransactionVersion to blockSubscribe #181

Merged
merged 1 commit into from
Mar 28, 2024
Merged
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
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
Loading