firefly
firefly copied to clipboard
Proposal: Generic subscription options while adding contract listener
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.
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)
Closing and re-opening to get the build to run again
@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!