> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet/deploycontract | TRON

> TRON API method that creates a transaction to deploy a new smart contract to the TRON network. wallet/deploycontract on TRON via Chainstack.

TRON API method that creates a transaction to deploy a new smart contract to the TRON network. This method prepares the deployment transaction with all necessary parameters, which must then be signed and broadcast to complete the contract deployment.

## Parameters

* `owner_address` — address of the account deploying the contract in hexadecimal format
* `abi` — contract ABI (Application Binary Interface) as a JSON string defining contract methods and events
* `bytecode` — compiled contract bytecode in hexadecimal format
* `parameter` — (optional) constructor parameters encoded in hexadecimal format
* `call_value` — (optional) amount of TRX to transfer to the contract during deployment (in SUN, 1 TRX = 1,000,000 SUN)
* `consume_user_resource_percent` — (optional) percentage of caller's resources used for contract calls (0-100, default 100)
* `fee_limit` — (optional) maximum energy fee willing to pay for deployment (in SUN)
* `origin_energy_limit` — (optional) energy limit provided by the contract creator for future calls
* `name` — (optional) human-readable name for the contract

## Response

* `visible` — boolean indicating whether addresses are in visible format
* `txID` — unique transaction ID for the deployment transaction
* `raw_data` — raw transaction data containing all deployment parameters
* `raw_data_hex` — raw transaction data encoded in hexadecimal format

## Use case

The `wallet/deploycontract` method is used for:

* Deploying new smart contracts to the TRON blockchain.
* Creating TRC20 tokens, NFT contracts, and other decentralized applications.
* Setting up contract resource limits and fee structures during deployment.
* Preparing deployment transactions that can be signed offline for security.
* Building deployment tools and contract management platforms.
* Establishing smart contract infrastructure for DApps and services.

<Note>
  This method only creates the deployment transaction. You must sign the transaction and use `wallet/broadcasttransaction` to actually deploy the contract to the network.
</Note>


## OpenAPI

````yaml openapi/tron_node_api/deploycontract.json post /95e61622bf6a8af293978377718e3b77/wallet/deploycontract
openapi: 3.0.0
info:
  title: wallet/deploycontract TRON API
  version: 1.0.0
  description: Deploy a new smart contract to the TRON network
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/deploycontract:
    post:
      tags:
        - Smart Contracts
      summary: wallet/deploycontract
      operationId: deployContract
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                owner_address:
                  type: string
                  description: Address deploying the contract in hex format
                abi:
                  type: string
                  description: Contract ABI (Application Binary Interface) as JSON string
                bytecode:
                  type: string
                  description: Contract bytecode in hex format
                parameter:
                  type: string
                  description: Constructor parameters encoded in hex format
                call_value:
                  type: number
                  description: Amount of TRX to transfer to contract (in SUN)
                consume_user_resource_percent:
                  type: number
                  description: Percentage of caller's resources used (0-100)
                fee_limit:
                  type: number
                  description: Maximum energy fee willing to pay (in SUN)
                origin_energy_limit:
                  type: number
                  description: Energy limit provided by contract creator
                name:
                  type: string
                  description: Human-readable contract name
              required:
                - owner_address
                - abi
                - bytecode
              example:
                owner_address: 41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b
                abi: >-
                  [{"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"type":"function"}]
                bytecode: >-
                  608060405234801561001057600080fd5b5061012a806100206000396000f3fe6080604052
                parameter: ''
                call_value: 0
                consume_user_resource_percent: 100
                fee_limit: 1000000000
                origin_energy_limit: 10000000
                name: MyContract
      responses:
        '200':
          description: Contract deployment transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  visible:
                    type: boolean
                    description: Whether addresses are in visible format
                  txID:
                    type: string
                    description: Transaction ID of the deployment
                  raw_data:
                    type: object
                    description: Raw transaction data
                  raw_data_hex:
                    type: string
                    description: Raw transaction data in hex format

````