Home

Deploy contract

POST
https://trx.nownodes.io/wallet/deploycontract

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Deploys a new smart contract to the TRON blockchain. This creates a transaction that must be signed and broadcast to the network. The contract deployment requires sufficient energy and bandwidth resources.

Body

application/json

Request value.

owner_addressstringrequired

The address that will own and deploy the contract.

abistringrequired

The contract's ABI in JSON string format.

bytecodestringrequired

The contract's compiled bytecode in hex format.

namestring

The contract name.

fee_limitinteger<int64>

The maximum fee (in SUN) for contract deployment.

origin_energy_limitinteger

The energy limit for the contract execution.

consume_user_resource_percentinteger

The percentage of resource consumption paid by the user (0-100).

parameterstring

Constructor parameters in hex format (if any).

visibleboolean

Whether addresses are in base58 format.

Response

200OK

HTTP 200 response for deploycontract. The body contains either a successful result or a node-level error.

400Bad Request

Bad Request. The request is malformed or contains invalid parameters.

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error. The gateway or node failed while processing the request.