/v1/scripts REST API Endpoint
Parameter
block_id
Zeichenkette
Wird geladen...
block_height
Zeichenkette
Wird geladen...
Skript
Zeichenkette
Wird geladen...
arguments
Array
Wird geladen...
Rücksendungen
Wert
Zeichenkette
Wird geladen...
Anfrage
1SCRIPT=$(echo 'pub fun main(greeting: String): String { return greeting }' | base64)2GREETING=$(echo '{"type":"String","value":"Hello world"}' | base64)34curl --location https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts \5-H 'Content-Type: application/json' \6-d "{\"script\": \"${SCRIPT}\",\"arguments\":[\"${GREETING}\"]}"
1SCRIPT=$(echo 'pub fun main(greeting: String): String { return greeting }' | base64)2GREETING=$(echo '{"type":"String","value":"Hello world"}' | base64)34curl --location https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts \5-H 'Content-Type: application/json' \6-d "{\"script\": \"${SCRIPT}\",\"arguments\":[\"${GREETING}\"]}"
1const SCRIPT = btoa('pub fun main(greeting: String): String { return greeting }');2const GREETING = btoa(JSON.stringify({"type": "String", "value": "Hello world"}));345const Daten = {6script: SCRIPT,7arguments: [GREETING]8};910const Kopfzeilen = {11„Content-Type“: 'application/json'12};1314fetch("https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts", {15method: 'POST',16headers: headers,17body: JSON.stringify(data)18})19.dann(Antwort => Antwort.json())20.dann(Daten => Konsole.log(Daten))21.catch(error => console.error(error));
1const SCRIPT = btoa('pub fun main(greeting: String): String { return greeting }');2const GREETING = btoa(JSON.stringify({"type": "String", "value": "Hello world"}));345const Daten = {6script: SCRIPT,7arguments: [GREETING]8};910const Kopfzeilen = {11„Content-Type“: 'application/json'12};1314fetch("https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts", {15method: 'POST',16headers: headers,17body: JSON.stringify(data)18})19.dann(Antwort => Antwort.json())20.dann(Daten => Konsole.log(Daten))21.catch(error => console.error(error));
1import base642import json3import requests45SCRIPT = base64.b64encode(b'pub fun main(greeting: String): String { return greeting }').decode('utf-8')6GREETING = base64.b64encode(b'{"type":"String","value":"Hello world"}').decode('utf-8')78url = 'https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts'9Daten = {10'script': SCRIPT,11'arguments': [GREETING]12}13Überschriften = {14'Content-Type': 'application/json'15}1617response = requests.post(url, data=json.dumps(data), headers=headers)1819Drucken(Antwort.text)
1import base642import json3import requests45SCRIPT = base64.b64encode(b'pub fun main(greeting: String): String { return greeting }').decode('utf-8')6GREETING = base64.b64encode(b'{"type":"String","value":"Hello world"}').decode('utf-8')78url = 'https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts'9Daten = {10'script': SCRIPT,11'arguments': [GREETING]12}13Überschriften = {14'Content-Type': 'application/json'15}1617response = requests.post(url, data=json.dumps(data), headers=headers)1819Drucken(Antwort.text)
1require 'net/http'2require 'json'3require 'base64'45SCRIPT = Base64.strict_encode64('pub fun main(greeting: String): String { return greeting }')6GREETING = Base64.strict_encode64('{"type":"String","value":"Hello world"}')78url = URI("https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts")9headers = { 'Content-Type' => 'application/json' }10data = { 'script' => SCRIPT, 'arguments' => [GREETING] }1112http = Net::HTTP.new(url.host, URL.Port)13http.use_ssl = true14request = Net::HTTP::Post.new(url, headers)15request.body = JSON.generate(data)1617Antwort = http.Anfrage(Anfrage)18gibt die Antwort aus.Hauptteil
1require 'net/http'2require 'json'3require 'base64'45SCRIPT = Base64.strict_encode64('pub fun main(greeting: String): String { return greeting }')6GREETING = Base64.strict_encode64('{"type":"String","value":"Hello world"}')78url = URI("https://docs-demo.flow-mainnet.quiknode.pro/v1/scripts")9headers = { 'Content-Type' => 'application/json' }10data = { 'script' => SCRIPT, 'arguments' => [GREETING] }1112http = Net::HTTP.new(url.host, URL.Port)13http.use_ssl = true14request = Net::HTTP::Post.new(url, headers)15request.body = JSON.generate(data)1617Antwort = http.Anfrage(Anfrage)18gibt die Antwort aus.Hauptteil
Haben Sie noch kein Konto?
Erstellen Sie Ihren Quicknode-Endpunkt in Sekundenschnelle und legen Sie los
Kostenlos loslegen