cosmos{proposal_id}/votes/{voter} REST API Endpoint
이 방법은 제안이 유효한 동안에만 적용됩니다.
경로 매개변수
제안서_ID
문자열
필수
로딩 중...
유권자
문자열
필수
로딩 중...
반품
투표
객체
로딩 중...
제안서_ID
문자열
로딩 중...
유권자
문자열
로딩 중...
옵션
문자열
로딩 중...
옵션
배열
로딩 중...
옵션
문자열
로딩 중...
무게
문자열
로딩 중...
요청
1curl --location 'https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}'
1curl --location 'https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}'
1패키지 main23가져오기 (4"문맥"5gov "cosmossdk.cosmos"6"fmt"7"google.golang.grpc"8"로그"9)1011func main() {12endpoint := "YOUR_QUICKNODE_ENDPOINT"13대상, opts opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(대상, opts...)15만약 err != nil {16로그.치명적(err)17}18defer grpcConn.닫기()1920거버넌스 := gov.NewQueryClient(grpcConn)2122var proposalId uint64 = 0 // 실제 proposal_id로 대체하세요23voter := "{voter}" // Replace with actual voter address2425resp, err := governance.Vote(context.Background(), &gov.QueryVoteRequest{26제안 ID: proposalId,27유권자: 유권자,28})29만약 err != nil {30로그.치명적(err)31}3233fmt.PrintlnPrintln("투표:", resp.GetVote())34}
1패키지 main23가져오기 (4"문맥"5gov "cosmossdk.cosmos"6"fmt"7"google.golang.grpc"8"로그"9)1011func main() {12endpoint := "YOUR_QUICKNODE_ENDPOINT"13대상, opts opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(대상, opts...)15만약 err != nil {16로그.치명적(err)17}18defer grpcConn.닫기()1920거버넌스 := gov.NewQueryClient(grpcConn)2122var proposalId uint64 = 0 // 실제 proposal_id로 대체하세요23voter := "{voter}" // Replace with actual voter address2425resp, err := governance.Vote(context.Background(), &gov.QueryVoteRequest{26제안 ID: proposalId,27유권자: 유권자,28})29만약 err != nil {30로그.치명적(err)31}3233fmt.PrintlnPrintln("투표:", resp.GetVote())34}
1const myHeaders = new Headers();2myHeaders.추가("Accept", "*/*");34const requestOptions = {5메서드: "GET",6헤더: myHeaders,7리디렉션: "팔로우"8};910fetch("https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}", requestOptions)11.그런 다음((응답) => 응답.text())12.그런 다음((결과) => console.log(result))13.catchcatch ((오류) => console.오류(오류));
1const myHeaders = new Headers();2myHeaders.추가("Accept", "*/*");34const requestOptions = {5메서드: "GET",6헤더: myHeaders,7리디렉션: "팔로우"8};910fetch("https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}", requestOptions)11.그런 다음((응답) => 응답.text())12.그런 다음((결과) => console.log(result))13.catchcatch ((오류) => console.오류(오류));
1import 요청23url = "https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"45페이로드 = {}6헤더 = {7'수락': '*/*'8}910답변 = 요청.요청("GET", url, 헤더=헤더, data=페이로드)1112인쇄(응답.text)13
1import 요청23url = "https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"45페이로드 = {}6헤더 = {7'수락': '*/*'8}910답변 = 요청.요청("GET", url, 헤더=헤더, data=페이로드)1112인쇄(응답.text)13
1require "uri"2require "net/http"34url = URI("https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}")56https = Net::HTTP.new(url.호스트, url.포트)7https.use_ssl = true89요청 = 순::HTTP::Get.new(url)10요청["수락"] = "*/*"1112답변 = https.요청(요청)13응답을 반환합니다.read_body14
1require "uri"2require "net/http"34url = URI("https://docs-demo.cosmos-mainnet.quiknode.pro/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}")56https = Net::HTTP.new(url.호스트, url.포트)7https.use_ssl = true89요청 = 순::HTTP::Get.new(url)10요청["수락"] = "*/*"1112답변 = https.요청(요청)13응답을 반환합니다.read_body14