public class AssembleTransactionProcessor extends TransactionProcessor implements AssembleTransactionProcessorInterface
| 限定符和类型 | 字段和说明 |
|---|---|
protected ABICodec |
abiCodec |
protected ContractLoader |
contractLoader |
protected static org.slf4j.Logger |
log |
protected TransactionDecoderInterface |
transactionDecoder |
protected TransactionPusherInterface |
transactionPusher |
chainId, client, cryptoKeyPair, cryptoSuite, groupId, transactionBuilder, transactionEncoder| 构造器和说明 |
|---|
AssembleTransactionProcessor(Client client,
CryptoKeyPair cryptoKeyPair,
java.lang.String groupId,
java.lang.String chainId,
ContractLoader contractLoader) |
AssembleTransactionProcessor(Client client,
CryptoKeyPair cryptoKeyPair,
java.lang.String groupId,
java.lang.String chainId,
java.lang.String contractName,
java.lang.String abi,
java.lang.String bin) |
| 限定符和类型 | 方法和说明 |
|---|---|
CallResponse |
callAndGetResponse(java.lang.String from,
java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
byte[] data) |
java.lang.String |
createSignedConstructor(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
create signed constructor.
|
TransactionReceipt |
deployAndGetReceipt(byte[] data)
deploy contract to fisco bcos node and get transaction receipt.
|
TransactionResponse |
deployAndGetResponse(java.lang.String abi,
java.lang.String signedData)
deploy contract to fisco bcos node and get response.
|
TransactionResponse |
deployAndGetResponse(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
deploy contract to fisco bcos node and get response.
|
TransactionResponse |
deployAndGetResponseWithStringParams(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.String> params,
java.lang.String path)
deploy contract to fisco bcos node and get response.
|
java.util.concurrent.CompletableFuture<TransactionReceipt> |
deployAsync(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
deploy contract to fisco bcos node asynchronously.
|
void |
deployAsync(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params,
TransactionCallback callback)
deploy contract to fisco bcos node asynchronously.
|
TransactionResponse |
deployByContractLoader(java.lang.String contractName,
java.util.List<java.lang.Object> args)
Deploy by bin and abi files.
|
void |
deployByContractLoaderAsync(java.lang.String contractName,
java.util.List<java.lang.Object> args,
TransactionCallback callback)
deploy contract to fisco bcos node and get response by contract name asynchronously.
|
void |
deployOnly(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
deploy contract to fisco bcos node only without receive any response.
|
byte[] |
encodeFunction(java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params)
encode function with abi and parameters.
|
ContractLoader |
getContractLoader() |
TransactionData |
getRawTransaction(java.math.BigInteger blockLimit,
java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params)
get raw transaction exclude constructor.
|
TransactionData |
getRawTransaction(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params)
get raw transaction exclude constructor.
|
TransactionData |
getRawTransactionForConstructor(java.math.BigInteger blockLimit,
java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
get constructor raw transaction.
|
TransactionData |
getRawTransactionForConstructor(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
get constructor raw transaction.
|
CallResponse |
sendCall(CallRequest callRequest)
send call to fisco bcos node and get call response
|
CallResponse |
sendCall(java.lang.String from,
java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> paramsList)
send call to fisco bcos node and get call response
|
CallResponse |
sendCallByContractLoader(java.lang.String contractName,
java.lang.String contractAddress,
java.lang.String functionName,
java.util.List<java.lang.Object> args)
send call to fisco bcos node and get call response by contract name.
|
CallResponse |
sendCallWithStringParams(java.lang.String from,
java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.String> paramsList)
send call to fisco bcos node and get call response
|
TransactionReceipt |
sendTransactionAndGetReceiptByContractLoader(java.lang.String contractName,
java.lang.String contractAddress,
java.lang.String functionName,
java.util.List<java.lang.Object> args)
send transaction to fisco bcos node and get transaction receipt by contract name.
|
void |
sendTransactionAndGetReceiptByContractLoaderAsync(java.lang.String contractName,
java.lang.String contractAddress,
java.lang.String functionName,
java.util.List<java.lang.Object> args,
TransactionCallback callback)
send transaction to fisco bcos node by contract name asynchronously.
|
TransactionResponse |
sendTransactionAndGetResponse(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
byte[] data)
send transaction to fisco bcos node and get response.
|
TransactionResponse |
sendTransactionAndGetResponse(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params)
send transaction to fisco bcos node and get response.
|
TransactionResponse |
sendTransactionAndGetResponseByContractLoader(java.lang.String contractName,
java.lang.String contractAddress,
java.lang.String functionName,
java.util.List<java.lang.Object> funcParams)
send transaction to fisco bcos node and get transaction response by contract name.
|
java.util.concurrent.CompletableFuture<TransactionReceipt> |
sendTransactionAsync(java.lang.String signedData)
send transaction to fisco bcos node asynchronously.
|
void |
sendTransactionAsync(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params,
TransactionCallback callback)
send transaction to fisco bcos node by contract name asynchronously.
|
void |
sendTransactionAsync(java.lang.String signedTransaction,
TransactionCallback callback)
send transaction to fisco bcos node asynchronously.
|
void |
sendTransactionOnly(java.lang.String signedData)
send transaction only.
|
TransactionResponse |
sendTransactionWithStringParamsAndGetResponse(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.String> params)
send transaction to fisco bcos node and get response.
|
createSignedTransaction, executeCall, executeCall, sendTransactionAndGetReceipt, sendTransactionAsyncprotected static org.slf4j.Logger log
protected final TransactionDecoderInterface transactionDecoder
protected final TransactionPusherInterface transactionPusher
protected final ABICodec abiCodec
protected ContractLoader contractLoader
public AssembleTransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.String groupId, java.lang.String chainId, ContractLoader contractLoader)
public AssembleTransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.String groupId, java.lang.String chainId, java.lang.String contractName, java.lang.String abi, java.lang.String bin)
public void deployOnly(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
throws ABICodecException
AssembleTransactionProcessorInterfacedeployOnly 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct parametersABICodecExceptionpublic TransactionReceipt deployAndGetReceipt(byte[] data)
AssembleTransactionProcessorInterfacedeployAndGetReceipt 在接口中 AssembleTransactionProcessorInterfacedata - encoded transaction datapublic TransactionResponse deployAndGetResponse(java.lang.String abi, java.lang.String signedData)
AssembleTransactionProcessorInterfacedeployAndGetResponse 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.signedData - signed and encoded constructor datapublic TransactionResponse deployAndGetResponse(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacedeployAndGetResponse 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct parametersABICodecExceptionpublic TransactionResponse deployAndGetResponseWithStringParams(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.String> params, java.lang.String path) throws ABICodecException
AssembleTransactionProcessorInterfacedeployAndGetResponseWithStringParams 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct string parametersABICodecExceptionpublic void deployAsync(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params,
TransactionCallback callback)
throws ABICodecException
AssembleTransactionProcessorInterfacedeployAsync 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct parameterscallback - transaction with callback functionABICodecExceptionpublic java.util.concurrent.CompletableFuture<TransactionReceipt> deployAsync(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacedeployAsync 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct parametersABICodecExceptionpublic TransactionResponse deployByContractLoader(java.lang.String contractName, java.util.List<java.lang.Object> args) throws ABICodecException, TransactionBaseException
deployByContractLoader 在接口中 AssembleTransactionProcessorInterfacecontractName - the contract nameargs - the params when deploy a contractTransactionBaseException - send transaction exceptionedABICodecException - abi encode exceptionedNoSuchTransactionFileException - Files related to abi codec were not foundpublic void deployByContractLoaderAsync(java.lang.String contractName,
java.util.List<java.lang.Object> args,
TransactionCallback callback)
throws ABICodecException,
NoSuchTransactionFileException
AssembleTransactionProcessorInterfacedeployByContractLoaderAsync 在接口中 AssembleTransactionProcessorInterfacecontractName - contract name.args - contract construct parameterscallback - transaction with callback functionABICodecExceptionNoSuchTransactionFileExceptionpublic void sendTransactionOnly(java.lang.String signedData)
AssembleTransactionProcessorInterfacesendTransactionOnly 在接口中 AssembleTransactionProcessorInterfacesignedData - signed and encoded transaction datapublic TransactionResponse sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, byte[] data) throws ABICodecException
AssembleTransactionProcessorInterfacesendTransactionAndGetResponse 在接口中 AssembleTransactionProcessorInterfaceto - the target contract address.abi - contract abi, which could be obtained by compiling solidity contract.functionName - contract function name.data - abi encoded transaction dataABICodecExceptionpublic TransactionResponse sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params) throws ABICodecException, TransactionBaseException
AssembleTransactionProcessorInterfacesendTransactionAndGetResponse 在接口中 AssembleTransactionProcessorInterfaceto - the target contract address.abi - contract abi, which could be obtained by compiling solidity contract.functionName - contract function name.params - contract construct parametersABICodecExceptionTransactionBaseExceptionpublic TransactionResponse sendTransactionWithStringParamsAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> params) throws ABICodecException, TransactionBaseException
AssembleTransactionProcessorInterfacesendTransactionWithStringParamsAndGetResponse 在接口中 AssembleTransactionProcessorInterfaceto - the target contract address.abi - contract abi, which could be obtained by compiling solidity contract.functionName - contract function name.params - contract function string parametersABICodecExceptionTransactionBaseExceptionpublic TransactionReceipt sendTransactionAndGetReceiptByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args) throws ABICodecException, TransactionBaseException
AssembleTransactionProcessorInterfacesendTransactionAndGetReceiptByContractLoader 在接口中 AssembleTransactionProcessorInterfacecontractName - contract name.contractAddress - contract addressfunctionName - contract function nameargs - contract construct parametersABICodecExceptionTransactionBaseExceptionpublic TransactionResponse sendTransactionAndGetResponseByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> funcParams) throws ABICodecException, TransactionBaseException
AssembleTransactionProcessorInterfacesendTransactionAndGetResponseByContractLoader 在接口中 AssembleTransactionProcessorInterfacecontractName - contract name.contractAddress - the target contract address.functionName - contract function name.funcParams - contract function parametersABICodecExceptionTransactionBaseExceptionpublic void sendTransactionAsync(java.lang.String signedTransaction,
TransactionCallback callback)
AssembleTransactionProcessorInterfacesendTransactionAsync 在接口中 AssembleTransactionProcessorInterfacesignedTransaction - signed and encoded transaction datacallback - transaction with callback functionpublic void sendTransactionAsync(java.lang.String to,
java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params,
TransactionCallback callback)
throws TransactionBaseException,
ABICodecException
AssembleTransactionProcessorInterfacesendTransactionAsync 在接口中 AssembleTransactionProcessorInterfaceto - the target contract address.abi - contract abi, which could be obtained by compiling solidity contract.functionName - contract function name.params - contract function parameterscallback - transaction with callback functionTransactionBaseExceptionABICodecExceptionpublic java.util.concurrent.CompletableFuture<TransactionReceipt> sendTransactionAsync(java.lang.String signedData)
AssembleTransactionProcessorInterfacesendTransactionAsync 在接口中 AssembleTransactionProcessorInterfacesignedData - signed and encoded transaction datapublic void sendTransactionAndGetReceiptByContractLoaderAsync(java.lang.String contractName,
java.lang.String contractAddress,
java.lang.String functionName,
java.util.List<java.lang.Object> args,
TransactionCallback callback)
throws ABICodecException,
TransactionBaseException
AssembleTransactionProcessorInterfacesendTransactionAndGetReceiptByContractLoaderAsync 在接口中 AssembleTransactionProcessorInterfacecontractName - contract name.contractAddress - the target contract address.functionName - contract function name.args - contract function parameterscallback - transaction with callback functionABICodecExceptionTransactionBaseExceptionpublic CallResponse sendCallByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args) throws TransactionBaseException, ABICodecException
AssembleTransactionProcessorInterfacesendCallByContractLoader 在接口中 AssembleTransactionProcessorInterfacecontractName - contract name.contractAddress - the target contract address.functionName - contract function name.args - contract call parametersTransactionBaseExceptionABICodecExceptionpublic CallResponse sendCall(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> paramsList) throws TransactionBaseException, ABICodecException
AssembleTransactionProcessorInterfacesendCall 在接口中 AssembleTransactionProcessorInterfacefrom - sender addressto - the target contract address.functionName - contract function name.paramsList - contract call parametersTransactionBaseExceptionABICodecExceptionpublic CallResponse sendCall(CallRequest callRequest) throws TransactionBaseException, ABICodecException
AssembleTransactionProcessorInterfacesendCall 在接口中 AssembleTransactionProcessorInterfacecallRequest - call request informationTransactionBaseExceptionABICodecExceptionpublic CallResponse sendCallWithStringParams(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> paramsList) throws TransactionBaseException, ABICodecException
AssembleTransactionProcessorInterfacesendCallWithStringParams 在接口中 AssembleTransactionProcessorInterfacefrom - sender addressto - the target contract address.functionName - contract function name.paramsList - contract call parametersTransactionBaseExceptionABICodecExceptionpublic CallResponse callAndGetResponse(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, byte[] data) throws ABICodecException, TransactionBaseException
public java.lang.String createSignedConstructor(java.lang.String abi,
java.lang.String bin,
java.util.List<java.lang.Object> params)
throws ABICodecException
AssembleTransactionProcessorInterfacecreateSignedConstructor 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binary, which could be obtained by compiling solidity contract.params - contract construct parametersABICodecExceptionpublic byte[] encodeFunction(java.lang.String abi,
java.lang.String functionName,
java.util.List<java.lang.Object> params)
throws ABICodecException
AssembleTransactionProcessorInterfaceencodeFunction 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.functionName - contract function nameparams - contract function parametersABICodecExceptionpublic TransactionData getRawTransactionForConstructor(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacegetRawTransactionForConstructor 在接口中 AssembleTransactionProcessorInterfaceabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binaryparams - contract function parametersABICodecExceptionpublic TransactionData getRawTransactionForConstructor(java.math.BigInteger blockLimit, java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacegetRawTransactionForConstructor 在接口中 AssembleTransactionProcessorInterfaceblockLimit - block limitabi - contract abi, which could be obtained by compiling solidity contract.bin - contract binaryparams - contract function parametersABICodecExceptionpublic TransactionData getRawTransaction(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacegetRawTransaction 在接口中 AssembleTransactionProcessorInterfaceto - target addressabi - contract abi, which could be obtained by compiling solidity contract.functionName - function nameparams - contract function parametersABICodecExceptionpublic TransactionData getRawTransaction(java.math.BigInteger blockLimit, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params) throws ABICodecException
AssembleTransactionProcessorInterfacegetRawTransaction 在接口中 AssembleTransactionProcessorInterfaceblockLimit - block limitto - target addressabi - contract abi, which could be obtained by compiling solidity contract.functionName - function nameparams - contract function parametersABICodecExceptionpublic ContractLoader getContractLoader()