TronRequestTriggerConstantContract class

Invoke the readonly function (modified by the view or pure modifier) of a contract for contract data query; or Invoke the non-readonly function of a contract for predicting whether the transaction can be successfully executed and estimating the energy consumption; or estimate the energy consumption of contract deployment developers.tron.network.

Inheritance

Constructors

TronRequestTriggerConstantContract({required TronAddress ownerAddress, required TronAddress contractAddress, String? functionSelector, String? parameter, String? data, BigInt? callValue, BigInt? callTokenValue, BigInt? tokenId, bool visible = true})
factory
TronRequestTriggerConstantContract.fromMethod({required TronAddress ownerAddress, required TronAddress contractAddress, required AbiFunctionFragment function, required List params, String? parameter, BigInt? callValue, BigInt? callTokenValue, BigInt? tokenId, bool visible = true})
factory

Properties

callTokenValue BigInt?
Amount of TRC10 token transferred with this transaction
final
callValue BigInt?
Amount of TRX transferred to the contract with this transaction, the unit is sun. This field may be used when estimating energy consumption.
final
contractAddress TronAddress
Smart contract address
final
data String?
The bytecode of the contract or the data for interacting with smart contracts, including the contract function and parameters. You can choose to use this field, or you can choose to use function_selector and parameter for contract interaction. When both of data and function_selector exist, function_selector is preferred
final
functionSelector String?
Function call, must not be left blank.
final
hashCode int
The hash code for this object.
no setterinherited
method TronHTTPMethods
wallet/triggerconstantcontract
no setteroverride
ownerAddress TronAddress
Owner address that triggers the contract.
final
parameter String?
Parameter encoding needs to be in accordance with the ABI rules, the rules are more complicated, users can use the ethers library to encode,For details, please refer to the document-Guide-Smart Contract-Best Practice-Parameter Encoding and Decoding.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenId BigInt?
TRC10 token id
final
visible bool
Indicates whether the address is visible.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onResonse(Map<String, dynamic> result) ParsedSmartContractRequest
Converts the response result to the specified type RESULT.
override
toJson() Map<String, dynamic>
Converts the request parameters to a JSON format.
override
toRequest(int _) TronRequestDetails
Converts the request parameters to TronRequestDetails with a unique identifier.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited