New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

Last updated on January 1, 1970

1 min read

Method buildTransaction%28TransferContract%29 undefined ()
connect with JSON-RPC protocol

buildTransaction%28TransferContract%29

info-circle-fill

Method not allowed

info-circle-fill

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

Parameters

from - data, 20 bytes

The address the transaction is sent from.

to - data, 20 bytes

The address the transaction is directed to.

value - data

the transfer amount

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", "0x95FD23D3D2221CFEF64167938DE5E62074719E54", "0x1f4"],
"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