/wallet/deploycontract REST API Endpoint
Body Parameters
abi
json
REQUIRED
Loading...
bytecode
string
REQUIRED
Loading...
fee_limit
integer
REQUIRED
Loading...
parameter
string
REQUIRED
Loading...
origin_energy_limit
integer
REQUIRED
Loading...
owner_address
string
REQUIRED
Loading...
name
string
REQUIRED
Loading...
call_value
string
REQUIRED
Loading...
consume_user_resource_percent
integer
REQUIRED
Loading...
permission_id
integer
Loading...
visible
boolean
Loading...
Returns
visible
Loading...
txid
Loading...
raw_data
Loading...
contract
Loading...
parameter
Loading...
value
Loading...
new_contract
Loading...
owner_address
Loading...
call_token_value
Loading...
token_id
Loading...
type_url
Loading...
type
Loading...
ref_block_bytes
Loading...
ref_block_hash
Loading...
expiration
Loading...
timestamp
Loading...
raw_data_hex
Loading...
Request
curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"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\"}]",
"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",
"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"name": "SomeContract",
"visible": true
}
'const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract';
const headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
const body = JSON.stringify({
"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\"}]",
"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",
"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"name": "SomeContract",
"visible": true
});
fetch(url, {
method: 'POST',
headers: headers,
body: body
})
.then(response => response.json())
.then(data => {
// Handle response data
console.log(data);
})
.catch(error => {
// Handle error
console.error(error);
});
import requests
import json
url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract'
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
data = {
"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\"}]",
"bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",
"owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"name": "SomeContract",
"visible": True
}
response = requests.post(url, headers=headers, json=data)
response_body = response.json()
# Handle response data
print(response_body)
require 'net/http'
require 'json'
url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/wallet/deploycontract')
http = Net::HTTP.new(url.host, url.port)
headers = {
'Accept' => 'application/json',
'Content-Type' => 'application/json'
}
data = {
"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\"}]",
"bytecode" => "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029",
"owner_address" => "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh",
"name" => "SomeContract",
"visible" => true
}
request = Net::HTTP::Post.new(url.path, headers)
request.body = data.to_json
response = http.request(request)
response_body = JSON.parse(response.body)
# Handle response data
puts response_body
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free