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
6 votes
2 answers
752 views

Can blockchain viewers read the source code of a smart contract if they know its address?

I'm curious, is it possible to find the source code of the validation script of a smart contract (as well as other parts) that is already on the blockchain? Or this code automatically picking up into ...
user avatar
  • 195
5 votes
2 answers
273 views

How to convert posixTime to slot number on Cardano Testnet

I'd like to obtain the slot number corresponding to a posixtime on Cardano Testnet. For example, this might be useful if you need to set a slot number in cardano-cli, say building a transaction: ...
user avatar
  • 1,196
16 votes
4 answers
985 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 ...
user avatar
8 votes
5 answers
210 views

Possible DApp infrastructure on Cardano. Interaction with users' wallets

I'm trying to build a possible DApp infrastructure on Cardano in my head. We should write the validation script in Haskell. Also as I understand, it is suggested to use Haskell for the off-chain code ...
user avatar
  • 195
12 votes
2 answers
433 views

What does it mean that a UTxO sits at script address?

What does it mean that a "UTxO sits at a script address". What is a script address?
user avatar
  • 181
1 vote
1 answer
139 views

plutus-playground-client npm start error (MacOs Intel i7)

[Updated] ✖ 「wdm」: ERROR in Error: Child compilation failed: Module not found: Error: Can't resolve '/Users/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client/undefined/...
user avatar
1 vote
1 answer
117 views

Playground client can't connect to playground server (all localhost)

