6 votes
Accepted

Where is the on-chain code actually stored?

As stated by Samuel, the code that a validator runs to check whether a transaction is valid is sent and stored in the transaction body as an input. So all scripts, be they Plutus or Native scripts, ...
user avatar
  • 1,181
6 votes
Accepted

What's the difference between programmable validators and smart contracts?

You are asking a few questions here, so I'll try my best to point you in the right direction. I feel like KtorZ did a great job explaining it, but it doesn't hurt to put it into different words. ...
user avatar
4 votes
Accepted

Are transaction witnesses stored on the blockchain?

A witness is the public key of the signer and the signature of the txbody using that public key. That is attached to the submitted transaction. It is not possible to query witnesses from db-sync at ...
user avatar
3 votes
Accepted

Can I Use TraceIfFalse in deployment?

it strictly depends on your needs and how your validator is supposed to work. traces in general (trace, traceIfFalse, traceIfTrue, traceError) are known to be one of the causes of larger scripts. so ...
user avatar
  • 587
3 votes
Accepted

Can we check signatures of arbitrary data in plutus validators?

I think PlutusTx.Builtins has what you need: {-# INLINABLE verifySignature #-} -- | Verify that the signature is a signature of the message by the public key. verifySignature :: BuiltinByteString ->...
user avatar
  • 1,356
2 votes
Accepted

Confusion regarding findOwnInput function with on-chain code

Calling findOwnInput in a validator returns the value contained in the Script-UTxO that is currently being validated. In your example above it is the one with 2 Ada in it. Your example above is, ...
user avatar
  • 1,356
2 votes
Accepted

How to Make Sure A Contract Is Signed By a Certain Party?

So, at a high level, you can't make any restrictions on who can create a script, or submit datums to a script address. You can only put restrictions on who can "spend" datum utxos at the ...
user avatar
2 votes

Rising trend in blocks missing: what could be the reason? Should we worry?

I can give you my opinion on the argument, but please note that I'm not assuming to have enough data to give you 100% guarantee mine are the reasons this is appening. I will focus more on your first ...
user avatar
  • 587
2 votes

Can we check signatures of arbitrary data in plutus validators?

There is also an oracle for signature verification here
user avatar
2 votes
Accepted

How to have a contract on chain for extended periods of time?

Just a guess, but you might be referring to the POSIX time <-> slot conversion, where Lars noted in week 3 (see notes here), that - if you require a definite upper bound for a slot interval - ...
user avatar
  • 1,254
1 vote

Do I Need A Contract Monad For a Burn Wallet?

to help clarify, a plutus smart contract does not need a contract monad. A contract monad is used by the plutus PAB to create a client side contract that helps prepare and submits the plutus script ...
user avatar
  • 211
1 vote
Accepted

How to use plutus script withness in other plutus script

I just had to sleep a night on it. Obviously one can look at the incoming addresses and lookup the validatorhash in the credentials there. For example use filter (\x -> (ScriptCredential . ...
user avatar
  • 1,181
1 vote

How can you use Ledger.Constraints in the Validator?

In short: no. Validator has three arguments: datum, from the utxo considered redemeer, supplied in the tx script context, which is a collection of data about the tx. Nothing else. Any information ...
user avatar
  • 353
1 vote
Accepted

Validator function in UTxO vs eUTxO model

In the UTxO model, we ARE passing the value into the validation, an output is compromised of both that and the redeemer (witness). The paper just fails to mention that. I believe that is because the ...
user avatar
  • 50
1 vote

How do I call the amount of ADA sent to a validator script in an Integer

You can not disallow users to send ADA into your smartcontract script address. You can only deny unlocking. However you can check how much of value is being sent with outgoing transaction from txOut ...
user avatar
1 vote

Verifiying a digital signature in a Plutus script

You can use this function to verify signature from a validator
user avatar
1 vote
Accepted

How to validate the correctness of another parameterized script address on-chain

You are asking a couple different questions here. This loads in cabal repl without problems. But when executing the EmulatorTrace, it yields the following error: *** Exception: Error: Unsupported ...
user avatar
1 vote

Where is the on-chain code actually stored?

Auxiliary scripts are an attribute in the txbody that can have the validator script in it if it's small enough. You could also have metadata that links your users to the script off-chain.
user avatar

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