POSTTriggerSmartContract

Tron Mainnethttps://tron-mainnet.nodit.io/wallet/triggersmartcontract

Returns TransactionExtention, which contains the unsigned Transaction

Request Body
owner_addressstringrequired

Transaction initiator address. (Format: Base58 or Hex)

contract_addressstringrequired

Contract address. (Format: Base58 or Hex). Example: TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs

function_selectorstring

Function selector. Example: transfer(address,uint256)

parameterstring

ABI-encoded function parameters (Hex String). e.g., 00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032

datastring

This field transmits the necessary data for smart contract interaction, including the function being called and its parameters. You may choose to use the data field, which contains the complete ABI-encoded information, or use the function_selector and parameter fields separately. Note that if both data and function_selector are present, the system will prioritize using the function_selector and parameter fields for the contract interaction.

fee_limitinteger (int32)required

Maximum TRX (in sun) the caller agrees to pay for transaction fees. (Unit: sun). Example: 1000000000 (1,000 TRX)

call_valueinteger (int64)

Amount of TRX transferred into the contract. (Unit: sun)

call_token_valueinteger (int64)

Amount of TRC-10 token transferred into the contract.

token_idinteger (int64)

TRC-10 token ID

visibleboolean

Optional. Set to true to format addresses in Base58; set to false for hex format. (Default: false)

Responses
owner_addressstring

Transaction initiator address. (Format: Base58 or Hex)

contract_addressstring

Contract address. (Format: Base58 or Hex)

call_valueinteger (int64)

Amount of TRX transferred into the contract in this call. (Unit: sun)

datastring

Function call data, containing the function selector and encoded parameters, specifying which function to execute and how. (Format: hex string)

call_token_valueint64 (int64)

Amount of TRC-10 token transferred into the contract.

token_idinteger (int64)

TRC-10 token id transferred into the contract.

X-API-KEY
RequestCU40
cURL
curl -X POST "https://tron-mainnet.nodit.io/wallet/triggersmartcontract" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "owner_address": "TUoHaVjx7n5xz8LwPRDckgFrDWhMhuSuJM",
  "contract_address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  "function_selector": "transfer(address,uint256)",
  "parameter": "00000000000000000000000098927ffb9f554dc4a453c64b2e553a02d6df514b00000000000000000000000000000000000000000000000000000000000f4240",
  "fee_limit": 100000000,
  "call_value": 0,
  "visible": true
}'
Response
Example · 200
{
  "owner_address": "string",
  "contract_address": "string",
  "call_value": 0,
  "data": "string",
  "token_id": 0
}