-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathTransactionAPI.java
35 lines (31 loc) · 1.11 KB
/
TransactionAPI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package io.goodforgod.api.etherscan;
import io.goodforgod.api.etherscan.error.EtherScanException;
import io.goodforgod.api.etherscan.model.Status;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
/**
* EtherScan - API Descriptions <a href="https://docs.etherscan.io/api-endpoints/stats">...</a>
*
* @author GoodforGod
* @since 30.10.2018
*/
public interface TransactionAPI {
/**
* Check Contract Execution Status (if there was an error during contract execution)
*
* @param txhash transaction hash
* @return optional status result
* @throws EtherScanException parent exception class
*/
@NotNull
Optional<Status> statusExec(@NotNull String txhash) throws EtherScanException;
/**
* Check Transaction Receipt Status (Only applicable for Post Byzantium fork transactions)
*
* @param txhash transaction hash
* @return 0 = Fail, 1 = Pass, empty value for pre-byzantium fork
* @throws EtherScanException parent exception class
*/
@NotNull
Optional<Boolean> statusReceipt(@NotNull String txhash) throws EtherScanException;
}