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 interface

  • bytecode - String - Required - The compiled contract identifier, used to interact with the Virtual Machine

  • fee_limit - int32 - Required - The maximum TRX consumption, measured in SUN

  • parameter - String - Required - The parameter passed to the constructor of the contract

  • origin_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 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 - 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 up

  • permission_id - int32 - Optional. The ID of the permission that is required to execute the transaction

  • visible - 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:

Field
Type
Description

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?