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, its lectures or homework.

Filter by
Sorted by
Tagged with
2
votes
2answers
71 views

Plutus Pioneer Program Week missing commit

The cabal.project file for Week 5 of the Plutus Pioneer program points to commit 8f1a47674a99ac9bc2aba3231375d8d6de0641d2 for the Plutus repo but that commit seems to not exist based on: 2:22PM /...
8
votes
2answers
244 views

Plutus Pioneer Program - Problem with plutus playground client

I'm setting up my environment to run the example from lecture #1 (Week01 auction) All compilations went well but when I try the evaluate in the simulator I always receive: interpreter Errors ...
2
votes
1answer
90 views

Must spend UTxO constraint when minting NFT

I'm currently going through week 5 of the plutus piooner lectures, and I have some questions about the NFT process. Here is a reference with the complete code, but here are the important parts: The on-...
7
votes
1answer
87 views

Plutus Pioneer Cohort 2 Lecture 3

I was going through the lecture on Youtube and this is the one with Vesting example where: wallet 1 gifts 20 ADA to wallet 2 in 2 different slots wallet 1 gifts 10 ADA to wallet 3 in a slot later on, ...
3
votes
1answer
31 views

What does it mean for a contract to "stop"?

I'm working through the week 4 homework for the Plutus Pioneer program. I've found an answer to the homework problem and now I'm trying to get a deeper understanding of the code. I've noticed that the ...
1
vote
1answer
35 views

Plutus Pioneer lecture 3 homework 1 vesting logic

I'm having some trouble figuring out the vesting logic in homework 1 of the Plutus pioneer program lecture. I eventually gave up and looked at the solution which seems to be exhibiting the same "...
0
votes
1answer
11 views

plutus-playground-server sense of time is incorrect

I think my plutus-playground-server has an incorrect notion of time. I'm working on the homework for lecture 3 and keep running into issues with the simulator. Here's a screenshot of what I'm ...
3
votes
1answer
71 views

