Skip to content

Commit

Permalink
docs: add function documentation for elcontracts/reader and `avsreg…
Browse files Browse the repository at this point in the history
…istry/subscriber` (#533)

Co-authored-by: Pablo Deymonnaz <[email protected]>
  • Loading branch information
MegaRedHand and pablodeymo authored Feb 7, 2025
1 parent f49eaf0 commit bfced4a
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 22 deletions.
2 changes: 2 additions & 0 deletions chainio/clients/avsregistry/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func NewSubscriberFromConfig(
return NewChainSubscriber(bindings.RegistryCoordinator, bindings.BlsApkRegistry, logger), nil
}

// Returns a channel that receives new BLS pubkey registration events.
func (s *ChainSubscriber) SubscribeToNewPubkeyRegistrations() (chan *blsapkreg.ContractBLSApkRegistryNewPubkeyRegistration, event.Subscription, error) {
newPubkeyRegistrationChan := make(chan *blsapkreg.ContractBLSApkRegistryNewPubkeyRegistration)
sub, err := s.blsApkRegistry.WatchNewPubkeyRegistration(
Expand All @@ -59,6 +60,7 @@ func (s *ChainSubscriber) SubscribeToNewPubkeyRegistrations() (chan *blsapkreg.C
return newPubkeyRegistrationChan, sub, nil
}

// Returns a channel that receives operator socket update events.
func (s *ChainSubscriber) SubscribeToOperatorSocketUpdates() (chan *regcoord.ContractRegistryCoordinatorOperatorSocketUpdate, event.Subscription, error) {
operatorSocketUpdateChan := make(chan *regcoord.ContractRegistryCoordinatorOperatorSocketUpdate)
sub, err := s.regCoord.WatchOperatorSocketUpdate(
Expand Down
Loading

0 comments on commit bfced4a

Please sign in to comment.