Hot answers tagged

14 votes
Accepted

Plutus Pioneer Program - Lecture #1 Problem with cabal build

It looks like your cabal version is too old. You can make sure you have the right one if you first start a nix-shell at the top-level directory of the plutus-repository, then cd to the code folder of ...
Lars Brünjes's user avatar
6 votes

plutus starter course

I asked Lars the same question in the Q&A, his answer was that your best bet is to copy one of the Plutus Pioneer Program lectures (preferably the last one), remove the unnecessary modules and ...
Mateus's user avatar
  • 978
6 votes
Accepted

Cardano DB Sync as Service (running on background) on Ubuntu

Why are you running cardano-db-sync with cabal? You should just run cardano-db-sync or cardano-db-sync-extended. And another question, more important: why are you running the service as root? This is ...
George - APEX Stake Pool's user avatar
5 votes

How to get intellisense/auto suggestion working for Plutus in VSCode?

Simply install the Haskell extension from inside Visual Studio Code. You'll get there by pressing Ctrl+Shift+X and searching for Haskell. Note that the extension requires a ghc installation (=<8.10....
thebrandre's user avatar
5 votes

How to properly start a new Plutus project, from scratch

A well formatted question deserves a well formatted answer! I will go into some depths, but also keep some things at a “magical” level. This is a long read so take your time! Before we start, it is ...
Fermat's user avatar
  • 1,862
4 votes

Plutus Pioneer Program - Lecture #1- Cabal Build error

I had a similar issue and solved it by running nix-shell in the plutus library, then navigating to the plutus-pioneer/code/week01 and running cabal update. I hope this helps!
Isaac Padberg's user avatar
4 votes

How can I set up my dev environment faster after pulling the pioneer code repos for each week

My weekly setup steps are similar to yours. But there's a few steps you do that I skip and, so far, haven't had any issues. I've never ran any of these: nix-build -A plutus-playground.client nix-build ...
Travis's user avatar
  • 520
4 votes
Accepted

Incorrect Pub Key from Wallet Emulator

mockWalletPaymentPubKey gives you the public key for a wallet. For Vesting.hs, you need to use the public key hash. Try mockWalletPaymentPubKeyHash $ knownWallet 1 instead.
Travis's user avatar
  • 520
4 votes

How to properly start a new Plutus project, from scratch

Since this question was posted Plutus-alternatives have been developed by the community that allow doing DApp development in JavaScript only. One such library is https://github.com/hyperion-bt/Helios ...
Christian Schmitz's user avatar
3 votes
Accepted

What is the difference between "cabal build" and "cabal repl"?

In our context of smart contracts, cabal build builds the executables needed for doing cabal run, which we use to build the Plutus validator. cabal repl, in the other hand loads all the modules that ...
Barros's user avatar
  • 56
3 votes
Accepted

missing node.socket

At this stage, it is normal that your node.socket does not yet exist because your launch has not passed the step IPSubscriptionTarget {ispIps = [], ispValency = 0}. It usually happens because your ...
baocontact's user avatar
3 votes
Accepted

What is a library stanza?

I recommend you this article: https://vrom911.github.io/blog/common-stanzas Take into account that stanzas is a cabal thing (not Haskell, not Plutus). However Plutus projects can be created using ...
kindofdev's user avatar
  • 1,304
3 votes
Accepted

Week 4 issue with Cabal build: Not in scope: type constructor or class 'JWT.EncodeSigner'

