Class TemplatesManager


  • public class TemplatesManager
    extends BaseManager
    Controller class to manage the SEA Template functions
    • Field Detail

      • log

        private static final org.apache.logging.log4j.Logger log
    • Method Detail

      • getInstance

        public static TemplatesManager getInstance​(KeeperService keeperService,
                                                   AquariusService aquariusService)
        Given the KeeperService and AquariusService, returns a new instance of AccountsManager using them as attributes
        Parameters:
        keeperService - Keeper Dto
        aquariusService - Provider Dto
        Returns:
        AccountsManager AccountsManager instance
      • proposeTemplate

        public org.web3j.protocol.core.methods.response.TransactionReceipt proposeTemplate​(String templateAddress)
                                                                                    throws EthereumException
        Suggest an agreement template smart contract to include in the white listed agreement templates
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EVM error
      • approveTemplate

        public org.web3j.protocol.core.methods.response.TransactionReceipt approveTemplate​(String templateAddress)
                                                                                    throws EthereumException
        Approve (whitelist) an already proposed template
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EVM error
      • revokeTemplate

        public org.web3j.protocol.core.methods.response.TransactionReceipt revokeTemplate​(String templateAddress)
                                                                                   throws EthereumException
        Cancel the propsed/approved template or essentially de-whitelist the template.
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        TransactionReceipt tx receipt
        Throws:
        EthereumException - EVM error
      • isTemplateApproved

        public boolean isTemplateApproved​(String templateAddress)
                                   throws EthereumException
        Returns true or false depending if the template was approved
        Parameters:
        templateAddress - Hex str the ethereum address of the deployed template (smart contract address)
        Returns:
        boolean is approved
        Throws:
        EthereumException - EVM error