8
votes
Accepted
Why not just simply use Haskell instead of Plutus?
There are many reasons. For example:
You need tooling for the communication between the on-chain and the off-chain code and many other tasks.
You need tooling that generates code where the on-chain ...
8
votes
Accepted
Chain Indexers with Stream Endpoints
Hi there (Kupo's maintainer here)!
Given the use case you're describing, Scrolls seems the most suited solution at present -- especially because this is exactly the direction Scrolls is moving into.
...
5
votes
Accepted
How To Convert Old Plutus Scripts to Vasil Reference Scripts?
The existing V1 Plutus script just needs to be recompiled and serialised as V2. See this example of a minting policy serialised as both V1 and V2 for guidance, https://github.com/james-iohk/plutus-...
5
votes
Committing a database to the ledger without storing it on the ledger?
You can use Merkle tree's for this! This is an inverted tree like data structure that uses hashes to create a root hash that is uniquely defined by its leafs, the leafs are the nodes in the lowest ...
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 ...
4
votes
Accepted
What is this Pop Up Screen on Cardano Documentation?
What is this screen?
that window comes by default with the haddock documentation
I think it should work as a quick "go-to" however for PlutusTx the links do never work (at least to my ...
4
votes
Accepted
Is function "isPayToScriptOut" unsafe?
Your deductions are partially correct. isPayToScriptOut looks at the credentials of an address (1) and return true if it is a script address, false if it is a public key credential. It thus does not ...
4
votes
Accepted
Plutus V2 Tx Building causing NonOutputSupplimentaryDatums error
I don't use cardano-serialization-lib but I can tell you that NonOutputSupplimentaryDatums is the ledger error thrown when datum is unneceserilly included in the tx when using inline datum. When ...
4
votes
How do users interact with smart contract?
You can use cardano serialization lib to write a webapp using react and CSL to build transactions for your vesting contract, like those actions for vesting funds or retrieving funds. These transaction ...
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
...
4
votes
Accepted
Can a smart contract execute itself automatically?
On Cardano the answer is simple: smart contracts cannot execute themselves automatically. Rather, a smart contract is nothing but a set of rules associated with an address. In a first transaction, Ada ...
3
votes
Accepted
How To Get Transaction Royalityies on Fungable Tokens
This is not possible. Native Tokens are first class citizens on Cardano. They are not part of a smart contract that could enforce behavior like this but are assets in your wallet like ADA.
It's the ...
3
votes
Accepted
How to hardcode smart contract address in minting policy in Plutus?
If it does not match, it means your off-chain code is using a different address than what you expect on-chain.
An address is comprised of two parts, the payment and the staking part. You seem to be ...
3
votes
Calculate tx fees via Blockfrost or any other provider?
Transaction fees are computed based on two factors: size of the transactions, and required resources (memory and CPU steps).
As Melroy van den Berg mentioned, transaction size increases the fee ...
3
votes
Accepted
Is there an equivalent of Bitcoin Script Opcodes or the EVM instruction set in Cardano
Yes, there is a lower level code that is used onchain, it is called Untyped Plutus Core (UPLC)! When validators are written in template haskell, they get compiled via
1) GHC: Haskell -> GHC Core
2) ...
3
votes
Accepted
Cannot find wrapMintingPolicy after updating to latest release of plutus-apps
You could try to replace Scripts.wrapMintingPolicy with Scripts.mkUntypedMintingPolicy
...
import Plutus.Script.Utils.V1.Typed.Scripts qualified as Scripts
...
$$(PlutusTx.compile
[|| \ ...
3
votes
Accepted
Is pure ADA put in a script address locked up forever?
You tADA is locked forever. Luckily it is tADA, not real ADA. The preview network will be re-created in a few week anyway (after preprod, which will be reset on October 19th 2022).
3
votes
Accepted
Custom currency error: Cannot build the initial state: Tag "toCardanoPolicyId"
ff is not a valid PolicyId (aka CurrencySymbol). It must be 28 bytes.
For examples, see this answer on this similar Github issue https://github.com/input-output-hk/plutus-apps/issues/732#issuecomment-...
3
votes
How to deploy the Plutus smart contract
There are two steps you need to follow in order to create a dApp on Cardano.
Create the script itself - the on-chain code
Create the transaction which will make use of that script, ideally make it ...
3
votes
Accepted
Overuse of resources when comparing for equality of VALUES (==)
Copying my answer from the Github issue here as well:
We have hit the same issue lately. It is due to how the == function in the Eq Value instance is implemented.
A value is logically a Map ...
3
votes
Accepted
How can I access Haddock documentation for Plutus?
The playground has been discontinued. Haddock can now be accessed at https://input-output-hk.github.io/plutus/master
3
votes
Which would be the future language for writing smart-contract?
PlutusTx inherits its qualities from Haskell, and thus has many of the same benefits/drawbacks:
Pros: auditability, maintainability, and upgradeability of code.
Cons: developers' unfamiliarity with ...
3
votes
Can a smart contract execute itself automatically?
To complement Jey's answer and respond to your last question, I don't think that smart contracts can execute automatically as they are just code that is sitting at an address and they need an actual ...
2
votes
Accepted
How do Endpoints work?
In Plutus apps, the mechanism for requesting inputs is called "endpoints".
All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of ...
2
votes
How can I secure a Datum value in a smart contract?
There are multiple ways to do that.
Option 1:
If you have "script-wide" constants, like your mentioned example of an auction house fee, I suggest parameterizing your contract like it is done ...
2
votes
Convert Plutus Address Credential to real-net address
Check here please:
https://cardano.stackexchange.com/a/8808/6196
I answered a similar question in a different post
2
votes
Structure of the Address type from Plutus.V1.Ledger.Address
The sriptAddress is in Base16 (aka Hexadecimal)
You need to do a few things to it to transform into an address:
Add "70" to the front for Testnet, or "71" for Mainnet
The Header ...
2
votes
ZeroKnowledge Proofs in Plutus?
Yes, Plutus makes it possible to validate zero knowledge proofs as it is a Turing-complete language. However, verifying zero knowledge proofs can be very complex, and go over the execution budget. To ...
2
votes
Accepted
Referencing (U)TxO's
The referencing of UTxO is decribed in the CIP 31 (1). There it is stated that
Referencing an output still requires the output to be presented as
part of the transaction and be unspent, so ...
2
votes
How do I test my smart-contract on Cardano
I find that using the plutus PAB simulator is the best way to first test out your smart contract. Once you confirm the smart contract logic is correct, you then move on to a local dev environment ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plutus × 640plutus-pioneer-program × 175
smart-contract × 143
haskell × 56
plutus-playground × 55
cardano-cli × 45
transaction × 37
nft × 36
plutustx × 32
cabal × 29
minting × 27
on-chain × 27
plutus-pab × 25
script × 24
pab × 23
validator × 21
wallet × 19
nix × 19
plutus-starter × 19
cardano-node × 18
datum × 17
nix-shell × 14
script-addresses × 12
offchain × 12
testnet × 11