View on GitHub
File Changes
    -> Contract s T.Text ()
vestFundsC vesting = do
    let tx = payIntoContract (totalAmount vesting)
-
        lookups = scriptLookups (scriptInstance vesting)
-
    void $ submitTxConstraintsWith lookups tx
+
    void $ submitTxConstraints (scriptInstance vesting) lookups tx

                      
data Liveness = Alive | Dead

                      
import           Ledger.Value                   (Value, lt, geq)
import Ledger.Constraints (TxConstraints)
import qualified Ledger.Constraints as Constraints
-
import Ledger.Constraints.OffChain (ScriptLookups(..), scriptLookups)

                      
import qualified Language.Plutus.Contract.Typed.Tx as Typed
import           Language.Plutus.Contract
    pk <- ownPubKey
    let tx = Constraints.mustPayToScript (Ledger.pubKeyHash pk) vl
                <> Constraints.mustValidateIn (Ledger.interval 1 (escrowDeadline escrow))
-
    submitTxConstraintsWith (scriptLookups inst) tx
+
    submitTxConstraints inst tx

                      
newtype RedeemSuccess = RedeemSuccess TxId
    deriving (Haskell.Eq, Show)
    then throwing _RedeemFailed DeadlinePassed
    else if (foldMap (Tx.txOutValue . Tx.txOutTxOut) unspentOutputs) `lt` targetTotal escrow
         then throwing _RedeemFailed NotEnoughFundsAtAddress
-
         else 
-
             let lookups = (scriptLookups inst) { slTxOutputs = unspentOutputs } in
-
             RedeemSuccess <$> submitTxConstraintsWith lookups tx
+
         else RedeemSuccess <$> submitTxConstraintsUtxo inst unspentOutputs tx

                      
newtype RefundSuccess = RefundSuccess TxId
    deriving (Haskell.Eq, Show)
        tx' = Typed.collectFromScriptFilter flt unspentOutputs Refund
                <> Constraints.mustValidateIn (from (succ $ escrowDeadline escrow))
    if Constraints.modifiesUtxoSet tx'
-
    then
-
        let lookups = (scriptLookups inst) { slTxOutputs = unspentOutputs } in
-
        RefundSuccess <$> submitTxConstraintsWith lookups tx'
+
    then RefundSuccess <$> submitTxConstraintsUtxo inst unspentOutputs tx'
    else throwing _RefundFailed ()

                      
-- | Pay some money into the escrow contract. Then release all funds to their