All Questions
20 questions
0
votes
1
answer
92
views
Using `curSymbol` function in Validator script
supposed I have a mintingpolicy script (simple one time minting policy, parameterizing TxOutRef) and a validator script. I want to validate if the token with correct CurrencySymbol is spent in a ...
4
votes
1
answer
182
views
Script unlock cannot submit, budget overspent
I'm trying to unlock some token at a script address, so I create a tx with cardano-cli transaction build ... this passes successfully, then I sign the tx. It is now ready for submit but when I submit ...
0
votes
3
answers
116
views
How Can You Prevent A Burn Address From Polluting The Cardano Ledger?
Making a Burn Address on the blockchain is currently done by using a script address with a validator that always returns False and so never validates.
This ties up ADA and causes the size of the ...
0
votes
1
answer
90
views
Limit the number for each Token (AssetName) within one Currency Symbol (Policy ID)
is there any way to limit number for each tokens within one minting policy, in Plutus validator?
For example for policy ab12 I want to allow users minting tokens, in different transactions. Сan the ...
0
votes
1
answer
49
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) (...
13
votes
2
answers
575
views
Where is the on-chain code actually stored?
I've just read something that suggests Validators aren't actually kept on the blockchain. To save the space, only the hash of the Validator is kept at the UTxO and users willing to spend it must ...
1
vote
1
answer
27
views
Do I Need A Contract Monad For a Burn Wallet?
If I make a script address to be a burn address, I end up having a validator that never validates i.e. returns false all the time. Does a Smart Contract that never can validate need an instance of the ...
2
votes
0
answers
41
views
Whats a Good Example of Interconnected Smart Contracts?
In the Contract Monad we have the use of w s e a. Now w is used to connect contracts is there a good example of how this is done, in particular how to validate a contract using the w of another ...
2
votes
1
answer
51
views
How to Make Sure A Contract Is Signed By a Certain Party?
I'm thinking about making a parameterised contract between two users. User A can be anyone i.e. any customer, But User B should always be the company. I want to make it so that the validator only ...
0
votes
1
answer
66
views
How to check if validator ran inside minting policy
I want to check within a minting policy whether a specific spending validator script is being run by checking if I can find an input that belongs to that spending validator's script address.
If there ...
3
votes
1
answer
97
views
Verifiying a digital signature in a Plutus script
Is there a function like signedBy that I can call in a Plutus script to verify a digital signature?
1
vote
1
answer
75
views
How to use plutus script withness in other plutus script
How can we reference the use of other scripts in a plutus validator?. Wat I was trying to making is an validator that only validates if an other predetermined plutus scripts also validates in the same ...
0
votes
2
answers
77
views
How can you use Ledger.Constraints in the Validator?
Hi i have noticed that you can get the unspent UTxOs in an wallet address using the Ledger. Constraints module. I want to know can I use it the same in the mkValidator as in the Endpoints?
The general ...
1
vote
1
answer
63
views
How do I call the amount of ADA sent to a validator script in an Integer
I am trying to create a validator function that only lets the user send ADA to the creator of the script if the user sends x amount of ADA how to I find out the amount of ADA the user sent and then ...
1
vote
0
answers
52
views
How do I use Plutus to check that payment has been made to a native script?
If I want to check that payment has been made to a Plutus script, then I can use the function valueLockedBy txinfo vhash where vhash is the ValidatorHash of the Plutus script. Is there an analogous ...
1
vote
1
answer
116
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
0
answers
90
views
Applycode to untyped validator, template Haskell
I am trying to learn the basics of the PlutusTx module. In this module is a function applyCode which maps the signatures CompiledCodeIn uni fun (a -> b) -> CompiledCodeIn uni fun a -> ...
4
votes
2
answers
136
views
Can we check signatures of arbitrary data in plutus validators?
I am looking for a function with a type like this:
verifySignature :: Datum -> Signature -> PubKey -> Bool
which is also INLINABLE to use it inside validator.
I know that we can check if the ...
3
votes
0
answers
122
views
Is it possible to use a parameterised CurrencySymbol inside another validator script? Unsupported feature: Type constructor: GHC.Prim.ByteArray#
I am having trouble using a parameterised CurrencySymbol inside another validator script. It seems to work (not shown here) when the currency symbol is unparametrised but not otherwise:
GHC Core to ...
0
votes
1
answer
128
views
How to validate the correctness of another parameterized script address on-chain
I would like to write a factory script that can initialize another parameterized script address by sending it an NFT. The factory validator gets the parameters of the target script as redeemer and has ...