FiyatlandırmaGitHubKontrol paneli

TRON

wallet/deploycontract15 kredi

Builds an unsigned smart contract deployment transaction.

Ağ: tron

Parametreler

AdTürAçıklama
owner_addressstringTransaction initiator address (base58 or hex).
abistringContract ABI as a JSON string. (isteğe bağlı)
bytecodestringContract bytecode as a hex string. (isteğe bağlı)
parameterstringABI-encoded constructor arguments (hex). (isteğe bağlı)
namestringContract name (at most 32 bytes). (isteğe bağlı)
fee_limitnumberMaximum TRX (in sun) the deployer is willing to burn for Energy. (isteğe bağlı)
origin_energy_limitnumberMaximum Energy the deployer pays per call; must be > 0. (isteğe bağlı)
consume_user_resource_percentnumberPercentage (0 to 100) of the Energy paid by the caller; default 0 (deployer pays all). (isteğe bağlı)
call_valuenumberTRX transferred to the contract at deployment, in sun. (isteğe bağlı)
Permission_idnumberPermission ID for multi-signature accounts; defaults to the owner permission (0). (isteğe bağlı)
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (isteğe bağlı)

Dönüş değeri

Tür

Object

Unsigned transaction object (txID, raw_data, raw_data_hex, visible) plus contract_address, the computed address of the new contract. It is only built, not signed or broadcast. On failure an Error string.

Kod örnekleri

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/deploycontract' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
  "name": "MyContract",
  "abi": "[]",
  "bytecode": "<contract bytecode>",
  "fee_limit": 1000000000,
  "origin_energy_limit": 10000000,
  "consume_user_resource_percent": 100,
  "visible": true
}'