/wallet/deploycontract REST API Endpoint
身體參數
abi
json
必填
載入中...
bytecode
字串
必填
載入中...
fee_limit
整數
必填
載入中...
parameter
字串
必填
載入中...
origin_energy_limit
整數
必填
載入中...
owner_address
字串
必填
載入中...
名稱
字串
必填
載入中...
call_value
字串
必填
載入中...
consume_user_resource_percent
整數
必填
載入中...
permission_id
整數
載入中...
visible
布林值
載入中...
退貨
visible
載入中...
txid
載入中...
raw_data
載入中...
合約
載入中...
parameter
載入中...
值
載入中...
new_contract
載入中...
owner_address
載入中...
call_token_value
載入中...
token_id
載入中...
type_url
載入中...
類型
載入中...
ref_block_bytes
載入中...
ref_block_hash
載入中...
expiration
載入中...
時間戳記
載入中...
raw_data_hex
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",7"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",8"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",9"name": "SomeContract",10"visible": true11}12'
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",7"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",8"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",9"name": "SomeContract",10"visible": true11}12'
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract';2const 標頭 = {3「接受」: 'application/json',4「Content-Type」: 'application/json'5};6const body = JSON.stringify({7"abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",8"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",9"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",10"name": "SomeContract",11"visible": true12});1314取得(url, {15方法: 'POST',16標題: 標頭:,17body: body18})19.接著(回應 => response.json())20.then(data => {21// Handle response data22console.log(data);23})24.catchcatch(錯誤 => {25// Handle error26控制台.錯誤(錯誤);27});28
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract';2const 標頭 = {3「接受」: 'application/json',4「Content-Type」: 'application/json'5};6const body = JSON.stringify({7"abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",8"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",9"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",10"name": "SomeContract",11"visible": true12});1314取得(url, {15方法: 'POST',16標題: 標頭:,17body: body18})19.接著(回應 => response.json())20.then(data => {21// Handle response data22console.log(data);23})24.catchcatch(錯誤 => {25// Handle error26控制台.錯誤(錯誤);27});28
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10"abi": "[{\"constant\":False,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":False,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":True,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":False,\"stateMutability\":\"view\",\"type\":\"function\"}]",11"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",12"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",13"name": "SomeContract",14"visible": True15}1617response = requests.post(url, headers=headers, json=data)18response_body = response.json()1920# Handle response data21print(response_body)22
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10"abi": "[{\"constant\":False,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":False,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":True,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":False,\"stateMutability\":\"view\",\"type\":\"function\"}]",11"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",12"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",13"name": "SomeContract",14"visible": True15}1617response = requests.post(url, headers=headers, json=data)18response_body = response.json()1920# Handle response data21print(response_body)22
1需要 'net/http'2require 'json'34url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract')5http = Net::HTTP.new(url.host, url.port)6標題 = {7'Accept' => 'application/json',8'Content-Type' => 'application/json'9}10資料 = {11"abi" => "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",12"bytecode" => "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",13"owner_address" => "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",14"name" => "SomeContract",15"visible" => true16}1718request = Net::HTTP::Post.new(url.path, headers)19請求。正文 = data.to_json2021回應 = http.請求(請求)22response_body = JSON.parse(response.body)2324# Handle response data25puts response_body26
1需要 'net/http'2require 'json'34url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract')5http = Net::HTTP.new(url.host, url.port)6標題 = {7'Accept' => 'application/json',8'Content-Type' => 'application/json'9}10資料 = {11"abi" => "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",12"bytecode" => "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",13"owner_address" => "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",14"name" => "SomeContract",15"visible" => true16}1718request = Net::HTTP::Post.new(url.path, headers)19請求。正文 = data.to_json2021回應 = http.請求(請求)22response_body = JSON.parse(response.body)2324# Handle response data25puts response_body26