TriggerSmartContract RPC Method
Paramètres
from
chaîne de caractères
OBLIGATOIRE
Chargement...
to
chaîne de caractères
OBLIGATOIRE
Chargement...
données
chaîne de caractères
OBLIGATOIRE
Chargement...
gaz
chaîne de caractères
OBLIGATOIRE
Chargement...
valeur
chaîne de caractères
OBLIGATOIRE
Chargement...
tokenId
entier
OBLIGATOIRE
Chargement...
tokenValue
entier
OBLIGATOIRE
Chargement...
Renvoie
transaction
Chargement...
visible
Chargement...
txID
Chargement...
données brutes
Chargement...
contrat
Chargement...
paramètre
Chargement...
valeur
Chargement...
montant
Chargement...
owner_address
Chargement...
to_address
Chargement...
type_url
Chargement...
type
Chargement...
octets du bloc de référence
Chargement...
hachage du bloc de référence
Chargement...
expiration
Chargement...
limite des frais
Chargement...
horodatage
Chargement...
raw_data_hex
Chargement...
Requête
1curl https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc \2-X POST \3-H "Content-Type: application/json" \4--data '{"id": 1337,5"jsonrpc": "2.0",6"method": "buildTransaction",7"params": [8{9"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",10"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",11"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",12"gas": "0x245498",13"value": "0xA",14"tokenId": 1000035,15"tokenValue": 2016}17]1819}20'
1curl https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc \2-X POST \3-H "Content-Type: application/json" \4--data '{"id": 1337,5"jsonrpc": "2.0",6"method": "buildTransaction",7"params": [8{9"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",10"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",11"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",12"gas": "0x245498",13"value": "0xA",14"tokenId": 1000035,15"tokenValue": 2016}17]1819}20'
1var myHeaders = new Headers();2mesEnTêtes.ajouter("Content-Type", "application/json");34var raw = JSON.stringify({5"id": 1337,6"jsonrpc": "2.0",7"method": "buildTransaction",8"params": [9{10"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",11"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",12"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",13"gas": "0x245498",14"value": "0xA",15"tokenId": 1000035,16"tokenValue": 2017}18]19});2021var requestOptions = {22method: 'POST',23headers: myHeaders,24body: raw,25redirect: 'follow'26};2728fetch("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc", requestOptions)29.then(response => response.text())30.then(result => console.log(result))31.catch(error => console.log('error', error));
1var myHeaders = new Headers();2mesEnTêtes.ajouter("Content-Type", "application/json");34var raw = JSON.stringify({5"id": 1337,6"jsonrpc": "2.0",7"method": "buildTransaction",8"params": [9{10"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",11"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",12"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",13"gas": "0x245498",14"value": "0xA",15"tokenId": 1000035,16"tokenValue": 2017}18]19});2021var requestOptions = {22method: 'POST',23headers: myHeaders,24body: raw,25redirect: 'follow'26};2728fetch("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc", requestOptions)29.then(response => response.text())30.then(result => console.log(result))31.catch(error => console.log('error', error));
1import requests2import json34url = "https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc"56payload = json.dumps({7"id": 1337,8"jsonrpc": "2.0",9"method": "buildTransaction",10"params": [11{12"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",13"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",14"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",15"gas": "0x245498",16"value": "0xA",17"tokenId": 1000035,18"tokenValue": 2019}20]21})22headers = {23'Content-Type': 'application/json'24}2526response = requests.request("POST", url, headers=headers, data=payload)2728print(response.text)29
1import requests2import json34url = "https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc"56payload = json.dumps({7"id": 1337,8"jsonrpc": "2.0",9"method": "buildTransaction",10"params": [11{12"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",13"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",14"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",15"gas": "0x245498",16"value": "0xA",17"tokenId": 1000035,18"tokenValue": 2019}20]21})22headers = {23'Content-Type': 'application/json'24}2526response = requests.request("POST", url, headers=headers, data=payload)2728print(response.text)29
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc")67http = Net::HTTP.new(url.host, url.port);8request = Net::HTTP::Post.new(url)9request["Content-Type"] = "application/json"10request.body = JSON.dump({11"id": 1337,12"jsonrpc": "2.0",13"method": "buildTransaction",14"params": [15{16"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",17"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",18"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",19"gas": "0x245498",20"value": "0xA",21"tokenId": 1000035,22"tokenValue": 2023}24]25})2627response = http.request(request)28puts response.read_body29
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc")67http = Net::HTTP.new(url.host, url.port);8request = Net::HTTP::Post.new(url)9request["Content-Type"] = "application/json"10request.body = JSON.dump({11"id": 1337,12"jsonrpc": "2.0",13"method": "buildTransaction",14"params": [15{16"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",17"to": "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd",18"data": "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001",19"gas": "0x245498",20"value": "0xA",21"tokenId": 1000035,22"tokenValue": 2023}24]25})2627response = http.request(request)28puts response.read_body29
Vous n'avez pas encore de compte ?
Créez votre endpoint Quicknode en quelques secondes et commencez à développer
Commencez gratuitement