ドキュメント
料金GitHubダッシュボード

TRON

wallet/deploycontract15クレジット

Builds an unsigned smart contract deployment transaction.

ネットワーク: tron

パラメータ

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

戻り値

型

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.

コード例

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
}'