@@ -40,7 +40,7 @@ redeploying the code. This eliminates one of the key motivations for using a fac
4040 interface would be implemented by `MySqlDatabaseConnectionFactory ` and
4141 `SQLiteDatabaseConnectionFactory ` (and potentially others). Which specific database connection
4242 is constructed depends on which factory is provided.
43-
43+
4444 In the factory method pattern, the code resides in an base class that has an abstract method
4545 for constructing `DatabaseConnection ` objects. The base class is then subclassed to provide
4646 different implementation of the factory method.
@@ -56,7 +56,7 @@ redeploying the code. This eliminates one of the key motivations for using a fac
5656 On Concordium, the same problem does not really exist (viewing contract instances as the
5757 analogue of objects). Contract instances are always created by top-level transactions, and
5858 the contract being instantiated is always explicitly determined.
59-
59+
6060
6161Another motiviation for using a factory pattern might be for the factory to have some on-going
6262relationship with the products that it produces. In particular, the factory could maintain an
@@ -185,7 +185,7 @@ identify the code of the smart contract instance.
185185
186186Getting the module reference and contract name is done using the host functions
187187``contract_module_reference `` and ``contract_name ``, respectively. Note: both of these functions
188- are introduced in protocol version 7, and will not work while the chain is running an earlier
188+ are introduced in protocol version 7, and will not work while the chain is running an earlier
189189protocol version.
190190
191191In this example, the factory and product contracts are defined in the same module.
@@ -330,7 +330,7 @@ the invoker Adversary does not match the owner User), but success for User:
330330
331331 .. image :: images/factory-tricked.svg
332332 :alt: sequence diagram showing how a hijacking attempt may succeed if the user is deceived into signing a bad transaction
333-
333+
334334 This is hopefully unlikely. Moreover, the effect of
335335 such a hijacking should typically be that the product cannot be used as the
336336 user intended, but the user would still be able to create another product
@@ -354,7 +354,7 @@ At this point, it just remains to initialize the state of the product:
354354 factory,
355355 };
356356 *state = ProductState::Initialized(product);
357-
357+
358358
359359 .. Note ::
360360
@@ -389,4 +389,4 @@ product contract must:
389389
390390It is important to always consider the risks presented by malicious third
391391parties and to evaluate if any given solution is appropriate to the
392- application at hand.
392+ application at hand.
0 commit comments