Be sure to do a git pull for both 'plutus-master' and 'plutus-pioneer-program'. Then set the right git-checkout tag (of the week's cabal project file) Restart nix-shell so it builds the 'plutus-master'...
DJ92's user avatar
  • 46
2 votes

Parse error on input ']' when running cabal build in my Plutus code

{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE ...
glneto's user avatar
  • 206
2 votes

cabal build Out of Memory Mac VS Code Docker

You will not be able to build this in less than 8G of RAM. Adding swap to make the total memory at least 8G may help.
Erik de Castro Lopo's user avatar
2 votes

cabal: Could not resolve dependencies:plutus-core:happy:exe.happy

The line Falling back to older state () means you probably need to run cabal update first (which downloads a copy of the current hackage index state).
Erik de Castro Lopo's user avatar
2 votes

How can I set up my dev environment faster after pulling the pioneer code repos for each week

You can create command aliases or write bash scripts to automate certain commands. An example of aliases I've written for myself (in Linux): alias plutus-nix='cd /home/datapool/plutus-apps; GC_DONT_GC=...
d_fajardo's user avatar
  • 198
2 votes
Accepted

Cardano DB Sync - RTS Options

RTS opts are disabled by default in the db-sync build. To enable it add -rtsopts after -with-rtsopts=-N3 for the cardano-db-sync executable in the file cardano-db-sync/cardano-db-sync.cabal.
Erik de Castro Lopo's user avatar
2 votes

Cabal repl fails because of missing dependency lzma

Two weeks just to realize I hand't followed instructions properly. To be completely fair, it's hard to find documentation that links setting up the plutus playground with the plutus pioneer program, ...
mayanhavoc's user avatar
2 votes

cabal: Failed to build digest-0.0.1.3

The cause of the problem is right there in the error message cabal-3.6.2.0: Missing dependency on a foreign library: * Missing (or bad) header file: zlib.h * Missing (or bad) C library: z I have ...
Erik de Castro Lopo's user avatar
2 votes

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

Take a look at this example: (https://github.com/Apexaverse-metaverse/P2E/blob/main/scripts/mint-token-cli.sh#L22), is a bit clunky but it works: Using cabal repl. I call writePolicyFile function from ...
Walker Leite's user avatar
2 votes
Accepted

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

Another way is to use a separate Utils.hs file (remember add it in your your-app.cabal file for config) for utility fucntions, example: dataToScriptData :: Data -> ScriptData dataToScriptData (...
SIDAN Whatever's user avatar
2 votes

Error - Building Cardano Node 1.35.4 in Ubuntu Linux 22.04

I think between CHaP movements and upstream updates the build process has started failing for 1.35.4, they've been fixed since on master branch. But for visibility of those using 1.35.4 to build: ...
RdLrT's user avatar
  • 1,577
2 votes
Accepted

Error when trying to build my Plutus project

You are missing libsodium : [__0] rejecting: cardano-crypto-class-2.0.0 (conflict: pkg-config package libsodium-any, not found in the pkg-config database) The way I get around this is sudo apt ...
Erik de Castro Lopo's user avatar
2 votes

Failed to build cardano-crypto-wrapper

This is due to use of old forked libsodium dependency. Follow the updated install guide to ensure yourLD_LIBRARY_PATH env var points to the correct build. If you're using nix, then unset ...
james's user avatar
  • 1,505
2 votes

Cabal - could not resolve dependencies error

Someone mentioned something to me on the Cardano discord that I needed my cabal.project file. I guess for some reason using cabal init doesn't put it in there? Anyway, after I put that file in there ...
mrsargent's user avatar
  • 121
1 vote

Trouble fulfilling: base, libsystemd-journal, lobemo-scribe-systemd

I received this error when running nix-shell from the plutus repository. To fix I exited that nix-shell, navigated to plutus-apps repository, and checked out the appropriate hash from the cabal....
user2757738's user avatar
1 vote
Accepted

Running week01 expressions in repl

It was newbie mistake. There are these lines at the top {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ...
Roofi's user avatar
  • 125
1 vote

Running week01 expressions in repl

Somewhere you have a typo. "ByString" should be "ByteString".
Erik de Castro Lopo's user avatar
1 vote

Error on cabal build - Encounterd missing dependesies

Check and make sure that your version of the repo has the correct commit-id.
simon's user avatar
  • 130

Only top scored, non community-wiki answers of a minimum length are eligible