-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b35bd04
commit 9e8be41
Showing
18 changed files
with
951 additions
and
67 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/main/java/com/openelements/spring/hedera/api/ContractVerificationClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.openelements.spring.hedera.api; | ||
|
||
import com.hedera.hashgraph.sdk.ContractId; | ||
import com.openelements.spring.hedera.api.data.ContractVerificationState; | ||
|
||
public interface ContractVerificationClient { | ||
|
||
ContractVerificationState checkVerification(String contractId, String contractSource, String contractMetadata); | ||
|
||
ContractVerificationState checkVerification(ContractId contractId, String contractSource, String contractMetadata); | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/openelements/spring/hedera/api/FileServiceClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.openelements.spring.hedera.api; | ||
|
||
import com.hedera.hashgraph.sdk.FileId; | ||
|
||
public interface FileServiceClient { | ||
|
||
FileId createFile(byte[] contents) throws HederaException; | ||
|
||
default byte[] readFile(String fileId) throws HederaException { | ||
return readFile(FileId.fromString(fileId)); | ||
} | ||
|
||
byte[] readFile(FileId fileId) throws HederaException; | ||
|
||
default void deleteFile(String fileId) throws HederaException { | ||
deleteFile(FileId.fromString(fileId)); | ||
} | ||
|
||
void deleteFile(FileId fileId) throws HederaException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/com/openelements/spring/hedera/api/SmartContractServiceClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.openelements.spring.hedera.api; | ||
|
||
import com.hedera.hashgraph.sdk.ContractFunctionResult; | ||
import com.hedera.hashgraph.sdk.ContractId; | ||
import com.hedera.hashgraph.sdk.FileId; | ||
import com.openelements.spring.hedera.api.data.ContractParam; | ||
import java.nio.file.Path; | ||
|
||
public interface SmartContractServiceClient { | ||
|
||
default ContractId createContract(String fileId, ContractParam<?>... constructorParams) throws HederaException { | ||
return createContract(FileId.fromString(fileId), constructorParams); | ||
} | ||
|
||
ContractId createContract(FileId fileId, ContractParam<?>... constructorParams) throws HederaException; | ||
|
||
ContractId createContract(byte[] contents, ContractParam<?>... constructorParams) throws HederaException; | ||
|
||
ContractId createContract(Path pathToBin, ContractParam<?>... constructorParams) throws HederaException; | ||
|
||
default ContractFunctionResult callContractFunction(String contractId, String functionName, ContractParam<?>... params) throws HederaException { | ||
return callContractFunction(ContractId.fromString(contractId), functionName, params); | ||
} | ||
|
||
ContractFunctionResult callContractFunction(ContractId contractId, String functionName, ContractParam<?>... params) throws HederaException; | ||
|
||
} |
Oops, something went wrong.