TRON
protocol.Wallet/TriggerConstantContract25 kredi
Calls a smart contract function read-only, nothing is broadcast (gRPC).
Parametreler
| Ad | Tür | Açıklama |
|---|---|---|
| owner_address | string | Caller address (bytes; base64 in the JSON form). |
| contract_address | string | Contract address (bytes; base64 in the JSON form). |
| data | string | ABI-encoded call data: function selector + arguments (bytes; base64 in the JSON form). (isteğe bağlı) |
| call_value | number | TRX sent with the call, in sun (int64). (isteğe bağlı) |
| call_token_value | number | Amount of a TRC-10 token sent with the call (int64). (isteğe bağlı) |
| token_id | number | TRC-10 token id for call_token_value (int64). (isteğe bağlı) |
Dönüş değeri
Tür
Object
TransactionExtention message: transaction (unsigned), txid, constant_result[] (ABI-encoded return data), result (result, code, message), energy_used, energy_penalty, logs[], internal_transactions[].
Kod örnekleri
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"owner_address": "<base64 caller address>",
"contract_address": "<base64 contract address>",
"data": "<base64 ABI call data>"
}' \
grpc-holy-burned-sky-tron-mainnet.rpcnode.dev:443 \
protocol.Wallet/TriggerConstantContract