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
7 votes
3 answers
1k 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 ...
Angelina's user avatar
  • 305
7 votes
2 answers
492 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: ...
kindofdev's user avatar
  • 1,304
16 votes
4 answers
1k 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 ...
Pierre Previsionz's user avatar
12 votes
2 answers
565 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?
thirsty's user avatar
  • 191
8 votes
5 answers
279 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 ...
Angelina's user avatar
  • 305
2 votes
1 answer
110 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....
XiTouch's user avatar
  • 349
2 votes
1 answer
149 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, ...
FrostByte's user avatar
1 vote
1 answer
198 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/...
prodineeritecht's user avatar
1 vote
1 answer
152 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/...
Fanik Fan's user avatar
0 votes
1 answer
186 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 ...
Steve Mason's user avatar
9 votes
1 answer
214 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 ...
Hud's user avatar
  • 433
8 votes
2 answers
163 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; ...
Alan Saw's user avatar
  • 171
7 votes
3 answers
548 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/...
Bronya's user avatar
  • 101
6 votes
4 answers
633 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 ...
Angelo Badellino's user avatar
4 votes
3 answers
445 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 ...
wakathi's user avatar
  • 100
3 votes
1 answer
179 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 ...
Avatar33's user avatar
  • 201
3 votes
1 answer
276 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 ...
Zlac116's user avatar
  • 31
3 votes
2 answers
196 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 ...
Roofi's user avatar
  • 125
3 votes
2 answers
172 views

Starting a new Plutus Project

I've read a few threads on Cardano Stack exchange on how to start a new Plutus project, but there doesn't seem to be a satisfying answer. I've read the following: plutus starter course How to Start a ...
Domy2018's user avatar
2 votes
1 answer
58 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 ...
jerome's user avatar
  • 183
2 votes
3 answers
130 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 ...
Fermat's user avatar
  • 1,862
2 votes
1 answer
449 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 ...
Myles's user avatar
  • 321
2 votes
3 answers
349 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....
Paymahn Moghadasian's user avatar
2 votes
1 answer
150 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 ...
yoyobigmanyo's user avatar
2 votes
2 answers
223 views

/bin/plutus-playground-server: No such file or directory

Can't get plutus-playground-server to start. plutus-playground-server: for development use only /nix/store/601kdlvidgan842yfklrmvpbz6a5xkf7-plutus-playground-server/bin/plutus-playground-server: line ...
ryanaverell's user avatar
1 vote
3 answers
290 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 ...
d_fajardo's user avatar
  • 198
1 vote
1 answer
650 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/...
Jan's user avatar
  • 13
1 vote
1 answer
213 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-...
Johan Wahlqvist's user avatar
1 vote
1 answer
64 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-...
San Kim's user avatar
  • 41
1 vote
1 answer
72 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 ...
CryptoDinoAdamuso's user avatar
1 vote
1 answer
421 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=...
Roofi's user avatar
  • 125
0 votes
1 answer
25 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) ...
Adam's user avatar
  • 343
0 votes
1 answer
223 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 = ...
TheStophe's user avatar
  • 400
0 votes
1 answer
83 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://...
Radoslav Naidenov's user avatar
0 votes
1 answer
60 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 ...
Paymahn Moghadasian's user avatar
0 votes
1 answer
86 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 ...
SIDAN Whatever's user avatar
0 votes
1 answer
280 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/...
TheStophe's user avatar
  • 400