I am on an Intel based iMac Pro running Big Sur (11.6.1) I have followed every variant of the local playground setup I can find (all are some version of page 2 in this document https://docs.google.com/...
user avatar
2 votes
1 answer
118 views

HLS Compiler Error PPP (WSL2 + VSCode)

I'm trying to get HLS (Haskell Language Server) working in VSCode using WSL2 so I can get type hints. I've already ran through the week01 instructions so I have a working nix installation. However, ...
user avatar
2 votes
1 answer
108 views

Why would ">:i " work in the repl but not "> :t "?

Doing week 04, watching "PPP 030403 - The EmulatorTrace Monad" In the repl, having already imported as follows >import Data.Char >import Text.Read >import Plutus.Trace.Emulator >import Data....
user avatar
  • 177
0 votes
1 answer
165 views

plutus-playground-client crashes on Intel Mac (Big Sur)

After setting up environment for cohort 3 of the pioneers program, running the plutus-playground-client crashes on my Intel Mac (Big Sur). I've been able to successfully set up Nix and all the code ...
user avatar
7 votes
3 answers
403 views

Building Plutus-apps on Mac M1

I am in the 3rd pioneers cohort, going through the env setup. I have Mac M1 with Monterey. I installed nix and added config for the caches etc as recommended here: https://github.com/input-output-hk/...
user avatar
  • 101
4 votes
4 answers
481 views

Plutus environment set up: pro and cons

I am starting the Pioneer program by setting up the development environment. There are several ways to do that, I think 4! At the end the two that seems to me more appealing are the one using nix or ...
user avatar
  • 155
2 votes
1 answer
107 views

Working with BuiltinByteString

I tried to create a few modification on the NFT minting contract from week 5 of the plutus pioneer program. I wanted to be able to mint a few tokens at once. My policy should require that the token ...
user avatar
  • 191
2 votes
1 answer
103 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 ...
user avatar
3 votes
2 answers
154 views

Empty TokenName Literal Overloading in Week05 Homework2

This doesn't work mkPolicy oref () ctx = traceIfFalse "UTxO not consumed" hasUTxO && traceIfFalse "wrong amount minted" checkMintedAmount ...
user avatar
  • 125
2 votes
1 answer
50 views

Transaction lifecycle

Working to understand transaction lifecycle. Some understanding of Bitcoin transaction lifecycle perhaps helps here. That is, a transaction is originated from a client request to a node. This node ...
user avatar
  • 183
7 votes
2 answers
133 views

Referencing onchain contract as 3rd party

In solidity and EVM, it is possible to reference external contracts by providing the address and interface to the contract: address ckAddress = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d; ...
user avatar
  • 161
4 votes
3 answers
391 views

nix-shell did not create the server/client directories

I am trying to follow the instructions in https://docs.plutus-community.com/docs/setup/Ubuntu.html The nix-shell command completes without any errors. But, I cannot cd to plutus-plaground-server or ...
user avatar
  • 100
2 votes
1 answer
118 views

Referencing an external plutus script

I would like to understand how one can reference an external plutus script in one transaction. In solidity (for the other script), one can import the contract interface into their script, create an ...
user avatar
  • 21
2 votes
3 answers
97 views

Vim setup of Lars

I was wondering which Vim setup Lars uses in his video, is this perhaps natively available when we use the nix-shell? In lecture two of the third cohort his vim suggests what I guess common used ...
user avatar
  • 896
2 votes
1 answer
247 views

How to lock funds in a smart contract?

What I want to do: Send 25 ADA and lock it all at the script address until 1 of the 2 scenarios happen: 100 ADA is sent by Nov 25th (today is Nov 20th) and all ADA at the script address is sent out ...
user avatar
  • 135
2 votes
3 answers
179 views

Sandbox error when running nix build on macOS

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....
user avatar
1 vote
1 answer
54 views

Compiler Error {-# LANGUAGE DataKinds #-}

I try to compile EnglishAuction.hs code in playground web app and keep on getting compiler error. "[compiler] [E] loadObj "/nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z- persistent-sqlite-lib-...
user avatar
  • 41
1 vote
1 answer
161 views

PPViewHashesDontMatch and UnspendableUTxONoDatumHash error on redeeming funds from week03 example

I am trying to redeem the funds from the smart contract into the second wallet without running cardano-node (following the instructions from here: https://www.youtube.com/watch?v=ABtffZPoUqU&list=...
user avatar
  • 125
1 vote
1 answer
157 views

starting nix-shell on mac "Operation not permitted"

I am building natively on intel Mac. After nix-build finished I run nix-shell and it ends with following error: installing Installing executable cardano-cli in /nix/store/...
user avatar
  • 13
1 vote
1 answer
198 views

Haskell Language Server - linker error: symbol sqlite3_fts3_may_be_corrupt

When I run haskell-language-server in nix-shell in plutus-pioneer-progam i get this error. sqlite3_fts3_may_be_corrupt whilst processing object file /nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-...
user avatar
  • 11
1 vote
1 answer
52 views

Updating counter on the extended UTXO

I would like to be able to update state on the token that is locked in the smart contract address. My assumption was that using below code getLockingDatum :: Maybe LockingDatum getLockingDatum ...
user avatar
0 votes
1 answer
41 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 ...
user avatar
0 votes
1 answer
120 views

macOS Monterey i7, what is the best `nix.conf` file to use?

Does anyone have the recommended nix.conf file to use for macOS Monterey i7? Following a few different tutorials, my current .conf file looks like: build-users-group = nixbld substituters = ...
user avatar
  • 185
0 votes
1 answer
87 views

nix doctor --verbose [FAIL] Multiple versions of nix found in PATH, on MacOS i7

After performing a git commit tag update on plutus-apps, I restarted my computer, and ran nix doctor --verbose and got the following FAIL [FAIL] Multiple versions of nix found in PATH: /nix/...
user avatar
  • 185
0 votes
3 answers
229 views

Error running plutus-playground-client in Linux

I have successfully installed nix, cabal and have setup the IOHK binary cache. I cloned the plutus-app repository and successfully built the Haskell packages and other artifacts with nix. Then running ...
user avatar
  • 188
0 votes
1 answer
73 views

Unable to start /plutus-apps client application

Error is occurring for MacOS 12.1 Monterey. Please, let me know, if I should include additional details. I am going through the step noted in this document in order to setup local Plutus app: https://...
user avatar
0 votes
0 answers
39 views

Failing to start Nix-Shell in Windows Terminal with WSL2

I'm attempting to start a nix-shell from the top of my plutus-apps repository using Zsh on Windows Terminal (I'm running Ubuntu on WSL2). This is what I see when I run nix-shell. Any idea what I ...
user avatar
  • 211