/cosmos/tx/v1beta1/simulate REST API Endpoint
Parâmetros corporais
tx
objeto
A carregar...
body
objeto
A carregar...
messages
matriz
OBRIGATÓRIO
A carregar...
type_url
cadeia de caracteres
A carregar...
exchange_rates
cadeia de caracteres
A carregar...
feeder
cadeia de caracteres
A carregar...
validador
cadeia de caracteres
A carregar...
memo
cadeia de caracteres
A carregar...
timeout_height
cadeia de caracteres
OBRIGATÓRIO
A carregar...
extension_options
matriz
A carregar...
type_url
cadeia de caracteres
A carregar...
valor
cadeia de caracteres
A carregar...
non_critical_extension_options
matriz
A carregar...
type_url
cadeia de caracteres
A carregar...
valor
cadeia de caracteres
A carregar...
auth_info
objeto
A carregar...
signer_infos
matriz
A carregar...
chave_pública
objeto
A carregar...
type_url
cadeia de caracteres
A carregar...
valor
cadeia de caracteres
A carregar...
mode_info
objeto
A carregar...
single
objeto
A carregar...
mode
cadeia de caracteres
A carregar...
multi
objeto
A carregar...
bitarray
objeto
A carregar...
extra_bits_stored
número inteiro
A carregar...
elems
cadeia de caracteres
A carregar...
mode_infos
matriz
A carregar...
sequência
cadeia de caracteres
A carregar...
fee
objeto
OBRIGATÓRIO
A carregar...
montante
matriz
A carregar...
denom
cadeia de caracteres
A carregar...
montante
cadeia de caracteres
A carregar...
gas_limit
cadeia de caracteres
A carregar...
payer
cadeia de caracteres
A carregar...
granter
cadeia de caracteres
A carregar...
tip
objeto
A carregar...
montante
matriz
A carregar...
denom
cadeia de caracteres
A carregar...
montante
cadeia de caracteres
A carregar...
tipper
cadeia de caracteres
A carregar...
assinaturas
matriz
OBRIGATÓRIO
A carregar...
tx_bytes
cadeia de caracteres
A carregar...
Devoluções
params
objeto
A carregar...
gas_info
objeto
A carregar...
gas_wanted
cadeia de caracteres
A carregar...
gas_used
cadeia de caracteres
A carregar...
resultado
objeto
A carregar...
dados
cadeia de caracteres
A carregar...
registo
cadeia de caracteres
A carregar...
eventos
matriz
A carregar...
tipo
cadeia de caracteres
A carregar...
atributos
matriz
A carregar...
chave
cadeia de caracteres
A carregar...
valor
cadeia de caracteres
A carregar...
índice
booleano
A carregar...
msg_responses
matriz
A carregar...
type_url
cadeia de caracteres
A carregar...
valor
cadeia de caracteres
A carregar...
Pedido
1curl --location 'https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate' \2--cabeçalho 'Content-Type: application/json' \3--dados '{4"tx": {5"body": {6"messages": [7{8"type_url": "TYPE_URL",9"value": "VALUE"10}11],12"memo": "MEMO",13"timeout_height": "TIMEOUT_HEIGHT",14"extension_options": [15{16"type_url": "TYPE_URL",17"value": "VALUE"18}19],20"non_critical_extension_options": [21{22"type_url": "TYPE_URL",23"value": "VALUE"24}25]26},27"auth_info": {28"signer_infos": [29{30"public_key": {31"type_url": "TYPE_URL",32"value": "VALUE"33},34"mode_info": {35"single": {36"mode": "SIGN_MODE_UNSPECIFIED"37},38"multi": {39"bitarray": {40"extra_bits_stored": 0,41"elems": "ELEMS"42},43"mode_infos": [44{}45]46}47},48"sequence": "SEQUENCE"49}50],51"fee": {52"amount": [53{54"denom": "DENOM",55"amount": "AMOUNT"56}57],58"gas_limit": "GAS_LIMIT",59"payer": "PAYER",60"granter": "GRANTER"61},62"tip": {63"amount": [64{65"denom": "DENOM",66"amount": "AMOUNT"67}68],69"tipper": "TIPPER"70}71},72"signatures": [73"SIGNATURES"74]75},76"tx_bytes": "TX_BYTES"77}'
1curl --location 'https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate' \2--cabeçalho 'Content-Type: application/json' \3--dados '{4"tx": {5"body": {6"messages": [7{8"type_url": "TYPE_URL",9"value": "VALUE"10}11],12"memo": "MEMO",13"timeout_height": "TIMEOUT_HEIGHT",14"extension_options": [15{16"type_url": "TYPE_URL",17"value": "VALUE"18}19],20"non_critical_extension_options": [21{22"type_url": "TYPE_URL",23"value": "VALUE"24}25]26},27"auth_info": {28"signer_infos": [29{30"public_key": {31"type_url": "TYPE_URL",32"value": "VALUE"33},34"mode_info": {35"single": {36"mode": "SIGN_MODE_UNSPECIFIED"37},38"multi": {39"bitarray": {40"extra_bits_stored": 0,41"elems": "ELEMS"42},43"mode_infos": [44{}45]46}47},48"sequence": "SEQUENCE"49}50],51"fee": {52"amount": [53{54"denom": "DENOM",55"amount": "AMOUNT"56}57],58"gas_limit": "GAS_LIMIT",59"payer": "PAYER",60"granter": "GRANTER"61},62"tip": {63"amount": [64{65"denom": "DENOM",66"amount": "AMOUNT"67}68],69"tipper": "TIPPER"70}71},72"signatures": [73"SIGNATURES"74]75},76"tx_bytes": "TX_BYTES"77}'
1pacote principal23importar (4"contexto"5tx "cosmossdk.io/api/cosmos/tx/v1beta1"6"fmt"7"google.golang.org/grpc"8"registo"9)1011func main() {12endpoint := "YOUR_QUICKNODE_ENDPOINT"13target, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(target, opts...)15if err != nil {16log.Fatal(err)17}18defer grpcConn.Close()1920req := &tx.SimulateRequest{21TxBytes: []byte("YOUR_TX_BYTES")22}23txClient := tx.NewServiceClient(grpcConn)24resp, err := txClient.Simulate(context.Background(), req)25if err != nil {26log.Fatal(err)27}28fmt.Println(resp.SimulateResponse().Result())29}30
1pacote principal23importar (4"contexto"5tx "cosmossdk.io/api/cosmos/tx/v1beta1"6"fmt"7"google.golang.org/grpc"8"registo"9)1011func main() {12endpoint := "YOUR_QUICKNODE_ENDPOINT"13target, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(target, opts...)15if err != nil {16log.Fatal(err)17}18defer grpcConn.Close()1920req := &tx.SimulateRequest{21TxBytes: []byte("YOUR_TX_BYTES")22}23txClient := tx.NewServiceClient(grpcConn)24resp, err := txClient.Simulate(context.Background(), req)25if err != nil {26log.Fatal(err)27}28fmt.Println(resp.SimulateResponse().Result())29}30
1const myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34const raw = JSON.stringify({5"tx": {6"body": {7"messages": [8{9"type_url": "TYPE_URL",10"value": "VALUE"11}12],13"memo": "MEMO",14"timeout_height": "TIMEOUT_HEIGHT",15"extension_options": [16{17"type_url": "TYPE_URL",18"value": "VALUE"19}20],21"non_critical_extension_options": [22{23"type_url": "TYPE_URL",24"value": "VALUE"25}26]27},28"auth_info": {29"signer_infos": [30{31"public_key": {32"type_url": "TYPE_URL",33"value": "VALUE"34},35"mode_info": {36"single": {37"mode": "SIGN_MODE_UNSPECIFIED"38},39"multi": {40"bitarray": {41"extra_bits_stored": 0,42"elems": "ELEMS"43},44"mode_infos": [45{}46]47}48},49"sequence": "SEQUENCE"50}51],52"fee": {53"amount": [54{55"denom": "DENOM",56"amount": "AMOUNT"57}58],59"gas_limit": "GAS_LIMIT",60"payer": "PAYER",61"granter": "GRANTER"62},63"tip": {64"amount": [65{66"denom": "DENOM",67"amount": "AMOUNT"68}69],70"tipper": "TIPPER"71}72},73"signatures": [74"SIGNATURES"75]76},77"tx_bytes": "TX_BYTES"78});7980const requestOptions = {81método: "POST",82cabeçalhos: myHeaders,83corpo: raw,84redirecionar: "seguir"85};8687fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate", requestOptions)88.então((resposta) => resposta.texto())89.então((resultado) => console.log(resultado))90.catch((erro) => console.erro(erro));
1const myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34const raw = JSON.stringify({5"tx": {6"body": {7"messages": [8{9"type_url": "TYPE_URL",10"value": "VALUE"11}12],13"memo": "MEMO",14"timeout_height": "TIMEOUT_HEIGHT",15"extension_options": [16{17"type_url": "TYPE_URL",18"value": "VALUE"19}20],21"non_critical_extension_options": [22{23"type_url": "TYPE_URL",24"value": "VALUE"25}26]27},28"auth_info": {29"signer_infos": [30{31"public_key": {32"type_url": "TYPE_URL",33"value": "VALUE"34},35"mode_info": {36"single": {37"mode": "SIGN_MODE_UNSPECIFIED"38},39"multi": {40"bitarray": {41"extra_bits_stored": 0,42"elems": "ELEMS"43},44"mode_infos": [45{}46]47}48},49"sequence": "SEQUENCE"50}51],52"fee": {53"amount": [54{55"denom": "DENOM",56"amount": "AMOUNT"57}58],59"gas_limit": "GAS_LIMIT",60"payer": "PAYER",61"granter": "GRANTER"62},63"tip": {64"amount": [65{66"denom": "DENOM",67"amount": "AMOUNT"68}69],70"tipper": "TIPPER"71}72},73"signatures": [74"SIGNATURES"75]76},77"tx_bytes": "TX_BYTES"78});7980const requestOptions = {81método: "POST",82cabeçalhos: myHeaders,83corpo: raw,84redirecionar: "seguir"85};8687fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate", requestOptions)88.então((resposta) => resposta.texto())89.então((resultado) => console.log(resultado))90.catch((erro) => console.erro(erro));
1importar pedidos2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate"56carga útil = json.dumps({7"tx": {8"body": {9"messages": [10{11"type_url": "TYPE_URL",12"value": "VALUE"13}14],15"memo": "MEMO",16"timeout_height": "TIMEOUT_HEIGHT",17"extension_options": [18{19"type_url": "TYPE_URL",20"value": "VALUE"21}22],23"non_critical_extension_options": [24{25"type_url": "TYPE_URL",26"value": "VALUE"27}28]29},30"auth_info": {31"signer_infos": [32{33"public_key": {34"type_url": "TYPE_URL",35"value": "VALUE"36},37"mode_info": {38"single": {39"mode": "SIGN_MODE_UNSPECIFIED"40},41"multi": {42"bitarray": {43"extra_bits_stored": 0,44"elems": "ELEMS"45},46"mode_infos": [47{}48]49}50},51"sequence": "SEQUENCE"52}53],54"fee": {55"amount": [56{57"denom": "DENOM",58"amount": "AMOUNT"59}60],61"gas_limit": "GAS_LIMIT",62"payer": "PAYER",63"granter": "GRANTER"64},65"tip": {66"amount": [67{68"denom": "DENOM",69"amount": "AMOUNT"70}71],72"tipper": "TIPPER"73}74},75"signatures": [76"SIGNATURES"77]78},79"tx_bytes": "TX_BYTES"80})81cabeçalhos = {82'Content-Type': 'application/json'83}8485resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)8687imprimir(resposta.texto)88
1importar pedidos2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate"56carga útil = json.dumps({7"tx": {8"body": {9"messages": [10{11"type_url": "TYPE_URL",12"value": "VALUE"13}14],15"memo": "MEMO",16"timeout_height": "TIMEOUT_HEIGHT",17"extension_options": [18{19"type_url": "TYPE_URL",20"value": "VALUE"21}22],23"non_critical_extension_options": [24{25"type_url": "TYPE_URL",26"value": "VALUE"27}28]29},30"auth_info": {31"signer_infos": [32{33"public_key": {34"type_url": "TYPE_URL",35"value": "VALUE"36},37"mode_info": {38"single": {39"mode": "SIGN_MODE_UNSPECIFIED"40},41"multi": {42"bitarray": {43"extra_bits_stored": 0,44"elems": "ELEMS"45},46"mode_infos": [47{}48]49}50},51"sequence": "SEQUENCE"52}53],54"fee": {55"amount": [56{57"denom": "DENOM",58"amount": "AMOUNT"59}60],61"gas_limit": "GAS_LIMIT",62"payer": "PAYER",63"granter": "GRANTER"64},65"tip": {66"amount": [67{68"denom": "DENOM",69"amount": "AMOUNT"70}71],72"tipper": "TIPPER"73}74},75"signatures": [76"SIGNATURES"77]78},79"tx_bytes": "TX_BYTES"80})81cabeçalhos = {82'Content-Type': 'application/json'83}8485resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)8687imprimir(resposta.texto)88
1exigir "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12pedido.corpo = JSON.dump({13"tx": {14"body": {15"messages": [16{17"type_url": "TYPE_URL",18"value": "VALUE"19}20],21"memo": "MEMO",22"timeout_height": "TIMEOUT_HEIGHT",23"extension_options": [24{25"type_url": "TYPE_URL",26"value": "VALUE"27}28],29"non_critical_extension_options": [30{31"type_url": "TYPE_URL",32"value": "VALUE"33}34]35},36"auth_info": {37"signer_infos": [38{39"public_key": {40"type_url": "TYPE_URL",41"value": "VALUE"42},43"mode_info": {44"single": {45"mode": "SIGN_MODE_UNSPECIFIED"46},47"multi": {48"bitarray": {49"extra_bits_stored": 0,50"elems": "ELEMS"51},52"mode_infos": [53{}54]55}56},57"sequence": "SEQUENCE"58}59],60"fee": {61"amount": [62{63"denom": "DENOM",64"amount": "AMOUNT"65}66],67"gas_limit": "GAS_LIMIT",68"payer": "PAYER",69"granter": "GRANTER"70},71"tip": {72"amount": [73{74"denom": "DENOM",75"amount": "AMOUNT"76}77],78"tipper": "TIPPER"79}80},81"signatures": [82"SIGNATURES"83]84},85"tx_bytes": "TX_BYTES"86})8788resposta = https.pedido(pedido)89insere a resposta.read_body90
1exigir "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/simulate")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12pedido.corpo = JSON.dump({13"tx": {14"body": {15"messages": [16{17"type_url": "TYPE_URL",18"value": "VALUE"19}20],21"memo": "MEMO",22"timeout_height": "TIMEOUT_HEIGHT",23"extension_options": [24{25"type_url": "TYPE_URL",26"value": "VALUE"27}28],29"non_critical_extension_options": [30{31"type_url": "TYPE_URL",32"value": "VALUE"33}34]35},36"auth_info": {37"signer_infos": [38{39"public_key": {40"type_url": "TYPE_URL",41"value": "VALUE"42},43"mode_info": {44"single": {45"mode": "SIGN_MODE_UNSPECIFIED"46},47"multi": {48"bitarray": {49"extra_bits_stored": 0,50"elems": "ELEMS"51},52"mode_infos": [53{}54]55}56},57"sequence": "SEQUENCE"58}59],60"fee": {61"amount": [62{63"denom": "DENOM",64"amount": "AMOUNT"65}66],67"gas_limit": "GAS_LIMIT",68"payer": "PAYER",69"granter": "GRANTER"70},71"tip": {72"amount": [73{74"denom": "DENOM",75"amount": "AMOUNT"76}77],78"tipper": "TIPPER"79}80},81"signatures": [82"SIGNATURES"83]84},85"tx_bytes": "TX_BYTES"86})8788resposta = https.pedido(pedido)89insere a resposta.read_body90
Ainda não tem uma conta?
Crie o seu ponto de extremidade Quicknode em segundos e comece a desenvolver
Comece gratuitamente