Questions tagged [plutustx]
The plutustx tag has no usage guidance.
40
questions
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 ...
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'...
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 ...
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 ...
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
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:
...
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
...
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 ...
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 ...
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?
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 ...
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.
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?
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 ...
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 ...