Search in sources :

Example 1 with BcosTransactionReceipt

use of org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt in project web3sdk by FISCO-BCOS.

the class ManagedTransactionTester method prepareTransactionReceipt.

@SuppressWarnings("unchecked")
void prepareTransactionReceipt(TransactionReceipt transactionReceipt) throws IOException {
    BcosTransactionReceipt ethGetTransactionReceipt = new BcosTransactionReceipt();
    ethGetTransactionReceipt.setResult(transactionReceipt);
    Request<?, BcosTransactionReceipt> getTransactionReceiptRequest = mock(Request.class);
    when(getTransactionReceiptRequest.send()).thenReturn(ethGetTransactionReceipt);
    when(web3j.getTransactionReceipt(TRANSACTION_HASH)).thenReturn((Request) getTransactionReceiptRequest);
}
Also used : BcosTransactionReceipt(org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt)

Example 2 with BcosTransactionReceipt

use of org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt in project web3sdk by FISCO-BCOS.

the class Web3jApITest method getTransactionReceipt.

@Test
public void getTransactionReceipt() throws IOException {
    BcosTransactionReceipt bcosTransactionReceipt = web3j.getTransactionReceipt(txHash).send();
    TransactionReceipt transactionReceipt = bcosTransactionReceipt.getTransactionReceipt().get();
    assertNotNull(transactionReceipt);
}
Also used : BcosTransactionReceipt(org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt) TransactionReceipt(org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt) BcosTransactionReceipt(org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt) Test(org.junit.Test)

Aggregations

BcosTransactionReceipt (org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt)2 TransactionReceipt (org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt)1 Test (org.junit.Test)1