Skip to main content

Questions tagged [plutustx]

The tag has no usage guidance.

2 votes
2 answers
108 views

can't understand which part of the code is not "PlutusTx"

I'm trying to write a very simple NFT minting policy myself and I can't get rid of the following error Program error: GHC Core to PLC plugin: E043:Error: Reference to a name which is not a local, a ...
Michele Nuzzi's user avatar
2 votes
3 answers
236 views

How to get a base 16 hex BuiltinString from getTxId

I am trying to find a way to inspect the base16 hash from a Tx on-chain using plutus. I get a BuiltinByteString from the txInputs here: getTxIdBBS :: TxInInfo -> BuiltinByteString getTxIdBBS txInfo'...
lley154's user avatar
  • 297
1 vote
1 answer
52 views

Difference between `PlutusTx.TH.compile` and `PlutusTx.compile`?

I've been reading the official Plutus docs and saw that in the explanation about Template Haskell, there is information about PlutusTx.TH.compile, to use it for producing the quoted Plutus Core ...
Piotr N.'s user avatar
2 votes
1 answer
131 views

Understand purpose of tx-out-datum-hash in Lars' lobster NFT minting example

When the Alonzo era started on mainnet, Lars deployed a smart contract example, in which he minted a lobster NFT as part of a lobster naming challenge. In the policy script used to mint the lobster ...
Kurt Hartmann's user avatar
3 votes
1 answer
789 views

What are the benefits of using Plutarch?

Is Plutarch a good replacement for Plutus Tx? https://github.com/Plutonomicon/plutarch/blob/master/docs/GUIDE.md
Attilah's user avatar
  • 381
1 vote
1 answer
108 views

Confusion regarding findOwnInput function with on-chain code

Context I was looking for a simple way to get exact TxOut on on-chain code to validate if funds are to be unlocked to correct wallet address. While looking in plutus haddoc I have found this function: ...
KugisMugis's user avatar
1 vote
1 answer
83 views

Cannot compile parameterized mintingPolicy to Plutus

I tried compiling a solution from the examples provided in PPP Iteration #2 but got stuck. Any ideas? Code: https://github.com/ILIYANGERMANOV/cardano-smart-contracts/blob/main/ivy-token/src/MintIvy.hs ...
Iliyan's user avatar
  • 13
0 votes
0 answers
36 views

"No unfolding" error in Visual Studio Code

I copied the Plutus starter template, Plutus Platform starter project, and created a file, BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file). Then I started copying over all the ...
dspyz's user avatar
  • 123
1 vote
1 answer
18 views

How do I run doctests?

I copied the plutus-starter template: https://github.com/input-output-hk/plutus-starter and created a file BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file). Then I started ...
dspyz's user avatar
  • 123
4 votes
1 answer
148 views

How to calculate fees for Plutus Smart Contract?

How can someone calculate fee for executing Plutus smart contract given that they know CPU and Memory Units required for executing Plutus Script?
pyropy's user avatar
  • 641
3 votes
1 answer
164 views

How can I secure a Datum value in a smart contract?

I am trying to figure out how to write a script where you can make sure the datum value doesn't change each time an output gets consumed. For example, in the auction script in the pioneer program each ...
noone392's user avatar
  • 263
3 votes
2 answers
530 views

What exactly is the script context in Plutus context?

I believe the best way to answer this question would be to give examples of the type of information that the script context could contain.
FTM's user avatar
  • 294
1 vote
1 answer
83 views

Is it possible to have an On-chain Set data structure?

As the title of the question says, is it possible for me to use a Set data structure for the Datum and/or Redeemer?
Attilah's user avatar
  • 381
3 votes
1 answer
125 views

Canonical example of Smart Contract Verification?

Given that the chief benefit of Cardano Smart Contracts over Ethereum Smart Contracts is formal verification (and thus its implied validity, security, and robustness), is there a non-trivial example ...
Michael Daconta's user avatar
2 votes
1 answer
300 views

String in Datum

I want to use String or Text in a Datum, like this: import PlutusTx.Prelude newtype MyDatum = MyDatum {userReadableStuff :: BuiltinString} PlutusTx.unstableMakeIsData ''MyDatum but the complier ...
Kwaggy's user avatar
  • 400

15 30 50 per page