Questions tagged [plutus]
A programming language based on Haskell used to write smart contracts on the Cardano blockchain.
642
questions
0
votes
1
answer
107
views
Script Execution Failure PT8
I am trying to transact with UTxO from a script address on the pre-production testnet.
I locked the fund ok with Datum, now I get an error when trying to consume that UTxO, it seem that the script is ...
1
vote
1
answer
396
views
Missing/ No Redeemer Error when spending 2 script outputs
I am getting the following error, when I try to submit a transaction that spends 2 script outputs:
Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [...
2
votes
1
answer
156
views
InlineDatum on ReferenceOutput in OffChain code
I tried to use the inline datum of a reference input in the minting policy below:
{-# INLINABLE validateMinting2 #-}
validateMinting2 :: TxOutRef -> BuiltinData -> BuiltinData -> ()
...
4
votes
3
answers
149
views
How do users interact with smart contract?
In plutus playground, there is an example called “Vesting”. In the simulation, users can interact with this smart contract by click on “vest fund” or “retrieve funds”.
Now suppose that we compile this ...
0
votes
1
answer
47
views
Printing a plutus validators cborhex to a file
I was hoping to get some advice re printing a plutus validators cborhex to a file. Im kinda basing my logic off of an example in week03 in the pioneer program but need to make some adaptations.
Below ...
0
votes
1
answer
51
views
Use a parameterized currencySymbol within a Plutus Validator. Unsupported feature: Type constructor: GHC.Prim.ByteArray#
I have a minting policy which is parameterized by PaymentPubKeyHash and a script which checks that a token from that minting policy has been burned. The script also takes PaymentPubKeyHash as a ...
0
votes
1
answer
88
views
"plutusV2MintingPolicy" lookup not found by "balanceTx"
I am trying to mint some example tokens in offchain plutus code on tag v1.0.0-alpha1.
This is the OffChain code I am currently using:
mintFactoryToken :: Contract () MintFactorySchema Text ()
...
2
votes
2
answers
307
views
Plutus V2 Tx Building causing NonOutputSupplimentaryDatums error
I am stuck with this error, what's a NonOutputSupplimentaryDatums?:
""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (...
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 [(\\\"...
1
vote
0
answers
55
views
Plutus Playground WalletError: InsufficientFunds
I am running my smart contract on the plutus-playground and getting the error below:
Contract instance stopped with error: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\&...
0
votes
1
answer
91
views
GHC error when adding TokenName to NFTMint params
I get the following GHC error for code that I am trying to update to Plutus V2. I can reproduce the error using the plutus-scripts below. Is this a bug with Plutus V2 or can anyone explain how to ...
0
votes
2
answers
65
views
Coin Selection for Multiasset
I am building an NFT marketplace on Cardano.
To build my transactions I use cardano-serialization-lib. When I try to use add_inputs_from() with LargestFirstMultiAsset strategy to choose inputs for the ...
0
votes
1
answer
20
views
Can I run garbage collector after installing plutus-apps?
I just finished installing plutus-apps and running nix-shell for the first time on a new computer. I noticed that the file size is pushing 60gb is there anyway for me to clean up some of the unused ...
1
vote
1
answer
64
views
How to build a MultiSig wallet with a time delay element?
Any examples of tested libraries or code which enables multisig wallet where flow is more complex?
Example of requirements:
wallet transaction needs at least 2 signatures
wallet can be created with a ...
0
votes
1
answer
48
views
Opportunity for theft of funds in Martify marketplace
I am some kinda embarrassed by "mkBuyValidator" in Martify Marketplace on-chain code . For buyer there is only one check for token transfer (on line 68):
(valueOf (valuePaidTo info sig) (...
0
votes
1
answer
68
views
Whether validation checks are necessary
In Plutonomicon github repo it says by the end of the page:
For example, you don't need to prevent an unexpected transaction from locking value away - that's the submitter's own problem - but you do ...
1
vote
1
answer
33
views
How to get Integer from Cardano.Ledger.BaseTypes.TxIx
I am using the following function from the Plutus pioneer program:
stakeReferenceLedgerToPlutus :: Ledger.StakeReference StandardCrypto -> Maybe Plutus.StakingCredential
...
2
votes
1
answer
128
views
Cannot find wrapMintingPolicy after updating to latest release of plutus-apps
I've just checked out the latest release of the plutus-apps repository and ensured to copy the respective cabal.project dependencies (including their commit hashes). But I get a weird error, I didn't ...
2
votes
2
answers
516
views
What's a BabbageOutputTooSmallUTxO error? How to access minAda in Plutus code?
I'm trying to convert a V1 contract to V2, and I have offchain code that mints a token with a OneShotCurrency, and then pays the token plus 1 ada to my script.
It worked with Plutus libraries from Feb....
1
vote
1
answer
65
views
Is there an equivalent of Bitcoin Script Opcodes or the EVM instruction set in Cardano
Is there some lower level code that Plutus code compiles to (akin to Solidity => EVM bytecode, or BSV sCrypt => OP_codes)?
Related (but distinct) how the state changes: https://cardano....
1
vote
1
answer
222
views
VSCode HLS not working for plutus project
System Info:
Ubuntu :20.04
I am trying to get VSCode HLS extension working for plutus based project but seeing below error in output.
Failed to get project GHC version: no cradle
[Info - 3:27:24 p.m.]...
1
vote
0
answers
31
views
How to profile the budget usage of Plutus scripts
How to profile the budget usage of Plutus scripts
https://plutus.readthedocs.io/en/latest/howtos/profiling-scripts.html?highlight=profiling
Im struggling trying to follow the steps indicated in the ...
1
vote
1
answer
69
views
Understanding the serialization and the deployment of a custom untyped plutus core implementation
I have found this open source project that aims to create a typescript library to write smart contracts.
I had a look at the code but was not able to understand a couple of main pieces useful to ...
0
votes
1
answer
221
views
What happens if I omit a datum hash in a transaction to a script address?
When using a Trezor to sign a transaction with a script address as the receiver, I get the message "The following transaction output contains a script address, but does not contain a datum. ...
0
votes
1
answer
132
views
Any up to date Plutus tutorials for how to use the Emulator Trace?
I've recently updated my plutus-starter based app to the latest version, and it now references plutus-apps v0.1.0, and there are a lot of changes compared to what I started with in January.
It seems ...
3
votes
1
answer
336
views
Committing a database to the ledger without storing it on the ledger?
The Cardano blockchain has no global state, this means that shared state needs to be introduced. Is there a design pattern that lets you commit big sets of data to the ledger without storing it? This ...
1
vote
1
answer
44
views
Plutus Playground parsing Wallet error: EndpointDecodeContractError
I ran the code from this plutus playground tutorial in the online playground
https://playground.plutus.iohkdev.io/doc/plutus/tutorials/basic-apps.html#
I'm getting this error when entering a number ...
1
vote
0
answers
35
views
strange cabal build behaviour - won't detect changes to code file
This might have something to do with me working in a docker container, that is an ubuntu version of linux, with nix installed and plutus-starter cloned.
I'm currently updating a plutus script I wrote ...
3
votes
1
answer
81
views
Is function "isPayToScriptOut" unsafe?
As far as i understood, function "isPayToScriptOut" assumes every output that has a datum hash is a script output. But what if we create new output with datum, assigned to some pub key (for ...
2
votes
1
answer
51
views
Plutus BuiltinData vs. Data
I am confused about how they relate to each other. At first I thought Data is for offchain use and BuiltinData is for onchain use, but then I saw that that Data is also defined in PlutusCore which ...