Skip to main content

TriggerSmartContract RPC Method

Executes a specific function within a smart contract by passing necessary parameters and obtaining the output and transaction details.

Updated on
Oct 04, 2023

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 recieve the transaction

data
string
REQUIRED

The bytecode of the smart contract being deployed. It contains the actual code that will be executed on the blockchain

gas
string
REQUIRED

The maximum amount of gas that the transaction can consume to execute the smart contract creation. It is the fee limit

value
string
REQUIRED

The amount of TRX (Tronix) that is transferred with the transaction

tokenId
integer
REQUIRED

The ID of the token being transferred with the transaction

tokenValue
integer
REQUIRED

The amount of tokens being transferred with the transaction

Returns

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 reciever 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
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free