plutus-playground-server: user error (Error evaluating simulation: JsonDecodingError

I'm following the first lecture in the plutus pioneer program but I cannot set up the local environment. The error happens when running npm start on a nix-shell after initializing the playground ...
0
votes
1answer
55 views

Question about Datum and DatumHash

I have a question about findDatum which is used in some of example contracts in Plutus Pioneer Program. According to those lectures, this method is used to get Datum from its DatumHash. I wonder if it ...
3
votes
1answer
103 views

How to solve the Plutus scalability issue?

This issue is one that'll plague projects trying to build on Cardano. Let's consider Lecture 10 of the first iteration of the Plutus Pioneers Program (https://www.youtube.com/watch?v=Dg36h9YPMz4&...
1
vote
1answer
76 views

POSIXTime as payload

I have a parameterized contract that includes a POSIXTime as a field called startTime served via PAB. What is the appropriate stringified HTTP payload to indicate a date with time such as the 25th of ...
0
votes
1answer
4 views

HSL error for Datakinds extension in Week01 in VSCode

I'm trying to get type definitions for Plutus code in VSCode and I'm getting an unusual error. The first extension in the file is {-# LANGUAGE DataKinds #-} (<- this is a clickable link) and the ...
0
votes
1answer
11 views

Error when building HSL for GHC 8.10.4.20210212

I'm trying to get the haskell language server installed on my mac and I"m following the docs at https://docs.plutus-community.com/docs/setup/editors/prerequisites.html but they seem to not work. ...
1
vote
2answers
21 views

Sandbox error when running nix build

I'm trying to get the exercises for week 1 of the plutus pioneer program working. I've installed nix and have set the IOHK caches. When I try to run nix build -f default.nix plutus.haskell.packages....
1
vote
1answer
32 views

Getting the address of a parameterized contract from within the validator of another script

Suppose I have one contract, Contract 1, that is parameterized by type Contract1Params{ tokenName :: BuiltinByteString } and I have a minting policy that will only mint a token with tokenName tn ...
1
vote
0answers
26 views

Plutus Pioneer Program Week01 : Installing plutus - Unable to start server if syncing plutus with plutus-pioneer-program version

In the plutus-pioneer-program/code/week01 folder, I got the tag as tag: ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4 The git log tag for plutus was 9879b31579d0deb863f3cdf27f93419deec3b4bb So I used git ...
6
votes
4answers
210 views

How to prevent economic DOS attacks against Plutus contracts

Many people wrote about the eUTXO model and the benefits it brings compared to Ethereum. However, eUTXO also comes with some challenges. In particular, eUTXO is susceptible to "economic denial of ...
13
votes
4answers
377 views

On-chain and off-chain for Plutus SCs

Hi I am currently at lecture 5 of the Plutus Pioneers Programm and I was wondering which part of the code is on chain and which is offchain. I know that the valididation script is onchain but the ...
0
votes
0answers
14 views

Plutus Pioneer Program Week02: grab endpoint not working and trace log being cut off

Here you can see the 'grab' endpoint being correctly set. And here you can see the Tx2 slot for the grab endpoint is missing. Also, some lines of the trace are being cut off, I'm not sure if this is ...
0
votes
0answers
40 views

Why Cabal will not build Cardano api?

Hi I was just following lecture 1 when trying to build the Auction contract. Plutus commit: ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4 I ran Cabal clean, Cabal update, then added brew install libsodium-...
0
votes
0answers
12 views

Pioneer Lecture 6 - oracle client gets 403 error from coinmarketcap url

I'm running an ubuntu docker container on a MacOS host. I have the oracle-pab server running in a nix-shell, but when I try to run the oracle-client executable, I get this error: [nix-shell:/src/...
3
votes
1answer
58 views

Issues with oracle concurrency

I'm sort of running into an issue with the oracle described in the PPP. It looks like there is race between the oracle to update the exchange rate and the users to use the exchange rate in a swap. We ...
4
votes
1answer
179 views

How do I deploy a smart contract from another smart contract?

If I want to create one top level contract for creating a bunch of other, similar contracts, lets say a top level Uniswap contract that creates liquidity pool contracts and keeps track of the total ...
3
votes
1answer
49 views

Funding emulator wallets with custom currencies

How exactly can I fund the emulator wallets with custom currencies? Please show an emulator example doing so.
2
votes
0answers
53 views

What is achieved by invoking endpoint for wallet in the emulator?

As per entire code below, give always mandates that Wallet 2 be given: thePkh :: PubKeyHash thePkh = pubKeyHash $ walletPubKey $ Wallet 2 theVal :: Value theVal = ADA.toValue (ADA.Lovelace 3_000_000) ...
6
votes
2answers
190 views

What does it mean that utxo sits at script address

What does it mean that "utxo sits at script address". What script address?
4
votes
2answers
73 views

plutus pioneer week01 src code explain

I'm a little confused about the following code(from EnglishAuction.hs): auctionInstance :: Scripts.ScriptInstance Auctioning auctionInstance = Scripts.validator @Auctioning $$(PlutusTx.compile [|| ...
2
votes
1answer
45 views

Failing to set up plutus on windows

So I'm using WSL Windows 10 and I set up IOHK hashes, but everytime I run nix-shell I get following error: build of '/nix/store/9im4jp068ykqsm4s8996px605p6zrw7q-Agda-plan-to-nix-pkgs.drv' failed. ...
1
vote
1answer
39 views

What is the benefit of installing plutus playground locally?

In these instructions for working through the plutus pioneer program, it suggests installing the playground locally: https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-...
1
vote
1answer
123 views

Is there any eth_sign equivalent signing method in plutus?

I want to use my private key to sign a message, and submit the message and signatures to third party server, the third party server can verify that signatures through plutus smartcontract. In ethereum ...
4
votes
1answer
39 views

Type instance syntax

I have already learned haskell from http://learnyouahaskell.com/chapters, but it doesn't cover the type instance syntax, like this: data Auctioning instance Scripts.ValidatorTypes Auctioning where ...
2
votes
2answers
118 views

How to compile plutus source code locally?

I'm trying to compile the Plutus source code locally, I tried cabal build in nix-shell, getting this error After searching the rest of the dependency tree exhaustively, these were the goals I've had ...
3
votes
1answer
66 views

Couldn't match expected type ‘BuiltinData’ in locally run playground

Working through the Plutus Pioneer Week2 homework and getting the following error in the locally served playground. error: • Couldn't match expected type ‘BuiltinData’ with ...
5
votes
1answer
115 views

Generate random number in Plutus on-chain code

Is it possible to generate a random number in Plutus on-chain code? For example, if I would like to implement a smart contract that works like gambling game, where a person deposits ADA and bets on a ...
5
votes
2answers
76 views

(Lecture #6 It #2 - Core.Hs) : Explaining lookups use of both typedValidatorLookups and otherScript?

Can somebody explain these lines and why (both) Constraints.typedValidatorLookups... and Constraints.otherScript... are used? Still struggling to get my head around lookups, so maybe that is why I'm ...
7
votes
2answers
154 views

Is there documentation on the Prerequisites for Plutus Pioneer code?

I'm trying to run the Plutus Pioneer code on a Docker container based on https://hub.docker.com/r/nixos/nix. I've followed this guide to install Cabal and GHC https://www.reddit.com/r/haskell/comments/...
3
votes
1answer
65 views

Not in scope: data constructor ‘PayToPubKey’ - Fixing the Week 1 Pioneers Exercise

So in week 3 of the Plutus Pioneers program, the Plutus build changed which meant code in weeks 1 and 2 would no longer work. From what I can find, no one has published an updated set of code for ...
8
votes
1answer
113 views

Building local Plutus documentation

I've been following this guide to build Plutus documentation locally. The key line is - [~/plutus] nix-build -A plutus-playground.haddock This works fine, but I'm following the Pioneer Program and ...
5
votes
2answers
137 views

Pioneer Lecture 4 recursion - how is it not infinite?

In the solution for the Lecture #4 (cohort 1 I guess, I'm following on Youtube) payContract :: Contract () PaySchema Text () payContract = do pp <- endpoint @"pay" let tx = ...
6
votes
1answer
54 views

How does `submitTxConstraintsWith` make usage of the ScriptLookups?

submitTxConstraintsWith :: ScriptLookups a -> TxConstraints (RedeemerType a) (DatumType a) -> Contract w s e Tx How does submitTxConstraintsWith make usage of the ScriptLookups? I always see it ...
6
votes
2answers
168 views

Where is the returning Contract Monad in the handleError function of Contract Monad?

The type of handleError function is :: (e -> Contract w s e' a)-> Contract w s e a -> Contract w s e' a It takes two arguments a function which takes error and returns a Contract monad (...
5
votes
1answer
48 views

Understanding do notation with Monads in Plutus Pioneer Week 04

I have a question regarding a block of code from th Week04 Plutus Pioneer Program. The block is in Writer.hs foo'' :: Writer Int -> Writer Int -> Writer Int -> Writer Int foo'' x y z = do ...
2
votes
2answers
100 views

Plutus Pioneer Week 2 Smart Contracts

Do I need to run the cabal build for all the weekly modules? Will it do the following for all of the modules? Please confirm. In order, the following will be built (use -v for more details): - plutus-...
7
votes
1answer
137 views

plutus starter course

So I am trying to start a plutus project from scratch, as we are always just editing the .hs source files in the plutus pioneering program homeworks, wondering what are the bare necessary files needed ...
4
votes
1answer
43 views

Is there any keyword to get the epoch details or stake-pool details in Plutus Smart Contract?

I am trying to write a smart contract where I can get the awards for delegators of a particular stake pool. I need to know if that is right now possible to do using Plutus, if yes, pls suggest me.
7
votes
1answer
92 views

Plutus tutorial similar to Ethereums "CryptoZombies"

Is anyone aware of a similar tutorial as Ethereum's "CryptoZombies" being built for Plutus on Cardano? I'm currently in the Pioneer program, and although we're incredibly lucky to have Lars ...
7
votes
1answer
78 views

Confused by compilation message in plutus playground (week 5 pioneer program)

This is part of my attempt at solving the first homework assignment of week 5 in the plutus pioneer program. The rest of the unmodified file can be found here. {-# INLINABLE mkPolicy #-} -- This ...
3
votes
1answer
78 views

Why does my test of Plutus contract crash?

I tried to equip the EnglishAuction.hs contract from Plutus Pioneer Program week 01 with test routine designed according to what Lars presented in later lectures: doTest :: IO() doTest = ...
4
votes
1answer
46 views

Plutus Pioneer Week02: otherScript validator

In gift.hs, I do not understand the logic for why in the lookups for the grab contract there is Constraints.otherScript validator. The grabber is the consumer of the UTXO and thus the burden of ...
8
votes
3answers
240 views

Plutus Pioneer Program - Lecture #1- Cabal Build error

I started following the lectures on youtube and got this error when I try to build the English Auction Warning: The build command is a part of the legacy v1 style of cabal usage. Please switch to ...