Questions tagged [plutus-pioneer-program]

A program to recruit and train developers in Plutus for the Cardano ecosystem. Use this tag for questions regarding the Plutus pioneer program. Keep lecture and homework questions brief and on-topic. Give full answers that clearly explain why they resolve the problem.

Filter by
Sorted by
Tagged with
2 votes
1 answer
29 views

Can't collect utxo from the gift script address

I'm following Plutus Pioneers Program, 4th Cohort. In the 2nd week we learned the smart contract Gift.hs -- This validator always succeeds mkGiftValidator :: BuiltinData -> BuiltinData -> ...
1 vote
1 answer
21 views

Week02 Homework 1

I am getting type mismatch when I use traceIfFalse. What could be be reason? And how could I get this resolved. I also noticed that it didn't fail while I build lecture examples. Couldn't match ...
0 votes
1 answer
54 views

The Plutus script evaluation failed [Homework Week 02]

I'm a have problem unlocking the smart contracts of the homework of week 02. The Plutus code: {-# LANGUAGE DataKinds #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE NoImplicitPrelude ...
  • 21
2 votes
1 answer
47 views

Can't collect due to a non existent script

I'm following Plutus Pioneers Program, 4th Cohort, I'm at Week 2 on testnet I'm struggling a bit collecting the gift, I have do a slightly modified version of Gift, creating it works as expect: $ ...
1 vote
1 answer
44 views

Is Plutus off-chain code relevant for testing?

It was mentioned in lecture 1 that in this fourth cohort of the PPP we won't need to learn to write off-chain code in Plutus/Haskell. Nevertheless it appears that testing uses the emulator and it ...
0 votes
0 answers
9 views

nix-shell fails when first run

I am new to cardano development and I was following the instruction manual that was linked in plutus pioneer program lecture This link and everything went well until I ran nix-shell there is where I ...
  • 1
1 vote
1 answer
103 views

How to deploy the Plutus smart contract

I am following Plutus-pioneer-program to learn smart contract development in Cardano. I have tried the onchain and offchain code, compiled and tested in Plutus playground and also in emulator trace. ...
0 votes
1 answer
23 views

Custom currency error: Cannot build the initial state: Tag "toCardanoPolicyId"

I try to set an initial state of the emulator like so: test :: IO () test = runEmulatorTraceIO' def emCfg myTrace where dist = Map.fromList [ (senderWallet, Ada.lovelaceValueOf 100_000_000) ...
  • 323
0 votes
1 answer
29 views

SlotToPOSIXTime in English Auction Demo

