github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/staking/types/address.go (about)

     1  package types
     2  
     3  import (
     4  	"fmt"
     5  
     6  	sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
     7  )
     8  
     9  // OVPair is designed for querying validators by rest
    10  type OVPair struct {
    11  	OperAddr sdk.ValAddress `json:"operator_address"`
    12  	ValAddr  string         `json:"validator_address"`
    13  }
    14  
    15  // OVPairs is the alias of the OVPair slice
    16  type OVPairs []OVPair
    17  
    18  // String returns a human readable string representation of OVPairs
    19  func (ovPairs OVPairs) String() (out string) {
    20  	for _, ovPair := range ovPairs {
    21  		out = fmt.Sprintf("%s%s:%s\n", out, ovPair.OperAddr.String(), ovPair.ValAddr)
    22  	}
    23  	return
    24  }