12
endpoint := "YOUR_QUICKNODE_ENDPOINT"13
대상, opts opts := getGrpcOptions(endpoint)14
grpcConn, err := grpc.Dial(대상, opts...)20
req := &stk.QueryValidatorDelegationsRequest{21
ValidatorAddr: "0x8b4eF40FD500dFa0Ad2381976C90D9Fad8a42814",23
스테이킹 := stk.NewQueryClient(grpcConn)24
답변, err := 스테이킹.ValidatorDelegations(컨텍스트.배경(), req)28
for _, d := range resp.DelegationResponses {29
fmt.Println("위임자 주소:", d.위임.위임자 주소)30
fmt.Println("유효성 검사기 주소:", d.위임.ValidatorAddress)31
fmt.PrintlnPrintln("주식:", d.잔액)32
fmt.PrintlnPrintln ("")
12
endpoint := "YOUR_QUICKNODE_ENDPOINT"13
대상, opts opts := getGrpcOptions(endpoint)14
grpcConn, err := grpc.Dial(대상, opts...)20
req := &stk.QueryValidatorDelegationsRequest{21
ValidatorAddr: "0x8b4eF40FD500dFa0Ad2381976C90D9Fad8a42814",23
스테이킹 := stk.NewQueryClient(grpcConn)24
답변, err := 스테이킹.ValidatorDelegations(컨텍스트.배경(), req)28
for _, d := range resp.DelegationResponses {29
fmt.Println("위임자 주소:", d.위임.위임자 주소)30
fmt.Println("유효성 검사기 주소:", d.위임.ValidatorAddress)31
fmt.PrintlnPrintln("주식:", d.잔액)32
fmt.PrintlnPrintln ("")