in my cabal repl, i'm getting the following error from trying to replicate the week1 demo of Plutus-pioneer-program. I'm also unable to simulate the example scenario in the playground (i can see ...
0 votes
0 answers
35 views

PaymentPubKeyHashes don't match

I have a structured datum like: data VestingDatum = VestingDatum { beneficiary :: PaymentPubKeyHash , deadline :: POSIXTime } ...
  • 323
0 votes
1 answer
52 views

Module `Ledger.Typed.Scripts' does not export `wrapValidator'

I try to compile code from Plutus Pioneer Program week 4. These lines cause error. typedValidator :: Scripts.TypedValidator Vesting typedValidator = Scripts.mkTypedValidator @Vesting $$(PlutusTx....
  • 323
0 votes
0 answers
8 views

reference is not a tree error in week03 of pionner program

Hello everyone I was just going through second cohort of pioneer program. When I run cabal repl in week03 it's giving me reference is not a tree error. Could anyone please tell me how to fix this ...
7 votes
0 answers
87 views

Developers are having dismal experience building on Cardano [closed]

When developers get into plutus playground, 10 out pf 10 expect it to work like remix, an IDE. You put a code in. You compile and deploy. And then start interacting with the dApp. All in the same ...
  • 323
0 votes
0 answers
21 views

Plutus Pioneer Program, Week 7: Zero-One game, redundant check?

Regarding the check performed in this line, does it serve any purpose? We have already made sure of this when the second player made his move and thread token is helping in chaining stuff (some other ...
  • 110
1 vote
1 answer
66 views

User error: Caused by: [ (builtin unConstrData) (con data #187b) ] while trying to unlock tokens from contract

hi I am getting this error while trying to unlock tokens from my treasury contract it is already topp up with tokens when trying to unlock with the access token doesn't know the exact reason behind ...
0 votes
2 answers
41 views

How to check the output datum reference in V2

The following code would work for V1: outputDatum :: EkivalEscrowDatum outputDatum = case transferDatum $ txOutDatumHash ownOutput >>= flip findDatum info of Nothing -> traceError "...
4 votes
3 answers
93 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 ...
  • 323
0 votes
1 answer
38 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
37 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 ...
1 vote
2 answers
59 views

Error cabal build: "Failed to build lzma-0.0.0.3" even in nix-shell and also tried "sudo-apt install liblzma-dev"

I'm trying to run the command "cabal build" the Week02 code of plutus-pioneer-program but it has this error and I have tried everything but the same error keeps appear: Failed to build lzma-...
3 votes
3 answers
143 views

How to turn (compile) “script.hs” into “script.plutus”?

I have a script that is developed in Plutus Playground. It is working well and now I want to deploy it to the Cardano blockchain via cardano-cli. Following this answer, I have to use cabal to turn my ...
  • 323
0 votes
0 answers
5 views

plutus PAB db migrate issue

I have been using this reference [https://github.com/input-output-hk/plutus-apps/tree/main/plutus-pab/test-node] to deploy smart contract using PAB but while run db migrate command faced below error ...
0 votes
1 answer
99 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 ...
  • 229
0 votes
0 answers
139 views

fatal: reference is not a tree

I'm in week 1 when I'm trying to run cabal project I'm getting this error... /myplutus/plutus$ git checkout 41149926c108c71831cfe8d244c83b0ee4bf5c8a fatal: reference is not a tree: ...
1 vote
1 answer
59 views

Plutus Playground Server error: opening lock file '/nix/...root.lock': Permission denied

So I've been going through the Plutus Pioneers 3rd cohort lectures and last night accidentally left my computer unplugged. When I booted up Ubuntu Linux on the computer this morning I noticed I have 3 ...
0 votes
0 answers
44 views

Using plutus-apps with cardano-node 1.35.x

I am new to Plutus development and I am working on some contracts. Some months ago, I setup my environment by cloning plutus-apps and checking out the main branch. I then created my project using one ...
  • 327
0 votes
0 answers
12 views

How ContractInstanceId works? What's the porpuse of cid files?

When working with PAB some files with cid extensions are generated when you try to use an endpoint. Does this file stores your information after you've done some operation in the smart-contract?
1 vote
0 answers
58 views

TxOutRefNotFound when using Plutus.Contract.Wallet (getUnspentOutput)

I am trying to get a UTxO of the current wallet, use it to mint a token via the OneShotCurrency type, but I keep getting the following Error: (TxOutRefNotFound (TxOutRef {txOutRefId = ...
  • 1,088
2 votes
0 answers
27 views

npm run start in plutus-playground-client creating npm errors

edit...I was able to get the plutus-playground-client working by using --force. How do I fix the monaco-editor dependency errors so I don't need to force it? Or do I even need to worry about it? I am ...
  • 121
0 votes
1 answer
24 views

Is there training offered for those interested in being moderators?

Is there training offered for being a moderator? I would love to be one of them. I like learning and helping too.
1 vote
2 answers
71 views

Plutus week 6 - Oracle example smart contract removed

Previously in Plutus pioneer program Week 6 shows how to implement an Oracle, now the example code has been removed. Is this because the way to implement Oracles has changed? and the previous approach ...
  • 13
1 vote
1 answer
110 views

Cabal repl fails because of missing dependency lzma

Summary When running cabal repl inside any week in the Plutus Pioneer Program, it fails with the error message: cabal: Missing dependency on a foreign library: * Missing (or bad) header file: lzma.h * ...
1 vote
2 answers
129 views

Plutus V2 Primitives

Does any have (or has anyone found) a simple summary of Plutus V2 Primitives? They made the short list of big changes in the Vasil fork announcement, so they seem important. Other than just reading ...
1 vote
1 answer
96 views

How to reduce tx size using typed Plutus script with Vasil fork PlutusV2?

With the recent Vasil fork script references allow to reduce transaction size. Even though Vasil has been already launched on the testnet I could not find information on how to reduce the size of ...
0 votes
1 answer
62 views

Cannot wrap my head on NFTs

I am running through the Plutus Pioneer Program and I have reached week 5. Also as a reference, I will use the LobsterChallenge repository. I am a bit confused about how NFTs work for the Cardano ...
0 votes
1 answer
47 views

Is there a way to see which Plutus code is deployed on a specific script address?

On Ethereum, for example, there is a way to see the Solidity code that is deployed in a specific address (as long as the code gets verified). Is there a way to achieve this same behaviour in Cardano?
1 vote
1 answer
46 views

How does valuePaidTo work?

How does valuePaidTo work ? Does it give the value paid by the script to the pubkeyhash or is it the total value of the pubkeyhash for the pending transactions ? Consider the following TxOut txOutputs ...
  • 13
0 votes
1 answer
27 views

Did I update Plutus Apps Repo Wrong?

I just did a git pull updating my plutus repos from the one used in plutus pioneers 3 to the full state. I did not choose to move the HEAD to the commit mentioned and wanted to see what happens if I ...
0 votes
1 answer
72 views

Using `curSymbol` function in Validator script

supposed I have a mintingpolicy script (simple one time minting policy, parameterizing TxOutRef) and a validator script. I want to validate if the token with correct CurrencySymbol is spent in a ...
0 votes
1 answer
88 views

Can't create ```TokenName``` using ```tokenName``` with error ```GHC Core to PLC plugin: E042:Error: Unsupported feature: ...```

I'm not sure is relevant but the code in question is for a generic Validator (with Datums and Redeemers) used to get a forwarded minting policy the problem should be clear from the title, I can't get ...
  • 666
0 votes
2 answers
148 views

problem setting up the plutus environment

Noob here. I am basically just trying to learn plutus on my own I am on week01. When I ran the following command: [nix-shell:~/plutus-apps/plutus-playground-client]$ npm run start (or even just npm ...
  • 1
1 vote
1 answer
53 views

Where does the PAB run?

I understand that PAB is a backend that: provides a standardized environment in which Plutus applications run provides disciplined state management presents discoverable interfaces to the external ...
1 vote
1 answer
96 views

Using Endpoints in a PAB Schema

I am trying to find a way to integrate endpoints from a native token staking contract and implement them into the PAB. I am assuming I will heavily be using the getSchema instance. Like so: instance ...
1 vote
1 answer
166 views

Bad File Descriptor on nix-build of Plutus-Apps on Mac M1

I am seeing an error building Plutus-Apps on Mac M1. After precisely following https://github.com/renzwo/cardano-plutus-apps-install-m1/blob/main/README.md UPDATE: This did resolve. These errors ...
  • 100
0 votes
1 answer
39 views

Error signer not found - txInfoSignatories

I'm trying to implement lock and withdraw of an NFT, but when I tried to check the signer on-chain with the function: signer :: PubKeyHash signer = case txInfoSignatories (scriptContextTxInfo ctx) of ...
  • 91
1 vote
1 answer
54 views

How to use plutus script withness in other plutus script

How can we reference the use of other scripts in a plutus validator?. Wat I was trying to making is an validator that only validates if an other predetermined plutus scripts also validates in the same ...
  • 1,737
0 votes
1 answer
40 views

Emulator trace throws `BuiltinEvaluationFailure of UnIData` error with simple minting policy

Source https://github.com/tomazvila/plutus_minting_test Problem Running smart contract with simple minting use case fails to mint. Error Slot 00001: *** CONTRACT STOPPED WITH ERROR: "\"...
1 vote
1 answer
95 views

How is metadata typed on the blockchain

I am reading through the haddock documentation to find the way metadata is attached to a transaction. In this documentation (1) we have data Blockchain = [Block] data Block = [OnChainTx] Where and ...
  • 1,737
0 votes
1 answer
51 views

How can I code a liquidity pool?

I am really interested in how i can code a liquidity pool using Plutus. What are the mechanics & the components I need to handle? Is there a specific pattern, skeleton to follow?
1 vote
0 answers
45 views

setting up the PAB - could not start the plutus-chain-index

I'm trying to follow the lesson 6 of iteration 3 of the plutus-pioneer-program when trying to start che chain index trough the command (fromn the plutus-apps repository) plutus-chain-index --config ./...
  • 666

1
2 3 4 5
8