diff --git a/src/Protocol/ProtocolScriptInfo.purs b/src/Protocol/ProtocolScriptInfo.purs index ab2f7b9..217a30c 100644 --- a/src/Protocol/ProtocolScriptInfo.purs +++ b/src/Protocol/ProtocolScriptInfo.purs @@ -40,7 +40,7 @@ getProtocolScriptInfo protocol = do protocolUtxo <- getProtocolUtxo protocol utxos currentDatum <- liftContractM "Impossible to get Protocol Datum" $ extractDatumFromUTxO protocolUtxo let value = extractValueFromUTxO protocolUtxo - + let scriptRef = PlutusScriptRef (unwrap protocolValidator) refScriptUtxo <- getUtxoByScriptRef "Protocol" scriptRef utxos let refScriptInput = Constraints.RefInput $ mkTxUnspentOut (fst refScriptUtxo) (snd refScriptUtxo) diff --git a/src/Protocol/UpdateProtocol.purs b/src/Protocol/UpdateProtocol.purs index 3934a50..3a51b09 100644 --- a/src/Protocol/UpdateProtocol.purs +++ b/src/Protocol/UpdateProtocol.purs @@ -60,7 +60,7 @@ contract protocolData protocolConfigParams = do constraints :: Constraints.TxConstraints Void Void constraints = Constraints.mustSpendScriptOutputUsingScriptRef - (fst protocolInfo.pUtxo) + (fst protocolInfo.pUtxo) updateProtocolRedeemer protocolInfo.pRefScriptInput <> Constraints.mustPayToScriptAddress @@ -74,7 +74,7 @@ contract protocolData protocolConfigParams = do let lookups :: Lookups.ScriptLookups Void lookups = - Lookups.unspentOutputs protocolInfo.pUtxos + Lookups.unspentOutputs protocolInfo.pUtxos <> Lookups.unspentOutputs walletUtxo unbalancedTx <- liftedE $ Lookups.mkUnbalancedTx lookups constraints diff --git a/src/Shared/ScriptRef.purs b/src/Shared/ScriptRef.purs index 38d5b60..69e1ef7 100644 --- a/src/Shared/ScriptRef.purs +++ b/src/Shared/ScriptRef.purs @@ -25,20 +25,21 @@ createRefScriptUtxo scriptName validatorHash validator = do let constraints :: Constraints.TxConstraints Unit Unit constraints = Constraints.mustPayToScriptAddressWithScriptRef - validatorHash - (ScriptCredential validatorHash) - unitDatum - Constraints.DatumWitness - scriptRef - minAdaValue + validatorHash + (ScriptCredential validatorHash) + unitDatum + Constraints.DatumWitness + scriptRef + minAdaValue lookups :: Lookups.ScriptLookups PlutusData lookups = Lookups.unspentOutputs creds.ownUtxo unbalancedTx <- liftedE $ Lookups.mkUnbalancedTx lookups constraints - addressWithNetworkTag <- - liftedM "Failed to get own address with Network Tag" - $ Array.head <$> getWalletAddressesWithNetworkTag + addressWithNetworkTag <- + liftedM "Failed to get own address with Network Tag" + $ Array.head + <$> getWalletAddressesWithNetworkTag let balanceTxConstraints :: BalanceTxConstraintsBuilder diff --git a/src/Shared/Utxo.purs b/src/Shared/Utxo.purs index 8119a83..2c6990b 100644 --- a/src/Shared/Utxo.purs +++ b/src/Shared/Utxo.purs @@ -57,7 +57,7 @@ checkScriptRefInUTxO scriptRef (Tuple _ txOutWithRef) = filteByScriptRefInUtxo :: ScriptRef -> Array UtxoTuple -> Array UtxoTuple filteByScriptRefInUtxo scriptRef = - Array.filter (checkScriptRefInUTxO scriptRef) + Array.filter (checkScriptRefInUTxO scriptRef) getUtxoByScriptRef :: String -> ScriptRef -> UtxoMap -> Contract UtxoTuple getUtxoByScriptRef scriptName scriptRef utxos =