def invoke_contract(self, contract_hash, params, id=None, endpoint=None):
        """
        Invokes a contract
        Args:
            contract_hash: (str) hash of the contract, for example 'd7678dd97c000be3f33e9362e673101bac4ca654'
            params: (list) a list of json ContractParameters to pass along with the invocation, example [{'type':7,'value':'symbol'},{'type':16, 'value':[]}]
            id: (int, optional) id to use for response tracking
            endpoint: (RPCEndpoint, optional) endpoint to specify to use
        Returns:
            json object of the result or the error encountered in the RPC call
        """
        return self._call_endpoint(INVOKE, params=[contract_hash, params], id=id, endpoint=endpoint)