DeployContract
Deploys a contract. Returns TransactionExtention, which contains an unsigned transaction.
This method will use 30 Compute Units.
Parameters
abi- json - Required - The smart contract application binary interfacebytecode- String - Required - The compiled contract identifier, used to interact with the Virtual Machinefee_limit- int32 - Required - The maximum TRX consumption, measured in SUNparameter- String - Required - The parameter passed to the constructor of the contractorigin_energy_limit- int32 - 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 0owner_address- String - Required - The contract owner address, converted to a hex stringname- String - Required - The Contract namecall_value- String - Required - The amount of TRX transferred with this transaction, measured in SUNconsume_user_resource_percent- int32 - Requried - 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 uppermission_id- int32 - Optional. The ID of the permission that is required to execute the transactionvisible- boolean - Optional. Specifies whether the address is in Base58 format (default: false)
Returns
Transaction object - JSON object: Unsigned transaction, please refer to the Transaction chapter for the fields contained in it. Since the transaction type is CreateSmartContract, the fields contained in raw_data.contract[0].parameter.value in the transaction are as follows:
owner_address
string
Account address
new_contract
SmartContract
Deployed contract data, the fields contained in it, please refer to GetContract
call_token_value
int64
The amount of TRC-10 transferred into the contract
token_id
int64
TRC-10 token id
Last updated
Was this helpful?