triggerSmartContract method
Trigger a smart contract (write, modifies the blockchain)
Implementation
Future<JSON> triggerSmartContract({
required String address,
required String contractAddress,
required String functionSelector,
required String parameter,
bool visible = true,
int feeLimit = 1000000, // 1 TRX
int? call_value, // Amount of TRX within the transaction
int? call_token_value, // Amount of TRC10 token within the transaction
String? token_id, // Token ID for TRC10
}) {
return postCall<JSON>(
"$baseURL/wallet/triggercontract",
data: {
"owner_address": address,
"contract_address": contractAddress,
"function_selector": functionSelector,
"parameter": parameter,
"visible": visible,
"fee_limit": feeLimit,
if (call_value != null) "call_value": call_value,
if (call_token_value != null) "call_token_value": call_token_value,
if (token_id != null) "token_id": token_id,
},
);
}