/cosmos/distribution/v1beta1/community_pool REST API Endpoint
参数
该方法不接受任何参数
退货
pool
数组
正在加载...
denom
字符串
正在加载...
金额
字符串
正在加载...
请求
1curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool'
1curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool'
1包 main23导入 (4"上下文"5dist "cosmossdk.io/api/cosmos/distribution/v1beta1"6"fmt"7"google.golang.org/grpc"8"日志"9)1011func main() {12端点 := "YOUR_QUICKNODE_ENDPOINT"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920distribution := dist.NewQueryClient(grpcConn)21resp, err := distribution.CommunityPool(context.Background(), &dist.QueryCommunityPoolRequest{})22如果 err != nil {23log.致命(err)24}25for _, coin := range resp.Pool {26fmt.Println("community pool coin supply: ", coin.Denom, coin.Amount)27}28}29
1包 main23导入 (4"上下文"5dist "cosmossdk.io/api/cosmos/distribution/v1beta1"6"fmt"7"google.golang.org/grpc"8"日志"9)1011func main() {12端点 := "YOUR_QUICKNODE_ENDPOINT"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920distribution := dist.NewQueryClient(grpcConn)21resp, err := distribution.CommunityPool(context.Background(), &dist.QueryCommunityPoolRequest{})22如果 err != nil {23log.致命(err)24}25for _, coin := range resp.Pool {26fmt.Println("community pool coin supply: ", coin.Denom, coin.Amount)27}28}29
1const myHeaders = new Headers();2myHeaders.append("Accept", "*/*");34const requestOptions = {5方法: "GET",6标题: myHeaders,7重定向: "follow"8};910fetch("https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool", requestOptions)11.然后((响应) => 响应.文本())12.然后((结果) => 控制台.log(result))13.catch((error) => 控制台.错误(error));
1const myHeaders = new Headers();2myHeaders.append("Accept", "*/*");34const requestOptions = {5方法: "GET",6标题: myHeaders,7重定向: "follow"8};910fetch("https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool", requestOptions)11.然后((响应) => 响应.文本())12.然后((结果) => 控制台.log(result))13.catch((error) => 控制台.错误(error));
1导入 请求23url = 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool'45有效载荷 = {}6标题 = {7'Accept': '*/*'8}910回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)1112打印(响应.text)13
1导入 请求23url = 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool'45有效载荷 = {}6标题 = {7'Accept': '*/*'8}910回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)1112打印(响应.text)13
1require "uri"2require "net/http"34url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool")56https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true89请求 = Net::HTTP::Get.new(url)10request["Accept"] = "*/*"1112回复 = https.请求(请求)13返回响应.read_body14
1require "uri"2require "net/http"34url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmos/distribution/v1beta1/community_pool")56https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true89请求 = Net::HTTP::Get.new(url)10request["Accept"] = "*/*"1112回复 = https.请求(请求)13返回响应.read_body14