firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Proposal: Generic subscription options while adding contract listener

Open niklas-emmelius-mittelstand-ai opened this issue 2 years ago • 4 comments
trafficstars

Generic subscription options while adding contract listener

Generic options for the automatically generated subscription can be passed in listener options

{
  "name": "PayPerUseListener",
  "options": {
    "firstEvent": "newest",
    "subscriptionOptions": {
      "additionalOption1": "option1",
      "additionalOption2": "option 2"
    }
  },
  "topic": "default1"
}

Intention

A privacyGroupId could be passed to Ethconnect and calls to priv_getLogs etc. would be possible. Every plugin would be able to listen for the subscriptionOptions necessary for its subscription configuration.

The introduced changes do not break existing functionality.

Thanks for opening this! This seems like an interesting idea and I or one of other maintainers will review this and provide some feedback as soon as we can, though most of them are a bit busier than usual at the moment.

nguyer avatar Sep 12 '23 20:09 nguyer

Ah, it looks like the linter is complaining because a file was updated by the copyright year in the header wasn't also updated. Sorry, it's a silly linter rule.

Error: pkg/core/contract_listener.go:1:17: Expected:2023, Actual: 2022 Kaleido, Inc. (goheader)

nguyer avatar Sep 14 '23 16:09 nguyer

Closing and re-opening to get the build to run again

nguyer avatar Jan 17 '24 16:01 nguyer

@niklas-emmelius-mittelstand-ai Sorry it took so long to get feedback on this one. If you want to rename SubscriptionOptions to ListenerOptions I'm happy to merge this PR. Thanks!

nguyer avatar Feb 15 '24 18:02 nguyer