Skip to content

Commit

Permalink
Merge branch 'dev' into feat-improve-bls-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
taturosati authored Aug 30, 2024
2 parents 225cc3f + 8757e81 commit da6f4ed
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions chainio/clients/avsregistry/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,26 @@ func (r *ChainReader) GetOperatorFromId(
return operatorAddress, nil
}

func (r *ChainReader) QueryRegistrationDetail(
opts *bind.CallOpts,
operatorAddress common.Address,
) ([]bool, error) {
operatorId, err := r.GetOperatorId(opts, operatorAddress)
if err != nil {
return nil, err
}
value, err := r.registryCoordinator.GetCurrentQuorumBitmap(opts, operatorId)
if err != nil {
return nil, err
}
numBits := value.BitLen()
var quorums []bool
for i := 0; i < numBits; i++ {
quorums = append(quorums, value.Int64()&(1<<i) != 0)
}
return quorums, nil
}

func (r *ChainReader) IsOperatorRegistered(
opts *bind.CallOpts,
operatorAddress common.Address,
Expand Down

0 comments on commit da6f4ed

Please sign in to comment.