public abstract class TronContractProxy extends SmartContractEventListener
Constructor and Description |
---|
TronContractProxy(TronClient client,
TronAddress contractAddress)
Creates a new instance of TronContractProxy.
|
TronContractProxy(TronClient client,
TronAddress contractAddress,
Protocol.SmartContract.ABI contractABI)
Creates a new instance of TronContractProxy.
|
Modifier and Type | Method and Description |
---|---|
TriggerContractResult |
callMethod(TronWallet sender,
TriggerContractDataBuilder call,
TronCurrency feeLimit,
TronCurrency callValue)
Calls a method of the smart contract.
|
TriggerContractResult |
callMethod(TronWallet sender,
TriggerContractDataBuilder call,
TronCurrency feeLimit,
TronCurrency callValue,
long callValueTokenId,
long callValueToken)
Calls a method of the smart contract.
|
getContract, handleBlock, handleEvent, handleNotInterpretableEvent, handleTransaction
public TronContractProxy(TronClient client, TronAddress contractAddress) throws GRPCException
client
- The client.contractAddress
- The contract address.GRPCException
- If an error occurs in the GRPC protocol, generally connection problems.public TronContractProxy(TronClient client, TronAddress contractAddress, Protocol.SmartContract.ABI contractABI)
client
- The client.contractAddress
- the contract address.contractABI
- The contract ABI.public TriggerContractResult callMethod(TronWallet sender, TriggerContractDataBuilder call, TronCurrency feeLimit, TronCurrency callValue) throws GRPCException, TransactionException, EncodingException
sender
- The sender of the transaction.call
- The method call.feeLimit
- The fee limit for the transaction.callValue
- The call value.GRPCException
- If an error occurs in the GRPC protocol, generally connection problems.TransactionException
- If The transaction fails to be sent.EncodingException
- If the method call is invalid.public TriggerContractResult callMethod(TronWallet sender, TriggerContractDataBuilder call, TronCurrency feeLimit, TronCurrency callValue, long callValueTokenId, long callValueToken) throws GRPCException, TransactionException, EncodingException
sender
- The sender of the transaction.call
- The method call.feeLimit
- The fee limit for the transaction.callValue
- The call value.callValueTokenId
- The token to send as a token call valuecallValueToken
- The number of tokens to send as call valueGRPCException
- If an error occurs in the GRPC protocol, generally connection problems.TransactionException
- If The transaction fails to be sent.EncodingException
- If the method call is invalid.Copyright © 2020. All rights reserved.