All Questions
Tagged with plutus smart-contract
145
questions
2
votes
2
answers
269
views
How to return funds from a smart contract
If I have assets (can be just ADA for simplicity) locked in a contract, how can I release the funds to the previous owners most efficiently?
Some more context regarding the question.
I created a pay ...
0
votes
2
answers
84
views
playground-common package giving 'Failed to build scrypt-0.5.0' error
I'm trying to run my own little smart contract in the plutus-pioneer-program [fourth iteration] docker container and I'm having some problems. I've just added an extra folder alongside the other weeks....
2
votes
3
answers
113
views
How to convert Address type variable to get "addr_testXXX" format address?
In plutus endpoint, I want to convert Address type value to get addr_testXXX format address.
I have try :
import Cardano.Api ( SerialiseAddress (deserialiseAddress, serialiseAddress) )
...
-- here, ...
0
votes
1
answer
34
views
Plutus Playground - mustPayToTheScript - unexpected char escapes - 0 converted to \NUL, 1 to \SOH
I am having trouble with the mustPayToTheScript function - I am getting this error
Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\"...
0
votes
1
answer
202
views
What is the correct way to compare two instances of Value data type?
Question
What is the correct way to compare two instances of Value data type?
Context
I would like to check if outgoing transaction identified by PubKeyHash has the same Value as Value which was ...
0
votes
3
answers
108
views
How Can You Prevent A Burn Address From Polluting The Cardano Ledger?
Making a Burn Address on the blockchain is currently done by using a script address with a validator that always returns False and so never validates.
This ties up ADA and causes the size of the ...
1
vote
0
answers
15
views
redeeming from PlutusV3 script fails
This is the code of my smart contract. It basically requires exactly 3 reference inputs to pass validation.
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ...
1
vote
1
answer
23
views
how to use ownPubKey and RedeemerType and DatumType
My code is here.
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ...
2
votes
1
answer
26
views
Expecting one more argument to ‘RedeemerType’
My code is here
marketConstraints :: Market -> TxConstraints (RedeemerType -> ScriptContext -> Bool) (DatumType, ())
marketConstraints market = mustValidateIn (to $ scriptAddress market)
I ...
0
votes
1
answer
151
views
Select only one UTxO from script address
I need to get only one UTxO from the script address, where its datum hash matches the redeemer hash. For example I have locked two UTxO with 10 Ada and the DatumHash "house" at the script ...
0
votes
0
answers
32
views
In which cases Plutus compiler is producing expensive code?
I have heard a couple of times, that is hard to make Plutus produce non-costly code, and one should consider writing scripts on a level with Plutarch's help instead. Still, I never get real reasons ...
0
votes
1
answer
202
views
How to resolve this "(FromAlonzoUtxoFail (UtxosFailure (ValidationTagMismatch (IsValid True)" transaction submission error on mesh library
I am getting this error on transaction submission.
""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (...
2
votes
3
answers
95
views
How to allow non deterministic spent output
I would like a validator (or a minting policy) to succeed always but only to spend the output if some conditions are met;
an example use case of such behaviour is to allow burning token (kind of a &...
0
votes
2
answers
160
views
Different types of Datums
I have a good understanding of the role of Datums in Cardano's Extended UTXO model, including their use in representing the state of a smart contract. However, I'm seeking further clarification on the ...
2
votes
1
answer
62
views
How to handle sensitive data in smart contracts?
I'm interested in creating an escrow smart contract using Plutus, where a seller stores an encryption key in the Datum and sells it for a price. The key should only be accessible to a buyer who pays ...