Share your GetBlock experience with other devs and get 5M RPCs

banner image

Last updated on January 1, 1970

1 min read

Method buildTransaction%28TriggerSmartContract%29 Tron (TRX)
connect with JSON-RPC protocol

buildTransaction%28TriggerSmartContract%29

info-circle-fill

Method not allowed

info-circle-fill

Create a transaction, different transaction types have differentparametersthis is an example of TriggerSmartContract

Parameters

from - data, 20 bytes

The address the transaction is sent from.

to - DATA, 20 bytes

The address of the smart contract

data - DATA

The invoked contract function and parameters

gas - DATA

fee limit

value - DATA

The data passed through call_value.

tokenId - QUANTITY

Token ID

tokenValue - QUANTITY

The transfer amount of TRC10

Request

curl --location --request POST 'https://trx.getblock.io/mainnet/jsonrpc' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "buildTransaction",
"params": ["0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8", "0xf859b5c93f789f4bcffbe7cc95a71e28e5e6a5bd", "0x3be9ece7000000000000000000000000ba8e28bdb6e49fbb3f5cd82a9f5ce8363587f1f600000000000000000000000000000000000000000000000000000000000f42630000000000000000000000000000000000000000000000000000000000000001", "0x245498", "0xA", "1000035", 20],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}
banner icon

Start Building with GetBlock RPCs for Free