/wallet/deploycontract REST API Endpoint
Body Parameters
abi
json
REQUIRED
The smart contract application binary interface
bytecode
string
REQUIRED
The compiled contract identifier, used to interact with the Virtual Machine
fee_limit
integer
REQUIRED
The maximum TRX consumption, measured in SUN
parameter
string
REQUIRED
The parameter passed to the constructor of the contract
origin_energy_limit
integer
REQUIRED
The max energy which will be consumed by the owner in the process of execution or creation of the contract, is an integer which should be greater than 0
owner_address
string
REQUIRED
The contract owner address, converted to a hex string
name
string
REQUIRED
The Contract name
call_value
string
REQUIRED
The amount of TRX transferred with this transaction, measured in SUN
consume_user_resource_percent
integer
REQUIRED
The consume user resource percentage. It should be an integer between [0, 100]. if 0, means it does not consume user resource until the developer resource has been used up
permission_id
integer
The ID of the permission that is required to execute the transaction
visible
boolean
A boolean value indicating whether the address is in base58 format
Returns
visible
A boolean value indicating whether the transaction was successful
txid
The transaction id
raw_data
An object that contains the transaction details with the following fields:
contract
An array of objects containing information about the delegate resource contract
parameter
An object containing the delegate resource contract parameters
value
An object containing the values of the delegate resource contract parameters
new_contract
The deployed contract data
owner_address
The owner account address
call_token_value
The amount of TRC-10 transferred into the contract
token_id
The TRC-10 token id
type_url
The URL of the freeze balance contract type
type
The type of the freeze balance contract
ref_block_bytes
The ref block bytes of the transaction
ref_block_hash
The ref block hash of the transaction
expiration
This is a timestamp indicating the expiration time of the transaction in milliseconds
timestamp
This is a timestamp indicating the time at which the transaction was created in milliseconds
raw_data_hex
The hexadecimal representation of the raw data in the transactio
Request
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'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free