TransferContract RPC Method
Parameters
from
string
REQUIRED
The address of the account that sends the transaction and will be the owner of the new smart contract
to
string
REQUIRED
The address of the account that received the transaction
value
string
REQUIRED
The amount of TRX (Tronix) that is transferred with the transaction
Returns
result
This method returns an error if the asset balance is less than zero, otherwise it returns the following transaction object
transaction
The transaction object which contain the following fields:
visible
A boolean value indicating whether the transaction is visible on the blockchain or not
txID
The id of the transaction
raw_data
The raw transaction data, including the contract and its parameters
contract
The details of the smart contract involved in the transaction
parameter
The parameter of the smart contract function being called in the transaction
value
The value object containing following fields:
amount
The amount of token to be transferred
owner_address
The address of the owner of the token being transferred
to_address
The address of the receiver to which the token is to be transferred
type_url
The type of data being represented by the parameter or output
type
The type of smart contract
ref_block_bytes
The bytes of the previous block hash
ref_block_hash
The hash of the previous block
expiration
The expiration time of the transaction
fee_limit
The maximum fee limit for the transaction
timestamp
The timestamp of the transaction
raw_data_hex
The raw transaction data, encoded in hexadecimal format
Request
1curl https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc \2-X POST \3-H "Content-Type: application/json" \4--data '{5"id": 1337,6"jsonrpc": "2.0",7"method": "buildTransaction",8"params": [9{10"from": "0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8",11"to": "0x95FD23D3D2221CFEF64167938DE5E62074719E54",12"value": "0x1f4"13}]}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free