TRON
wallet/triggersmartcontract25 크레딧
Builds an unsigned transaction that calls a smart contract function.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
| owner_address | string | Address of the caller (base58 or hex). |
| contract_address | string | Contract address (base58 or hex). |
| fee_limit | number | Maximum TRX (in sun) the caller is willing to burn for Energy. |
| function_selector | string | Function signature, e.g. transfer(address,uint256). (선택) |
| parameter | string | ABI-encoded call arguments as a hex string, without the 4-byte selector. (선택) |
| data | string | Full ABI-encoded call data (selector + arguments); ignored when function_selector is set. (선택) |
| call_value | number | TRX sent with the call, in sun. (선택) |
| call_token_value | number | Amount of a TRC-10 token sent with the call. (선택) |
| token_id | number | TRC-10 token id for call_token_value. (선택) |
| Permission_id | number | Permission ID for multi-signature accounts; defaults to the owner permission (0). (선택) |
| visible | boolean | true = base58 addresses (in the request and the response); false (default) = hex addresses. (선택) |
반환값
타입
Object
TransactionExtention: transaction (the unsigned transaction), txid, constant_result, result (result, code, message), energy_used, energy_penalty, logs, internal_transactions. Sign it and send it with wallet/broadcasttransaction. On failure an Error string.
코드 예제
curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/triggersmartcontract' \
-X POST \
-H 'content-type: application/json' \
-d '{
"owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
"contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"function_selector": "transfer(address,uint256)",
"parameter": "<ABI-encoded arguments>",
"fee_limit": 100000000,
"call_value": 0,
"visible": true
}'