Interface SmartContractService
- All Known Implementing Classes:
SuperUserSmartContractService
public interface SmartContractService
-
Method Summary
Modifier and TypeMethodDescriptioncreateSmartContract
(CreateSmartContractRequest createSmartContractRequest) Creates a new smart contract.void
deleteContract
(String contractId) Deletes theSmartContract
with the supplied contract ID.getSmartContract
(String contractId) Fetches a specificSmartContract
instance based on ID.getSmartContracts
(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Lists allSmartContract
instances, 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 allSmartContract
instances, specifying a search query.- Parameters:
offset
-count
-- Returns:
- a
Pagination
ofSmartContract
instances
-
getSmartContract
Fetches a specificSmartContract
instance 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
. ThePatchSmartContractRequest
method is used to key theSmartContract
.- Parameters:
updateSmartContractRequest
- theUpdateSmartContractRequest
with the information to update- Returns:
- the
SmartContract
as it was changed by the service.
-
deleteContract
Deletes theSmartContract
with the supplied contract ID.- Parameters:
contractId
- the contract ID.
-