user2155: submitTxConstraintsWith :: ScriptLookups a -> TxConstraints (RedeemerType a) (DatumType a) -> Contract w s e Tx
How does submitTxConstraintsWith make usage of the ScriptLookups?
I always see it used like this: ledgerTx <- submitTxConstraints (swapInst oracle) tx
I am wondering why the ScriptLookups?

user2201: The family of submitTx functions all create transactions from the constraints submitted in the arguments. The most general implementation of the function is
submitTxConstraintsWith 
  :: ScriptLookups a 
  -> TxConstraints (RedeemerType a) (DatumType a) 
  -> Contract w s e Tx

Here ScriptLookups a takes a lookup of the (Plutus compiled) scripts that are required by the transaction for on-chain execution.
This link gives an overview of the functions that are implemented. I added it as illustration as I don't know what Plutus commit it belongs to.

2155: <p><code>submitTxConstraintsWith :: ScriptLookups a -&gt; TxConstraints (RedeemerType a) (DatumType a) -&gt; Contract w s e Tx</code></p>
<p>How does <code>submitTxConstraintsWith</code> make usage of the ScriptLookups?</p>
<p>I always see it used like this: <code>ledgerTx &lt;- submitTxConstraints (swapInst oracle) tx</code></p>
<p>I am wondering why the <code>ScriptLookups</code>?</p>
 2201: <p>The family of <code>submitTx</code> functions all create transactions from the constraints submitted in the arguments. The most general implementation of the function is</p>
<pre><code>submitTxConstraintsWith 
  :: ScriptLookups a 
  -&gt; TxConstraints (RedeemerType a) (DatumType a) 
  -&gt; Contract w s e Tx
</code></pre>
<p>Here <code>ScriptLookups a</code> takes a lookup of the (Plutus compiled) scripts that are required by the transaction for on-chain execution.</p>
<p><a href="https://alpha.marlowe.iohkdev.io/doc/haddock/plutus-contract/html/Plutus-Contract-Effects-WriteTx.html" rel="nofollow noreferrer">This link</a> gives an overview of the functions that are implemented. I added it as illustration as I don't know what Plutus commit it belongs to.</p>
