Questions tagged [validation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

mustMintValueWithRedeemer - Number of tokens minted

On the Offchain code I am trying to mint a token using the following snippet Constraints.mustMintValueWithRedeemer r (assetClassValue cTk 1) In the validation code of the minting script I am trying ...
  • 13
0 votes
1 answer
29 views

2 Validators for one Transaction

I'm building a use case where a person can buy a token and depending on the amount of ADA spent, he gets X tokens and a Special NFT. Each Validator represent the policy Id of these native tokens I'm ...
0 votes
1 answer
41 views

Opportunity for theft of funds in Martify marketplace

I am some kinda embarrassed by "mkBuyValidator" in Martify Marketplace on-chain code . For buyer there is only one check for token transfer (on line 68): (valueOf (valuePaidTo info sig) (...
  • 35
0 votes
1 answer
53 views

Whether validation checks are necessary

In Plutonomicon github repo it says by the end of the page: For example, you don't need to prevent an unexpected transaction from locking value away - that's the submitter's own problem - but you do ...
  • 35
1 vote
0 answers
9 views

How to Validate A Smart Contract Twice?

I have a smart contract I want to validate at a certain date. Exacute its logic and then revalidate on a second date. The trick is I only want it to be signed once. How do I do this? can I just add ...
0 votes
0 answers
14 views

How to Sign a Smart Contract From a Smart Contract?

I want to run a smart contract (that the user signs) and then wait 10 days and send some ADA from the user's wallet to another address. I can do the waiting with POSXIT Time but if there is not ...
0 votes
0 answers
27 views

Can I forcefully run phase 2 validation in PAB locally?

Transaction validation happens in two phases: https://docs.cardano.org/plutus/transaction-costs-determinism https://iohk.io/en/blog/posts/2021/09/07/no-surprises-transaction-validation-part-2/ https://...
0 votes
1 answer
23 views

Contract is not stopping execution if validation script fails (happened after 2022-04-06 PAB Release)

Before the 2022-04-06 PAB Release Contracts used to stop execution after validation script failed the transaction sent by submitTxConstraintsWith, but after this release Contract is not stopping its ...
  • 111
2 votes
2 answers
180 views

Can temporary forking occur in Cardano's protocol?

In Bitcoin's protocol (and similar PoW systems), at one point chain might temporarily split in two and two different chains will be maintained up until one outpaces the other and proves itself as the ...
  • 23
1 vote
1 answer
100 views

Script Witness Not Validating for Multisig

I'm getting the following error when trying to consume a UTxO sitting in a multisig script address: [ { "scriptWitnessNotValidating": [ "...
2 votes
1 answer
74 views

How to retrieve an addresses transaction history inside a plutus contract

I am trying to implement so logic to ensure smart contract (SC) validation upon certain conditions - which are derived from the end-users transaction history. If I parameterise the SC and take the ...
9 votes
2 answers
169 views

What is where executed and when?

To wrap my around what happens when I where, I tried to visualize it. In order to be able to show the interaction between two different systems generating transactions, I have a Generator A and ...
  • 172
7 votes
1 answer
191 views

on multiple eUTxO and the validation proces

I have an in-depth question that needs good knowledge of the ledger rules. I was thinking about how to program efficiently and design apps such that they are parallelizable, a good practice for ...
  • 1,633
0 votes
0 answers
17 views

Can I defined my own TxConstraints to be validated on-chain?

Can I defined my own validation function which would be used while validating a script transaction on-chain? If so, how to go about it? For example, let's say that the function would check if a given ...
  • 294
0 votes
1 answer
21 views

terminology validation and verification

Is there a strictly defined term for validation and verification or are they interchangeable? Are validations strictly used for transactions e.g. validate a transaction? Is verification strictly used ...
  • 433
1 vote
0 answers
79 views

Is it possible to validate on-chain if two different wallet addresses come from the same person?

My goal is: I would like to create a smart contract which would verify if unlocking transaction comes from the same person as the wallet address which is known before hand. What I have tried: I have ...
1 vote
2 answers
60 views

Why is there no mechanism available to restrict creation of UTXOs at a script address?

It has been told that anyone can create UTXOs at any script address without restrictions since the validator does not run for transaction that do not consume UTXOs. The question is, why so? I think it ...
  • 794
6 votes
2 answers
502 views

When is an eUTXO consumed?

Scenario There are two transactions tx1 and tx2 both trying to consume an arbitrary eUTXo oRef. Both tx1 and tx2 are submitted to the mempool in the same block, and are valid transactions; we can ...
  • 163
3 votes
1 answer
96 views

Can you specify an upper and lower bound for the validity period of a transaction?

I want a transaction to only be valid for a certain period of time relative to some specified start time. I thought that maybe I could use Constraints.mustValidateIn (interval firstInterval $ ...
1 vote
2 answers
113 views

Is there a way for a validator to get the current time?

Is it possible for a validator to get the current time without it being passed in via the redeemer? My validator is heavily dependent on the time being correct so it would probably be a bad design ...
1 vote
2 answers
51 views

StateMachine validation failing

Transition function throws an error. Here it is. transition :: FreelanceContract -> State FContractDatum -> FContractRedeemer -> Maybe (TxConstraints Void Void, State FContractDatum) ...