Interface SmartContractService
- All Known Implementing Classes:
SuperUserSmartContractService
public interface SmartContractService
-
Method Summary
Modifier and TypeMethodDescriptioncreateSmartContract(CreateSmartContractRequest createSmartContractRequest) Creates a new smart contract.voiddeleteContract(String contractId) Deletes theSmartContractwith the supplied contract ID.getSmartContract(String contractId) Fetches a specificSmartContractinstance based on ID.getSmartContracts(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Lists allSmartContractinstances, specifying a search query.updateSmartContract(String contractId, UpdateSmartContractRequest updateSmartContractRequest) Updates the suppliedSmartContract.
-
Method Details
-
getSmartContracts
Pagination<SmartContract> getSmartContracts(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Lists allSmartContractinstances, specifying a search query.- Parameters:
offset-count-- Returns:
- a
PaginationofSmartContractinstances
-
getSmartContract
Fetches a specificSmartContractinstance based on ID. If not found, an exception is raised.- Parameters:
contractId- the contract ID- Returns:
- the
SmartContract, never null
-
createSmartContract
Creates a new smart contract.- Parameters:
createSmartContractRequest- creates a smart contract- Returns:
- the
SmartContract
-
updateSmartContract
SmartContract updateSmartContract(String contractId, UpdateSmartContractRequest updateSmartContractRequest) Updates the suppliedSmartContract. ThePatchSmartContractRequestmethod is used to key theSmartContract.- Parameters:
updateSmartContractRequest- theUpdateSmartContractRequestwith the information to update- Returns:
- the
SmartContractas it was changed by the service.
-
deleteContract
Deletes theSmartContractwith the supplied contract ID.- Parameters:
contractId- the contract ID.
-